Skip to content

ReferenceInside a case

Field sets

The values Kontiga reads from each type of document with no setup: a standard field set per document type, with the common fields every document gets, and starter lists of your own fields for documents outside Kontiga’s types. Read them before you send a file to know what comes back. No key is needed.

Updated

Ask about this pageRead this page as Markdown

The field set object

  • keystring

    The set’s key, such as payslip or bank_statement. common is read on every document.

  • versioninteger

    A new version may add fields; it never renames or removes one.

  • namestring

    The set’s name as members see it.

  • document_typesarray

    The document types it is read for; empty for the common set.

  • fieldsarray

    Each field: its key, name, type (text, name, address, date, money, number, integer, percent, boolean, country, currency, identifier, iban, email or phone), whether it holds several values, and whether it is a key field, one a document of the type normally shows.

  • tablesarray

    The tables read row by row, such as a statement’s transactions or an invoice’s line items, each with its columns.

List the field sets

Reads only

GET/v1/field_sets

Every standard field set: the fields Kontiga reads for each document type with no setup, with their kinds and the key fields, and the common set every document gets.

Who may
Anyone, with no account yet
CLI
kontiga field-sets list
MCP tool
list_field_sets
Returns
Every field set with its version, document types and fields.

No parameters.

curl -X GET https://api.kontiga.com/v1/field_sets

GET /v1/field_sets

Response, 200 OK
{
  "object": "list",
  "items": [
    {
      "key": "payslip",
      "object": "field_set",
      "version": 1,
      "name": "Payslip",
      "document_types": ["payslip"],
      "fields": [
        {
          "key": "issuer_name",
          "name": "Employer",
          "type": "name",
          "multiple": false,
          "key_field": true
        },
        {
          "key": "issuer_address",
          "name": "Issuer address",
          "type": "address",
          "multiple": false,
          "key_field": false
        },
        {
          "key": "pay_date",
          "name": "Pay date",
          "type": "date",
          "multiple": false,
          "key_field": true
        },
        {
          "key": "net_pay",
          "name": "Net pay",
          "type": "money",
          "multiple": false,
          "key_field": true
        }
      ],
      "tables": [
        {
          "key": "earnings",
          "name": "Earnings",
          "columns": [
            {
              "key": "description",
              "type": "text"
            },
            { "key": "hours", "type": "number" },
            { "key": "rate", "type": "money" },
            { "key": "amount", "type": "money" },
            {
              "key": "amount_ytd",
              "type": "money"
            }
          ]
        }
      ]
    }
  ],
  "has_more": false,
  "next_cursor": null,
  "document_types": {
    "payslip": "payslip",
    "bank_statements": "bank_statement",
    "invoice": "invoice",
    "letter": "common"
  }
}

document_types maps every document type to the set read for it. Each answer carries an ETag: send it back in If-None-Match and an unchanged list answers 304 Not Modified.

Read a field set

Reads only

GET/v1/field_sets/{field_set}

One standard field set by its key: its version, the document types it is read for and its fields.

Who may
Anyone, with no account yet
CLI
kontiga field-sets get <field_set>
MCP tool
get_field_set
Returns
The field set with its version, document types and fields.

Parameters

  • field_setstringRequired

    The set’s key, as field_sets.list gives it. In the path.

curl -X GET https://api.kontiga.com/v1/field_sets/payslip

GET /v1/field_sets/{field_set}

Response, 200 OK
{
  "key": "payslip",
  "object": "field_set",
  "version": 1,
  "name": "Payslip",
  "document_types": ["payslip"],
  "fields": [
    {
      "key": "issuer_name",
      "name": "Employer",
      "type": "name",
      "multiple": false,
      "key_field": true
    },
    {
      "key": "issuer_address",
      "name": "Issuer address",
      "type": "address",
      "multiple": false,
      "key_field": false
    },
    {
      "key": "pay_date",
      "name": "Pay date",
      "type": "date",
      "multiple": false,
      "key_field": true
    },
    {
      "key": "net_pay",
      "name": "Net pay",
      "type": "money",
      "multiple": false,
      "key_field": true
    }
  ],
  "tables": [
    {
      "key": "earnings",
      "name": "Earnings",
      "columns": [
        { "key": "description", "type": "text" },
        { "key": "hours", "type": "number" },
        { "key": "rate", "type": "money" },
        { "key": "amount", "type": "money" },
        { "key": "amount_ytd", "type": "money" }
      ]
    }
  ]
}

List the field templates

Reads only

GET/v1/field_templates

The starter lists of custom fields for documents outside Kontiga’s types, to pick and edit when asking for one.

Who may
Anyone, with no account yet
CLI
kontiga field-templates list
MCP tool
list_field_templates
Returns
Every starter list, with its fields and their kinds.

No parameters.

curl -X GET https://api.kontiga.com/v1/field_templates

GET /v1/field_templates

Response, 200 OK
{
  "object": "list",
  "items": [
    {
      "key": "utility_bill",
      "object": "field_template",
      "name": "Utility bill",
      "fields": [
        {
          "name": "supplier_account_number",
          "type": "identifier"
        },
        {
          "name": "service_address",
          "type": "address"
        },
        {
          "name": "billing_period_start",
          "type": "date"
        },
        {
          "name": "billing_period_end",
          "type": "date"
        },
        { "name": "amount_due", "type": "money" },
        { "name": "due_date", "type": "date" },
        {
          "name": "meter_number",
          "type": "identifier"
        }
      ]
    }
  ],
  "has_more": false,
  "next_cursor": null
}

A starter list is a list of your own fields, never a document type: pick one when you ask for a document outside Kontiga’s types, keep, edit or remove its fields, and the common fields are read as well.