Close a partly received purchase order short (the rest will not come), or complete a sent one that holds only charges

The incoming stock still reserved for the units that will not come is released and the purchase order is received. From then on it owes for what it received, not for what it ordered: payableTotal becomes the value of the received units (per line that ships, a product line or a custom item, the lesser of the received and the ordered quantity, at its unit price) plus every charge line in full, and the balance due is counted from it, so it is below zero when more than that was paid already. total stays what was ordered. A later receipt takes the close back: the purchase order owes its total again (closedShort is false as soon as it is being received again, or once nothing is open any more). A sent purchase order that holds no line that ships (only charges) has nothing to receive: closing it completes it (received, closedAt set, it owes its total). Any other purchase order is 409 not_partly_received, also a sent one that holds a line that ships and received nothing.

Scope: outgoing-purchase-orders:write, channel:write or admin. A permission group made before the Channel API scopes existed grants it as inventory:manage or supply-chain:manage.

Idempotency: send Idempotency-Key; a retry with the same key replays the first answer.

Rate limit: write class, 1,200 requests per minute per tenant by default (read class 6,000). Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset; a refusal is 429 rate_limited with Retry-After.

Path Params
string
required
length between 1 and 64

The purchase order's uuid or 24-hex id.

Body Params
Headers
string
length between 7 and 50

Any string of 7 to 50 characters that identifies this request (an order number, a webhook id). A retry with the same key and the same body answers the first result with Idempotent-Replayed: true; the same key with a different body is 422 idempotency_key_reused; a concurrent request with the same key is 409 in_progress with Retry-After. Recommended on every write.

Responses

Language
Credentials
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json