لم يُكتب وصف هذه العملية بالعربية بعد، فأوصافها بالإنجليزية.
Refund order
POST
/ admin/ v1/ stores/ {store_id}/ orders/ {order_id}/ refunds- orders:refund
- يدعم Idempotency-Key
Return money through the order's payments and/or take items back (optionally restocking them).
معاملات المسار
store_idstringمطلوبمعرّف من نوع
store، مثلstore_01k8qs5s…. يصل إلى التطبيق مع التثبيت، في رابط OAuth وفي رد رمز الوصول.order_idstringمطلوبمعرّف من نوع
ord، مثلord_01k8qs5s….
الترويسات
Idempotency-Keystringأرسل المفتاح نفسه لإعادة المحاولة بأمان: تُعاد الإجابة الأولى لمدة ٢٤ ساعة.
shop-api-versionYYYY-MMالإصدار الذي تُكتب به الإجابة. بدونه يُستخدم الإصدار المثبّت لتطبيقك، وإلا الأحدث.
الجسم
linesarray of objectsshippinginteger · أو nullDelivery money to return, in minor units.
amountinteger · أو nullMoney to return in minor units; omit for the items' value plus
shipping.reasonstring · أو nullShown to staff only.
notify_customerbooleanTell the customer about the refund (on the channels the store chose for it).
ما يُرجعه
201 Refunded; the updated order.
الأخطاء
- 403
forbiddenMissing permission. - 404
not_foundNo such order. - 409Nothing to refund, or the provider refused.
- 422
validation_failedInvalid quantities or amounts. - 503
unavailableThe provider did not answer.