Link documents into cases
What you get
A case brings together the documents that belong to one matter, such as an invoice, its purchase order and the contract behind them, and flags where they disagree. It is for teams that check a transaction as a whole rather than one file at a time, such as procurement, accounts payable and claims.
Talonic links documents that share a reference value, such as a purchase order or contract number, and forms a case from them automatically as documents arrive. Spelling differences in reference numbers and company names (PO-000123 and 123, "ACME Corp." and "Acme Corporation") are treated as the same value. Documents that only share a company name stay a loose group, not a case.
Before you start
- Processed documents whose fields carry reference numbers such as PO, invoice or contract numbers.
- Any role can read cases. Member and above can merge, split, confirm, close and dismiss flags. Templates and the choice of which fields link documents are Admin settings.
- Over the API,
readto list and inspect,writeto change cases.
Do it in the app
- Open the Cases page. Each case has a readable title, such as "ACME Corp Invoice #4521 → PO #8890", a document count and a badge for open issues. Filter by status to see what needs attention.
- Open a case. Overview summarises the documents and what connects them. Evidence shows the check result for each field value, grouped by document. Timeline lists events in order. Export Evidence and Timeline as MD, CSV or JSON.
- Switch on Advanced mode to see the Anomalies tab: the values that disagree across the case, most severe first. Dismiss a flag you have checked; show dismissed brings it back.
- Fix the grouping when it is wrong: merge two cases about the same matter, split one that mixes two, pin or remove a document, and confirm or reject a link between two documents.
- Move the case through its life: discovered, confirmed, active, then Closed. Closing a case can trigger a delivery you set up under Delivery.
Exceptions Talonic finds
duplicate_key_divergence: documents share a reference number but disagree on another field, such as the supplier name.field_conflict: an identifier, such as an IBAN, has too many different values across the case.missing_document_type: the case lacks a document type its template expects, such as a contract.value_reuse_suspicious: the same value appears in unrelated fields, a sign of a copy error.- Open findings, such as a contract number a document cites that no document in the case carries.
Templates describe the document mix a complete case should have, for example "Purchase Order + Invoice + Contract", with each type required or optional. Talonic proposes templates from patterns it sees in at least three cases; Admins can edit them.
Do it with the API
List cases with GET /v1/cases (filter with search and min_documents) and read one with GET /v1/cases/{key}, where key is the case id. Read flags with GET /v1/cases/{key}/anomalies, the shared references that join the documents with GET /v1/cases/{key}/evidence, and gaps with GET /v1/cases/{key}/completeness. Change a case with PATCH /v1/cases/{key}/status, POST /v1/cases/merge, POST /v1/cases/{key}/split, POST /v1/cases/{key}/documents/{docId}/pin, and confirm or reject links under /v1/cases/{key}/edges.
curl -s "https://api.talonic.com/v1/cases?search=acme&min_documents=2" \
-H "Authorization: Bearer $TALONIC_API_KEY"
curl -s https://api.talonic.com/v1/cases/5c7fa78c-4d92-4613-9f42-9fe74458d8a9/anomalies \
-H "Authorization: Bearer $TALONIC_API_KEY"
curl -s -X PATCH https://api.talonic.com/v1/cases/5c7fa78c-4d92-4613-9f42-9fe74458d8a9/status \
-H "Authorization: Bearer $TALONIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "status": "resolved", "resolution_notes": "All invoices reconciled." }'const headers = { Authorization: `Bearer ${process.env.TALONIC_API_KEY}` };
const base = 'https://api.talonic.com/v1/cases';
const { data: cases } = await fetch(`${base}?min_documents=2`, { headers }).then((r) => r.json());
for (const c of cases) {
const { data: issues } = await fetch(`${base}/${c.id}/anomalies`, { headers }).then((r) => r.json());
const critical = issues.filter((a) => a.severity === 'critical');
if (critical.length) console.log(c.label, critical.map((a) => a.title));
}{
"data": [
{
"type": "field_conflict",
"severity": "warning",
"title": "Conflicting values for iban",
"document_ids": ["doc_uuid_1", "doc_uuid_2"],
"targets": [
{ "document_id": "doc_uuid_1", "field": "iban", "value": "DE44 5001 0517 5407 3249 31" },
{ "document_id": "doc_uuid_2", "field": "iban", "value": "DE89 3704 0044 0532 0130 00" }
]
}
],
"findings": [],
"template": { "name": "Procurement", "required_types": ["Purchase Order", "Invoice"], "optional_types": ["Delivery Note"] }
}severity is critical, warning or info. targets lists the document, field and value behind each flag so you can open the document at the right place. status takes discovered, confirmed, active or resolved (shown as Closed) and only moves forward; moving to resolved publishes case.resolved for delivery.
Do it with an agent
No agent tool for cases. Call the endpoints above from your agent. Example: "Which open cases have a supplier name that differs between invoice and purchase order?"
Limits and costs
- Cases with more than about 120 documents return open findings only, without the cross-document flags, to keep the call fast.
- Each flag lists up to 40 targets. Changes can take up to a minute to show in linked-document views.
- Cases are billed as intelligence operations, 100 credits each in the published catalog (
GET /v1/pricing). See Billing, credits and usage. - Documents hidden from you by access rules never appear in a case, and flags that cite them are left out.
Errors
| Parameter | Type | Description |
|---|---|---|
| 400 | bad_request | The case id is not a UUID, or a status change moves backward or uses an unknown value. |
| 403 | forbidden | Your role cannot change cases. Ask a Member or Admin. |
| 404 | not_found | No case or document with that id in your workspace, or the document is hidden from you. |
| 429 | rate_limited | Wait for `Retry-After` and resend. |