Update purchase order

Updates an existing purchase order's description, amount, currency, or items. When the total amount changes, item amounts are automatically recalculated based on their percentages.

Important Notes

  • Purchase order must not be approved or completed
  • User must have admin or owner role
  • Item percentages must sum to 100% after update
  • When amount_cents changes, all item amounts are recalculated
  • Items can be created, updated, or deleted using nested attributes

Authorization

  • User must be admin or owner of the company
  • Purchase order cannot be approved or completed

Nested Item Updates

You can create, update, or delete items in the same request:

  • Create: Include item without id field
  • Update: Include item with existing id field
  • Delete: Include item with id and _destroy: true
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
uuid
required

ID of the purchase order to update

Body Params

Updated purchase order details

purchase_order
object
Headers
uuid
required

UUID of the company on whose behalf the request is made. Required for every Pay endpoint.
See The company-id header for details on how to obtain
a value for this header and the error responses to expect when it is missing or invalid.

If the deprecated company_id query parameter is also sent, both values must match;
the API returns 422 Unprocessable Entity when they disagree.

Responses

401

Unauthorized — invalid/missing authentication token, or the caller is not
authorized to update this purchase order (Pundit policy). The response body
is empty
(Pundit renders nothing); branch on the status code, not the body.

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json