انتقل إلى المحتوى

لم يُكتب وصف هذه العملية بالعربية بعد، فأوصافها بالإنجليزية.

Create a draft order

POST/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 · أو null

    An existing customer; their email, phone and language fill in what is left blank.

  • emailstring · أو null
  • phonestring · أو null
  • localestring · أو null

    The customer's language for the invoice, e.g. ar.

  • linesarray of objects
  • shipping_addressobject · أو null

    An address for a checkout. Named apart from customers' saved addresses in the API documents.

  • billing_addressobject · أو null

    An address for a checkout. Named apart from customers' saved addresses in the API documents.

  • shippingobject | object · أو null

    How the order is delivered.

ما يُرجعه

201 Created, priced.

الأخطاء

  • 403forbiddenMissing permission.
  • 422validation_failedValidation failed.