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

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

Swap at door

POST/admin/v1/stores/{store_id}/returns/{return_id}/swap
  • orders:write
  • يدعم Idempotency-Key

Swaps at the door: books the replacement order's delivery with a carrier that collects the return's items in the same trip, and approves the return with that shipment.

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

  • store_idstringمطلوب

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

  • return_idstringمطلوب

    معرّف من نوع rtn، مثل rtn_01k8qs5s….

الترويسات

  • Idempotency-Keystring

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

  • shop-api-versionYYYY-MM

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

الجسم

  • order_idstringمطلوب

    The order with the replacement items, the same customer's and not yet shipped.

  • carrier_account_idstringمطلوب

    An account whose carrier swaps items at the door (capabilities.exchanges).

  • weight_gramsinteger · أو null

    Defaults to the products' weights.

  • parcelsinteger · أو null

    Defaults to 1.

ما يُرجعه

200 Approved, with the exchange shipment.

الأخطاء

  • 409Not open, a label already booked, another customer's order, or the carrier refused.
  • 422validation_failedThe same order, or a carrier that doesn't swap items (exchange_unsupported).