List Routing Rules
List document routing rules ordered by priority. Rules match incoming documents by conditions and apply actions like automatic schema assignment.
Routing rules automate document processing: each rule matches incoming documents against conditions (like document type) and applies an action (like assigning an extraction schema). The GET /v1/routing-rules endpoint lists every rule in your workspace. Rules are evaluated in priority order, and the first matching rule wins.
When a document is classified (after OCR and type detection), the routing engine evaluates each active rule in priority order. The first rule whose conditions match is applied, and subsequent rules are skipped. This lets you build a priority chain: specific rules at the top, catch-all rules at the bottom.
- Rules trigger on
document_classifiedevents after OCR and type detection. - Conditions can match
document_type,source,language,sensitivity, and other metadata. - Actions include schema assignment, Job triggering, and team routing.
- Lower priority numbers are evaluated first.
/v1/routing-rulesQuery parameters
20descRequest
Response
Response fields
Response
{
"data": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Route invoices to finance schema",
"trigger_type": "document_classified",
"conditions": { "field": "document_type", "operator": "eq", "value": "invoice" },
"action_type": "route_to_schema",
"actions": { "type": "assign_schema", "schema_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901" },
"priority": 1,
"is_active": true,
"review_required": false,
"source_connection_id": null,
"created_at": "2024-09-01T10:00:00.000Z",
"updated_at": null,
"links": {
"self": "/v1/routing-rules/a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
}
],
"pagination": {
"total": 5,
"limit": 20,
"has_more": false,
"next_cursor": null
}
}Errors
Error responses