Skip to main content
POST
/
service
/
general-ledger
/
approval-rules
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"
}

Request

Create a new approval rule for automated workflow routing.

Body Parameters

rule_id
string
required
Unique identifier for the rule
rule_name
string
required
Human-readable name for the rule
document_type
string
required
Document type: journal_entry, bill, invoice, bill_payment, invoice_payment, credit_memo, expense
rule_type
string
required
Rule type: Amount Threshold, Department Routing, Cost Center Routing
is_active
boolean
required
Whether the rule is active
priority
integer
required
Priority order (lower numbers execute first)
min_amount
number
Minimum amount threshold (for Amount Threshold rules)
max_amount
number
Maximum amount threshold (for Amount Threshold rules). Null for no upper limit.
approval_level
integer
required
Required approval level (1, 2, 3, etc.)
approver_type
string
required
Approver type: role, user, manager
approver_role
string
Role required for approval (when approver_type is role)
approver_user_id
string
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"
}