Get approval chain settings
Returns the approval flow for a process.
GET/v1/workspaces/{regionId}/approval-chains/{process}
Parameters
process"purchase_order" | "invoice_payment"RequiredWhich flow's approval chain to fetch.
Returns
200 OK with the object shown in the response.
More details
Returns the approval flow for a process, or { process, groups: [] } if the process has never had one. Accepts a buyer API key.
Response fields
linkedTo"purchase_order" | "invoice_payment"When set, this process uses the other process's flow (a live link, not a copy), and groups is ignored.
groups[].mode"sequential" | "parallel"sequential: exactly one step. parallel: every step must be approved, in any order, each by a different employee.
groups[].conditionsarrayWhen present, the group runs only if every condition matches. amount uses gt, gte, lt or lte with a number in the region's currency; supplier uses is or is_not with a supplier Workspace ID (ending in .supplier); requester uses is or is_not with an employee key. A document in another currency than the region's meets every amount condition.
groups[].stages[].approverEmployeeKeystringThe only employee who can act on the step. '' means the step has no approver yet - it needs one assigned before anyone can act on it. Only a flow saved before named approvers were required can carry it.
groups[].stages[].highValueOnlybooleanThe step runs only when the amount is above Settlement's approvalThreshold (the high-value threshold).
source"default"Present when Pleaxy wrote this flow as the region's default. Any other save clears it.
defaultApproverIsAdminbooleanOnly with source "default": whether the default step's approver is still a region administrator.
requesterRule.eligibleApproverCountnumberHow many buyer members can approve this process's documents. A requester can approve their own document only when nobody else could.
Errors
- 401 Unauthorized - No credential was presented, or the Bearer token / X-Api-Key value is missing, invalid, expired, or revoked.
- 403 Forbidden - The caller's Bearer token or API key doesn't grant access to this workspace (regionId), or lacks the required role.
curl "$PLEAXY_API_BASE_URL/v1/workspaces/{regionId}/approval-chains/{process}" \
-H "X-Api-Key: $PLEAXY_API_KEY"{
"process": "purchase_order" | "invoice_payment",
"linkedTo": "purchase_order" | "invoice_payment",
"groups": [
{
"id": "string",
"mode": "sequential" | "parallel",
"label": "string",
"stages": [
{
"id": "string",
"label": "string",
"approverEmployeeKey": "string",
"approverName": "string",
"approverEmail": "string",
"highValueOnly": boolean
}
],
"conditions": [
{ "field": "amount" | "supplier" | "requester", "operator": "gt" | "gte" | "lt" | "lte" | "is" | "is_not", "value": number | "string" }
]
}
],
"source": "default",
"defaultApproverIsAdmin": boolean,
"requesterRule": { "eligibleApproverCount": number }
}