Preview Approval Routing
POST/api/approval-policies/:documentType/preview
Route an amount through a policy without creating anything — answers "who would have to approve this, and could the requester approve it themselves?". Uses the saved policy, or an unsaved draft sent under policy so an edit can be checked before it is saved.
purchase-orders:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Authentication: Requires Bearer token with the purchase-orders scope (read for GET, write for POST/PUT/DELETE).
Requires permission: approval_policies.view
Body fields:
amount(number, required, min 0) — in base currencyrequester_user_id(integer, optional, nullable) — evaluate separation of duties andrequester_can_approve_directlyfor this userpolicy(object, optional, nullable) — an unsaved policy with the same fields as Update Approval Policy (all optional here;tiersmust be present for the draft to be used)
Response fields:
policy_enabled,requires_approval(false when the amount falls in an auto-approve tier)amount_base,base_currency,tier_name,tier_up_to_amountsteps[]—order,name,required_approvals,eligible_users[](user_id,name,via—step(listed),higher_tier(listed on a higher tier's final step),role:<id>(member of a listed role) ordelegate_of:<user id>;on_behalf_of_user_id/on_behalf_of_namefor a delegate;self_approval)warnings[]— e.g. a step nobody can approve (it would escalate to administrators)requester_can_approve_directly— the requester could approve every step in one callblocked_reason— why the requester cannot, when they cannot
Request
Responses
- 200
- 401
- 403
- 404
- 422
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Not found — no record with the given identifier (or the route does not exist). Verify the ID before retrying.
Unprocessable Entity
Response Headers
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.