InvenTree
App · 17 actions
Keep stock right in InvenTree from workflows: look up parts and their stock, add parts, add, remove, count and move stock, make purchase orders and receive them, and make and ship sales orders. Start a workflow when a part drops below its minimum stock, or a sales or purchase order is added.
Actions
| Action | What it does |
|---|---|
| Add line to purchase order | Add a part to a purchase order that isn't complete or cancelled. |
| Add stock | Add stock of a part at a location, such as after a delivery or a production run. |
| Count stock | Record a stock count: set how many of a part are at a location, as a stocktake. |
| Create part | Add a part, with its minimum stock and any stock on hand. |
| Create purchase order | Make a purchase order to a supplier with its lines, pending or placed. |
| Create sales order | Make a sales order for a customer with its lines, pending or issued. |
| Find companies | Find suppliers, customers and manufacturers by words in their name. |
| Find parts | Find parts by words in their name, IPN or description, or only those below their minimum stock, with how many are in stock. |
| Find purchase orders | Find purchase orders by status, supplier or reference, newest first. |
| Find sales orders | Find sales orders by status, customer or reference, newest first. |
| Find stock items | List the stock items in stock: of a part, at a location, or matching words, with how many each holds. |
| Get part | Look up a part by IPN, ID, name or barcode: its stock total, minimum, how many are on order, where it's kept and who sells it. |
| List locations | List the stock locations, by path, with how many stock items each holds. |
| Receive purchase order | Book what arrived on a purchase order into stock: everything still to come, or some of one part. |
| Remove stock | Take stock of a part out, such as when it's used or sold elsewhere. |
| Ship sales order | Send a sales order: take what's left to ship out of stock (oldest first), ship it with its tracking number, and mark the order shipped. |
| Transfer stock | Move stock of a part to another location. |
Add line to purchase order
Add a part to a purchase order that isn't complete or cancelled.
Inputs
- Purchase order
ordertextRequired - The order's reference (such as PO-0001), ID or link.
- Part
parttextRequired - The part: picked, or its IPN, ID, exact name or barcode.
- Quantity
quantitynumberRequired - How many.At least 0.
- Unit price
unit_pricenumber - The price of one.At least 0.
- Supplier SKU
skutext - The supplier's SKU. Leave blank for the one InvenTree has.
- Notes
notestext - A note on the line.
Outputs
complete_datetext- The day it was completed; blank if not
completed_linesnumber- How many lines are done
createdtext- The day it was made (YYYY-MM-DD)
currencytext- Its currency, such as USD
descriptiontext- Its description
idnumber- The order's ID, for other InvenTree steps
issue_datetext- The day it was placed or issued; blank while pending
lineobject- The line just added
line_countnumber- How many lines it has
lineslist- Its lines, in order
linktext- A link to it in InvenTree
referencetext- Its reference, such as PO-0001
statustext- pending, placed, on_hold, complete, cancelled, lost or returned
suppliertext- The supplier's name
supplier_idnumber- The supplier's company ID
supplier_referencetext- The supplier's own reference for it
target_datetext- The day it's due; blank if none
totalnumber- Its total price
Example output
{
"complete_date": "",
"completed_lines": 0,
"created": "2026-11-06",
"currency": "USD",
"description": "Restock screws",
"id": 3,
"issue_date": "2026-11-06",
"line": {
"id": 4,
"ipn": "M3-10",
"part": "M3 screw 10mm",
"part_id": 2,
"quantity": 500.0,
"received": 0.0,
"sku": "BN-M3-10",
"unit_price": 0.02
},
"line_count": 1,
"lines": [
{
"id": 4,
"ipn": "M3-10",
"part": "M3 screw 10mm",
"part_id": 2,
"quantity": 500.0,
"received": 0.0,
"sku": "BN-M3-10",
"unit_price": 0.02
}
],
"link": "https://inventree.example.com/web/purchasing/purchase-order/3",
"reference": "PO-0003",
"status": "placed",
"supplier": "Bolt & Nut Co",
"supplier_id": 2,
"supplier_reference": "",
"target_date": "",
"total": 10.0
}Add stock
Add stock of a part at a location, such as after a delivery or a production run. It joins the part's stock already there.
Inputs
- Part
parttext - The part: picked, or its IPN, ID, exact name or barcode. Leave blank when you give a stock item.
- Quantity
quantitynumberRequired - How many to add.At least 0.
- Location
locationtext - Where it goes. Leave blank for the part's default location.
- Stock item
stock_itemtext - One stock item's ID or barcode, instead of a part, to change that item only.
- Batch
batchtext - The batch code, kept apart from other batches.
- Notes
notestext - Why, kept in the stock item's history.
Outputs
below_minimumtrue/false- Whether the part is now below its minimum
in_stocknumber- How many of the part are in stock now, everywhere
ipntext- The part's IPN
itemslist- The stock items changed, as they are now (0 for an item emptied and removed)
linktext- A link to the part in InvenTree
locationtext- That location's path
location_idnumber- The location it happened at; 0 if not one place
minimum_stocknumber- The part's minimum stock; 0 if none
parttext- The part's name
part_idnumber- The part's ID
quantitynumber- How many were added, removed, counted or moved
Example output
{
"below_minimum": false,
"in_stock": 200.0,
"ipn": "M3-10",
"items": [
{
"id": 5,
"location": "Warehouse/Shelf B",
"quantity": 200.0
}
],
"link": "https://inventree.example.com/web/part/2",
"location": "Warehouse/Shelf B",
"location_id": 3,
"minimum_stock": 200.0,
"part": "M3 screw 10mm",
"part_id": 2,
"quantity": 50.0
}Count stock
Record a stock count: set how many of a part are at a location, as a stocktake.
Inputs
- Part
parttext - The part: picked, or its IPN, ID, exact name or barcode. Leave blank when you give a stock item.
- Counted
quantitynumberRequired - How many were counted.At least 0.
- Location
locationtext - Where it was counted. Leave blank for the part's default location, or its only one.
- Stock item
stock_itemtext - One stock item's ID or barcode, instead of a part, to change that item only.
- Notes
notestext - Why, kept in the stock item's history.
Outputs
below_minimumtrue/false- Whether the part is now below its minimum
in_stocknumber- How many of the part are in stock now, everywhere
ipntext- The part's IPN
itemslist- The stock items changed, as they are now (0 for an item emptied and removed)
linktext- A link to the part in InvenTree
locationtext- That location's path
location_idnumber- The location it happened at; 0 if not one place
minimum_stocknumber- The part's minimum stock; 0 if none
parttext- The part's name
part_idnumber- The part's ID
quantitynumber- How many were added, removed, counted or moved
Example output
{
"below_minimum": false,
"in_stock": 200.0,
"ipn": "M3-10",
"items": [
{
"id": 5,
"location": "Warehouse/Shelf B",
"quantity": 200.0
}
],
"link": "https://inventree.example.com/web/part/2",
"location": "Warehouse/Shelf B",
"location_id": 3,
"minimum_stock": 200.0,
"part": "M3 screw 10mm",
"part_id": 2,
"quantity": 50.0
}Create part
Add a part, with its minimum stock and any stock on hand. If a part already has the IPN, it's returned instead, unchanged.
Inputs
- Name
nametextRequired - The part's name.
- Category
categorytext - Its category.
- IPN
ipntext - Its internal part number, such as M3-10. A part with this IPN already there is returned instead.
- Description
descriptiontext - What it is.
- Units
unitstext - Its units, such as m or kg. Leave blank for pieces.
- Minimum stock
minimum_stocknumber - The least you want in stock. Below it, the part shows as low stock.At least 0.
- Default location
default_locationtext - Where it's normally kept.
- Purchaseable
purchaseabletrue/false - It's bought from suppliers.Default:
true. - Salable
salabletrue/false - It's sold to customers.Default:
false. - Component
componenttrue/false - It's used to build other parts.Default:
true. - Assembly
assemblytrue/false - It's built from other parts.Default:
false. - Stock on hand
initial_quantitynumber - How many you have now, added as its first stock.At least 0.
- Stock location
initial_locationtext - Where the stock on hand is. Leave blank for the default location.
Outputs
activetrue/false- Whether it's active
allocatednumber- How many are set aside for sales orders and builds
assemblytrue/false- Whether it's built from other parts
availablenumber- How many are in stock and not set aside for orders or builds
below_minimumtrue/false- Whether stock is below its minimum
categorytext- Its category's name
category_idnumber- Its category's ID; 0 if none
componenttrue/false- Whether it's used to build other parts
createdtrue/false- False when a part with that IPN was already there
created_ontext- The day it was added (YYYY-MM-DD)
descriptiontext- Its description
idnumber- The part's ID, for other InvenTree steps
in_stocknumber- How many are in stock, everywhere
ipntext- Its internal part number (IPN)
linktext- A link to it in InvenTree
minimum_stocknumber- The minimum it should have in stock; 0 if none is set
nametext- Its name
on_ordernumber- How many are on open purchase orders
purchaseabletrue/false- Whether it can be bought from suppliers
salabletrue/false- Whether it can be sold to customers
shortfallnumber- How many short of its minimum it is; 0 if not short
unitstext- Its units of measure, such as m or kg; blank for pieces
Example output
{
"active": true,
"allocated": 0.0,
"assembly": false,
"available": 150.0,
"below_minimum": true,
"category": "Fasteners",
"category_id": 4,
"component": true,
"created": true,
"created_on": "2026-11-06",
"description": "M3 x 10 mm pan head screw",
"id": 2,
"in_stock": 150.0,
"ipn": "M3-10",
"link": "https://inventree.example.com/web/part/2",
"minimum_stock": 200.0,
"name": "M3 screw 10mm",
"on_order": 0.0,
"purchaseable": true,
"salable": false,
"shortfall": 50.0,
"units": ""
}Create purchase order
Make a purchase order to a supplier with its lines, pending or placed.
Inputs
- Supplier
suppliertextRequired - Who it's to: picked, or their ID, exact name or email address.
- Lines
lineslistRequired - One row per part: the part and how many, with a price and the supplier's SKU if you have them.
- Place order
place_ordertrue/false - Place it straight away. Otherwise it stays pending, to check in InvenTree.Default:
false. - Supplier reference
supplier_referencetext - The supplier's reference, such as their quote number.
- Description
descriptiontext - What it's for.
- Target date
target_datedate - When it's due.
- Destination
destinationtext - Where the stock goes when it arrives.
Outputs
complete_datetext- The day it was completed; blank if not
completed_linesnumber- How many lines are done
createdtext- The day it was made (YYYY-MM-DD)
currencytext- Its currency, such as USD
descriptiontext- Its description
idnumber- The order's ID, for other InvenTree steps
issue_datetext- The day it was placed or issued; blank while pending
line_countnumber- How many lines it has
lineslist- Its lines, in order
linktext- A link to it in InvenTree
referencetext- Its reference, such as PO-0001
statustext- pending, placed, on_hold, complete, cancelled, lost or returned
suppliertext- The supplier's name
supplier_idnumber- The supplier's company ID
supplier_referencetext- The supplier's own reference for it
target_datetext- The day it's due; blank if none
totalnumber- Its total price
Example output
{
"complete_date": "",
"completed_lines": 0,
"created": "2026-11-06",
"currency": "USD",
"description": "Restock screws",
"id": 3,
"issue_date": "2026-11-06",
"line_count": 1,
"lines": [
{
"id": 4,
"ipn": "M3-10",
"part": "M3 screw 10mm",
"part_id": 2,
"quantity": 500.0,
"received": 0.0,
"sku": "BN-M3-10",
"unit_price": 0.02
}
],
"link": "https://inventree.example.com/web/purchasing/purchase-order/3",
"reference": "PO-0003",
"status": "placed",
"supplier": "Bolt & Nut Co",
"supplier_id": 2,
"supplier_reference": "",
"target_date": "",
"total": 10.0
}Create sales order
Make a sales order for a customer with its lines, pending or issued.
Inputs
- Customer
customertextRequired - Who it's for: picked, or their ID, exact name or email address.
- Lines
lineslistRequired - One row per part: the part and how many, with a price if you have one.
- Issue order
issuetrue/false - Issue it straight away, ready to ship. Otherwise it stays pending.Default:
false. - Customer reference
customer_referencetext - The customer's own reference, such as their order number.
- Description
descriptiontext - What it's for.
- Target date
target_datedate - When it's due.
Outputs
completed_linesnumber- How many lines are done
createdtext- The day it was made (YYYY-MM-DD)
currencytext- Its currency, such as USD
customertext- The customer's name
customer_idnumber- The customer's company ID
customer_referencetext- The customer's own reference, such as their PO number
descriptiontext- Its description
idnumber- The order's ID, for other InvenTree steps
issue_datetext- The day it was placed or issued; blank while pending
line_countnumber- How many lines it has
lineslist- Its lines, in order
linktext- A link to it in InvenTree
referencetext- Its reference, such as SO-0001
shipment_datetext- The day it was shipped; blank if not
statustext- pending, in_progress, shipped, on_hold, complete, cancelled, lost or returned
target_datetext- The day it's due; blank if none
totalnumber- Its total price
Example output
{
"completed_lines": 0,
"created": "2026-11-06",
"currency": "USD",
"customer": "Acme Robotics",
"customer_id": 3,
"customer_reference": "ACME-PO-881",
"description": "",
"id": 4,
"issue_date": "",
"line_count": 1,
"lines": [
{
"allocated": 0.0,
"id": 7,
"ipn": "ARD-UNO",
"part": "Arduino Uno R3",
"part_id": 3,
"quantity": 2.0,
"shipped": 0.0,
"unit_price": 27.5
}
],
"link": "https://inventree.example.com/web/sales/sales-order/4",
"reference": "SO-0004",
"shipment_date": "",
"status": "pending",
"target_date": "2026-11-20",
"total": 55.0
}Find companies
Find suppliers, customers and manufacturers by words in their name.
Inputs
- Search
searchtext - Words in the name, description or website.
- Type
typetext - Which companies.One of:
any,suppliers,customers,manufacturers. Default:any. - How many
limitnumber - The most to list. Defaults to 25.From 1 to 100.
Outputs
companieslist- The companies, by name
countnumber- How many are listed
totalnumber- How many match in all
Example output
{
"companies": [
{
"active": true,
"currency": "USD",
"description": "Electronics supplier",
"email": "orders@northwind.example.com",
"id": 1,
"is_customer": false,
"is_manufacturer": false,
"is_supplier": true,
"link": "https://inventree.example.com/web/company/1",
"name": "Northwind Components",
"phone": "",
"website": ""
}
],
"count": 1,
"total": 1
}Find parts
Find parts by words in their name, IPN or description, or only those below their minimum stock, with how many are in stock.
Inputs
- Search
searchtext - Words in the name, IPN or description.
- Category
categorytext - Only parts in this category or the ones inside it.
- Only below minimum
below_minimum_onlytrue/false - Only parts with less in stock than their minimum, to reorder.Default:
false. - Include inactive
include_inactivetrue/false - Include parts marked inactive.Default:
false. - How many
limitnumber - The most to list. Defaults to 25.From 1 to 100.
Outputs
countnumber- How many are listed
partslist- The parts found, by name
totalnumber- How many match in all
Example output
{
"count": 1,
"parts": [
{
"active": true,
"allocated": 0.0,
"assembly": false,
"available": 150.0,
"below_minimum": true,
"category": "Fasteners",
"category_id": 4,
"component": true,
"created_on": "2026-11-06",
"description": "M3 x 10 mm pan head screw",
"id": 2,
"in_stock": 150.0,
"ipn": "M3-10",
"link": "https://inventree.example.com/web/part/2",
"minimum_stock": 200.0,
"name": "M3 screw 10mm",
"on_order": 0.0,
"purchaseable": true,
"salable": false,
"shortfall": 50.0,
"units": ""
}
],
"total": 1
}Find purchase orders
Find purchase orders by status, supplier or reference, newest first.
Inputs
- Status
statustext - Which orders.One of:
any,open(Open (not yet done)),pending,placed,on_hold(On hold),complete,cancelled,lost,returned. Default:any. - Supplier
suppliertext - Only this supplier's orders.
- Search
searchtext - Words in the reference, description or other reference.
- How many
limitnumber - The most to list. Defaults to 25.From 1 to 100.
Outputs
countnumber- How many are listed
purchase_orderslist- The purchase orders found, newest first
totalnumber- How many match in all
Example output
{
"count": 1,
"purchase_orders": [
{
"complete_date": "",
"completed_lines": 0,
"created": "2026-11-06",
"currency": "USD",
"description": "Restock screws",
"id": 3,
"issue_date": "2026-11-06",
"line_count": 1,
"link": "https://inventree.example.com/web/purchasing/purchase-order/3",
"reference": "PO-0003",
"status": "placed",
"supplier": "Bolt & Nut Co",
"supplier_id": 2,
"supplier_reference": "",
"target_date": "",
"total": 10.0
}
],
"total": 1
}Find sales orders
Find sales orders by status, customer or reference, newest first.
Inputs
- Status
statustext - Which orders.One of:
any,open(Open (not yet done)),pending,in_progress(In progress),shipped,on_hold(On hold),complete,cancelled,lost,returned. Default:any. - Customer
customertext - Only this customer's orders.
- Search
searchtext - Words in the reference, description or other reference.
- How many
limitnumber - The most to list. Defaults to 25.From 1 to 100.
Outputs
countnumber- How many are listed
sales_orderslist- The sales orders found, newest first
totalnumber- How many match in all
Example output
{
"count": 1,
"sales_orders": [
{
"completed_lines": 0,
"created": "2026-11-06",
"currency": "USD",
"customer": "Acme Robotics",
"customer_id": 3,
"customer_reference": "ACME-PO-881",
"description": "",
"id": 4,
"issue_date": "",
"line_count": 1,
"link": "https://inventree.example.com/web/sales/sales-order/4",
"reference": "SO-0004",
"shipment_date": "",
"status": "pending",
"target_date": "2026-11-20",
"total": 55.0
}
],
"total": 1
}Find stock items
List the stock items in stock: of a part, at a location, or matching words, with how many each holds.
Inputs
- Part
parttext - Only this part's stock.
- Location
locationtext - Only stock at this location.
- Include sublocations
include_sublocationstrue/false - With a location, include the locations inside it.Default:
true. - Search
searchtext - Words in the part's name, IPN or description, the batch or the location.
- Batch
batchtext - Only this batch code.
- How many
limitnumber - The most to list. Defaults to 25.From 1 to 100.
Outputs
countnumber- How many are listed
quantitynumber- How many the listed items hold in all
stock_itemslist- The stock items found, most recently changed first
totalnumber- How many match in all
Example output
{
"count": 1,
"quantity": 150.0,
"stock_items": [
{
"allocated": 0.0,
"available": 150.0,
"batch": "",
"id": 5,
"ipn": "M3-10",
"link": "https://inventree.example.com/web/stock/item/5",
"location": "Warehouse/Shelf B",
"location_id": 3,
"part": "M3 screw 10mm",
"part_id": 2,
"quantity": 150.0,
"serial": "",
"status": "OK",
"updated": "2026-11-06 01:00"
}
],
"total": 1
}Get part
Look up a part by IPN, ID, name or barcode: its stock total, minimum, how many are on order, where it's kept and who sells it.
Inputs
- Part
parttextRequired - The part: picked, or its IPN, ID, exact name or barcode.
Outputs
activetrue/false- Whether it's active
allocatednumber- How many are set aside for sales orders and builds
assemblytrue/false- Whether it's built from other parts
availablenumber- How many are in stock and not set aside for orders or builds
below_minimumtrue/false- Whether stock is below its minimum
categorytext- Its category's name
category_idnumber- Its category's ID; 0 if none
componenttrue/false- Whether it's used to build other parts
created_ontext- The day it was added (YYYY-MM-DD)
descriptiontext- Its description
idnumber- The part's ID, for other InvenTree steps
in_stocknumber- How many are in stock, everywhere
ipntext- Its internal part number (IPN)
linktext- A link to it in InvenTree
locationslist- Where it's kept, with how many in each place
minimum_stocknumber- The minimum it should have in stock; 0 if none is set
nametext- Its name
on_ordernumber- How many are on open purchase orders
purchaseabletrue/false- Whether it can be bought from suppliers
salabletrue/false- Whether it can be sold to customers
shortfallnumber- How many short of its minimum it is; 0 if not short
supplierslist- The suppliers it can be bought from
unitstext- Its units of measure, such as m or kg; blank for pieces
Example output
{
"active": true,
"allocated": 0.0,
"assembly": false,
"available": 150.0,
"below_minimum": true,
"category": "Fasteners",
"category_id": 4,
"component": true,
"created_on": "2026-11-06",
"description": "M3 x 10 mm pan head screw",
"id": 2,
"in_stock": 150.0,
"ipn": "M3-10",
"link": "https://inventree.example.com/web/part/2",
"locations": [
{
"items": 1,
"location": "Warehouse/Shelf B",
"location_id": 3,
"quantity": 150.0
}
],
"minimum_stock": 200.0,
"name": "M3 screw 10mm",
"on_order": 0.0,
"purchaseable": true,
"salable": false,
"shortfall": 50.0,
"suppliers": [
{
"sku": "BN-M3-10",
"supplier": "Bolt & Nut Co",
"supplier_id": 2
}
],
"units": ""
}List locations
List the stock locations, by path, with how many stock items each holds.
Inputs
- Search
searchtext - Words in the name or description.
- How many
limitnumber - The most to list. Defaults to 25.From 1 to 100.
Outputs
countnumber- How many are listed
locationslist- The stock locations, by path
totalnumber- How many match in all
Example output
{
"count": 1,
"locations": [
{
"description": "",
"id": 2,
"items": 1,
"link": "https://inventree.example.com/web/stock/location/2",
"name": "Shelf A",
"parent_id": 1,
"path": "Warehouse/Shelf A"
}
],
"total": 1
}Receive purchase order
Book what arrived on a purchase order into stock: everything still to come, or some of one part.
Inputs
- Purchase order
ordertextRequired - The order's reference (such as PO-0001), ID or link.
- Location
locationtext - Where it goes. Leave blank for the order's destination or each part's default location.
- Part
parttext - Only this part. Leave blank for everything.
- Quantity
quantitynumber - With a part, how many arrived. Leave blank for all still to come.At least 0.
- Batch
batchtext - The batch code for what arrived.
Outputs
complete_datetext- The day it was completed; blank if not
completed_linesnumber- How many lines are done
createdtext- The day it was made (YYYY-MM-DD)
currencytext- Its currency, such as USD
descriptiontext- Its description
idnumber- The order's ID, for other InvenTree steps
issue_datetext- The day it was placed or issued; blank while pending
line_countnumber- How many lines it has
lineslist- Its lines, in order
linktext- A link to it in InvenTree
receivedlist- The stock items made from what arrived
referencetext- Its reference, such as PO-0001
statustext- pending, placed, on_hold, complete, cancelled, lost or returned
suppliertext- The supplier's name
supplier_idnumber- The supplier's company ID
supplier_referencetext- The supplier's own reference for it
target_datetext- The day it's due; blank if none
totalnumber- Its total price
Example output
{
"complete_date": "2026-11-06",
"completed_lines": 1,
"created": "2026-11-06",
"currency": "USD",
"description": "Restock screws",
"id": 3,
"issue_date": "2026-11-06",
"line_count": 1,
"lines": [
{
"id": 4,
"ipn": "M3-10",
"part": "M3 screw 10mm",
"part_id": 2,
"quantity": 500.0,
"received": 500.0,
"sku": "BN-M3-10",
"unit_price": 0.02
}
],
"link": "https://inventree.example.com/web/purchasing/purchase-order/3",
"received": [
{
"location_id": 3,
"part_id": 2,
"quantity": 500.0,
"stock_item_id": 12
}
],
"reference": "PO-0003",
"status": "complete",
"supplier": "Bolt & Nut Co",
"supplier_id": 2,
"supplier_reference": "",
"target_date": "",
"total": 10.0
}Remove stock
Take stock of a part out, such as when it's used or sold elsewhere. It comes from the oldest stock first, and is refused if there isn't enough.
Inputs
- Part
parttext - The part: picked, or its IPN, ID, exact name or barcode. Leave blank when you give a stock item.
- Quantity
quantitynumberRequired - How many to take out.At least 0.
- Location
locationtext - Take it from this location (or one inside it). Leave blank for anywhere.
- Stock item
stock_itemtext - One stock item's ID or barcode, instead of a part, to change that item only.
- Notes
notestext - Why, kept in the stock item's history.
Outputs
below_minimumtrue/false- Whether the part is now below its minimum
in_stocknumber- How many of the part are in stock now, everywhere
ipntext- The part's IPN
itemslist- The stock items changed, as they are now (0 for an item emptied and removed)
linktext- A link to the part in InvenTree
locationtext- That location's path
location_idnumber- The location it happened at; 0 if not one place
minimum_stocknumber- The part's minimum stock; 0 if none
parttext- The part's name
part_idnumber- The part's ID
quantitynumber- How many were added, removed, counted or moved
Example output
{
"below_minimum": false,
"in_stock": 200.0,
"ipn": "M3-10",
"items": [
{
"id": 5,
"location": "Warehouse/Shelf B",
"quantity": 200.0
}
],
"link": "https://inventree.example.com/web/part/2",
"location": "Warehouse/Shelf B",
"location_id": 3,
"minimum_stock": 200.0,
"part": "M3 screw 10mm",
"part_id": 2,
"quantity": 50.0
}Ship sales order
Send a sales order: take what's left to ship out of stock (oldest first), ship it with its tracking number, and mark the order shipped. Refused if there isn't enough stock.
Inputs
- Sales order
ordertextRequired - The order's reference (such as SO-0001), ID or link.
- Tracking number
tracking_numbertext - The carrier's tracking number.
- Invoice number
invoice_numbertext - The invoice it went with.
- Ship from
locationtext - Take the stock from this location (or one inside it). Leave blank for anywhere.
- Mark order shipped
mark_shippedtrue/false - Mark the order shipped once every line has gone.Default:
true.
Outputs
completed_linesnumber- How many lines are done
createdtext- The day it was made (YYYY-MM-DD)
currencytext- Its currency, such as USD
customertext- The customer's name
customer_idnumber- The customer's company ID
customer_referencetext- The customer's own reference, such as their PO number
descriptiontext- Its description
idnumber- The order's ID, for other InvenTree steps
issue_datetext- The day it was placed or issued; blank while pending
line_countnumber- How many lines it has
lineslist- Its lines, in order
linktext- A link to it in InvenTree
referencetext- Its reference, such as SO-0001
shipmentobject- The shipment just sent
shipment_datetext- The day it was shipped; blank if not
statustext- pending, in_progress, shipped, on_hold, complete, cancelled, lost or returned
target_datetext- The day it's due; blank if none
totalnumber- Its total price
Example output
{
"completed_lines": 1,
"created": "2026-11-06",
"currency": "USD",
"customer": "Acme Robotics",
"customer_id": 3,
"customer_reference": "ACME-PO-881",
"description": "",
"id": 4,
"issue_date": "2026-11-06",
"line_count": 1,
"lines": [
{
"allocated": 0.0,
"id": 7,
"ipn": "ARD-UNO",
"part": "Arduino Uno R3",
"part_id": 3,
"quantity": 2.0,
"shipped": 2.0,
"unit_price": 27.5
}
],
"link": "https://inventree.example.com/web/sales/sales-order/4",
"reference": "SO-0004",
"shipment": {
"id": 2,
"invoice_number": "",
"items": 1,
"reference": "2",
"shipment_date": "2026-11-06",
"tracking_number": "1Z999AA10123456784"
},
"shipment_date": "2026-11-06",
"status": "shipped",
"target_date": "2026-11-20",
"total": 55.0
}Transfer stock
Move stock of a part to another location. It joins the part's stock already there.
Inputs
- To location
to_locationtextRequired - Where it goes.
- Part
parttext - The part: picked, or its IPN, ID, exact name or barcode. Leave blank when you give a stock item.
- Quantity
quantitynumber - How many to move. Leave blank for all of it.At least 0.
- From location
from_locationtext - Take it from this location (or one inside it). Leave blank for anywhere else.
- Stock item
stock_itemtext - One stock item's ID or barcode, instead of a part, to change that item only.
- Notes
notestext - Why, kept in the stock item's history.
Outputs
below_minimumtrue/false- Whether the part is now below its minimum
in_stocknumber- How many of the part are in stock now, everywhere
ipntext- The part's IPN
itemslist- The stock items changed, as they are now (0 for an item emptied and removed)
linktext- A link to the part in InvenTree
locationtext- That location's path
location_idnumber- The location it happened at; 0 if not one place
minimum_stocknumber- The part's minimum stock; 0 if none
parttext- The part's name
part_idnumber- The part's ID
quantitynumber- How many were added, removed, counted or moved
Example output
{
"below_minimum": false,
"in_stock": 200.0,
"ipn": "M3-10",
"items": [
{
"id": 5,
"location": "Warehouse/Shelf B",
"quantity": 200.0
}
],
"link": "https://inventree.example.com/web/part/2",
"location": "Warehouse/Shelf B",
"location_id": 3,
"minimum_stock": 200.0,
"part": "M3 screw 10mm",
"part_id": 2,
"quantity": 50.0
}