Skip to main content

Documents Endpoint Reference

Reference for 10 Documents endpoints of the Talonic API: parameters, request body, curl and Node.js examples, response and errors.

Browse, inspect, and delete processed documents. Includes document type classification and OCR markdown retrieval.

Every request needs an API key in the Authorization: Bearer header. Examples read the key from the TALONIC_API_KEY environment variable.

PATCH/v1/documents/{id}

Path parameters

id*string (uuid)Resource UUID.

Request body (application/json)

batch_idstringGrouping key — string sets, null clears, absent untouched.
metadataobjectFlat primitive bag merged over the stored metadata.

curl

curl -X PATCH 'https://api.talonic.com/v1/documents/a1b2c3d4-e5f6-7890-abcd-ef1234567890' \
  -H "Authorization: Bearer $TALONIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "batch_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "metadata": {}
}'

Node.js (18+)

const res = await fetch("https://api.talonic.com/v1/documents/a1b2c3d4-e5f6-7890-abcd-ef1234567890", {
  method: 'PATCH',
  headers: {
    Authorization: `Bearer ${process.env.TALONIC_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "batch_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "metadata": {}
  }),
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
const data = await res.json();

Response 200 — Updated tags. `batch_id`/`metadata` are echoed only when set.

{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "updated": true,
  "batch_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "metadata": {}
}
  • 400 — The request is invalid.
  • 401 — Missing or invalid API key.
  • 404 — The requested resource was not found.
  • 429 — Daily rate limit exceeded.
GET/v1/documents/{id}/extractions

Path parameters

id*string (uuid)Resource UUID.

curl

curl -X GET 'https://api.talonic.com/v1/documents/a1b2c3d4-e5f6-7890-abcd-ef1234567890/extractions' \
  -H "Authorization: Bearer $TALONIC_API_KEY"

Node.js (18+)

const res = await fetch("https://api.talonic.com/v1/documents/a1b2c3d4-e5f6-7890-abcd-ef1234567890/extractions", {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.TALONIC_API_KEY}`,
  },
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
const data = await res.json();

Response 200 — Extractions for the document.

{
  "data": [
    {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "status": "completed",
      "document": {
        "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
        "filename": "invoice-042.pdf",
        "pages": 1,
        "type_detected": "string"
      },
      "data": {},
      "confidence": {
        "overall": 1.5,
        "fields": {}
      },
      "locked_fields": [
        "string"
      ],
      "batch_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "metadata": {},
      "processing": {
        "duration_ms": 1,
        "pages_processed": 1,
        "region": "eu-west"
      },
      "created_at": "2026-04-25T14:30:00.000Z",
      "links": {
        "self": "string",
        "data": "string",
        "document": "string",
        "dashboard": "https://example.com"
      }
    }
  ]
}
  • 401 — Missing or invalid API key.
  • 404 — The requested resource was not found.
  • 429 — Daily rate limit exceeded.
GET/v1/documents/{id}/segments

Path parameters

id*string (uuid)Resource UUID.

curl

curl -X GET 'https://api.talonic.com/v1/documents/a1b2c3d4-e5f6-7890-abcd-ef1234567890/segments' \
  -H "Authorization: Bearer $TALONIC_API_KEY"

Node.js (18+)

const res = await fetch("https://api.talonic.com/v1/documents/a1b2c3d4-e5f6-7890-abcd-ef1234567890/segments", {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.TALONIC_API_KEY}`,
  },
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
const data = await res.json();

Response 200 — The packet's segments.

{
  "document_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "filename": "string",
  "pages": 1,
  "is_packet": true,
  "segment_count": 1,
  "data": [
    {}
  ],
  "links": {}
}
  • 404 — Document not found.
GET/v1/settings/packet-split

curl

curl -X GET 'https://api.talonic.com/v1/settings/packet-split' \
  -H "Authorization: Bearer $TALONIC_API_KEY"

Node.js (18+)

const res = await fetch("https://api.talonic.com/v1/settings/packet-split", {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.TALONIC_API_KEY}`,
  },
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
const data = await res.json();

Response 200 — The packet-split setting.

{
  "enabled": true,
  "effective": true,
  "locked": "string",
  "vision_read": true,
  "vision_available": true
}
PATCH/v1/settings/packet-split

Request body (application/json)

enabledboolean
vision_readboolean
vision_read_handwrittenbooleanRead only the split documents that are filled in by hand from their page images. Ignored while vision_read is on.

curl

curl -X PATCH 'https://api.talonic.com/v1/settings/packet-split' \
  -H "Authorization: Bearer $TALONIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "enabled": true,
  "vision_read": true,
  "vision_read_handwritten": true
}'

Node.js (18+)

const res = await fetch("https://api.talonic.com/v1/settings/packet-split", {
  method: 'PATCH',
  headers: {
    Authorization: `Bearer ${process.env.TALONIC_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "enabled": true,
    "vision_read": true,
    "vision_read_handwritten": true
  }),
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
// 200: no JSON body

Response 200: The resulting packet-split setting.

POST/v1/documents/{id}/vision-read

Path parameters

id*string (uuid)Resource UUID.

Query parameters

onlystring ("handwritten")On a split packet, re-read only the segments filled in by hand (each page is checked first); skipped counts the others.

curl

curl -X POST 'https://api.talonic.com/v1/documents/a1b2c3d4-e5f6-7890-abcd-ef1234567890/vision-read' \
  -H "Authorization: Bearer $TALONIC_API_KEY"

Node.js (18+)

const res = await fetch("https://api.talonic.com/v1/documents/a1b2c3d4-e5f6-7890-abcd-ef1234567890/vision-read", {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.TALONIC_API_KEY}`,
  },
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
const data = await res.json();

Response 201 — The documents queued for the vision read.

{
  "document_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "available": true,
  "queued": 1,
  "document_ids": [
    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  ]
}
  • 404 — Document not found.
POST/v1/documents/{id}/re-extract

Path parameters

id*string (uuid)Resource UUID.

curl

curl -X POST 'https://api.talonic.com/v1/documents/a1b2c3d4-e5f6-7890-abcd-ef1234567890/re-extract' \
  -H "Authorization: Bearer $TALONIC_API_KEY"

Node.js (18+)

const res = await fetch("https://api.talonic.com/v1/documents/a1b2c3d4-e5f6-7890-abcd-ef1234567890/re-extract", {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.TALONIC_API_KEY}`,
  },
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
const data = await res.json();

Response 200 — Re-extraction started.

{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "status": "completed",
  "message": "Re-extraction started.",
  "links": {
    "self": "string",
    "document": "string"
  }
}
  • 401 — Missing or invalid API key.
  • 403 — The API key does not have the required scope.
  • 404 — The requested resource was not found.
  • 429 — Daily rate limit exceeded.
GET/v1/documents/{id}/markdown

Path parameters

id*string (uuid)Resource UUID.

curl

curl -X GET 'https://api.talonic.com/v1/documents/a1b2c3d4-e5f6-7890-abcd-ef1234567890/markdown' \
  -H "Authorization: Bearer $TALONIC_API_KEY"

Node.js (18+)

const res = await fetch("https://api.talonic.com/v1/documents/a1b2c3d4-e5f6-7890-abcd-ef1234567890/markdown", {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.TALONIC_API_KEY}`,
  },
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
const data = await res.json();

Response 200 — Document markdown.

{
  "document_id": "f0e1d2c3-b4a5-9687-8765-432109876543",
  "markdown": "# Invoice INV-2024-0042\nVendor: Acme Corp..."
}
  • 401 — Missing or invalid API key.
  • 404 — The requested resource was not found.
  • 429 — Daily rate limit exceeded.
GET/v1/accounts

curl

curl -X GET 'https://api.talonic.com/v1/accounts' \
  -H "Authorization: Bearer $TALONIC_API_KEY"

Node.js (18+)

const res = await fetch("https://api.talonic.com/v1/accounts", {
  method: 'GET',
  headers: {
    Authorization: `Bearer ${process.env.TALONIC_API_KEY}`,
  },
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
const data = await res.json();

Response 200 — The workspace's accounts.

{
  "data": [
    {
      "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "name": "Filu",
      "aliases": [
        "Filu Group GmbH"
      ],
      "description": "string",
      "created_at": "2026-01-15T09:30:00Z"
    }
  ]
}
  • 401 — Missing or invalid API key.
POST/v1/accounts

Request body (application/json)

name*string
aliasesstring[]
descriptionstring

curl

curl -X POST 'https://api.talonic.com/v1/accounts' \
  -H "Authorization: Bearer $TALONIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Filu",
  "aliases": [
    "Filu Group GmbH"
  ],
  "description": "string"
}'

Node.js (18+)

const res = await fetch("https://api.talonic.com/v1/accounts", {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.TALONIC_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "name": "Filu",
    "aliases": [
      "Filu Group GmbH"
    ],
    "description": "string"
  }),
});
if (!res.ok) throw new Error(`${res.status}: ${await res.text()}`);
const data = await res.json();

Response 201 — Account created.

{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "name": "Filu",
  "aliases": [
    "Filu Group GmbH"
  ],
  "description": "string",
  "created_at": "2026-01-15T09:30:00Z"
}
  • 401 — Missing or invalid API key.
  • 409 — A collection with that name already exists.