Request
Create a new approval rule for automated workflow routing.
Body Parameters
Unique identifier for the rule
Human-readable name for the rule
Document type: journal_entry, bill, invoice, bill_payment, invoice_payment, credit_memo, expense
Rule type: Amount Threshold, Department Routing, Cost Center Routing
Whether the rule is active
Priority order (lower numbers execute first)
Minimum amount threshold (for Amount Threshold rules)
Maximum amount threshold (for Amount Threshold rules). Null for no upper limit.
Required approval level (1, 2, 3, etc.)
Approver type: role, user, manager
Role required for approval (when approver_type is role)
Specific user ID (when approver_type is user)
curl -X POST https://kube.acho.io/service/general-ledger/approval-rules \
-H "Authorization: jwt YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"rule_id": "APR-BILL-HIGH",
"rule_name": "Bill - High Amount (Level 2 Required)",
"document_type": "bill",
"rule_type": "Amount Threshold",
"is_active": true,
"priority": 25,
"min_amount": 10000,
"max_amount": null,
"approval_level": 2,
"approver_type": "role",
"approver_role": "approve_level_2"
}'
{
"rule_id": "APR-BILL-HIGH",
"rule_name": "Bill - High Amount (Level 2 Required)",
"document_type": "bill",
"rule_type": "Amount Threshold",
"is_active": true,
"priority": 25,
"min_amount": 10000,
"max_amount": null,
"approval_level": 2,
"approver_type": "role",
"approver_role": "approve_level_2",
"created_at": "2024-01-15T10:00:00Z",
"created_by": "user-123"
}