patch
https://api.cardda.com/v1/erp/payouts/purchase_orders/
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
idfield - Update: Include item with existing
idfield - Delete: Include item with
idand_destroy: true
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
401Unauthorized — 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.
