لم يُكتب وصف هذه العملية بالعربية بعد، فأوصافها بالإنجليزية.
Create a draft order
/ admin/ v1/ stores/ {store_id}/ draft-orders- orders:write
- يدعم Idempotency-Key
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.
معاملات المسار
store_idstringمطلوبمعرّف من نوع
store، مثلstore_01k8qs5s…. يصل إلى التطبيق مع التثبيت، في رابط OAuth وفي رد رمز الوصول.
الترويسات
Idempotency-Keystringأرسل المفتاح نفسه لإعادة المحاولة بأمان: تُعاد الإجابة الأولى لمدة ٢٤ ساعة.
shop-api-versionYYYY-MMالإصدار الذي تُكتب به الإجابة. بدونه يُستخدم الإصدار المثبّت لتطبيقك، وإلا الأحدث.
الجسم
customer_idstring · أو nullAn existing customer; their email, phone and language fill in what is left blank.
emailstring · أو nullphonestring · أو nulllocalestring · أو nullThe customer's language for the invoice, e.g.
ar.linesarray of objectsshipping_addressobject · أو nullAn address for a checkout. Named apart from customers' saved addresses in the API documents.
billing_addressobject · أو nullAn address for a checkout. Named apart from customers' saved addresses in the API documents.
shippingobject | object · أو nullHow the order is delivered.
ما يُرجعه
201 Created, priced.
الأخطاء
- 403
forbiddenMissing permission. - 422
validation_failedValidation failed.