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
Language
Credentials
Bearer
Click Try It! to start a request and see the response here!