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

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

Record refusal

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

The customer refused the parcel at the door: its units come back into stock, the order is cancelled as refused, the uncollected cash is voided and the courier's return fee is kept. With returned, the customer kept the rest and paid for it: those units come back, the cash to collect drops by what they were worth, and the order stays open.

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

  • store_idstringمطلوب

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

  • order_idstringمطلوب

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

الترويسات

  • Idempotency-Keystring

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

  • shop-api-versionYYYY-MM

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

الجسم

  • restockboolean

    Put the units back into stock: they came back with the parcel.

  • return_feeinteger · أو null

    What the courier charged to bring it back, in the order's minor units.

  • returnedarray of objects

    A partial delivery: only these units came back, and the customer kept and paid for the rest. Leave out when the whole parcel was refused.

ما يُرجعه

200 The cancelled order, or the open one after a partial delivery.

الأخطاء

  • 403forbiddenMissing permission.
  • 404not_foundNo such order.
  • 409Cancelled already, nothing shipped (nothing_shipped), or paid (order_paid): refund it instead. For a partial delivery, also no cash waiting (nothing_to_collect) or everything came back (everything_returned).
  • 422validation_failedA return fee below zero.