Skip to main content

Purchase Order Lifecycle

A Purchase Order advances through a series of states throughout its lifecycle.

This diagram illustrates the different states in the lifecycle and the transitions between them. The most typical transition paths are shown in solid lines, while dotted lines indicate possible but less common paths.

States

StateDescription
draftPurchase Order is in a draft state, meaning it can be edited.
pending_approvalPurchase Order is waiting for a somebody to approve or reject it. It cannot be edited in this state.
rejectedPurchase Order has been rejected. It can be edited in this state.
approvedPurchase Order has been approved. At this point, it can no longer be edited.
purchasedPurchase Order has been purchased
received_partialSome line items has been partially received
received_fullAll line items have been fully received
closedPurchase Order is complete. The only editable fields at this point are description and labels.

State Transitions

To transition from one state to the next, you must call the appropriate API endpoint with the PATCH method.

info

We do not support receiving inventory in the Purchase Orders API.

The table below describes which all possible states and which endpoints you need to call to perform the transition.

caution

If you attempt to call an endpoint and the transition is impossible, you will get a HTTP 422 with an error in the response body.

Initial StatePossible Transition StatesEndpoint
draftpending_approval/purchase_orders/:number/submit_for_approval
approved/purchase_orders/:number/approve
pending_approvalapproved/purchase_orders/:number/approve
rejected/purchase_orders/:number/reject
rejectedpending_approval/purchase_orders/:number/submit_for_approval
approved/purchase_orders/:number/approve
approvedpurchased/purchase_orders/:number/purchase
purchasedapproved/purchase_orders/:number/undo_purchase
received_partial
received_fullclosed/purchase_orders/:number/close
closed