Rulebooks are tenant-specific adjudication policies. Each rulebook contains deterministic rules evaluated by the claims engine to approve, flag, or block claims. Rules are versioned — publishing a new version is non-destructive.
/rulebooksList all rulebooks for the tenant
rulebooks:read/rulebooksCreate a new rulebook (starts as draft)
rulebooks:write/rulebooks/:idGet rulebook details and rules
rulebooks:read/rulebooks/:idUpdate rulebook draft
rulebooks:write/rulebooks/:id/publishPublish rulebook — makes it active
rulebooks:write/rulebooks/versionscurl -X POST http://localhost:8000/api/v1/rulebooks/versions \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"rulebook_id": "rb-uuid-here",
"version_label": "v1.0",
"rule_definitions": {
"rules": [
{
"rule_code": "NGN_COST_FLAG_001",
"description": "Flag claims where billed amount exceeds ₦500,000",
"severity": "high",
"outcome_on_match": "flag",
"condition": { "field_path": "claim.amount", "operator": "greater_than", "expected_value": 500000 }
}
]
}
}'Rulebooks start as draft. Publish to make them active. Only one version per rulebook can be active at a time.
curl -X POST http://localhost:8000/api/v1/rulebooks/publish \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "rulebook_version_id": "rv-uuid-here" }'APPROVEAPPROVEClaim is automatically approved and moves to payment processing.
FLAGFLAGClaim flagged for secondary manual review. A workflow task is created.
BLOCKBLOCKClaim is blocked with a reason code. No payment is made.
In addition to deterministic rules, Qubiclo supports Retrieval-Augmented Generation (RAG) for policy interpretation. Policy documents are chunked, embedded with sentence transformers, and stored in pgvector. The LLM reasons over retrieved chunks to produce policy citations that justify adjudication decisions.