Bulk Approve Purchase Orders
POST/api/purchase-orders/approve
Bulk approve purchase orders by IDs or filters.
purchase-orders:writeGrant 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
- 200
- 400
- 401
- 403
- 422
- 429
OK
Response Headers
Bad Request
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden
Response Headers
Validation failed — the body is a field → messages map (Laravel shape) or the platform envelope with a stable machine-readable code. Fix the payload and resubmit.
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.