API reference

Catalog

Read the catalog

GET
/v1/catalog

Returns the current catalog of builtin document types, fields, checks and templates. Use their keys in the spec of an analysis.

Authorization

BearerAuth
headerAuthorizationBearer <token>

A partner API key, sent as Authorization: Bearer <key>. Live keys look like sk_live_<lookup>_<secret> and test keys like sk_test_<lookup>_<secret>. A key sees only data of its own mode.

Header Parameters

x-request-id?string

Your ID for correlating this request with your logs, up to 128 bytes. If it is missing, empty or longer, the API generates one as req_<uuid>. The response echoes the ID in x-request-id, and error bodies repeat it in request_id.

Length1 <= length <= 128

Response Body

The current catalog.

application/json
  1. response

The current catalog of builtins.

catalog_version*CatalogVersion

The catalog version. It changes whenever the meaning of a builtin changes.

Length1 <= length
document_types*

The builtin document types.

fields*

The builtin fields.

checks*

The builtin checks.

templates*

The builtin templates.

Example Request
curl -X GET 'https://api.aircredit.de/partner/v1/catalog'
Example Response

A few real entries of each kind. The full catalog has many more, and the template lists more fields and checks than shown.

{  "catalog_version": "sha256:235de54bf23a933aa613918eecfcd9e08da12d48ffdb98f80f77bda29cb5590e",  "document_types": {    "ausweis": {      "title": "ID Document",      "default_requirements": {        "both_sides_required": {          "kind": "text",          "parameters": {},          "description": "Both sides of the same document are present."        },        "uncropped_required": {          "kind": "text",          "parameters": {},          "description": "The whole document, including its edges, is in the frame."        },        "validity_required": {          "kind": "not_expired",          "parameters": {},          "description": "The document has not expired."        }      }    },    "gehaltsabrechnung": {      "title": "Payslip",      "default_requirements": {}    }  },  "fields": {    "employed_since": {      "title": "Employed Since",      "type": "date"    },    "employer": {      "title": "Employer",      "type": "string"    },    "net_salary": {      "title": "Net Salary",      "type": "money",      "description": "Monthly amount in the reported currency."    }  },  "checks": {    "bank.salary_matches_payslip": {      "title": "Salary Matches Payslip",      "uses": [        "net_salary",        "employer"      ]    },    "payslip.employer_change_last_12_months": {      "title": "Recent Employer Change",      "uses": [        "employer",        "employed_since"      ]    }  },  "templates": {    "default_personal_property_purchase": {      "title": "Purchase of an existing property – Detached, semi-detached, or terraced house",      "fields": {        "employed_since": {          "builtin": "employed_since"        },        "employer": {          "builtin": "employer"        },        "net_salary": {          "builtin": "net_salary"        }      },      "checks": {        "bank.salary_matches_payslip": {          "builtin": "bank.salary_matches_payslip"        },        "payslip.employer_change_last_12_months": {          "builtin": "payslip.employer_change_last_12_months"        }      }    }  }}