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

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

Exchanges items in one step

POST/admin/v1/stores/{store_id}/pos/sessions/{session_id}/exchanges
  • يدعم Idempotency-Key

Exchanges items in one step: what comes back is refunded on its order, its worth comes off the new sale, and the customer pays the difference (or the rest goes back). Requires the clerk's unlock.

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

  • store_idstringمطلوب

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

  • session_idstringمطلوب

    معرّف من نوع pses، مثل pses_01k8qs5s….

الترويسات

  • x-pos-clerkstringمطلوب

    The clerk's unlock

  • Idempotency-Keystring

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

  • shop-api-versionYYYY-MM

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

الجسم

  • order_idstringمطلوب

    TypeID with the ord prefix.

  • backarray of objectsمطلوب
  • restockbooleanمطلوب
  • rest_toenumمطلوب

    When the new items cost less: original, cash or store_credit.

    • original
    • cash
    • store_credit
    • exchange
  • saleobjectمطلوب

    The sale of what goes out; its payments pay the difference.

  • reasonstring · أو null
  • approvalsarray of strings

ما يُرجعه

201 Exchanged: the new sale's receipt.

الأخطاء

  • 409A manager must approve, or the total changed.