Create purchase order
/ admin/ v1/ stores/ {store_id}/ inventory/ purchase-orders- Idempotency-Key supported
Draft a purchase order: what's ordered from a supplier, delivered to one location.
Path parameters
store_idstringrequiredThe store's ID, like
store_01k8qs5s…. Apps get it with the install, in the OAuth redirect and the token response.
Headers
Idempotency-KeystringSend the same key to retry safely: the first answer is replayed for 24 hours.
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
201 The draft.
Errors
- 403
forbiddenMissing permission, or a location you don't work at. - 422
validation_failedAn unknown or archived supplier, an inactive location, an unknown or uncounted item, or a bad quantity or cost.