Skip to main content

Document Types

List workspace document types and explore the full 529-type ontology with 10 categories via the Document Types API for classification insights.

The Document Types API gives programmatic access to the document classification taxonomy used by the platform. Talonic auto-classifies every ingested document into one of 529 document types organized across 10 ontology categories — Financial & Tax, Procurement & Invoicing, Human Resources, Legal & Compliance, Insurance, Healthcare, Logistics & Supply Chain, Real Estate, Government, and General Business. These endpoints let you query which types exist in your workspace and explore the full ontology structure.

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 full classification taxonomy regardless of what documents exist in your workspace. Use it to understand the complete set of types the platform can classify, build type-ahead selectors in integrations, or pre-configure schema mappings before documents arrive. The ontology is versioned and stable — type IDs do not change between platform releases.

Document type classification happens automatically during ingestion. The platform uses a multi-tier classifier: Document AI returns a free-text label, which is then resolved against the ontology via exact match with content signal verification, falling back to a Haiku LLM call with document content for ambiguous cases. This ensures correct classification regardless of document language or OCR label bias.

Document types are assigned automatically during ingestion — no manual configuration is required. The ontology covers 529 types across 10 categories and is designed to handle documents in any language.
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. Invoice, Purchase Order).
data[].ontology_type_idstringReference ID in the ontology taxonomy.
data[].category_idstringOntology 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": "Invoice",
      "ontology_type_id": "ont_inv_001",
      "category_id": "cat_procurement",
      "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": "ont_po_002",
      "category_id": "cat_procurement",
      "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": "ont_emp_015",
      "category_id": "cat_hr",
      "document_count": 18,
      "links": { "self": "/v1/document-types/c3d4e5f6-a7b8-9012-cdef-123456789012" }
    }
  ]
}

Ontology

The ontology endpoint returns the full document classification taxonomy with all 529 types organized into 10 categories. Each category contains a list of 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

categoriesarrayArray of ontology category objects.
categories[].idstringCategory identifier.
categories[].namestringHuman-readable category name.
categories[].type_countintegerNumber of document types in this category.
categories[].typesarrayDocument types belonging to this category.
categories[].types[].ontology_type_idstringOntology type identifier.
categories[].types[].namestringDocument type display name.

Response — Ontology summary (truncated)

{
  "categories": [
    {
      "id": "cat_procurement",
      "name": "Procurement & Invoicing",
      "type_count": 64,
      "types": [
        { "ontology_type_id": "ont_inv_001", "name": "Invoice" },
        { "ontology_type_id": "ont_po_002", "name": "Purchase Order" },
        { "ontology_type_id": "ont_rcpt_003", "name": "Receipt" }
      ]
    },
    {
      "id": "cat_hr",
      "name": "Human Resources",
      "type_count": 58,
      "types": [
        { "ontology_type_id": "ont_emp_015", "name": "Employment Contract" },
        { "ontology_type_id": "ont_pay_016", "name": "Payslip" }
      ]
    }
  ]
}

Example Requests

cURL — List workspace document types

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

cURL — Get full ontology

curl -X GET "https://api.talonic.ai/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.