Filter Documents
Search and filter documents by extracted field values via API. Compose equality, comparison, range, containment, and emptiness conditions in one call.
The POST /v1/documents/filter endpoint lets you search documents by their extracted field values: compose conditions on any field Talonic has extracted (supplier names, invoice dates, contract amounts) and get back the matching documents with their field values. Each condition targets a specific field and applies an operator to test its value; multiple conditions are AND-combined. The endpoint also supports free-text search across document content and sorting by any field.
fieldId identifies the field to test. Use the field autocomplete endpoint to discover the field IDs available in your workspace; an unresolvable field ID returns a 400 error./v1/documents/filterBody parameters
150Operators: eq, neq, gt, gte, lt, lte, between, contains, is_empty, is_not_empty
Request body
{
"conditions": [
{ "fieldId": "fld_a1b2c3d4", "operator": "eq", "value": "Acme Corp" },
{ "fieldId": "fld_e5f6g7h8", "operator": "between", "value": "2024-01-01", "valueTo": "2024-12-31" }
],
"sort": { "fieldId": "fld_e5f6g7h8", "direction": "desc" },
"page": 1,
"limit": 25
}Response
Response fields
Response
{
"data": [
{
"id": "doc_x9y8z7w6",
"name": "Invoice-2024-001.pdf",
"sourceId": "src_m1n2o3p4",
"uploadedAt": "2024-09-14T10:32:00Z",
"fieldValues": {
"supplier_name": "Acme Corp",
"invoice_date": "2024-06-15"
}
}
],
"total": 47,
"links": {
"self": "/v1/documents/filter"
}
}Errors
Error responses
Build conditions programmatically by first calling GET /v1/search/autocomplete to resolve field IDs, then GET /v1/search/field-values to populate value pickers. The response includes the full fieldValues map per document, so you can render result tables without additional per-document fetches.