OPDC API error code

RECEIPT_STATUS_NOT_ALLOWED

HTTP status 422

A purchase-order receipt against an order that is Void or a Master, or whose status the order cannot be left at. 422.

A receipt leaves the order's status as it is, except that it may close (4) an Open, Review or Dispute order it leaves with nothing to receive. Refused: Closed while any line still has quantity to receive (the unreceived balance is still committed), a change to a Closed, Void or Master order, and any other status. Send no status to leave the order as it is. Nothing is received.

The API answers with a problem document (RFC 9457) whose type is https://twinn.engineering/errors/receipt-status-not-allowed, and with X-Error-Code: RECEIPT_STATUS_NOT_ALLOWED. Branch on the code, never on the detail text.

How errors work, and what to retryEvery error code