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

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

Update purchase order

PUT/admin/v1/stores/{store_id}/inventory/purchase-orders/{purchase_order_id}
  • inventory:write

Change a draft or a sent order: every field replaced. A sent order keeps what already arrived (quantities never below it, its lines and destination stay). Send If-Match: "v{version}".

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

  • store_idstringمطلوب

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

  • purchase_order_idstringمطلوب

    معرّف من نوع po، مثل po_01k8qs5s….

الترويسات

  • If-Matchstring · أو null

    ETag from the last read, e.g. "v3"

  • shop-api-versionYYYY-MM

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

الجسم

  • supplier_idstringمطلوب

    TypeID with the supl prefix.

  • destination_idstringمطلوب

    Where the stock arrives; an active location.

  • linesarray of objectsمطلوب

    What's ordered, in order (1–250 different items).

  • currency_codestring · أو null

    Three letters; blank for the supplier's currency. Fixed once anything arrives.

  • referencestring · أو null

    The supplier's quote or invoice number (up to 100 characters).

  • notestring · أو null

    Up to 1,000 characters.

  • expected_ondate · أو null

    When it should arrive (YYYY-MM-DD).

  • adjustmentsarray of objects

    Shipping, customs, a discount (up to 10): a label and a signed amount.

ما يُرجعه

200 The purchase order.

الأخطاء

  • 404not_foundNo such purchase order.
  • 409It's received or closed.
  • 412precondition_failedIt changed since it was read.
  • 422validation_failedValidation failed.