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

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

Create shipment

POST/admin/v1/stores/{store_id}/orders/{order_id}/shipments
  • orders:write
  • يدعم Idempotency-Key

Books the order's parcel with the carrier: the units it carries are fulfilled with the waybill, the label is kept and tracking starts.

معاملات المسار

  • store_idstringمطلوب

    معرّف من نوع store، مثل store_01k8qs5s…. يصل إلى التطبيق مع التثبيت، في رابط OAuth وفي رد رمز الوصول.

  • order_idstringمطلوب

    معرّف من نوع ord، مثل ord_01k8qs5s….

الترويسات

  • Idempotency-Keystring

    أرسل المفتاح نفسه لإعادة المحاولة بأمان: تُعاد الإجابة الأولى لمدة ٢٤ ساعة.

  • shop-api-versionYYYY-MM

    الإصدار الذي تُكتب به الإجابة. بدونه يُستخدم الإصدار المثبّت لتطبيقك، وإلا الأحدث.

الجسم

  • carrier_account_idstringمطلوب

    TypeID with the carr prefix.

  • servicestring · أو null

    Defaults to the account's default service.

  • linesarray of objects · أو null

    Omit to ship every unit still to ship.

  • parcelsinteger · أو null

    Defaults to 1.

  • weight_gramsinteger · أو null

    Defaults to the products' weights.

  • collect_codboolean · أو null

    Omit to collect when the order awaits cash on delivery.

  • notify_customerboolean

    Email the customer the tracking link.

  • collectobject · أو null

    Bring these back from the customer in the same trip: an exchange at the door, for carriers that swap items.

ما يُرجعه

201 Booked.

الأخطاء

  • 409The order can't ship, or the carrier refused.
  • 422validation_failedInvalid input.
  • 503unavailableThe carrier couldn't be reached.