Skip to content

ReferenceInside a case

Fields

The values read from a document, such as the employer, the net pay, the pay date or a closing balance. Each value says how sure the reading is and keeps the value as first read. A member can correct a value; the original reading and every correction stay, and the checks that use it run again.

Updated

Ask about this pageRead this page as Markdown

The field object

  • document_idstring

    The document it was read from.

  • fieldstring

    The field’s key, such as net_pay or pay_date; one of your own fields as custom.<name>.

  • namestring

    The field’s name as members see it.

  • typestring

    What it holds: text, name, address, date, money, number, integer, percent, boolean, country, currency, identifier, iban, email or phone.

  • valuestring

    The value now, as one line of text: the reading, or the latest correction. Amounts are written with a dot, dates as yyyy-mm-dd. Null when it is not on the document.

  • typed_valueany

    The same value as its type: an amount as {amount, currency} with the amount a decimal string, a date as yyyy-mm-dd.

  • originalstring

    The value as first read, before any correction.

  • printedstring

    The text as printed on the page, kept beside the value.

  • sourcestring

    Where the value comes from: profile, reader, id_reader, barcode, words or correction.

  • confidencenumber

    How clearly the printed text was recognised, from 0 to 1; null when the value was not found on the page.

  • levelstring

    high, medium or low: how much to trust the reading at a glance.

  • locationarray

    Where it is printed: each place a page (from 1) and a box [x1, y1, x2, y2] from 0 to 1000 of the page’s width and height.

  • reviewarray

    Why a person should look, such as not_located, low_recognition, ambiguous_date, currency_unknown or page_not_read. Empty when nothing needs a look.

  • alternativesarray

    Another reading of the document that gives another value, with where it comes from.

  • correctedboolean

    Whether a correction is in force.

  • pendingobject

    A correction waiting for a second member to confirm it, when the workspace asks for one; null otherwise.

  • historyarray

    Oldest first: each earlier reading that gave another value and each correction, with the value, who made it, when and their note.

The extraction holds the document’s fields in its field set’s order, then your own fields; its tables, such as a statement’s transactions; the checks run on the values, each passed, failed or skipped with its reason; and the findings a failed check raised, each with its proof in plain words. Its state is reading, read, partial (some pages or fields could not be read), failed or not_read. A live document of a workspace on the free start shows its values once a plan starts: until then the lists are empty and details_locked says why.

Read the values of a document

Reads only

GET/v1/documents/{document_id}/extraction

Every value read from a document, with its confidence, the value as first read, and each correction with who made it and when.

Who may
Owner, Admin, Analyst and Viewer; Developer in test mode
CLI
kontiga documents fields <document_id>
MCP tool
get_document_fields
Returns
The document’s values, each with its reading and its history.

Parameters

  • document_idid (doc_)Required

    The document whose values to read. In the path.

curl -X GET https://api.kontiga.com/v1/documents/doc_4Fp8Ns2/extraction \
  -H "Authorization: Bearer $KONTIGA_API_KEY"

GET /v1/documents/{document_id}/extraction

Response, 200 OK
{
  "object": "extraction",
  "document_id": "doc_4Fp8Ns2",
  "mode": "live",
  "state": "read",
  "reading_version": 1,
  "document_type": "payslip",
  "field_set": { "key": "payslip", "version": 1 },
  "pages_total": 1,
  "pages_read": 1,
  "read_at": "2026-11-25T09:40:02Z",
  "fields": [
    {
      "document_id": "doc_4Fp8Ns2",
      "field": "issuer_name",
      "name": "Employer",
      "type": "name",
      "multiple": false,
      "value": "Corrib Freight Ltd",
      "typed_value": "Corrib Freight Ltd",
      "original": "Corrib Freight Ltd",
      "printed": "CORRIB FREIGHT LTD",
      "source": "profile",
      "confidence": 0.99,
      "level": "high",
      "location": [
        { "page": 1, "box": [62, 41, 318, 58] }
      ],
      "review": [],
      "alternatives": [],
      "corrected": false,
      "pending": null,
      "history": []
    },
    {
      "document_id": "doc_4Fp8Ns2",
      "field": "net_pay",
      "name": "Net pay",
      "type": "money",
      "multiple": false,
      "value": "3412.60",
      "typed_value": {
        "amount": "3412.60",
        "currency": "EUR"
      },
      "original": "3412.80",
      "printed": "3 412,80",
      "source": "correction",
      "confidence": 0.71,
      "level": "medium",
      "location": [
        { "page": 1, "box": [702, 640, 811, 657] }
      ],
      "review": [],
      "alternatives": [],
      "corrected": true,
      "pending": null,
      "history": [
        {
          "kind": "correction",
          "action": "set",
          "value": "3412.60",
          "from": "3412.80",
          "to": "3412.60",
          "by": "Tomas Lindqvist",
          "actor": {
            "kind": "member",
            "id": "mem_6Tb1Nf8",
            "name": "Tomas Lindqvist"
          },
          "at": "2026-11-25T09:48:16Z",
          "note": "The last digit is smudged on the scan; the bank statement shows 3,412.60.",
          "state": "in_force"
        }
      ]
    }
  ],
  "tables": [],
  "checks": [
    {
      "rule": "W10",
      "key": "payslip_net_pay",
      "state": "passed"
    }
  ],
  "findings": [
    {
      "tag": "trust.extract.payslip_arithmetic_holds",
      "kind": "positive",
      "title": "Payslip adds up",
      "description": "The payslip's amounts add up.",
      "rule": "W10",
      "proof": null
    }
  ],
  "custom_fields": []
}

Correct a value

Changes data

PATCH/v1/documents/{document_id}/fields/{field}

Change a value read from a document. The original reading, who changed it and when are kept, and the checks run again.

Who may
Owner, Admin and Analyst; Developer in test mode
CLI
kontiga documents correct-field <document_id> <field> --value <value> [--note <text>]
MCP tool
correct_field
Returns
The field with its new value and its history.

Parameters

  • document_idid (doc_)Required

    The document the value was read from. In the path.

  • fieldstringRequired

    The field’s key, as fields.list gives it. In the path.

  • valuestringRequired

    The right value, written as the field writes it. Give not_present: true instead when it is not on the document, or restore: true to go back to the reading. At most 500 characters.

  • notestring

    Why, for the team. It stays in the field’s history. A workspace may ask for one on every correction. At most 500 characters.

curl -X PATCH https://api.kontiga.com/v1/documents/doc_4Fp8Ns2/fields/net_pay \
  -H "Authorization: Bearer $KONTIGA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "value": "3412.60",
    "note": "The last digit is smudged on the scan; the bank statement shows 3,412.60."
  }'

PATCH /v1/documents/{document_id}/fields/{field}

Response, 200 OK
{
  "object": "field",
  "document_id": "doc_4Fp8Ns2",
  "field": "net_pay",
  "name": "Net pay",
  "type": "money",
  "multiple": false,
  "value": "3412.60",
  "typed_value": {
    "amount": "3412.60",
    "currency": "EUR"
  },
  "original": "3412.80",
  "printed": "3 412,80",
  "source": "correction",
  "confidence": 0.71,
  "level": "medium",
  "location": [
    { "page": 1, "box": [702, 640, 811, 657] }
  ],
  "review": [],
  "alternatives": [],
  "corrected": true,
  "pending": null,
  "history": [
    {
      "kind": "correction",
      "action": "set",
      "value": "3412.60",
      "from": "3412.80",
      "to": "3412.60",
      "by": "Tomas Lindqvist",
      "actor": {
        "kind": "member",
        "id": "mem_6Tb1Nf8",
        "name": "Tomas Lindqvist"
      },
      "at": "2026-11-25T09:48:16Z",
      "note": "The last digit is smudged on the scan; the bank statement shows 3,412.60.",
      "state": "in_force"
    }
  ]
}

The checks that read the field run again at once, so a finding can be raised or removed. A correction sends field.corrected to your webhook endpoints with the document and the field, never the values: read them here. A value that does not fit the field’s type, or a missing note the workspace asks for, is refused with 422; a role that may not correct values gets 403; a document still being read gets 409.

Read one value of a document

Reads only

GET/v1/documents/{document_id}/fields/{field}

One value read from a document, with where it was read, how sure the reading is, and every correction with who made it and when.

Who may
Owner, Admin, Analyst and Viewer; Developer in test mode
CLI
kontiga documents field <document_id> <field>
MCP tool
get_document_field
Returns
The value, as first read and as it is now, with its confidence and its history.

Parameters

  • document_idid (doc_)Required

    The document. In the path.

  • fieldstringRequired

    The field’s key, as fields.list gives it. In the path.

curl -X GET https://api.kontiga.com/v1/documents/doc_5Wm2Hk7/fields/net_pay \
  -H "Authorization: Bearer $KONTIGA_API_KEY"

GET /v1/documents/{document_id}/fields/{field}

Response, 200 OK
{
  "object": "field",
  "document_id": "doc_4Fp8Ns2",
  "field": "net_pay",
  "name": "Net pay",
  "type": "money",
  "multiple": false,
  "value": "3412.60",
  "typed_value": {
    "amount": "3412.60",
    "currency": "EUR"
  },
  "original": "3412.80",
  "printed": "3 412,80",
  "source": "correction",
  "confidence": 0.71,
  "level": "medium",
  "location": [
    { "page": 1, "box": [702, 640, 811, 657] }
  ],
  "review": [],
  "alternatives": [],
  "corrected": true,
  "pending": null,
  "history": [
    {
      "kind": "correction",
      "action": "set",
      "value": "3412.60",
      "from": "3412.80",
      "to": "3412.60",
      "by": "Tomas Lindqvist",
      "actor": {
        "kind": "member",
        "id": "mem_6Tb1Nf8",
        "name": "Tomas Lindqvist"
      },
      "at": "2026-11-25T09:48:16Z",
      "note": "The last digit is smudged on the scan; the bank statement shows 3,412.60.",
      "state": "in_force"
    }
  ]
}

Correct a table

Changes data

POST/v1/documents/{document_id}/tables/{table}/corrections

Correct a table read from a document: set a cell, add a row or remove one. Each correction is kept with who made it and when, and stays when the document is read again.

Who may
Owner, Admin and Analyst; Developer in test mode
CLI
kontiga documents correct-table <document_id> <table> --corrections <json>
MCP tool
correct_document_table
Returns
The table as corrected, with every correction.

Parameters

  • document_idid (doc_)Required

    The document. In the path.

  • tablestringRequired

    The table’s key: transactions, line_items. In the path.

  • correctionsarray of objectRequired

    Up to 100, applied in order: set_cell (row, column, value), add_row (row, the new row goes after it) or remove_row (row). A value is checked against its column’s type. They stay when the document is read again.

curl -X POST https://api.kontiga.com/v1/documents/doc_3Hy8Vc1/tables/transactions/corrections \
  -H "Authorization: Bearer $KONTIGA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "corrections": [
      {
        "op": "set_cell",
        "row": 4,
        "column": "amount",
        "value": "-1250.00"
      }
    ]
  }'

POST /v1/documents/{document_id}/tables/{table}/corrections

Response, 200 OK
{
  "document_id": "doc_3Hy8Vc1",
  "table": "transactions",
  "name": "Transactions",
  "columns": [
    "booking_date",
    "value_date",
    "description",
    "reference",
    "counterparty",
    "amount",
    "balance"
  ],
  "column_types": [
    { "name": "booking_date", "type": "date" },
    { "name": "amount", "type": "money" }
  ],
  "rows": [
    {
      "index": 4,
      "cells": {
        "booking_date": "2026-10-28",
        "description": "Rent",
        "amount": "-1250.00",
        "balance": "2104.35"
      },
      "values": {
        "booking_date": "2026-10-28",
        "description": "Rent",
        "amount": {
          "amount": "-1250.00",
          "currency": "EUR"
        }
      },
      "location": [
        { "page": 2, "box": [48, 412, 951, 427] }
      ],
      "corrected": true
    }
  ],
  "review": [],
  "history": [
    {
      "at": "2026-11-27T11:02:10Z",
      "by": "Jonas Weber",
      "op": "set_cell",
      "row": 4,
      "column": "amount",
      "value": "-1250.00",
      "note": null
    }
  ],
  "object": "table"
}

Read a document again

Changes data

POST/v1/documents/{document_id}/extraction/reread

Read a document’s values again as a new version of its reading, with up to 50 fields of your own beside its field set. The corrections made by people are kept over it.

Who may
Owner, Admin and Analyst; Developer in test mode
CLI
kontiga documents reread <document_id> [--custom-fields <json>]
MCP tool
reread_document
Returns
The new reading, under way.

Parameters

  • document_idid (doc_)Required

    The document to read again. Corrections people made stay over the new reading, and the earlier reading stays in each field’s history. In the path.

  • custom_fieldsarray of object

    Optional: up to 50 fields of your own to read beside the field set, each with a name (lower case letters, digits and _, starting with a letter) or a label it is made from, a type, and overwrite_if_exists. A name that does not fit, or a 51st field, is refused with 422. Left out, the fields asked for before are read again.

curl -X POST https://api.kontiga.com/v1/documents/doc_5Wm2Hk7/extraction/reread \
  -H "Authorization: Bearer $KONTIGA_API_KEY"

POST /v1/documents/{document_id}/extraction/reread

Response, 202 Accepted
{
  "object": "extraction_reading",
  "document_id": "doc_5Wm2Hk7",
  "version": 2,
  "state": "reading",
  "started_at": "2026-11-27T11:05:00Z",
  "finished_at": null
}