Skip to main content

Case Templates & Terminology

Define which document types make a case complete, and what your workspace calls a case.

A case template names the document types a complete case contains, for example a procurement package with an invoice, a purchase order and a delivery note. A case that matches a template reports which expected documents are missing (see GET /v1/cases/{key}/completeness and GET /v1/cases/{key}/anomalies). Terminology sets the word the workspace uses for a case.

Reading needs cases:read. Changing needs cases:write, and the person behind the credential must be allowed to change workspace settings, as in the app.

GET/v1/cases/templates
POST/v1/cases/templates

Body

namestringTemplate name, up to 200 characters.
descriptionstringOptional description.
expected_document_typesarrayEach { doc_type_name, doc_type_id?, required? }; required: true means a case is incomplete without it.
link_key_requirementsarrayOptional { canonical_name, category } fields whose shared value must connect the documents.

curl

curl -s -X POST https://api.talonic.com/v1/cases/templates \
  -H "Authorization: Bearer tlnc_your_api_key" \
  -H "Idempotency-Key: tpl-procurement" \
  -H "Content-Type: application/json" \
  -d '{"name": "Procurement package", "expected_document_types": [{"doc_type_name": "Invoice", "required": true}, {"doc_type_name": "Purchase order", "required": true}]}'
PATCH/v1/cases/templates/{id}
DELETE/v1/cases/templates/{id}
GET/v1/cases/terminology
PATCH/v1/cases/terminology

Errors

Error responses

400bad_requestInvalid parameters, or no specific workspace selected.
401unauthorizedMissing or invalid API key or token.
403insufficient_scope / insufficient_role / no_personThe credential lacks cases:write, or its person may not change workspace settings, or the key belongs to no person.
404not_foundThe template does not exist in this workspace.
409idempotency_request_in_progressA request with the same Idempotency-Key is still running. Retry shortly to receive its result.
422idempotency_key_reusedThe Idempotency-Key was already used for a different request.
429rate_limitedToo many requests. Retry after the period in the Retry-After header.

Frequently asked questions

Who can change templates?+
Anyone whose credential has cases:write and whose role allows changing workspace settings (workspace owners by default).