لم يُكتب وصف هذه العملية بالعربية بعد، فأوصافها بالإنجليزية.
Edit order
/ admin/ v1/ stores/ {store_id}/ orders/ {order_id}/ edit- orders:write
- يدعم Idempotency-Key
Change the items of an order: quantities of units not yet shipped, and new items at today's price for the order's address. Kept items keep the price, discount and tax they were sold at; stock follows. An unpaid order's pending payment takes the new total; a paid order's payments stay, and balance_due says what is owed: a refund owed is refunded at once unless refund_now is false, a balance due is collected on delivery when collect says so. Send dry_run: true to see the new totals first. (and orders:refund to refund).
معاملات المسار
store_idstringمطلوبمعرّف من نوع
store، مثلstore_01k8qs5s…. يصل إلى التطبيق مع التثبيت، في رابط OAuth وفي رد رمز الوصول.order_idstringمطلوبمعرّف من نوع
ord، مثلord_01k8qs5s….
الترويسات
Idempotency-Keystringأرسل المفتاح نفسه لإعادة المحاولة بأمان: تُعاد الإجابة الأولى لمدة ٢٤ ساعة.
shop-api-versionYYYY-MMالإصدار الذي تُكتب به الإجابة. بدونه يُستخدم الإصدار المثبّت لتطبيقك، وإلا الأحدث.
الجسم
linesarray of objectsaddarray of objectsItems to add, at today's price for the order's address.
dry_runbooleanOnly compute the new totals.
refund_nowbooleanFor a paid order whose new total is lower: refund the difference now (default).
collectenumFor a paid order whose new total is higher: collect the balance on delivery, or later.
- later
- on_delivery
ما يُرجعه
200 The edit (saved unless a dry run).
الأخطاء
- 403
forbiddenMissing permission. - 404
not_foundNo such order. - 409Closed or refunded order (
order_not_open,order_refunded), an order left empty (order_empty), not enough stock, no cash on delivery to collect with (no_cash_on_delivery). - 422
validation_failedUnknown lines, shipped units removed, nothing changed.