purchase_order
Manage the full lifecycle of purchase orders, from creation to receiving and completion, for inventory procurement.
Instructions
Purchase order lifecycle management in InvenTree.
Operations: Read: list, get, get_line_items Write: create, update, issue, receive, complete, cancel, hold, add_line_item, add_extra_line_item
Args: operation: One of the operations listed above. pk: Purchase order ID. data: Dict of fields for create/update/add_line_item. location_id: Receiving location for receive operation. items: Line items to receive (e.g. [{"line_item": 1, "quantity": 10}]). search: Text search filter for list. limit: Max results (default 25). offset: Pagination offset.
Returns: JSON string with PO data or {"error": "..."}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| operation | Yes | ||
| pk | No | ||
| data | No | ||
| location_id | No | ||
| items | No | ||
| search | No | ||
| limit | No | ||
| offset | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |