Create a draft order
/ admin/ v1/ stores/ {store_id}/ draft-orders- orders:write
- Idempotency-Key supported
Create a draft order: items (catalog variants, optionally at a staff price), the customer, addresses, shipping (a store rate, a custom charge or none) and a discount. Priced like a cart.
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
customer_idstring · or nullAn existing customer; their email, phone and language fill in what is left blank.
emailstring · or nullphonestring · or nulllocalestring · or nullThe customer's language for the invoice, e.g.
ar.linesarray of objectsshipping_addressobject · or nullAn address for a checkout. Named apart from customers' saved addresses in the API documents.
billing_addressobject · or nullAn address for a checkout. Named apart from customers' saved addresses in the API documents.
shippingobject | object · or nullHow the order is delivered.
Returns
201 Created, priced.
Errors
- 403
forbiddenMissing permission. - 422
validation_failedValidation failed.