Skip to main content

Bulk Approve Purchase Orders

POST 

/api/purchase-orders/approve

Bulk approve purchase orders by IDs or filters.

Required scope: purchase-orders:write

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

Authentication: Requires Bearer token.

Returns warnings if some POs fail to approve, error if all fail.

Body:

  • ids[]: Array of purchase order IDs (required without filters)
  • filters: Spatie filter params to resolve IDs (required without ids)

Requires permission: purchase_orders.approve

Approval policy: While the purchase-order approval policy is enabled the purchase_orders.approve permission is not required — each draft order is checked against the policy instead. Orders you can approve in one call are approved; orders over your limit are skipped, or — with auto_request: true (boolean, optional, default false) — sent for approval instead. The response adds top-level approval: approved (IDs), requested (IDs sent for approval) and skipped[] (id, purchase_order_number, reason, code). When every selected order was skipped for being over your limit the call returns 403 approval_limit_exceeded.

Skipped rows (approval policy on): each entry in approval.skipped has a code. approval_limit_exceeded means the purchase order is over your approval limit and has no request yet; send it again with auto_request: true to raise an approval request. approval_pending means it is already waiting on its approvers, so there is nothing to send.

Request​

Responses​

OK

Response Headers
    Content-Type