Get automation rules
Returns a process's automation rules.
GET/v1/workspaces/{regionId}/automation-rules/{process}
Parameters
process"purchase_order" | "invoice_payment"RequiredWhich flow's rules to fetch.
Returns
200 OK with the object shown in the response.
More details
Returns a process's automation rules in priority order, or { process, rules: [] } if none are configured, and whether the workspace's plan lets auto-approve rules run.
Response fields
autoApproveAllowedbooleanWhether the plan allows autonomy (Autonomous or Enterprise). When false, rules with autoApprove true are kept but skipped when orders and invoices are evaluated, so a rule behind them can still match; upgrading makes them run again. Computed on every read, never stored.
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}/automation-rules/{process}" \
-H "X-Api-Key: $PLEAXY_API_KEY"{
"process": "purchase_order" | "invoice_payment",
"rules": [
{ "id": "string", "label": "string", "conditions": { "supplierWorkspaceId": "string", "supplierContains": "string", "maxAmount": number }, "autoApprove": boolean, "enabled": boolean, "createdAt": "string" }
],
"autoApproveAllowed": boolean
}