Update Purchase Order
PUT /purchase_orders/{id}
π Paid plan only
Updates a purchase order.
Parameters
Section titled β Parameters βPath Parameters
Section titled βPath Parameters βPurchase order ID.
Example
491Header Parameters
Section titled βHeader Parameters βE.g. 123
Example
123Request Body
Section titled βRequest Body βobject
object
Supplier ID. Required; must belong to the company.
Warehouse ID stock is delivered to. Required; must belong to the company.
Lifecycle state: draft -> active -> completed.
PO number. Auto-generated if blank.
Must be unique per company.
Expected delivery date (must fall between 2010-01-01 and 2035-01-01).
Default GBP. Cannot be changed once the PO is active.
Auto-calculated from expected_date if omitted.
Emails the supplier report on save when the PO is active.
Format for the supplier report. Default pdf.
Line items.
object
Existing line item ID (update requests only).
Must exist in the company and not be deleted. Required for create requests.
Must be greater than 0. Required for create requests.
Unit cost. Must be greater than 0. Required for create requests.
Required for create requests.
Updates the supplier product variant reference.
Updates the supplier product variant title.
Update requests only β increments the received count for the line item. Cannot be negative.
Example
{ "purchase_order": { "state": "active", "note": "Updated note", "purchase_order_product_variants_attributes": [ { "id": 1575, "received_quantity": 5 } ] }}Responses
Section titled β Responses βOK. Returns the updated purchase order.
object
Validation failed. Note that currency_code and supplier_id cannot be changed while the PO is active, and a completed PO cannot be updated at all. Duplicate product_variant_ids are rejected.
Purchase order not found (or belongs to another company).