لم يُكتب وصف هذه العملية بالعربية بعد، فأوصافها بالإنجليزية.
Record refusal
/ 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الإصدار الذي تُكتب به الإجابة. بدونه يُستخدم الإصدار المثبّت لتطبيقك، وإلا الأحدث.
الجسم
restockbooleanPut the units back into stock: they came back with the parcel.
return_feeinteger · أو nullWhat the courier charged to bring it back, in the order's minor units.
returnedarray of objectsA 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.
الأخطاء
- 403
forbiddenMissing permission. - 404
not_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). - 422
validation_failedA return fee below zero.