Update purchase order
/ admin/ v1/ stores/ {store_id}/ inventory/ purchase-orders/ {purchase_order_id}- inventory:write
Change a draft or a sent order: every field replaced. A sent order keeps what already arrived (quantities never below it, its lines and destination stay). Send If-Match: "v{version}".
Path parameters
store_idstringrequiredThe store's ID, like
store_01k8qs5s…. Apps get it with the install, in the OAuth redirect and the token response.purchase_order_idstringrequiredThe purchase order's ID, like
po_01k8qs5s….
Headers
If-Matchstring · or nullETag from the last read, e.g. "v3"
shop-api-versionYYYY-MMThe version to answer in. Without it, your app’s pinned version, else the newest.
Body
supplier_idstringrequiredTypeID with the
suplprefix.destination_idstringrequiredWhere the stock arrives; an active location.
linesarray of objectsrequiredWhat's ordered, in order (1–250 different items).
currency_codestring · or nullThree letters; blank for the supplier's currency. Fixed once anything arrives.
referencestring · or nullThe supplier's quote or invoice number (up to 100 characters).
notestring · or nullUp to 1,000 characters.
expected_ondate · or nullWhen it should arrive (
YYYY-MM-DD).adjustmentsarray of objectsShipping, customs, a discount (up to 10): a label and a signed amount.
Returns
200 The purchase order.
Errors
- 404
not_foundNo such purchase order. - 409It's received or closed.
- 412
precondition_failedIt changed since it was read. - 422
validation_failedValidation failed.