Create purchase order
sosinventory_create_purchase_orderWRITE: creates a new purchase order to an EXISTING vendor with line items for existing items. The PO number is assigned automatically unless you pass one. Confirm the vendor, items, quantities and costs with the user before calling. POST /api/v2/purchaseorder.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | Order date (YYYY-MM-DDTHH:MM:SS); defaults to now in SOS. | |
| lines | Yes | PO lines (unit_price = purchase cost per unit). | |
| number | No | PO number; leave out for automatic numbering. | |
| vendor | Yes | Existing vendor (sosinventory_list_vendors). | |
| comment | No | Internal comment. | |
| location | No | Location that receives the goods (type=location). | |
| expected_date | No | Expected receipt date (YYYY-MM-DDTHH:MM:SS). | |
| vendor_message | No | Message to the vendor. |