Skip to main content

Document Types

List the document types observed in your workspace and explore the Ontology, the classification taxonomy of over 450 Talonic base types in 16 categories.

The Document Types API gives programmatic access to the Ontology, the document-type taxonomy the Talonic platform classifies against. The Ontology has two parts: a standards-based Talonic base of more than 450 document types organized into 16 categories, from Invoicing & Billing and Contracts & Legal to Healthcare & Life Sciences and Government & Regulatory, plus your organization's optional Customer Overlay of custom types. Talonic auto-classifies every ingested document against it. These endpoints let you query which types exist in your workspace and explore the structure of the Talonic base.

The workspace types endpoint returns only the document types that have been observed in your workspace, ordered by document count descending. This makes it easy to see which document types dominate your pipeline and how many documents have been classified into each type. Each type includes its ontology category reference for grouping in dashboards or filters.

The ontology endpoint returns the Ontology's full Talonic base regardless of what documents exist in your workspace. Use it to understand the complete set of built-in types the platform can classify, build type-ahead selectors in integrations, or pre-configure schema mappings before documents arrive. The Talonic base is versioned (currently v1.0), and its types describe business function rather than format or sender, mapping to standards such as UBL, ANSI X12, UN/EDIFACT, and HL7 where one exists.

Document type classification happens automatically during ingestion through an auto-allocation waterfall: a document passes through allocation levels in order, and the first level that produces a confident answer wins. Self-declaring formats (UBL, X12, EDIFACT, HL7 envelopes) are detected first, each type carries content signals used to verify candidate labels, and ambiguous cases fall back to an LLM call over the document content. This keeps classification accurate regardless of document language or OCR label bias.

Document types are assigned automatically during ingestion, with no manual configuration required. The Ontology's Talonic base covers more than 450 types across 16 categories and is designed to handle documents in any language; a published Customer Overlay adds your own types on an axis alongside it.
GET/v1/document-types

List Response

Response fields

dataarrayArray of document type objects.
data[].idstringDocument type UUID.
data[].namestringHuman-readable document type name (e.g. Commercial Invoice, Purchase Order).
data[].ontology_type_idstring | nullReference ID of the type in the ontology taxonomy.
data[].category_idstring | nullOntology category this type belongs to.
data[].document_countintegerNumber of documents classified as this type in the workspace.
data[].links.selfstringSelf-link to this document type resource.

Response — List workspace document types

{
  "data": [
    {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "name": "Commercial Invoice",
      "ontology_type_id": "commercial_invoice",
      "category_id": "invoicing_billing",
      "document_count": 42,
      "links": { "self": "/v1/document-types/a1b2c3d4-e5f6-7890-abcd-ef1234567890" }
    },
    {
      "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "name": "Purchase Order",
      "ontology_type_id": "purchase_order",
      "category_id": "sales_ordering",
      "document_count": 31,
      "links": { "self": "/v1/document-types/b2c3d4e5-f6a7-8901-bcde-f12345678901" }
    },
    {
      "id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
      "name": "Employment Contract",
      "ontology_type_id": "employment_contract",
      "category_id": "hr_people",
      "document_count": 18,
      "links": { "self": "/v1/document-types/c3d4e5f6-a7b8-9012-cdef-123456789012" }
    }
  ]
}

Ontology

The ontology endpoint returns the Talonic base of the Ontology: more than 450 types organized into 16 categories, with larger categories subdivided into subcategories. Each category carries its types with their ontology IDs and display names. Use this to build document type selectors, map external classification systems to Talonic types, or understand the full scope of automatic classification.

GET/v1/document-types/ontology

Ontology Response

Response fields

dataarrayArray of ontology category objects.
data[].idstringCategory identifier (e.g. invoicing_billing).
data[].namestringHuman-readable category name.
data[].descriptionstringWhat the category covers.
data[].typeCountintegerTotal number of document types in this category, including subcategories.
data[].typesarrayTypes attached directly to the category ({ id, name }). Empty when the category is organized by subcategory.
data[].subcategoriesarraySubcategory groups, each with id, name, typeCount, and its own types array.

Response — Ontology summary (truncated)

{
  "data": [
    {
      "id": "invoicing_billing",
      "name": "Invoicing & Billing",
      "description": "All invoice and billing document types across industries",
      "typeCount": 11,
      "types": [
        { "id": "commercial_invoice", "name": "Commercial Invoice" },
        { "id": "self_billed_invoice", "name": "Self-Billed Invoice" }
      ],
      "subcategories": []
    },
    {
      "id": "hr_people",
      "name": "HR & People",
      "typeCount": 22,
      "types": [],
      "subcategories": [
        {
          "id": "hiring_onboarding",
          "name": "Hiring & Onboarding",
          "typeCount": 8,
          "types": [
            { "id": "employment_contract", "name": "Employment Contract" }
          ]
        }
      ]
    }
  ]
}

Example Requests

cURL — List workspace document types

curl -X GET "https://api.talonic.com/v1/document-types" \
  -H "Authorization: Bearer tlnc_your_api_key"

cURL — Get full ontology

curl -X GET "https://api.talonic.com/v1/document-types/ontology" \
  -H "Authorization: Bearer tlnc_your_api_key"

Errors

Error responses

401unauthorizedMissing or invalid API key.
429rate_limitedToo many requests. Retry after the period indicated in the Retry-After header.