v1

latestOpenAPI 3.1.02026-08-0420819698.7 KB
Routes
Purchase Orders
State

Change PO State

Updates the state of the specified PO.

Important Note: Currently POs can only move forward one state per state change request.

Parameters:

ParameterInTypeRequiredDefaultDescription
poIDpathintegeryesPurchase Order identifier
newStatebodystringyesAll PO states: 0 (setup), 1–96 (custom), 97 (ready_to_receive), 98 (partially_received), 99 (fully_received), 100 (closed), 101 (disapproved). API accepts numbers, standard names, or custom_step_N
reasonbodystringnoOptional note (max 500 chars)

Responses:

  • 200 OK: State changed.

  • 400 Bad Request: Invalid transition or failed validation.

  • 404 Not Found: PO not found.

Response data:

success | Boolean, if this operation was successful state | JSON object describing current state. previousState | JSON object describing previous state. validNextStates | JSON object with a list of possible next states.

patch/v2/po/{poID}/state

Response

200 OK

successboolean
messagestring
currentStatestring