Skip to content

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}".

Path parameters

  • store_idstringrequired

    The store's ID, like store_01k8qs5s…. Apps get it with the install, in the OAuth redirect and the token response.

  • purchase_order_idstringrequired

    The purchase order's ID, like po_01k8qs5s….

Headers

  • If-Matchstring · or null

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

  • shop-api-versionYYYY-MM

    The version to answer in. Without it, your app’s pinned version, else the newest.

Body

  • supplier_idstringrequired

    TypeID with the supl prefix.

  • destination_idstringrequired

    Where the stock arrives; an active location.

  • linesarray of objectsrequired

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

  • currency_codestring · or null

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

  • referencestring · or null

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

  • notestring · or null

    Up to 1,000 characters.

  • expected_ondate · or null

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

  • adjustmentsarray of objects

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

Returns

200 The purchase order.

Errors

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