Fields and checks

Choose which values to read from the documents and which questions to answer, from the catalog or defined yourself.

A field is a value to read from the documents, such as a net salary. A check is a question about the documents, such as whether the salary on the payslip arrives on the bank statement. You list them under spec.fields and spec.checks and give each one a name of your own, called its alias. The result reports each field and check under its alias.

Each alias either points to a builtin definition from the catalog or defines a custom one. This request asks for one builtin and one custom field, and for one builtin and one custom check. Replace file_REPLACE with one of your file IDs. Then send the request to POST /v1/analyses with a new Idempotency-Key.

{
  "files": ["file_REPLACE"],
  "language": "en",
  "spec": {
    "fields": {
      "net_income": {"builtin": "net_salary"},
      "employee_number": {"type": "string", "instruction": "Extract the employee number."}
    },
    "checks": {
      "consistent_income": {"builtin": "bank.salary_matches_payslip"},
      "income_threshold": {
        "instruction": "Is the monthly net income at least EUR 3000?",
        "uses": ["net_income"]
      }
    }
  }
}

Fields and checks relate as follows:

  • A custom check lists the fields it needs in uses. AirCredit looks up each name among your aliases first, then among the builtin field keys.
  • A builtin check has fixed dependencies. You do not list them.
  • AirCredit extracts every field that a check depends on. The result contains only the fields you asked for.
  • If several aliases point to the same builtin, AirCredit extracts it once. Each alias still gets its own entry.
  • An analysis resolves at most 256 fields, including the fields that checks depend on, and at most 128 checks (Limits).

Fields

Each field in result.fields has a status of found or not_found. If the documents do not state a value, the field is not_found with value: null. It is never zero or a guessed value.

not_found is not an error. If an extraction that the analysis needs fails, the whole analysis fails (Execution failures).

Values have these formats:

  • A money field has a numeric value and a separate currency.
  • Percentages are in percent, not fractions.
  • Numbers are JSON numbers with IEEE 754 double precision. Integers up to 2^53 and decimals with up to 15 significant digits come through exactly. Declare values with more digits, such as long identifiers, as string.

Value types

A custom field declares its type: string, number, integer, boolean, date, money or enum. An enum also needs enum_values, a list of unique allowed values.

Builtin fields can also have types that a custom field cannot declare:

  • enum_set returns an array of unique allowed strings. A found [] means that none of the values applies. This differs from not_found with null.
  • A structured type returns an object, or a list of objects, made of named subfields.

Look up a builtin field's type in the catalog before you read its value. These are the structured types:

typevalue
addressObject: street, house_number, addition, postal_code, city, country (ISO 3166-1 alpha-2)
person_nameObject: first_name, last_name
durationObject: months, a whole number of months
probationObject: in_probation, ends_on
existing_loansList of objects: lender, loan_type, remaining_debt, monthly_instalment, interest_rate, fixed_interest_until, maturity_date, remaining_debt_at_payoff, pay_off
household_assetsList of objects: asset_type, amount, description
childrenList of objects: first_name, birth_date, receives_child_benefit, child_support
other_incomesList of objects: income_type, amount, description
text_listList of strings

This excerpt of result.fields shows some of them:

{
  "name": {
    "type": "person_name",
    "status": "found",
    "value": { "first_name": "Anna Maria", "last_name": "von Schneider" },
    "confidence": 0.94
  },
  "address": {
    "type": "address",
    "status": "found",
    "value": {
      "street": "Musterstraße",
      "house_number": "12a",
      "addition": null,
      "postal_code": "10115",
      "city": "Berlin",
      "country": "DE"
    },
    "confidence": 0.91
  },
  "term": {
    "type": "duration",
    "status": "found",
    "value": { "months": 120 },
    "confidence": 0.88
  },
  "loans": {
    "type": "existing_loans",
    "status": "found",
    "value": [
      {
        "lender": "Sparkasse Köln",
        "loan_type": "KFZ",
        "remaining_debt": { "amount": 12500.5, "currency": "EUR" },
        "monthly_instalment": { "amount": 289, "currency": "EUR" },
        "interest_rate": 3.9,
        "fixed_interest_until": null,
        "maturity_date": "2029-06-30",
        "remaining_debt_at_payoff": null,
        "pay_off": null
      }
    ],
    "confidence": 0.82
  },
  "children": {
    "type": "children",
    "status": "not_found",
    "value": null
  }
}

Structured values follow these rules:

  • Every subfield is present. It is null when the documents do not state it. A partial address therefore has its stated parts and null for the rest.
  • A list contains only entries with content and is never empty. If the documents say nothing about existing loans, the field is not_found, not [].
  • An amount inside a structured value is an object with amount and currency. A date is an ISO date.
  • Subfields that name a kind, such as loan_type, take one of the fixed values listed in the API reference.

Checks

Each check in result.checks has a status and a verdict. status says whether the check could be answered. verdict is the answer. A succeeded check has one of these verdicts:

verdictMeaning
fulfilledThe answer is favorable
criticalThe documents show an adverse finding
openUnresolved, or a person needs to confirm it
not_applicableThe question does not apply to these documents

A failed check has no verdict. It always has an error with code and message. The code is check_failed unless a more specific code applies. A succeeded analysis can contain failed checks, so read each check's status before its verdict.

A verdict answers only its own question. It is not a loan approval, a recommendation or a risk band.

Builtin templates

A template is a predefined set of builtin fields and checks for one financing purpose. Reference it by its key:

{
  "files": ["file_REPLACE"],
  "language": "en",
  "spec": {"template": {"key": "default_personal_property_purchase"}}
}

A request uses either a template or its own fields and checks, never both. The catalog lists each template with its fields and checks.

Collection requirements

A collection requirement checks the whole file set of an analysis. It asks whether the set contains enough documents of a type, or documents for enough distinct months.

This example asks for payslips for the three months before the reference month. With a reference_date in October 2026, these are July, August and September 2026.

{
  "files": ["file_REPLACE"],
  "language": "en",
  "reference_date": "2026-10-09",
  "spec": {
    "documents": {"builtins": {"gehaltsabrechnung": {}}},
    "collection_requirements": {
      "payslips": {
        "document_type": {"builtin": "gehaltsabrechnung"},
        "periods": {"count": 3, "unit": "month", "ending": "previous_month"}
      }
    }
  }
}

The months are counted like this:

  • A document counts for every month of its period. One quarterly bank statement therefore fills three required months.
  • Two documents for the same month count once. They do not fill a missing month.
  • If it is unclear whom a document concerns or which period it covers, the document never silently satisfies a requirement.
  • present_periods and missing_periods list the required months in calendar order.

Each collection requirement has its own entry in result.collection, separate from the results of the per-document requirements. A collection requirement cannot add document types that your documents selection leaves out.

One person or account per analysis

A collection requirement expects the documents of its type to concern one person or one account. The verdict is unknown if they concern more than one, such as the payslips of two people or the statements of two accounts. The same applies if it is unclear whom they concern. Run one analysis per person or account, for example one for each borrower's payslips.

On this page