v1
latestOpenAPI 3.1.02026-08-0420819698.7 KBRoutes
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:
| Parameter | In | Type | Required | Default | Description |
|---|---|---|---|---|---|
| poID | path | integer | yes | Purchase Order identifier | |
| newState | body | string | yes | All 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 | |
| reason | body | string | no | Optional 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