Cases

Update a case template

Changed on

Change a template. Partial: only the fields you send change. Requires the cases:write scope and a person allowed to change workspace settings.

patch/v1/cases/templates/{id}

Request

  • Base URL
    https://api.talonic.com
  • Auth
    HTTP bearer

Headers

Idempotency-Key, string

Unique key for idempotent requests, at most 64 characters (a longer key is refused with 400 invalid_idempotency_key before any work). A retry with the same key, request and API key within 24 hours returns the first response with Idempotent-Replayed: true; the same key on a different request or from another API key answers 422 idempotency_key_reused. On POST /v1/extract the key caches the extraction result for the workspace instead: any key of the workspace sending it gets that result with cached: true.

Request body

CaseTemplateUpdate required
name, string
description, string
expected_document_types, CaseTemplateDocumentType[]
link_key_requirements, CaseTemplateLinkKey[]
match_threshold, number

Share of the expected types a case must contain to match.

Example request

{
  "expected_document_types": [
    {
      "doc_type_name": "Invoice"
    }
  ],
  "link_key_requirements": [
    {
      "canonical_name": "order_number"
    }
  ]
}

Response

The updated template.

CaseTemplate required
id, string uuid
name, string
description, string nullable
expected_document_types, CaseTemplateDocumentType[]
link_key_requirements, CaseTemplateLinkKey[]
match_threshold, number
auto_discovered, boolean
created_at, string date-time
updated_at, string date-time

Example response

{
  "expected_document_types": [
    {
      "doc_type_name": "Invoice"
    }
  ],
  "link_key_requirements": [
    {
      "canonical_name": "order_number"
    }
  ]
}

Changes