Update a purchase order with PUT semantics: read the purchase order, modify it, and send the complete resource back. Template fields are addressed by their stable field_key and validated against the template version the purchase order was created with. Line items are addressed by id.
Omission semantics: status, date and deadline omitted or null keep their current value; header_field_values_by_key and line_items_by_key omitted keep the current values, while an empty array [] deletes them all (full replace). Within a sent block, what you send is what remains.
Errors: validation problems are a 422 with {"errors": {<field_key>: [messages]}} (unknown/computed/predefined keys, missing required fields, unresolvable reference values, foreign line-item ids, mixing by_key and legacy addressing). A vendor_id or legal_entity_id that does not exist or is not visible to the credential is rejected by the platform resource check with a 400 ({"errors": [{"error": ...}]}). Lifecycle conflicts are a 409: purchase orders in closed or processing (still being generated — retry later) status cannot be updated. processing is not accepted as a new status (422). Purchase orders without a template only accept data edits while in draft status (409 afterwards).
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||

