sales_order
Manage sales order lifecycle: create, read, update, complete, cancel, hold, and add line items or shipments.
Instructions
Sales order lifecycle management in InvenTree.
Operations: Read: list, get, get_line_items, get_allocations Write: create, update, complete, cancel, hold, add_line_item, add_extra_line_item, create_shipment, complete_shipment
Args: operation: One of the operations listed above. pk: Sales order ID. data: Dict of fields for create/update/add_line_item. shipment_id: Shipment ID for complete_shipment. reference: Reference string for create_shipment. search: Text search filter for list. limit: Max results (default 25). offset: Pagination offset.
Returns: JSON string with SO data or {"error": "..."}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| operation | Yes | ||
| pk | No | ||
| data | No | ||
| shipment_id | No | ||
| reference | No | ||
| search | No | ||
| limit | No | ||
| offset | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |