Skip to main content
GET
/
service
/
general-ledger
/
approval-rules
/
applicable
curl -X GET "https://kube.acho.io/service/general-ledger/approval-rules/applicable?document_type=journal_entry&amount=15000&department_id=a3-dept-xxx" \
  -H "Authorization: jwt YOUR_TOKEN"
{
  "applicable_rules": [
    {
      "rule_id": "APR-JE-HIGH",
      "rule_name": "Journal Entry - High Amount",
      "approval_level": 2,
      "approver_type": "role",
      "approver_role": "approve_level_2",
      "priority": 20
    },
    {
      "rule_id": "APR-DEPT-FIN",
      "rule_name": "Finance Department Routing",
      "approval_level": 1,
      "approver_type": "manager",
      "priority": 30
    }
  ],
  "max_approval_level_required": 2,
  "total_rules_matched": 2
}

Request

Returns all approval rules that would apply to a document with the given criteria, sorted by priority.

Query Parameters

document_type
string
required
Document type: journal_entry, bill, invoice, bill_payment, invoice_payment, credit_memo, expense
amount
number
required
Document amount for threshold matching
department_id
string
Department ID for department routing rules
cost_center_id
string
Cost center ID for cost center routing rules
curl -X GET "https://kube.acho.io/service/general-ledger/approval-rules/applicable?document_type=journal_entry&amount=15000&department_id=a3-dept-xxx" \
  -H "Authorization: jwt YOUR_TOKEN"
{
  "applicable_rules": [
    {
      "rule_id": "APR-JE-HIGH",
      "rule_name": "Journal Entry - High Amount",
      "approval_level": 2,
      "approver_type": "role",
      "approver_role": "approve_level_2",
      "priority": 20
    },
    {
      "rule_id": "APR-DEPT-FIN",
      "rule_name": "Finance Department Routing",
      "approval_level": 1,
      "approver_type": "manager",
      "priority": 30
    }
  ],
  "max_approval_level_required": 2,
  "total_rules_matched": 2
}
Use this endpoint to preview which approval rules will be triggered before submitting a document for approval.