---
title: "Kontoflux.io API"
version: "1.1.1"
openapi: "3.0.3"
---

# Kontoflux.io API

The API for Kontoflux.io to access bank accounts and transactions in a specific workspace. Protected endpoints accept either a workspace-scoped API-Key or an integration-bound OAuth 2.1 access token in the Authorization header. Create credentials and configure their scopes in the Kontoflux.io dashboard.

**Version:** `1.1.1`

## Servers

| Environment | Base URL |
| --- | --- |
| The Official Kontoflux.io API Server | `https://api.kontoflux.io` |

**Terms of service:** https://kontoflux.io/nutzungsbedingungen  
**External documentation:** https://docs.kontoflux.io

## Table of contents

- [Authentication](#authentication)
- [Model Context Protocol (MCP)](#model-context-protocol-mcp)
- [Accounts](#tag-accounts)
  - [`GET` Get all accounts](#operation-get-v1-workspace-id-accounts)
  - [`GET` Get an account](#operation-get-v1-workspace-id-accounts-identifier)
  - [`GET` Get all transactions of an account](#operation-get-v1-workspace-id-accounts-identifier-transactions)
  - [`GET` Search transactions of an account](#operation-get-v1-workspace-id-accounts-identifier-transactions-search)
  - [`GET` Match transactions against a string for a specific account](#operation-get-v1-workspace-id-accounts-identifier-transactions-match)
- [Transactions](#tag-transactions)
  - [`GET` Get all transactions](#operation-get-v1-workspace-id-transactions)
  - [`GET` Search transactions](#operation-get-v1-workspace-id-transactions-search)
  - [`GET` Get a transaction](#operation-get-v1-workspace-id-transactions-transaction-id)
  - [`GET` Match transactions against a string](#operation-get-v1-workspace-id-transactions-match)
- [Counterparts](#tag-counterparts)
  - [`GET` Get all transactions of a counterpart](#operation-get-v1-workspace-id-counterpart-iban-transactions)
  - [`GET` Search transactions of a counterpart by iban](#operation-get-v1-workspace-id-counterpart-iban-transactions-search)
  - [`GET` Match transactions against a string for a counterpart by IBAN](#operation-get-v1-workspace-id-counterpart-iban-transactions-match)
- [AI Categories](#tag-ai-categories)
  - [`GET` Get all categories](#operation-get-v1-workspace-id-categories)
  - [`GET` Get a category](#operation-get-v1-workspace-id-categories-category-id)
- [Scope](#tag-scope)
  - [`GET` Get the Scope of the current API-Key](#operation-get-v1-workspace-id-key-scope)
- [Schemas](#schemas)
  - [Account](#schema-account)
  - [Transaction](#schema-transaction)
  - [MatchedTransaction](#schema-matched-transaction)
  - [MatchedTransactions](#schema-matched-transactions)
  - [cyclic_0](#schema-cyclic-0)
  - [Category](#schema-category-43-61-74-65-67-6f-72-79)
  - [Workspace](#schema-workspace)
  - [Error](#schema-error)
  - [workspaceId](#schema-workspace-id)
  - [blz](#schema-blz)
  - [bic](#schema-bic)
  - [offset](#schema-offset)
  - [limit](#schema-limit)
  - [customSchema](#schema-custom-schema)
  - [X-Total-Count](#schema-x-total-count)
  - [identifier](#schema-identifier)
  - [category](#schema-category-63-61-74-65-67-6f-72-79)
  - [parentCategory](#schema-parent-category)
  - [valuedBefore](#schema-valued-before)
  - [valuedAfter](#schema-valued-after)
  - [bookedBefore](#schema-booked-before)
  - [bookedAfter](#schema-booked-after)
  - [importedBefore](#schema-imported-before)
  - [importedAfter](#schema-imported-after)
  - [order](#schema-order)
  - [sortBy](#schema-sort-by)
  - [query](#schema-query)
  - [transactionId](#schema-transaction-id)
  - [iban](#schema-iban)
  - [query-8ba1eeba-e9ae-48b6-9990-f99b67bc08f0](#schema-query-8ba1eeba-e9ae-48b6-9990-f99b67bc08f0)
  - [offset-e0223173-8549-4300-a75c-d449253632b4](#schema-offset-e0223173-8549-4300-a75c-d449253632b4)
  - [limit-07fc66b5-ce6f-4d01-90b0-4b5f7cb9a93e](#schema-limit-07fc66b5-ce6f-4d01-90b0-4b5f7cb9a93e)
  - [threshold](#schema-threshold)
  - [query-2b180d48-f3ac-4ea7-8aa5-a029bc245575](#schema-query-2b180d48-f3ac-4ea7-8aa5-a029bc245575)
  - [offset-c976dbf0-2a2a-4b44-98c7-ad904f2e9ccb](#schema-offset-c976dbf0-2a2a-4b44-98c7-ad904f2e9ccb)
  - [limit-3e570fed-ab53-4d77-b4ed-6841f110a07d](#schema-limit-3e570fed-ab53-4d77-b4ed-6841f110a07d)
  - [query-c7fd835b-a856-4b37-884a-1df33ae6b50b](#schema-query-c7fd835b-a856-4b37-884a-1df33ae6b50b)
  - [offset-d79a8e31-aea4-44e6-9bae-f83e58f33362](#schema-offset-d79a8e31-aea4-44e6-9bae-f83e58f33362)
  - [limit-1eba390f-7b5a-4210-b27d-6db8f3f9be0c](#schema-limit-1eba390f-7b5a-4210-b27d-6db8f3f9be0c)
  - [categoryId](#schema-category-id)
  - [workspaceId-38c327d9-4b9a-465a-ae4e-c3427f7b5eff](#schema-workspace-id-38c327d9-4b9a-465a-ae4e-c3427f7b5eff)

<a id="authentication"></a>

## Authentication

Authentication requirements are declared by the OpenAPI contract.

### API-Key

Workspace-scoped API-Key. Send it as Authorization: Bearer &lt;API-Key&gt;.

**Type:** `apiKey`  
**Credential name:** `Authorization`  
**Location:** `header`

### oauthAuthorizationCode

Integration-bound OAuth 2.1 delegated access using the Authorization Code grant with mandatory PKCE (S256). Supported grants are authorization_code and refresh_token; client_credentials is not supported. Confidential clients use client_secret_post, which is token-endpoint client authentication—not a grant—and send client_id and client_secret in the form body. Public clients use none and omit client_secret. HTTP Basic client authentication is not supported. A redirect-host wildcard affects client registration only; authorization and token exchange still require redirect_uri to exactly match a URI saved on that client. Discover the current endpoints and scopes from the integration's authorization-server metadata.

**Type:** `oauth2`

| Flow | Authorization URL | Token URL | Scopes |
| --- | --- | --- | --- |
| `authorizationCode` | https://api.kontoflux.io/v1/{workspaceId}/oauth2/{integrationId}/authorize | https://api.kontoflux.io/v1/{workspaceId}/oauth2/{integrationId}/token | — |

### Connect with OAuth 2.1

Use OAuth when an application needs delegated access to a workspace. Kontoflux.io uses the Authorization Code grant with mandatory PKCE (S256) and issues integration-bound Bearer access and refresh tokens.

> **Supported grants:** `authorization_code` and `refresh_token`. The `client_credentials` grant is not supported. `client_secret_post` is a client authentication method for a code or refresh exchange; it is not the Client Credentials grant.

#### Discover the authorization server

Create and activate an **OAuth2 Server** integration in the dashboard, then register the client on that integration with its exact redirect URI and permitted scopes. Start from the metadata document instead of guessing endpoint capabilities.

> **Redirect policy:** “Allow from all Domains and IPs” relaxes only the hostname policy while a client is registered. It is not a runtime redirect wildcard. Every authorization request and code exchange must use one of that client’s saved redirect URIs exactly, including scheme, host, port, path, query, and trailing slash.

| Purpose | URL |
| --- | --- |
| Issuer | `https://api.kontoflux.io/v1/{workspaceId}/oauth2/{integrationId}` |
| Authorization-server metadata | `https://api.kontoflux.io/.well-known/oauth-authorization-server/v1/{workspaceId}/oauth2/{integrationId}` |
| Authorization endpoint | `https://api.kontoflux.io/v1/{workspaceId}/oauth2/{integrationId}/authorize` |
| Token endpoint | `https://api.kontoflux.io/v1/{workspaceId}/oauth2/{integrationId}/token` |
| Revocation endpoint | `https://api.kontoflux.io/v1/{workspaceId}/oauth2/{integrationId}/revoke` |

These examples use an OAuth2 Server integration for REST access. MCP Server integrations have a different issuer path and nested OAuth endpoints; clients should discover those endpoints from that integration’s metadata.

#### Choose a client type

| Client type | Registered token authentication | Token request |
| --- | --- | --- |
| Confidential client | `client_secret_post` | Send `client_id` and `client_secret` in the form body. |
| Public client | `none` | Send `client_id` and omit `client_secret`; PKCE protects the exchange. |

HTTP Basic client authentication (`client_secret_basic`) is not supported.

#### Complete the authorization flow

1. Generate a high-entropy `state` value and PKCE `code_verifier`; derive a base64url-encoded SHA-256 `code_challenge`.
2. Open the authorization endpoint in the user’s browser with `response_type=code`, the registered `client_id` and exact `redirect_uri`, a space-separated `scope`, `state`, `code_challenge`, and `code_challenge_method=S256`.
3. The user signs in and approves access. On the callback, verify both `state` and the returned `iss`, then read the authorization `code`.
4. Exchange the one-time code at the token endpoint using an `application/x-www-form-urlencoded` request. Include the same `redirect_uri`, the original `code_verifier`, and the client credentials required by the registered client type.
5. Send the access token as `Authorization: Bearer <access_token>` on REST requests. When it expires, use the `refresh_token` grant and replace the rotated token pair with the new response.

#### Authorization request

```http
GET https://api.kontoflux.io/v1/{workspaceId}/oauth2/{integrationId}/authorize
  ?response_type=code
  &client_id={clientId}
  &redirect_uri={urlEncodedRedirectUri}
  &scope={spaceSeparatedScopes}
  &state={randomState}
  &code_challenge={pkceChallenge}
  &code_challenge_method=S256
```

#### Code exchange

```http
POST https://api.kontoflux.io/v1/{workspaceId}/oauth2/{integrationId}/token
Content-Type: application/x-www-form-urlencoded

grant_type=authorization_code
&code={authorizationCode}
&redirect_uri={exactRegisteredRedirectUri}
&client_id={clientId}
&code_verifier={pkceVerifier}
&client_secret={confidentialClientsOnly}
```

#### Refresh and revoke

Refresh at `https://api.kontoflux.io/v1/{workspaceId}/oauth2/{integrationId}/token` with `grant_type=refresh_token`, `refresh_token`, `client_id`, and—only for confidential clients—`client_secret`. Revoke an access or refresh token at `https://api.kontoflux.io/v1/{workspaceId}/oauth2/{integrationId}/revoke` with `token`, `client_id`, and the same client-authentication rule.

#### Troubleshooting

| Error | Check |
| --- | --- |
| `unsupported_grant_type` | Use `authorization_code` with PKCE, not `client_credentials`. |
| `invalid_client` / app not found | Confirm that the client is active and registered on the same integration named by the issuer URL. Replace deleted or revoked client credentials. |
| Redirect URI rejected | Compare the client’s saved callback with the request’s `redirect_uri` character for character. Re-register the client if the saved URI is wrong. |
| `invalid_scope` / access denied | Request only scopes permitted by both the registered client and the integration scope policy. |

<a id="model-context-protocol-mcp"></a>

## Model Context Protocol (MCP)

Kontoflux.io also exposes a stateless Streamable HTTP MCP server for AI tools and agents. Each server is an inbound integration scoped to one workspace, its selected bank accounts, enabled tools, and credentials.

**MCP endpoint:** `https://api.kontoflux.io/v1/{workspaceId}/mcp/{integrationId}`

### Create an MCP server

1. Sign in to the **Kontoflux.io dashboard** and open **Automations → Integrations**.
2. Choose **New integration**, then select **MCP-Server**.
3. Choose explicit bank accounts and MCP tools, then activate the integration. Empty selections can mean all current and future entries; an inactive integration returns 404.
4. Prefer **OAuth 2.1** where the client supports it. Otherwise, create an integration-bound **MCP API-Key** on the integration’s API-Keys tab and send it as `Authorization: Bearer mcp-…`. Enable Dynamic Client Registration only when compatible clients should register themselves.
5. Copy the integration URL and add it to a Streamable HTTP MCP client such as Claude Desktop or MCP Inspector.

### Available tools

| Tool | Required scope | Purpose |
| --- | --- | --- |
| `get_transactions` | `transactions:read` | Search and list transactions. |
| `get_accounts` | `accounts:read` | List accounts or retrieve one account. |

> Use the `Authorization` header for static credentials. MCP API-Keys are integration-bound `mcp-*` credentials; ordinary REST API-Keys (`sk-*`) do not authenticate the MCP endpoint.

> The OpenAPI operation list below documents the REST API. MCP is an additional, integration-scoped protocol surface and is not counted as a REST operation.

<a id="tag-accounts"></a>

## Accounts

Access the bank accounts.

<a id="operation-get-v1-workspace-id-accounts"></a>

### `GET` Get all accounts

Get all accounts associated with the workspace.

**Method:** `GET`  
**Path:** `/v1/{workspaceId}/accounts`  
**Operation ID:** `getAccounts`  
**Tags:** `Accounts`  
**Authentication:** `generalApiKey` or `oauthAuthorizationCode`

#### Parameters

| Name | Location | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `workspaceId` | `path` | `string` | Yes | Your workspace ID to access the accounts within that workspace. Pattern: `^[-a-zA-Z0-9_]+$`. |
| `blz` | `query` | `string` | No | The Bankleitzahl (BLZ) of the bank to filter for accounts with that BLZ. |
| `bic` | `query` | `string` | No | The Bank Identifier Code (BIC) of the bank to filter for accounts with that BIC. |
| `offset` | `query` | `integer` | No | The offset for pagination. Starts with 0. Determine maximum offset with X-Total-Count header. Default: `0`. |
| `limit` | `query` | `integer` | No | The limit for pagination. Default: `100`. Maximum: `250`. |
| `customSchema` | `query` | `string` | No | A custom schema to apply to the accounts. Format: JSON object. Supports dot.notation. Provide on the left side the attribute name and on the right side the new desired attribute name in the account object. It's also possible to move attributes to a different location in the object. Additionally, when providing null as value, the attribute will be removed from the account object. Example: { "id": "accountId" } Format: `json`. |

#### Responses

| Status | Description | Schema | Content type |
| --- | --- | --- | --- |
| `200` | A list of accounts with account informations and balance. | [Account](#schema-account) | `application/json` |
| `400` | Bad Request – The request was invalid or cannot be served. | [Error](#schema-error) | `application/json` |
| `401` | Unauthorized | [Error](#schema-error) | `application/json` |

##### Response headers

| Status | Header | Type | Description |
| --- | --- | --- | --- |
| `200` | `X-Total-Count` | `integer` | The total number of accounts matching this query. Useful for Pagination with Offset and Limit. |

##### `200` examples

###### `application/json`

```json
{
  "id": 123456,
  "currency": "EUR",
  "holderName": "Marty McFly",
  "accountNumber": "111111123",
  "balance": 420.69,
  "availableFunds": 1337.42,
  "overdraft": 1000,
  "createdAt": "2024-03-29T21:31:21.990Z",
  "updatedAt": "2024-03-31T18:40:35.333Z",
  "iban": "DE12133700080111111102",
  "blz": "DEMO0001"
}
```

##### `400` examples

###### `application/json`

```json
{
  "error": "string",
  "message": "string"
}
```

##### `401` examples

###### `application/json`

```json
{
  "error": "string",
  "message": "string"
}
```

#### Example request

```bash
curl --request GET \
  --url "https://api.kontoflux.io/v1/a/accounts?offset=0&limit=100" \
  --header "Authorization: ${GENERAL_API_KEY}"
```

<a id="operation-get-v1-workspace-id-accounts-identifier"></a>

### `GET` Get an account

Get a specific account with the account ID or the IBAN.

**Method:** `GET`  
**Path:** `/v1/{workspaceId}/accounts/{identifier}`  
**Operation ID:** `getAccount`  
**Tags:** `Accounts`  
**Authentication:** `generalApiKey` or `oauthAuthorizationCode`

#### Parameters

| Name | Location | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `workspaceId` | `path` | `string` | Yes | Your workspace ID to access the accounts within that workspace. Pattern: `^[-a-zA-Z0-9_]+$`. |
| `identifier` | `path` | `string` | Yes | The account ID or the IBAN of the account. Pattern: `^[-a-zA-Z0-9_]+$`. |
| `customSchema` | `query` | `string` | No | A custom schema to apply to the account. Format: JSON object. Supports dot.notation. Provide on the left side the attribute name and on the right side the new desired attribute name in the account object. It's also possible to move attributes to a different location in the object. Additionally, when providing null as value, the attribute will be removed from the account object. Example: { "id": "accountId" } Format: `json`. |

#### Responses

| Status | Description | Schema | Content type |
| --- | --- | --- | --- |
| `200` | The account with account informations and balance. | [Account](#schema-account) | `application/json` |
| `400` | Bad Request – The request was invalid or cannot be served. | [Error](#schema-error) | `application/json` |
| `401` | Unauthorized | [Error](#schema-error) | `application/json` |

##### `200` examples

###### `application/json`

```json
{
  "id": 123456,
  "currency": "EUR",
  "holderName": "Marty McFly",
  "accountNumber": "111111123",
  "balance": 420.69,
  "availableFunds": 1337.42,
  "overdraft": 1000,
  "createdAt": "2024-03-29T21:31:21.990Z",
  "updatedAt": "2024-03-31T18:40:35.333Z",
  "iban": "DE12133700080111111102",
  "blz": "DEMO0001"
}
```

##### `400` examples

###### `application/json`

```json
{
  "error": "string",
  "message": "string"
}
```

##### `401` examples

###### `application/json`

```json
{
  "error": "string",
  "message": "string"
}
```

#### Example request

```bash
curl --request GET \
  --url "https://api.kontoflux.io/v1/a/accounts/a" \
  --header "Authorization: ${GENERAL_API_KEY}"
```

<a id="operation-get-v1-workspace-id-accounts-identifier-transactions"></a>

### `GET` Get all transactions of an account

Get all transactions of a specific bank account.

**Method:** `GET`  
**Path:** `/v1/{workspaceId}/accounts/{identifier}/transactions`  
**Operation ID:** `getAccountTransactions`  
**Tags:** `Accounts`, `Transactions`  
**Authentication:** `generalApiKey` or `oauthAuthorizationCode`

#### Parameters

| Name | Location | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `workspaceId` | `path` | `string` | Yes | Your workspace ID to access the transactions within that workspace. Pattern: `^[-a-zA-Z0-9_]+$`. |
| `identifier` | `path` | `string` | Yes | The account ID or the IBAN of the account. Pattern: `^[-a-zA-Z0-9_]+$`. |
| `category` | `query` | `string` | No | The category ID or exact category name to filter for transactions with that category. |
| `parentCategory` | `query` | `string` | No | The category name to filter for transactions with that category name. If no category parameter is set, it will search for the category in the category and parentCategory field of the transaction. |
| `valuedBefore` | `query` | `string` | No | The value date of the transaction should be before this date. Format: YYYY-MM-DDTHH:MM:SS.MMMZ Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`. |
| `valuedAfter` | `query` | `string` | No | The value date of the transaction should be after this date. Format: YYYY-MM-DDTHH:MM:SS.MMMZ Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`. |
| `bookedBefore` | `query` | `string` | No | The booking date of the transaction should be before this date. Format: YYYY-MM-DDTHH:MM:SS.MMMZ Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`. |
| `bookedAfter` | `query` | `string` | No | The booking date of the transaction should be after this date. Format: YYYY-MM-DDTHH:MM:SS.MMMZ Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`. |
| `importedBefore` | `query` | `string` | No | The import date of the transaction should be before this date. Format: YYYY-MM-DDTHH:MM:SS.MMMZ Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`. |
| `importedAfter` | `query` | `string` | No | The import date of the transaction should be after this date. Format: YYYY-MM-DDTHH:MM:SS.MMMZ Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`. |
| `offset` | `query` | `integer` | No | The offset for pagination. Starts with 0. Determine maximum offset with X-Total-Count header. Default: `0`. |
| `limit` | `query` | `integer` | No | The limit for pagination. Default: `100`. Maximum: `250`. |
| `order` | `query` | `string` | No | The order of the sort for the transactions. Default is descending. Default: `desc`. Allowed: `asc`, `desc`, `1`, `-1`. |
| `sortBy` | `query` | `string` | No | The field to sort the transactions. Default is the _id. Default: `_id`. Allowed: `bookingDate`, `valueDate`, `importDate`, `amount`, `_id`. |

#### Responses

| Status | Description | Schema | Content type |
| --- | --- | --- | --- |
| `200` | A list of transactions with transaction informations. | [Transaction](#schema-transaction) | `application/json` |
| `400` | Bad Request – The request was invalid or cannot be served. | [Error](#schema-error) | `application/json` |
| `401` | Unauthorized | [Error](#schema-error) | `application/json` |

##### Response headers

| Status | Header | Type | Description |
| --- | --- | --- | --- |
| `200` | `X-Total-Count` | `integer` | The total number of transactions matching this query. Useful for Pagination with Offset and Limit. |

##### `200` examples

###### `application/json`

```json
{
  "id": 123456789,
  "accountId": 12456,
  "account": {
    "accountNumber": "111111102",
    "name": "Tommy Sternen-Himmel",
    "iban": "DE23533700080111111102",
    "bankName": "finAPI Test Bank"
  },
  "amount": -58.63,
  "currency": "EUR",
  "category": {
    "name": "Restaurant / Cafe / Bar",
    "id": 378
  },
  "parentCategory": {
    "name": "Freizeit, Hobbies & Soziales",
    "id": 373
  },
  "counterpart": {
    "accountNumber": "4578522",
    "name": "Bar Centrale",
    "iban": "DE34700800000004578522",
    "bic": "DRESDEFF700",
    "bankName": "Commerzbank vormals Dresdner Bank"
  },
  "createdAt": "2024-03-29T21:31:22.129Z",
  "updatedAt": "2024-03-30T11:05:56.866Z",
  "bookingDate": "2022-03-31T00:00:00.000Z",
  "valueDate": "2022-03-31T00:00:00.000Z",
  "type": "Überweisungsauftrag",
  "purpose": "Rechnung 1234 vom 01.03.2022"
}
```

##### `400` examples

###### `application/json`

```json
{
  "error": "string",
  "message": "string"
}
```

##### `401` examples

###### `application/json`

```json
{
  "error": "string",
  "message": "string"
}
```

#### Example request

```bash
curl --request GET \
  --url "https://api.kontoflux.io/v1/a/accounts/a/transactions?offset=0&limit=100&order=desc&sortBy=_id" \
  --header "Authorization: ${GENERAL_API_KEY}"
```

<a id="operation-get-v1-workspace-id-accounts-identifier-transactions-search"></a>

### `GET` Search transactions of an account

Search transactions of a specific bank account with a search query.

**Method:** `GET`  
**Path:** `/v1/{workspaceId}/accounts/{identifier}/transactions/search`  
**Operation ID:** `searchAccountTransactions`  
**Tags:** `Accounts`, `Transactions`  
**Authentication:** `generalApiKey` or `oauthAuthorizationCode`

#### Parameters

| Name | Location | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `workspaceId` | `path` | `string` | Yes | Your workspace ID to access the transactions within that workspace. Pattern: `^[-a-zA-Z0-9_]+$`. |
| `identifier` | `path` | `string` | Yes | The account ID or the IBAN of the account. Pattern: `^[-a-zA-Z0-9_]+$`. |
| `query` | `query` | `string` | No | The search query to search for transactions. |
| `category` | `query` | `string` | No | The category ID or exact category name to filter for transactions with that category. |
| `parentCategory` | `query` | `string` | No | The category name to filter for transactions with that category name. If no category parameter is set, it will search for the category in the category and parentCategory field of the transaction. |
| `valuedBefore` | `query` | `string` | No | The value date of the transaction should be before this date. Format: YYYY-MM-DDTHH:MM:SS.MMMZ Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`. |
| `valuedAfter` | `query` | `string` | No | The value date of the transaction should be after this date. Format: YYYY-MM-DDTHH:MM:SS.MMMZ Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`. |
| `bookedBefore` | `query` | `string` | No | The booking date of the transaction should be before this date. Format: YYYY-MM-DDTHH:MM:SS.MMMZ Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`. |
| `bookedAfter` | `query` | `string` | No | The booking date of the transaction should be after this date. Format: YYYY-MM-DDTHH:MM:SS.MMMZ Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`. |
| `importedBefore` | `query` | `string` | No | The import date of the transaction should be before this date. Format: YYYY-MM-DDTHH:MM:SS.MMMZ Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`. |
| `importedAfter` | `query` | `string` | No | The import date of the transaction should be after this date. Format: YYYY-MM-DDTHH:MM:SS.MMMZ Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`. |
| `offset` | `query` | `integer` | No | The offset for pagination. Starts with 0. Determine maximum offset with X-Total-Count header. Default: `0`. |
| `limit` | `query` | `integer` | No | The limit for pagination. Default: `100`. Maximum: `250`. |
| `order` | `query` | `string` | No | The order of the sort for the transactions. Default is descending. Default: `desc`. Allowed: `asc`, `desc`, `1`, `-1`. |
| `sortBy` | `query` | `string` | No | The field to sort the transactions. Default is the _id. Default: `_id`. Allowed: `bookingDate`, `valueDate`, `importDate`, `amount`, `_id`. |

#### Responses

| Status | Description | Schema | Content type |
| --- | --- | --- | --- |
| `200` | A list of transactions with transaction informations. | [Transaction](#schema-transaction) | `application/json` |
| `400` | Bad Request – The request was invalid or cannot be served. | [Error](#schema-error) | `application/json` |
| `401` | Unauthorized | [Error](#schema-error) | `application/json` |

##### Response headers

| Status | Header | Type | Description |
| --- | --- | --- | --- |
| `200` | `X-Total-Count` | `integer` | The total number of transactions matching this query. Useful for Pagination with Offset and Limit. |

##### `200` examples

###### `application/json`

```json
{
  "id": 123456789,
  "accountId": 12456,
  "account": {
    "accountNumber": "111111102",
    "name": "Tommy Sternen-Himmel",
    "iban": "DE23533700080111111102",
    "bankName": "finAPI Test Bank"
  },
  "amount": -58.63,
  "currency": "EUR",
  "category": {
    "name": "Restaurant / Cafe / Bar",
    "id": 378
  },
  "parentCategory": {
    "name": "Freizeit, Hobbies & Soziales",
    "id": 373
  },
  "counterpart": {
    "accountNumber": "4578522",
    "name": "Bar Centrale",
    "iban": "DE34700800000004578522",
    "bic": "DRESDEFF700",
    "bankName": "Commerzbank vormals Dresdner Bank"
  },
  "createdAt": "2024-03-29T21:31:22.129Z",
  "updatedAt": "2024-03-30T11:05:56.866Z",
  "bookingDate": "2022-03-31T00:00:00.000Z",
  "valueDate": "2022-03-31T00:00:00.000Z",
  "type": "Überweisungsauftrag",
  "purpose": "Rechnung 1234 vom 01.03.2022"
}
```

##### `400` examples

###### `application/json`

```json
{
  "error": "string",
  "message": "string"
}
```

##### `401` examples

###### `application/json`

```json
{
  "error": "string",
  "message": "string"
}
```

#### Example request

```bash
curl --request GET \
  --url "https://api.kontoflux.io/v1/a/accounts/a/transactions/search?offset=0&limit=100&order=desc&sortBy=_id" \
  --header "Authorization: ${GENERAL_API_KEY}"
```

<a id="operation-get-v1-workspace-id-accounts-identifier-transactions-match"></a>

### `GET` Match transactions against a string for a specific account

Fuzzy-match one account's transactions across purpose, endToEndReference, counterpartCustomerReference, counterpartMandateReference, primanota, and paypalData.invoiceNumber. Matching normalizes case, Unicode, punctuation, spacing, common reference abbreviations, and number-only queries so misspellings and compact forms can still rank well. Each result has a deterministic relevance score from 0 to 1; higher is better, but the score is a ranking signal and not a probability. Exact normalized reference matches receive the strongest evidence and numeric conflicts reduce relevance. Results are ordered by score, evidence quality, booking date descending, then transaction ID descending. Only the newest 100,000 transactions that satisfy the account, category, and date filters are evaluated.

**Method:** `GET`  
**Path:** `/v1/{workspaceId}/accounts/{identifier}/transactions/match`  
**Operation ID:** `matchAccountTransactions`  
**Tags:** `Accounts`, `Transactions`  
**Authentication:** `generalApiKey` or `oauthAuthorizationCode`

#### Parameters

| Name | Location | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `workspaceId` | `path` | `string` | Yes | Your workspace ID to access the transactions within that workspace. Pattern: `^[-a-zA-Z0-9_]+$`. |
| `identifier` | `path` | `string` | Yes | The account ID or the IBAN of the account. Pattern: `^[-a-zA-Z0-9_]+$`. |
| `query` | `query` | `string` | Yes | Required fuzzy-match query containing at least two normalized letters or numbers, limited to 256 Unicode characters and 24 normalized tokens. Use this canonical query parameter; q, search, request-body aliases, and the misspelled treshold parameter are not accepted by match endpoints. Minimum length: `2`. Maximum length: `256`. |
| `category` | `query` | `string` | No | The category ID or exact category name to filter for transactions with that category. |
| `parentCategory` | `query` | `string` | No | The category name to filter for transactions with that category name. If no category parameter is set, it will search for the category in the category and parentCategory field of the transaction. |
| `valuedBefore` | `query` | `string` | No | The value date of the transaction should be before this date. Format: YYYY-MM-DDTHH:MM:SS.MMMZ Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`. |
| `valuedAfter` | `query` | `string` | No | The value date of the transaction should be after this date. Format: YYYY-MM-DDTHH:MM:SS.MMMZ Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`. |
| `bookedBefore` | `query` | `string` | No | The booking date of the transaction should be before this date. Format: YYYY-MM-DDTHH:MM:SS.MMMZ Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`. |
| `bookedAfter` | `query` | `string` | No | The booking date of the transaction should be after this date. Format: YYYY-MM-DDTHH:MM:SS.MMMZ Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`. |
| `importedBefore` | `query` | `string` | No | The import date of the transaction should be before this date. Format: YYYY-MM-DDTHH:MM:SS.MMMZ Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`. |
| `importedAfter` | `query` | `string` | No | The import date of the transaction should be after this date. Format: YYYY-MM-DDTHH:MM:SS.MMMZ Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`. |
| `offset` | `query` | `integer` | No | The offset into the score-ordered qualified matches within the newest 100,000 eligible transactions. Starts with 0; use X-Total-Count to determine the available result count in that evaluation window. Default: `0`. Minimum: `0`. |
| `limit` | `query` | `integer` | No | The limit for pagination. Default: `10`. Minimum: `1`. Maximum: `50`. |
| `threshold` | `query` | `number` | No | Minimum finite relevance score required for a result, expressed as a standard decimal or exponent-form number from 0 through 1. Scores are deterministic ranking signals, not probabilities. Default: `0.6`. Minimum: `0`. Maximum: `1`. |
| `customSchema` | `query` | `string` | No | A custom schema to apply to matched transactions. Format: JSON object with safe dot.notation. The required score field cannot be moved, removed, or overwritten. Provide the source attribute on the left and its new location on the right; null removes non-required fields. Example: { "id": "transactionId" } Format: `json`. |

#### Responses

| Status | Description | Schema | Content type |
| --- | --- | --- | --- |
| `200` | A score-descending array of matched transactions. Every item contains a required score between 0 and 1. | Array of [MatchedTransaction](#schema-matched-transaction) | `application/json` |
| `400` | Bad Request – query, threshold, pagination, filters, or customSchema are invalid. Match endpoints do not accept q, search, treshold, or request-body aliases. | [Error](#schema-error) | `application/json` |
| `401` | Unauthorized | [Error](#schema-error) | `application/json` |
| `409` | The selected transaction or related account changed while the global ranking was being finalized. No partial or stale result is returned; retry the request. | [Error](#schema-error) | `application/json` |
| `503` | Matching could not finish within the database or execution time budget. No partial ranking is returned; retry with narrower filters. This response is not triggered merely because more than 100,000 transactions are eligible. | [Error](#schema-error) | `application/json` |

##### Response headers

| Status | Header | Type | Description |
| --- | --- | --- | --- |
| `200` | `X-Total-Count` | `integer` | The number of results at or above threshold within the newest 100,000 eligible transactions, after account, category, and date filters and before offset and limit. Transactions outside that evaluation window are not counted. |

##### `200` examples

###### `application/json`

```json
[
  {
    "id": 123456789,
    "accountId": 12456,
    "account": {
      "accountNumber": "111111102",
      "name": "Tommy Sternen-Himmel",
      "iban": "DE23533700080111111102",
      "bankName": "finAPI Test Bank"
    },
    "amount": -58.63,
    "currency": "EUR",
    "category": {
      "name": "Restaurant / Cafe / Bar",
      "id": 378
    },
    "parentCategory": {
      "name": "Freizeit, Hobbies & Soziales",
      "id": 373
    },
    "counterpart": {
      "accountNumber": "4578522",
      "name": "Bar Centrale",
      "iban": "DE34700800000004578522",
      "bic": "DRESDEFF700",
      "bankName": "Commerzbank vormals Dresdner Bank"
    },
    "createdAt": "2024-03-29T21:31:22.129Z",
    "updatedAt": "2024-03-30T11:05:56.866Z",
    "bookingDate": "2022-03-31T00:00:00.000Z",
    "valueDate": "2022-03-31T00:00:00.000Z",
    "type": "Überweisungsauftrag",
    "purpose": "Rechnung 1234 vom 01.03.2022",
    "score": 0.94
  }
]
```

##### `400` examples

###### `application/json`

```json
{
  "error": "string",
  "message": "string"
}
```

##### `401` examples

###### `application/json`

```json
{
  "error": "string",
  "message": "string"
}
```

##### `409` examples

###### `application/json`

```json
{
  "error": "string",
  "message": "string"
}
```

##### `503` examples

###### `application/json`

```json
{
  "error": "string",
  "message": "string"
}
```

#### Example request

```bash
curl --request GET \
  --url "https://api.kontoflux.io/v1/a/accounts/a/transactions/match?query=string&offset=0&limit=10&threshold=0.6" \
  --header "Authorization: ${GENERAL_API_KEY}"
```

<a id="tag-transactions"></a>

## Transactions

Access transactions and transactions for specific bank accounts.

<a id="operation-get-v1-workspace-id-transactions"></a>

### `GET` Get all transactions

Get all transactions of all bank accounts of this workspace.

**Method:** `GET`  
**Path:** `/v1/{workspaceId}/transactions`  
**Operation ID:** `getTransactions`  
**Tags:** `Transactions`  
**Authentication:** `generalApiKey` or `oauthAuthorizationCode`

#### Parameters

| Name | Location | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `workspaceId` | `path` | `string` | Yes | Your workspace ID to access the transactions within that workspace. Pattern: `^[-a-zA-Z0-9_]+$`. |
| `category` | `query` | `string` | No | The category ID or exact category name to filter for transactions with that category. |
| `parentCategory` | `query` | `string` | No | The category name to filter for transactions with that category name. If no category parameter is set, it will search for the category in the category and parentCategory field of the transaction. |
| `valuedBefore` | `query` | `string` | No | The value date of the transaction should be before this date. Format: YYYY-MM-DDTHH:MM:SS.MMMZ Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`. |
| `valuedAfter` | `query` | `string` | No | The value date of the transaction should be after this date. Format: YYYY-MM-DDTHH:MM:SS.MMMZ Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`. |
| `bookedBefore` | `query` | `string` | No | The booking date of the transaction should be before this date. Format: YYYY-MM-DDTHH:MM:SS.MMMZ Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`. |
| `bookedAfter` | `query` | `string` | No | The booking date of the transaction should be after this date. Format: YYYY-MM-DDTHH:MM:SS.MMMZ Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`. |
| `importedBefore` | `query` | `string` | No | The import date of the transaction should be before this date. Format: YYYY-MM-DDTHH:MM:SS.MMMZ Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`. |
| `importedAfter` | `query` | `string` | No | The import date of the transaction should be after this date. Format: YYYY-MM-DDTHH:MM:SS.MMMZ Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`. |
| `offset` | `query` | `integer` | No | The offset for pagination. Starts with 0. Determine maximum offset with X-Total-Count header. Default: `0`. |
| `limit` | `query` | `integer` | No | The limit for pagination. Default: `100`. Maximum: `250`. |
| `order` | `query` | `string` | No | The order of the sort for the transactions. Default is descending. Default: `desc`. Allowed: `asc`, `desc`, `1`, `-1`. |
| `sortBy` | `query` | `string` | No | The field to sort the transactions. Default is the _id. Default: `_id`. Allowed: `bookingDate`, `valueDate`, `importDate`, `amount`, `_id`. |
| `customSchema` | `query` | `string` | No | A custom schema to apply to the transactions. Format: JSON object. Supports dot.notation. Provide on the left side the attribute name and on the right side the new desired attribute name in the transaction object. It's also possible to move attributes to a different location in the object. Additionally, when providing null as value, the attribute will be removed from the transaction object. Example: { "id": "transactionId" } Format: `json`. |

#### Responses

| Status | Description | Schema | Content type |
| --- | --- | --- | --- |
| `200` | A list of transactions with transaction informations. | [Transaction](#schema-transaction) | `application/json` |
| `400` | Bad Request – The request was invalid or cannot be served. | [Error](#schema-error) | `application/json` |
| `401` | Unauthorized | [Error](#schema-error) | `application/json` |

##### Response headers

| Status | Header | Type | Description |
| --- | --- | --- | --- |
| `200` | `X-Total-Count` | `integer` | The total number of transactions matching this query. Useful for Pagination with Offset and Limit. |

##### `200` examples

###### `application/json`

```json
{
  "id": 123456789,
  "accountId": 12456,
  "account": {
    "accountNumber": "111111102",
    "name": "Tommy Sternen-Himmel",
    "iban": "DE23533700080111111102",
    "bankName": "finAPI Test Bank"
  },
  "amount": -58.63,
  "currency": "EUR",
  "category": {
    "name": "Restaurant / Cafe / Bar",
    "id": 378
  },
  "parentCategory": {
    "name": "Freizeit, Hobbies & Soziales",
    "id": 373
  },
  "counterpart": {
    "accountNumber": "4578522",
    "name": "Bar Centrale",
    "iban": "DE34700800000004578522",
    "bic": "DRESDEFF700",
    "bankName": "Commerzbank vormals Dresdner Bank"
  },
  "createdAt": "2024-03-29T21:31:22.129Z",
  "updatedAt": "2024-03-30T11:05:56.866Z",
  "bookingDate": "2022-03-31T00:00:00.000Z",
  "valueDate": "2022-03-31T00:00:00.000Z",
  "type": "Überweisungsauftrag",
  "purpose": "Rechnung 1234 vom 01.03.2022"
}
```

##### `400` examples

###### `application/json`

```json
{
  "error": "string",
  "message": "string"
}
```

##### `401` examples

###### `application/json`

```json
{
  "error": "string",
  "message": "string"
}
```

#### Example request

```bash
curl --request GET \
  --url "https://api.kontoflux.io/v1/a/transactions?offset=0&limit=100&order=desc&sortBy=_id" \
  --header "Authorization: ${GENERAL_API_KEY}"
```

<a id="operation-get-v1-workspace-id-transactions-search"></a>

### `GET` Search transactions

Search transactions with a search query.

**Method:** `GET`  
**Path:** `/v1/{workspaceId}/transactions/search`  
**Operation ID:** `searchTransactions`  
**Tags:** `Transactions`  
**Authentication:** `generalApiKey` or `oauthAuthorizationCode`

#### Parameters

| Name | Location | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `workspaceId` | `path` | `string` | Yes | Your workspace ID to access the transactions within that workspace. Pattern: `^[-a-zA-Z0-9_]+$`. |
| `query` | `query` | `string` | No | The search query to search for transactions. |
| `category` | `query` | `string` | No | The category ID or exact category name to filter for transactions with that category. |
| `parentCategory` | `query` | `string` | No | The category name to filter for transactions with that category name. If no category parameter is set, it will search for the category in the category and parentCategory field of the transaction. |
| `valuedBefore` | `query` | `string` | No | The value date of the transaction should be before this date. Format: YYYY-MM-DDTHH:MM:SS.MMMZ Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`. |
| `valuedAfter` | `query` | `string` | No | The value date of the transaction should be after this date. Format: YYYY-MM-DDTHH:MM:SS.MMMZ Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`. |
| `bookedBefore` | `query` | `string` | No | The booking date of the transaction should be before this date. Format: YYYY-MM-DDTHH:MM:SS.MMMZ Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`. |
| `bookedAfter` | `query` | `string` | No | The booking date of the transaction should be after this date. Format: YYYY-MM-DDTHH:MM:SS.MMMZ Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`. |
| `importedBefore` | `query` | `string` | No | The import date of the transaction should be before this date. Format: YYYY-MM-DDTHH:MM:SS.MMMZ Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`. |
| `importedAfter` | `query` | `string` | No | The import date of the transaction should be after this date. Format: YYYY-MM-DDTHH:MM:SS.MMMZ Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`. |
| `offset` | `query` | `integer` | No | The offset for pagination. Starts with 0. Determine maximum offset with X-Total-Count header. Default: `0`. |
| `limit` | `query` | `integer` | No | The limit for pagination. Default: `100`. Maximum: `250`. |
| `order` | `query` | `string` | No | The order of the sort for the transactions. Default is descending. Default: `desc`. Allowed: `asc`, `desc`, `1`, `-1`. |
| `sortBy` | `query` | `string` | No | The field to sort the transactions. Default is the _id. Default: `_id`. Allowed: `bookingDate`, `valueDate`, `importDate`, `amount`, `_id`. |
| `customSchema` | `query` | `string` | No | A custom schema to apply to the transactions. Format: JSON object. Supports dot.notation. Provide on the left side the attribute name and on the right side the new desired attribute name in the transaction object. It's also possible to move attributes to a different location in the object. Additionally, when providing null as value, the attribute will be removed from the transaction object. Example: { "id": "transactionId" } Format: `json`. |

#### Responses

| Status | Description | Schema | Content type |
| --- | --- | --- | --- |
| `200` | A list of transactions with transaction informations. | [Transaction](#schema-transaction) | `application/json` |
| `400` | Bad Request – The request was invalid or cannot be served. | [Error](#schema-error) | `application/json` |
| `401` | Unauthorized | [Error](#schema-error) | `application/json` |

##### Response headers

| Status | Header | Type | Description |
| --- | --- | --- | --- |
| `200` | `X-Total-Count` | `integer` | The total number of transactions matching this query. Useful for Pagination with Offset and Limit. |

##### `200` examples

###### `application/json`

```json
{
  "id": 123456789,
  "accountId": 12456,
  "account": {
    "accountNumber": "111111102",
    "name": "Tommy Sternen-Himmel",
    "iban": "DE23533700080111111102",
    "bankName": "finAPI Test Bank"
  },
  "amount": -58.63,
  "currency": "EUR",
  "category": {
    "name": "Restaurant / Cafe / Bar",
    "id": 378
  },
  "parentCategory": {
    "name": "Freizeit, Hobbies & Soziales",
    "id": 373
  },
  "counterpart": {
    "accountNumber": "4578522",
    "name": "Bar Centrale",
    "iban": "DE34700800000004578522",
    "bic": "DRESDEFF700",
    "bankName": "Commerzbank vormals Dresdner Bank"
  },
  "createdAt": "2024-03-29T21:31:22.129Z",
  "updatedAt": "2024-03-30T11:05:56.866Z",
  "bookingDate": "2022-03-31T00:00:00.000Z",
  "valueDate": "2022-03-31T00:00:00.000Z",
  "type": "Überweisungsauftrag",
  "purpose": "Rechnung 1234 vom 01.03.2022"
}
```

##### `400` examples

###### `application/json`

```json
{
  "error": "string",
  "message": "string"
}
```

##### `401` examples

###### `application/json`

```json
{
  "error": "string",
  "message": "string"
}
```

#### Example request

```bash
curl --request GET \
  --url "https://api.kontoflux.io/v1/a/transactions/search?offset=0&limit=100&order=desc&sortBy=_id" \
  --header "Authorization: ${GENERAL_API_KEY}"
```

<a id="operation-get-v1-workspace-id-transactions-transaction-id"></a>

### `GET` Get a transaction

Get a specific transaction with the transaction ID.

**Method:** `GET`  
**Path:** `/v1/{workspaceId}/transactions/{transactionId}`  
**Operation ID:** `getTransaction`  
**Tags:** `Transactions`  
**Authentication:** `generalApiKey` or `oauthAuthorizationCode`

#### Parameters

| Name | Location | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `workspaceId` | `path` | `string` | Yes | Your workspace ID to access the transactions within that workspace. Pattern: `^[-a-zA-Z0-9_]+$`. |
| `transactionId` | `path` | `string` | Yes | The transaction ID of the transaction. Pattern: `^[-a-zA-Z0-9_]+$`. |
| `customSchema` | `query` | `string` | No | A custom schema to apply to the transactions. Format: JSON object. Supports dot.notation. Provide on the left side the attribute name and on the right side the new desired attribute name in the transaction object. It's also possible to move attributes to a different location in the object. Additionally, when providing null as value, the attribute will be removed from the transaction object. Example: { "id": "transactionId" } Format: `json`. |

#### Responses

| Status | Description | Schema | Content type |
| --- | --- | --- | --- |
| `200` | The transaction with transaction informations. | [Transaction](#schema-transaction) | `application/json` |
| `400` | Bad Request – The request was invalid or cannot be served. | [Error](#schema-error) | `application/json` |
| `401` | Unauthorized | [Error](#schema-error) | `application/json` |

##### `200` examples

###### `application/json`

```json
{
  "id": 123456789,
  "accountId": 12456,
  "account": {
    "accountNumber": "111111102",
    "name": "Tommy Sternen-Himmel",
    "iban": "DE23533700080111111102",
    "bankName": "finAPI Test Bank"
  },
  "amount": -58.63,
  "currency": "EUR",
  "category": {
    "name": "Restaurant / Cafe / Bar",
    "id": 378
  },
  "parentCategory": {
    "name": "Freizeit, Hobbies & Soziales",
    "id": 373
  },
  "counterpart": {
    "accountNumber": "4578522",
    "name": "Bar Centrale",
    "iban": "DE34700800000004578522",
    "bic": "DRESDEFF700",
    "bankName": "Commerzbank vormals Dresdner Bank"
  },
  "createdAt": "2024-03-29T21:31:22.129Z",
  "updatedAt": "2024-03-30T11:05:56.866Z",
  "bookingDate": "2022-03-31T00:00:00.000Z",
  "valueDate": "2022-03-31T00:00:00.000Z",
  "type": "Überweisungsauftrag",
  "purpose": "Rechnung 1234 vom 01.03.2022"
}
```

##### `400` examples

###### `application/json`

```json
{
  "error": "string",
  "message": "string"
}
```

##### `401` examples

###### `application/json`

```json
{
  "error": "string",
  "message": "string"
}
```

#### Example request

```bash
curl --request GET \
  --url "https://api.kontoflux.io/v1/a/transactions/a" \
  --header "Authorization: ${GENERAL_API_KEY}"
```

<a id="operation-get-v1-workspace-id-transactions-match"></a>

### `GET` Match transactions against a string

Fuzzy-match transactions across purpose, endToEndReference, counterpartCustomerReference, counterpartMandateReference, primanota, and paypalData.invoiceNumber. Matching normalizes case, Unicode, punctuation, spacing, common reference abbreviations, and number-only queries so misspellings and compact forms can still rank well. Each result has a deterministic relevance score from 0 to 1; higher is better, but the score is a ranking signal and not a probability. Exact normalized reference matches receive the strongest evidence and numeric conflicts reduce relevance. Results are ordered by score, evidence quality, booking date descending, then transaction ID descending. Only the newest 100,000 transactions that satisfy the account, counterpart, category, and date filters are evaluated.

**Method:** `GET`  
**Path:** `/v1/{workspaceId}/transactions/match`  
**Operation ID:** `matchTransactions`  
**Tags:** `Transactions`  
**Authentication:** `generalApiKey` or `oauthAuthorizationCode`

#### Parameters

| Name | Location | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `workspaceId` | `path` | `string` | Yes | Your workspace ID to access the transactions within that workspace. Pattern: `^[-a-zA-Z0-9_]+$`. |
| `query` | `query` | `string` | Yes | Required fuzzy-match query containing at least two normalized letters or numbers, limited to 256 Unicode characters and 24 normalized tokens. Use this canonical query parameter; q, search, request-body aliases, and the misspelled treshold parameter are not accepted by match endpoints. Minimum length: `2`. Maximum length: `256`. |
| `category` | `query` | `string` | No | The category ID or exact category name to filter for transactions with that category. |
| `parentCategory` | `query` | `string` | No | The category name to filter for transactions with that category name. If no category parameter is set, it will search for the category in the category and parentCategory field of the transaction. |
| `valuedBefore` | `query` | `string` | No | The value date of the transaction should be before this date. Format: YYYY-MM-DDTHH:MM:SS.MMMZ Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`. |
| `valuedAfter` | `query` | `string` | No | The value date of the transaction should be after this date. Format: YYYY-MM-DDTHH:MM:SS.MMMZ Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`. |
| `bookedBefore` | `query` | `string` | No | The booking date of the transaction should be before this date. Format: YYYY-MM-DDTHH:MM:SS.MMMZ Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`. |
| `bookedAfter` | `query` | `string` | No | The booking date of the transaction should be after this date. Format: YYYY-MM-DDTHH:MM:SS.MMMZ Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`. |
| `importedBefore` | `query` | `string` | No | The import date of the transaction should be before this date. Format: YYYY-MM-DDTHH:MM:SS.MMMZ Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`. |
| `importedAfter` | `query` | `string` | No | The import date of the transaction should be after this date. Format: YYYY-MM-DDTHH:MM:SS.MMMZ Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`. |
| `offset` | `query` | `integer` | No | The offset into the score-ordered qualified matches within the newest 100,000 eligible transactions. Starts with 0; use X-Total-Count to determine the available result count in that evaluation window. Default: `0`. Minimum: `0`. |
| `limit` | `query` | `integer` | No | The limit for pagination. Default: `10`. Minimum: `1`. Maximum: `50`. |
| `threshold` | `query` | `number` | No | Minimum finite relevance score required for a result, expressed as a standard decimal or exponent-form number from 0 through 1. Scores are deterministic ranking signals, not probabilities. Default: `0.6`. Minimum: `0`. Maximum: `1`. |
| `customSchema` | `query` | `string` | No | A custom schema to apply to matched transactions. Format: JSON object with safe dot.notation. The required score field cannot be moved, removed, or overwritten. Provide the source attribute on the left and its new location on the right; null removes non-required fields. Example: { "id": "transactionId" } Format: `json`. |

#### Responses

| Status | Description | Schema | Content type |
| --- | --- | --- | --- |
| `200` | A score-descending array of matched transactions. Every item contains a required score between 0 and 1. | Array of [MatchedTransaction](#schema-matched-transaction) | `application/json` |
| `400` | Bad Request – query, threshold, pagination, filters, or customSchema are invalid. Match endpoints do not accept q, search, treshold, or request-body aliases. | [Error](#schema-error) | `application/json` |
| `401` | Unauthorized | [Error](#schema-error) | `application/json` |
| `409` | The selected transaction or related account changed while the global ranking was being finalized. No partial or stale result is returned; retry the request. | [Error](#schema-error) | `application/json` |
| `503` | Matching could not finish within the database or execution time budget. No partial ranking is returned; retry with narrower filters. This response is not triggered merely because more than 100,000 transactions are eligible. | [Error](#schema-error) | `application/json` |

##### Response headers

| Status | Header | Type | Description |
| --- | --- | --- | --- |
| `200` | `X-Total-Count` | `integer` | The number of results at or above threshold within the newest 100,000 eligible transactions, after account, counterpart, category, and date filters and before offset and limit. Transactions outside that evaluation window are not counted. |

##### `200` examples

###### `application/json`

```json
[
  {
    "id": 123456789,
    "accountId": 12456,
    "account": {
      "accountNumber": "111111102",
      "name": "Tommy Sternen-Himmel",
      "iban": "DE23533700080111111102",
      "bankName": "finAPI Test Bank"
    },
    "amount": -58.63,
    "currency": "EUR",
    "category": {
      "name": "Restaurant / Cafe / Bar",
      "id": 378
    },
    "parentCategory": {
      "name": "Freizeit, Hobbies & Soziales",
      "id": 373
    },
    "counterpart": {
      "accountNumber": "4578522",
      "name": "Bar Centrale",
      "iban": "DE34700800000004578522",
      "bic": "DRESDEFF700",
      "bankName": "Commerzbank vormals Dresdner Bank"
    },
    "createdAt": "2024-03-29T21:31:22.129Z",
    "updatedAt": "2024-03-30T11:05:56.866Z",
    "bookingDate": "2022-03-31T00:00:00.000Z",
    "valueDate": "2022-03-31T00:00:00.000Z",
    "type": "Überweisungsauftrag",
    "purpose": "Rechnung 1234 vom 01.03.2022",
    "score": 0.94
  }
]
```

##### `400` examples

###### `application/json`

```json
{
  "error": "string",
  "message": "string"
}
```

##### `401` examples

###### `application/json`

```json
{
  "error": "string",
  "message": "string"
}
```

##### `409` examples

###### `application/json`

```json
{
  "error": "string",
  "message": "string"
}
```

##### `503` examples

###### `application/json`

```json
{
  "error": "string",
  "message": "string"
}
```

#### Example request

```bash
curl --request GET \
  --url "https://api.kontoflux.io/v1/a/transactions/match?query=string&offset=0&limit=10&threshold=0.6" \
  --header "Authorization: ${GENERAL_API_KEY}"
```

<a id="tag-counterparts"></a>

## Counterparts

Access transactions for specific counterparts with a IBAN reference.

<a id="operation-get-v1-workspace-id-counterpart-iban-transactions"></a>

### `GET` Get all transactions of a counterpart

Get all transactions of a specific counterpart by IBAN.

**Method:** `GET`  
**Path:** `/v1/{workspaceId}/counterpart/{iban}/transactions`  
**Operation ID:** `getCounterpartTransactions`  
**Tags:** `Counterparts`, `Transactions`  
**Authentication:** `generalApiKey` or `oauthAuthorizationCode`

#### Parameters

| Name | Location | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `workspaceId` | `path` | `string` | Yes | Your workspace ID to access the transactions within that workspace. Pattern: `^[-a-zA-Z0-9_]+$`. |
| `iban` | `path` | `string` | Yes | The IBAN of the account. Pattern: `^[-a-zA-Z0-9_]+$`. |
| `category` | `query` | `string` | No | The category ID or exact category name to filter for transactions with that category. |
| `parentCategory` | `query` | `string` | No | The category name to filter for transactions with that category name. If no category parameter is set, it will search for the category in the category and parentCategory field of the transaction. |
| `valuedBefore` | `query` | `string` | No | The value date of the transaction should be before this date. Format: YYYY-MM-DDTHH:MM:SS.MMMZ Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`. |
| `valuedAfter` | `query` | `string` | No | The value date of the transaction should be after this date. Format: YYYY-MM-DDTHH:MM:SS.MMMZ Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`. |
| `bookedBefore` | `query` | `string` | No | The booking date of the transaction should be before this date. Format: YYYY-MM-DDTHH:MM:SS.MMMZ Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`. |
| `bookedAfter` | `query` | `string` | No | The booking date of the transaction should be after this date. Format: YYYY-MM-DDTHH:MM:SS.MMMZ Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`. |
| `importedBefore` | `query` | `string` | No | The import date of the transaction should be before this date. Format: YYYY-MM-DDTHH:MM:SS.MMMZ Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`. |
| `importedAfter` | `query` | `string` | No | The import date of the transaction should be after this date. Format: YYYY-MM-DDTHH:MM:SS.MMMZ Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`. |
| `offset` | `query` | `integer` | No | The offset for pagination. Starts with 0. Determine maximum offset with X-Total-Count header. Default: `0`. |
| `limit` | `query` | `integer` | No | The limit for pagination. Default: `100`. Maximum: `250`. |
| `order` | `query` | `string` | No | The order of the sort for the transactions. Default is descending. Default: `desc`. Allowed: `asc`, `desc`, `1`, `-1`. |
| `sortBy` | `query` | `string` | No | The field to sort the transactions. Default is the _id. Default: `_id`. Allowed: `bookingDate`, `valueDate`, `importDate`, `amount`, `_id`. |
| `customSchema` | `query` | `string` | No | A custom schema to apply to the transactions. Format: JSON object. Supports dot.notation. Provide on the left side the attribute name and on the right side the new desired attribute name in the transaction object. It's also possible to move attributes to a different location in the object. Additionally, when providing null as value, the attribute will be removed from the transaction object. Example: { "id": "transactionId" } Format: `json`. |

#### Responses

| Status | Description | Schema | Content type |
| --- | --- | --- | --- |
| `200` | A list of transactions with transaction informations. | [Transaction](#schema-transaction) | `application/json` |
| `400` | Bad Request – The request was invalid or cannot be served. | [Error](#schema-error) | `application/json` |
| `401` | Unauthorized | [Error](#schema-error) | `application/json` |

##### Response headers

| Status | Header | Type | Description |
| --- | --- | --- | --- |
| `200` | `X-Total-Count` | `integer` | The total number of transactions matching this query. Useful for Pagination with Offset and Limit. |

##### `200` examples

###### `application/json`

```json
{
  "id": 123456789,
  "accountId": 12456,
  "account": {
    "accountNumber": "111111102",
    "name": "Tommy Sternen-Himmel",
    "iban": "DE23533700080111111102",
    "bankName": "finAPI Test Bank"
  },
  "amount": -58.63,
  "currency": "EUR",
  "category": {
    "name": "Restaurant / Cafe / Bar",
    "id": 378
  },
  "parentCategory": {
    "name": "Freizeit, Hobbies & Soziales",
    "id": 373
  },
  "counterpart": {
    "accountNumber": "4578522",
    "name": "Bar Centrale",
    "iban": "DE34700800000004578522",
    "bic": "DRESDEFF700",
    "bankName": "Commerzbank vormals Dresdner Bank"
  },
  "createdAt": "2024-03-29T21:31:22.129Z",
  "updatedAt": "2024-03-30T11:05:56.866Z",
  "bookingDate": "2022-03-31T00:00:00.000Z",
  "valueDate": "2022-03-31T00:00:00.000Z",
  "type": "Überweisungsauftrag",
  "purpose": "Rechnung 1234 vom 01.03.2022"
}
```

##### `400` examples

###### `application/json`

```json
{
  "error": "string",
  "message": "string"
}
```

##### `401` examples

###### `application/json`

```json
{
  "error": "string",
  "message": "string"
}
```

#### Example request

```bash
curl --request GET \
  --url "https://api.kontoflux.io/v1/a/counterpart/a/transactions?offset=0&limit=100&order=desc&sortBy=_id" \
  --header "Authorization: ${GENERAL_API_KEY}"
```

<a id="operation-get-v1-workspace-id-counterpart-iban-transactions-search"></a>

### `GET` Search transactions of a counterpart by iban

Search transactions of a specific counterpart by IBAN. Could be creditor or debtor of a transaction.

**Method:** `GET`  
**Path:** `/v1/{workspaceId}/counterpart/{iban}/transactions/search`  
**Operation ID:** `searchCounterpartTransactions`  
**Tags:** `Counterparts`, `Transactions`  
**Authentication:** `generalApiKey` or `oauthAuthorizationCode`

#### Parameters

| Name | Location | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `workspaceId` | `path` | `string` | Yes | Your workspace ID to access the transactions within that workspace. Pattern: `^[-a-zA-Z0-9_]+$`. |
| `iban` | `path` | `string` | Yes | The IBAN of the counterpart. Pattern: `^[-a-zA-Z0-9_]+$`. |
| `query` | `query` | `string` | No | The search query to search for transactions. |
| `category` | `query` | `string` | No | The category ID or exact category name to filter for transactions with that category. |
| `parentCategory` | `query` | `string` | No | The category name to filter for transactions with that category name. If no category parameter is set, it will search for the category in the category and parentCategory field of the transaction. |
| `valuedBefore` | `query` | `string` | No | The value date of the transaction should be before this date. Format: YYYY-MM-DDTHH:MM:SS.MMMZ Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`. |
| `valuedAfter` | `query` | `string` | No | The value date of the transaction should be after this date. Format: YYYY-MM-DDTHH:MM:SS.MMMZ Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`. |
| `bookedBefore` | `query` | `string` | No | The booking date of the transaction should be before this date. Format: YYYY-MM-DDTHH:MM:SS.MMMZ Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`. |
| `bookedAfter` | `query` | `string` | No | The booking date of the transaction should be after this date. Format: YYYY-MM-DDTHH:MM:SS.MMMZ Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`. |
| `importedBefore` | `query` | `string` | No | The import date of the transaction should be before this date. Format: YYYY-MM-DDTHH:MM:SS.MMMZ Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`. |
| `importedAfter` | `query` | `string` | No | The import date of the transaction should be after this date. Format: YYYY-MM-DDTHH:MM:SS.MMMZ Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`. |
| `offset` | `query` | `integer` | No | The offset for pagination. Starts with 0. Determine maximum offset with X-Total-Count header. Default: `0`. |
| `limit` | `query` | `integer` | No | The limit for pagination. Default: `100`. Maximum: `250`. |
| `order` | `query` | `string` | No | The order of the sort for the transactions. Default is descending. Default: `desc`. Allowed: `asc`, `desc`, `1`, `-1`. |
| `sortBy` | `query` | `string` | No | The field to sort the transactions. Default is the _id. Default: `_id`. Allowed: `bookingDate`, `valueDate`, `importDate`, `amount`, `_id`. |
| `customSchema` | `query` | `string` | No | A custom schema to apply to the transactions. Format: JSON object. Supports dot.notation. Provide on the left side the attribute name and on the right side the new desired attribute name in the transaction object. It's also possible to move attributes to a different location in the object. Additionally, when providing null as value, the attribute will be removed from the transaction object. Example: { "id": "transactionId" } Format: `json`. |

#### Responses

| Status | Description | Schema | Content type |
| --- | --- | --- | --- |
| `200` | A list of transactions with transaction informations. | [Transaction](#schema-transaction) | `application/json` |
| `400` | Bad Request – The request was invalid or cannot be served. | [Error](#schema-error) | `application/json` |
| `401` | Unauthorized | [Error](#schema-error) | `application/json` |

##### Response headers

| Status | Header | Type | Description |
| --- | --- | --- | --- |
| `200` | `X-Total-Count` | `integer` | The total number of transactions matching this query. Useful for Pagination with Offset and Limit. |

##### `200` examples

###### `application/json`

```json
{
  "id": 123456789,
  "accountId": 12456,
  "account": {
    "accountNumber": "111111102",
    "name": "Tommy Sternen-Himmel",
    "iban": "DE23533700080111111102",
    "bankName": "finAPI Test Bank"
  },
  "amount": -58.63,
  "currency": "EUR",
  "category": {
    "name": "Restaurant / Cafe / Bar",
    "id": 378
  },
  "parentCategory": {
    "name": "Freizeit, Hobbies & Soziales",
    "id": 373
  },
  "counterpart": {
    "accountNumber": "4578522",
    "name": "Bar Centrale",
    "iban": "DE34700800000004578522",
    "bic": "DRESDEFF700",
    "bankName": "Commerzbank vormals Dresdner Bank"
  },
  "createdAt": "2024-03-29T21:31:22.129Z",
  "updatedAt": "2024-03-30T11:05:56.866Z",
  "bookingDate": "2022-03-31T00:00:00.000Z",
  "valueDate": "2022-03-31T00:00:00.000Z",
  "type": "Überweisungsauftrag",
  "purpose": "Rechnung 1234 vom 01.03.2022"
}
```

##### `400` examples

###### `application/json`

```json
{
  "error": "string",
  "message": "string"
}
```

##### `401` examples

###### `application/json`

```json
{
  "error": "string",
  "message": "string"
}
```

#### Example request

```bash
curl --request GET \
  --url "https://api.kontoflux.io/v1/a/counterpart/a/transactions/search?offset=0&limit=100&order=desc&sortBy=_id" \
  --header "Authorization: ${GENERAL_API_KEY}"
```

<a id="operation-get-v1-workspace-id-counterpart-iban-transactions-match"></a>

### `GET` Match transactions against a string for a counterpart by IBAN

Fuzzy-match one counterpart's transactions across purpose, endToEndReference, counterpartCustomerReference, counterpartMandateReference, primanota, and paypalData.invoiceNumber. Matching normalizes case, Unicode, punctuation, spacing, common reference abbreviations, and number-only queries so misspellings and compact forms can still rank well. Each result has a deterministic relevance score from 0 to 1; higher is better, but the score is a ranking signal and not a probability. Exact normalized reference matches receive the strongest evidence and numeric conflicts reduce relevance. Results are ordered by score, evidence quality, booking date descending, then transaction ID descending. Only the newest 100,000 transactions that satisfy the counterpart, category, and date filters are evaluated.

**Method:** `GET`  
**Path:** `/v1/{workspaceId}/counterpart/{iban}/transactions/match`  
**Operation ID:** `matchCounterpartTransactions`  
**Tags:** `Counterparts`, `Transactions`  
**Authentication:** `generalApiKey` or `oauthAuthorizationCode`

#### Parameters

| Name | Location | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `workspaceId` | `path` | `string` | Yes | Your workspace ID to access the transactions within that workspace. Pattern: `^[-a-zA-Z0-9_]+$`. |
| `iban` | `path` | `string` | Yes | The IBAN of the counterpart. Pattern: `^[-a-zA-Z0-9_]+$`. |
| `query` | `query` | `string` | Yes | Required fuzzy-match query containing at least two normalized letters or numbers, limited to 256 Unicode characters and 24 normalized tokens. Use this canonical query parameter; q, search, request-body aliases, and the misspelled treshold parameter are not accepted by match endpoints. Minimum length: `2`. Maximum length: `256`. |
| `category` | `query` | `string` | No | The category ID or exact category name to filter for transactions with that category. |
| `parentCategory` | `query` | `string` | No | The category name to filter for transactions with that category name. If no category parameter is set, it will search for the category in the category and parentCategory field of the transaction. |
| `valuedBefore` | `query` | `string` | No | The value date of the transaction should be before this date. Format: YYYY-MM-DDTHH:MM:SS.MMMZ Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`. |
| `valuedAfter` | `query` | `string` | No | The value date of the transaction should be after this date. Format: YYYY-MM-DDTHH:MM:SS.MMMZ Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`. |
| `bookedBefore` | `query` | `string` | No | The booking date of the transaction should be before this date. Format: YYYY-MM-DDTHH:MM:SS.MMMZ Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`. |
| `bookedAfter` | `query` | `string` | No | The booking date of the transaction should be after this date. Format: YYYY-MM-DDTHH:MM:SS.MMMZ Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`. |
| `importedBefore` | `query` | `string` | No | The import date of the transaction should be before this date. Format: YYYY-MM-DDTHH:MM:SS.MMMZ Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`. |
| `importedAfter` | `query` | `string` | No | The import date of the transaction should be after this date. Format: YYYY-MM-DDTHH:MM:SS.MMMZ Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`. |
| `offset` | `query` | `integer` | No | The offset into the score-ordered qualified matches within the newest 100,000 eligible transactions. Starts with 0; use X-Total-Count to determine the available result count in that evaluation window. Default: `0`. Minimum: `0`. |
| `limit` | `query` | `integer` | No | The limit for pagination. Default: `10`. Minimum: `1`. Maximum: `50`. |
| `threshold` | `query` | `number` | No | Minimum finite relevance score required for a result, expressed as a standard decimal or exponent-form number from 0 through 1. Scores are deterministic ranking signals, not probabilities. Default: `0.6`. Minimum: `0`. Maximum: `1`. |
| `customSchema` | `query` | `string` | No | A custom schema to apply to matched transactions. Format: JSON object with safe dot.notation. The required score field cannot be moved, removed, or overwritten. Provide the source attribute on the left and its new location on the right; null removes non-required fields. Example: { "id": "transactionId" } Format: `json`. |

#### Responses

| Status | Description | Schema | Content type |
| --- | --- | --- | --- |
| `200` | A score-descending array of matched transactions. Every item contains a required score between 0 and 1. | Array of [MatchedTransaction](#schema-matched-transaction) | `application/json` |
| `400` | Bad Request – query, threshold, pagination, filters, or customSchema are invalid. Match endpoints do not accept q, search, treshold, or request-body aliases. | [Error](#schema-error) | `application/json` |
| `401` | Unauthorized | [Error](#schema-error) | `application/json` |
| `409` | The selected transaction or related account changed while the global ranking was being finalized. No partial or stale result is returned; retry the request. | [Error](#schema-error) | `application/json` |
| `503` | Matching could not finish within the database or execution time budget. No partial ranking is returned; retry with narrower filters. This response is not triggered merely because more than 100,000 transactions are eligible. | [Error](#schema-error) | `application/json` |

##### Response headers

| Status | Header | Type | Description |
| --- | --- | --- | --- |
| `200` | `X-Total-Count` | `integer` | The number of results at or above threshold within the newest 100,000 eligible transactions, after counterpart, category, and date filters and before offset and limit. Transactions outside that evaluation window are not counted. |

##### `200` examples

###### `application/json`

```json
[
  {
    "id": 123456789,
    "accountId": 12456,
    "account": {
      "accountNumber": "111111102",
      "name": "Tommy Sternen-Himmel",
      "iban": "DE23533700080111111102",
      "bankName": "finAPI Test Bank"
    },
    "amount": -58.63,
    "currency": "EUR",
    "category": {
      "name": "Restaurant / Cafe / Bar",
      "id": 378
    },
    "parentCategory": {
      "name": "Freizeit, Hobbies & Soziales",
      "id": 373
    },
    "counterpart": {
      "accountNumber": "4578522",
      "name": "Bar Centrale",
      "iban": "DE34700800000004578522",
      "bic": "DRESDEFF700",
      "bankName": "Commerzbank vormals Dresdner Bank"
    },
    "createdAt": "2024-03-29T21:31:22.129Z",
    "updatedAt": "2024-03-30T11:05:56.866Z",
    "bookingDate": "2022-03-31T00:00:00.000Z",
    "valueDate": "2022-03-31T00:00:00.000Z",
    "type": "Überweisungsauftrag",
    "purpose": "Rechnung 1234 vom 01.03.2022",
    "score": 0.94
  }
]
```

##### `400` examples

###### `application/json`

```json
{
  "error": "string",
  "message": "string"
}
```

##### `401` examples

###### `application/json`

```json
{
  "error": "string",
  "message": "string"
}
```

##### `409` examples

###### `application/json`

```json
{
  "error": "string",
  "message": "string"
}
```

##### `503` examples

###### `application/json`

```json
{
  "error": "string",
  "message": "string"
}
```

#### Example request

```bash
curl --request GET \
  --url "https://api.kontoflux.io/v1/a/counterpart/a/transactions/match?query=string&offset=0&limit=10&threshold=0.6" \
  --header "Authorization: ${GENERAL_API_KEY}"
```

<a id="tag-ai-categories"></a>

## AI Categories

Access AI categories for reference with the transactions.

<a id="operation-get-v1-workspace-id-categories"></a>

### `GET` Get all categories

Get all categories for transactions.

**Method:** `GET`  
**Path:** `/v1/{workspaceId}/categories`  
**Operation ID:** `getCategories`  
**Tags:** `AI Categories`, `Transactions`  
**Authentication:** `generalApiKey` or `oauthAuthorizationCode`

#### Parameters

| Name | Location | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `workspaceId` | `path` | `string` | Yes | Your workspace ID to access the categories within that workspace. Pattern: `^[-a-zA-Z0-9_]+$`. |

#### Responses

| Status | Description | Schema | Content type |
| --- | --- | --- | --- |
| `200` | A list of categories for transactions. | [Category](#schema-category-43-61-74-65-67-6f-72-79) | `application/json` |
| `400` | Bad Request – The request was invalid or cannot be served. | [Error](#schema-error) | `application/json` |
| `401` | Unauthorized | [Error](#schema-error) | `application/json` |

##### `200` examples

###### `application/json`

```json
{
  "id": 320,
  "name": "Einnahmen",
  "children": [
    {
      "id": 1,
      "name": "string",
      "children": [
        {
          "id": 1,
          "name": "string",
          "children": [
            "[Circular cyclic_0]"
          ]
        }
      ]
    }
  ]
}
```

##### `400` examples

###### `application/json`

```json
{
  "error": "string",
  "message": "string"
}
```

##### `401` examples

###### `application/json`

```json
{
  "error": "string",
  "message": "string"
}
```

#### Example request

```bash
curl --request GET \
  --url "https://api.kontoflux.io/v1/a/categories" \
  --header "Authorization: ${GENERAL_API_KEY}"
```

<a id="operation-get-v1-workspace-id-categories-category-id"></a>

### `GET` Get a category

Get a specific category with the category ID.

**Method:** `GET`  
**Path:** `/v1/{workspaceId}/categories/{categoryId}`  
**Operation ID:** `getCategory`  
**Tags:** `AI Categories`, `Transactions`  
**Authentication:** `generalApiKey` or `oauthAuthorizationCode`

#### Parameters

| Name | Location | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `workspaceId` | `path` | `string` | Yes | Your workspace ID to access the categories within that workspace. Pattern: `^[-a-zA-Z0-9_]+$`. |
| `categoryId` | `path` | `number` | Yes | The category ID of the category. Pattern: `^[0-9]+$`. |

#### Responses

| Status | Description | Schema | Content type |
| --- | --- | --- | --- |
| `200` | The category with category informations. | [Category](#schema-category-43-61-74-65-67-6f-72-79) | `application/json` |
| `400` | Bad Request – The request was invalid or cannot be served. | [Error](#schema-error) | `application/json` |
| `401` | Unauthorized | [Error](#schema-error) | `application/json` |

##### `200` examples

###### `application/json`

```json
{
  "id": 320,
  "name": "Einnahmen",
  "children": [
    {
      "id": 1,
      "name": "string",
      "children": [
        {
          "id": 1,
          "name": "string",
          "children": [
            "[Circular cyclic_0]"
          ]
        }
      ]
    }
  ]
}
```

##### `400` examples

###### `application/json`

```json
{
  "error": "string",
  "message": "string"
}
```

##### `401` examples

###### `application/json`

```json
{
  "error": "string",
  "message": "string"
}
```

#### Example request

```bash
curl --request GET \
  --url "https://api.kontoflux.io/v1/a/categories/0" \
  --header "Authorization: ${GENERAL_API_KEY}"
```

<a id="tag-scope"></a>

## Scope

<a id="operation-get-v1-workspace-id-key-scope"></a>

### `GET` Get the Scope of the current API-Key

Get the Scope of the current API-Key. This includes the scopes, the filter and the accounts that the API-Key has access to.

**Method:** `GET`  
**Path:** `/v1/{workspaceId}/key/scope`  
**Operation ID:** `getKeyScope`  
**Tags:** `Scope`  
**Authentication:** `generalApiKey` or `oauthAuthorizationCode`

#### Parameters

| Name | Location | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `workspaceId` | `path` | `string` | Yes | Your workspace ID tied to this API-Key. |

#### Responses

| Status | Description | Schema | Content type |
| --- | --- | --- | --- |
| `200` | The current API-Key capabilities. | `none` | — |
| `401` | Unauthorized | `none` | — |

#### Example request

```bash
curl --request GET \
  --url "https://api.kontoflux.io/v1/string/key/scope" \
  --header "Authorization: ${GENERAL_API_KEY}"
```

<a id="schemas"></a>

## Schemas

<a id="schema-account"></a>

### Account

A schema defining the structure for bank account information.

**Type:** `object`

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `integer` | Yes | The unique identifier for the bank account. |
| `currency` | `string` | Yes | The currency code for the account, conforming to the ISO 4217 currency codes. Pattern: `^[A-Z]{3}$`. |
| `holderName` | `string` | Yes | The name of the account holder. Might travel through time. |
| `accountNumber` | `string` | Yes | The account number unique within the bank's system. |
| `balance` | `number` | Yes | The current balance of the account. |
| `availableFunds` | `number` | No | The total available funds for the account. |
| `overdraft` | `number` | No | The amount of the overdraft volume available to this account. (Dispokredit) |
| `createdAt` | `string` | Yes | Timestamp of when the account was created (in Kontoflux). Format: `date-time`. |
| `updatedAt` | `string` | Yes | Timestamp of the most recent update made to the account. Format: `date-time`. |
| `iban` | `string` | Yes | The International Bank Account Number that uniquely identifies the account globally. Pattern: `^[A-Z]{2}[0-9]{2}[A-Z0-9]{1,30}$`. |
| `blz` | `string` | Yes | The bank identifier code specific to each bank in certain countries. |

#### Example

```json
{
  "id": 123456,
  "currency": "EUR",
  "holderName": "Marty McFly",
  "accountNumber": "111111123",
  "balance": 420.69,
  "availableFunds": 1337.42,
  "overdraft": 1000,
  "createdAt": "2024-03-29T21:31:21.990Z",
  "updatedAt": "2024-03-31T18:40:35.333Z",
  "iban": "DE12133700080111111102",
  "blz": "DEMO0001"
}
```

<a id="schema-transaction"></a>

### Transaction

Transaction Information

**Type:** `object`

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `integer` | Yes | Unique identifier for the transaction. |
| `accountId` | `integer` | Yes | Identifier of the account associated with this transaction. |
| `account` | `object` | Yes |  |
| `account.accountNumber` | `string` | Yes | Account number of the account. |
| `account.name` | `string` | Yes | Name of the account holder. |
| `account.iban` | `string` | Yes | International Bank Account Number of the account. |
| `account.bankName` | `string` | Yes | Name of the bank. |
| `amount` | `number` | Yes | The transaction amount. A negative value indicates a debit, while a positive value indicates a credit. |
| `currency` | `string` | Yes | Currency code for the transaction, following the ISO 4217 format. Pattern: `^[A-Z]{3}$`. |
| `category` | `object` | Yes | The detailed assigned Category by the AI-Categorization. |
| `category.name` | `string` | Yes | Category name. |
| `category.id` | `integer` | Yes | Category identifier. |
| `parentCategory` | `object` | No | The wider more broad assigned (Main-)Category by the AI-Categorization. Could be empty if no detailed category was found. In that case the category field is set with a parent category. |
| `parentCategory.name` | `string` | Yes | Parent category name. |
| `parentCategory.id` | `integer` | Yes | Parent category identifier. |
| `counterpart` | `object` | Yes |  |
| `counterpart.accountNumber` | `string` | Yes | Counterpart's account number. |
| `counterpart.name` | `string` | Yes | Counterpart's name. |
| `counterpart.iban` | `string` | Yes | Counterpart's International Bank Account Number. |
| `counterpart.bic` | `string` | Yes | Bank Identifier Code of the counterpart's bank. |
| `counterpart.bankName` | `string` | Yes | Name of the counterpart's bank. |
| `createdAt` | `string` | Yes | Timestamp when the transaction was created. Format: `date-time`. |
| `updatedAt` | `string` | Yes | Timestamp when the transaction was last updated. Format: `date-time`. |
| `bookingDate` | `string` | Yes | Date when the transaction was booked. NOTE: The time of a transaction is not delivered by the banks. Therefore, the time is always set to 00:00:00.000. Format: `date-time`. |
| `valueDate` | `string` | Yes | The date when the transaction amount is considered to affect the account balance. NOTE: The time of a transaction is not delivered by the banks. Therefore, the time is always set to 00:00:00.000. Format: `date-time`. |
| `type` | `string` | Yes | Type of the transaction. |
| `purpose` | `string` | Yes | Description or purpose of the transaction. |

#### Example

```json
{
  "id": 123456789,
  "accountId": 12456,
  "account": {
    "accountNumber": "111111102",
    "name": "Tommy Sternen-Himmel",
    "iban": "DE23533700080111111102",
    "bankName": "finAPI Test Bank"
  },
  "amount": -58.63,
  "currency": "EUR",
  "category": {
    "name": "Restaurant / Cafe / Bar",
    "id": 378
  },
  "parentCategory": {
    "name": "Freizeit, Hobbies & Soziales",
    "id": 373
  },
  "counterpart": {
    "accountNumber": "4578522",
    "name": "Bar Centrale",
    "iban": "DE34700800000004578522",
    "bic": "DRESDEFF700",
    "bankName": "Commerzbank vormals Dresdner Bank"
  },
  "createdAt": "2024-03-29T21:31:22.129Z",
  "updatedAt": "2024-03-30T11:05:56.866Z",
  "bookingDate": "2022-03-31T00:00:00.000Z",
  "valueDate": "2022-03-31T00:00:00.000Z",
  "type": "Überweisungsauftrag",
  "purpose": "Rechnung 1234 vom 01.03.2022"
}
```

<a id="schema-matched-transaction"></a>

### MatchedTransaction

A transaction returned by a match endpoint together with its normalized relevance score.

**Type:** `object`

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `integer` | Yes | Unique identifier for the transaction. |
| `accountId` | `integer` | Yes | Identifier of the account associated with this transaction. |
| `account` | `object` | Yes |  |
| `account.accountNumber` | `string` | Yes | Account number of the account. |
| `account.name` | `string` | Yes | Name of the account holder. |
| `account.iban` | `string` | Yes | International Bank Account Number of the account. |
| `account.bankName` | `string` | Yes | Name of the bank. |
| `amount` | `number` | Yes | The transaction amount. A negative value indicates a debit, while a positive value indicates a credit. |
| `currency` | `string` | Yes | Currency code for the transaction, following the ISO 4217 format. Pattern: `^[A-Z]{3}$`. |
| `category` | `object` | Yes | The detailed assigned Category by the AI-Categorization. |
| `category.name` | `string` | Yes | Category name. |
| `category.id` | `integer` | Yes | Category identifier. |
| `parentCategory` | `object` | No | The wider more broad assigned (Main-)Category by the AI-Categorization. Could be empty if no detailed category was found. In that case the category field is set with a parent category. |
| `parentCategory.name` | `string` | Yes | Parent category name. |
| `parentCategory.id` | `integer` | Yes | Parent category identifier. |
| `counterpart` | `object` | Yes |  |
| `counterpart.accountNumber` | `string` | Yes | Counterpart's account number. |
| `counterpart.name` | `string` | Yes | Counterpart's name. |
| `counterpart.iban` | `string` | Yes | Counterpart's International Bank Account Number. |
| `counterpart.bic` | `string` | Yes | Bank Identifier Code of the counterpart's bank. |
| `counterpart.bankName` | `string` | Yes | Name of the counterpart's bank. |
| `createdAt` | `string` | Yes | Timestamp when the transaction was created. Format: `date-time`. |
| `updatedAt` | `string` | Yes | Timestamp when the transaction was last updated. Format: `date-time`. |
| `bookingDate` | `string` | Yes | Date when the transaction was booked. NOTE: The time of a transaction is not delivered by the banks. Therefore, the time is always set to 00:00:00.000. Format: `date-time`. |
| `valueDate` | `string` | Yes | The date when the transaction amount is considered to affect the account balance. NOTE: The time of a transaction is not delivered by the banks. Therefore, the time is always set to 00:00:00.000. Format: `date-time`. |
| `type` | `string` | Yes | Type of the transaction. |
| `purpose` | `string` | Yes | Description or purpose of the transaction. |
| `score` | `number` | Yes | Normalized match relevance from 0 to 1. Higher values are better matches. The score is a deterministic ranking signal, not a probability. Minimum: `0`. Maximum: `1`. |

#### Example

```json
{
  "id": 123456789,
  "accountId": 12456,
  "account": {
    "accountNumber": "111111102",
    "name": "Tommy Sternen-Himmel",
    "iban": "DE23533700080111111102",
    "bankName": "finAPI Test Bank"
  },
  "amount": -58.63,
  "currency": "EUR",
  "category": {
    "name": "Restaurant / Cafe / Bar",
    "id": 378
  },
  "parentCategory": {
    "name": "Freizeit, Hobbies & Soziales",
    "id": 373
  },
  "counterpart": {
    "accountNumber": "4578522",
    "name": "Bar Centrale",
    "iban": "DE34700800000004578522",
    "bic": "DRESDEFF700",
    "bankName": "Commerzbank vormals Dresdner Bank"
  },
  "createdAt": "2024-03-29T21:31:22.129Z",
  "updatedAt": "2024-03-30T11:05:56.866Z",
  "bookingDate": "2022-03-31T00:00:00.000Z",
  "valueDate": "2022-03-31T00:00:00.000Z",
  "type": "Überweisungsauftrag",
  "purpose": "Rechnung 1234 vom 01.03.2022",
  "score": 0.94
}
```

<a id="schema-matched-transactions"></a>

### MatchedTransactions

A score-descending list of matched transactions.

**Type:** Array of [MatchedTransaction](#schema-matched-transaction)

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `[].id` | `integer` | Yes | Unique identifier for the transaction. |
| `[].accountId` | `integer` | Yes | Identifier of the account associated with this transaction. |
| `[].account` | `object` | Yes |  |
| `[].account.accountNumber` | `string` | Yes | Account number of the account. |
| `[].account.name` | `string` | Yes | Name of the account holder. |
| `[].account.iban` | `string` | Yes | International Bank Account Number of the account. |
| `[].account.bankName` | `string` | Yes | Name of the bank. |
| `[].amount` | `number` | Yes | The transaction amount. A negative value indicates a debit, while a positive value indicates a credit. |
| `[].currency` | `string` | Yes | Currency code for the transaction, following the ISO 4217 format. Pattern: `^[A-Z]{3}$`. |
| `[].category` | `object` | Yes | The detailed assigned Category by the AI-Categorization. |
| `[].category.name` | `string` | Yes | Category name. |
| `[].category.id` | `integer` | Yes | Category identifier. |
| `[].parentCategory` | `object` | No | The wider more broad assigned (Main-)Category by the AI-Categorization. Could be empty if no detailed category was found. In that case the category field is set with a parent category. |
| `[].parentCategory.name` | `string` | Yes | Parent category name. |
| `[].parentCategory.id` | `integer` | Yes | Parent category identifier. |
| `[].counterpart` | `object` | Yes |  |
| `[].counterpart.accountNumber` | `string` | Yes | Counterpart's account number. |
| `[].counterpart.name` | `string` | Yes | Counterpart's name. |
| `[].counterpart.iban` | `string` | Yes | Counterpart's International Bank Account Number. |
| `[].counterpart.bic` | `string` | Yes | Bank Identifier Code of the counterpart's bank. |
| `[].counterpart.bankName` | `string` | Yes | Name of the counterpart's bank. |
| `[].createdAt` | `string` | Yes | Timestamp when the transaction was created. Format: `date-time`. |
| `[].updatedAt` | `string` | Yes | Timestamp when the transaction was last updated. Format: `date-time`. |
| `[].bookingDate` | `string` | Yes | Date when the transaction was booked. NOTE: The time of a transaction is not delivered by the banks. Therefore, the time is always set to 00:00:00.000. Format: `date-time`. |
| `[].valueDate` | `string` | Yes | The date when the transaction amount is considered to affect the account balance. NOTE: The time of a transaction is not delivered by the banks. Therefore, the time is always set to 00:00:00.000. Format: `date-time`. |
| `[].type` | `string` | Yes | Type of the transaction. |
| `[].purpose` | `string` | Yes | Description or purpose of the transaction. |
| `[].score` | `number` | Yes | Normalized match relevance from 0 to 1. Higher values are better matches. The score is a deterministic ranking signal, not a probability. Minimum: `0`. Maximum: `1`. |

#### Example

```json
[
  {
    "id": 123456789,
    "accountId": 12456,
    "account": {
      "accountNumber": "111111102",
      "name": "Tommy Sternen-Himmel",
      "iban": "DE23533700080111111102",
      "bankName": "finAPI Test Bank"
    },
    "amount": -58.63,
    "currency": "EUR",
    "category": {
      "name": "Restaurant / Cafe / Bar",
      "id": 378
    },
    "parentCategory": {
      "name": "Freizeit, Hobbies & Soziales",
      "id": 373
    },
    "counterpart": {
      "accountNumber": "4578522",
      "name": "Bar Centrale",
      "iban": "DE34700800000004578522",
      "bic": "DRESDEFF700",
      "bankName": "Commerzbank vormals Dresdner Bank"
    },
    "createdAt": "2024-03-29T21:31:22.129Z",
    "updatedAt": "2024-03-30T11:05:56.866Z",
    "bookingDate": "2022-03-31T00:00:00.000Z",
    "valueDate": "2022-03-31T00:00:00.000Z",
    "type": "Überweisungsauftrag",
    "purpose": "Rechnung 1234 vom 01.03.2022",
    "score": 0.94
  }
]
```

<a id="schema-cyclic-0"></a>

### cyclic_0

**Type:** `object`

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `integer` | Yes |  |
| `name` | `string` | Yes |  |
| `children` | Array of [cyclic_0](#schema-cyclic-0) | No |  |
| `children[].id` | `integer` | Yes |  |
| `children[].name` | `string` | Yes |  |
| `children[].children` | Array of [cyclic_0](#schema-cyclic-0) | No |  |

#### Example

```json
{
  "id": 1,
  "name": "string",
  "children": [
    {
      "id": 1,
      "name": "string",
      "children": [
        "[Circular cyclic_0]"
      ]
    }
  ]
}
```

<a id="schema-category-43-61-74-65-67-6f-72-79"></a>

### Category

Represents a AI category for Transactions with potential child categories.

**Type:** `object`

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `integer` | Yes |  |
| `name` | `string` | Yes |  |
| `children` | Array of `object` | No |  |
| `children[].id` | `integer` | Yes |  |
| `children[].name` | `string` | Yes |  |
| `children[].children` | Array of [cyclic_0](#schema-cyclic-0) | No |  |
| `children[].children[].id` | `integer` | Yes |  |
| `children[].children[].name` | `string` | Yes |  |
| `children[].children[].children` | Array of [cyclic_0](#schema-cyclic-0) | No |  |

#### Example

```json
{
  "id": 320,
  "name": "Einnahmen",
  "children": [
    {
      "id": 1,
      "name": "string",
      "children": [
        {
          "id": 1,
          "name": "string",
          "children": [
            "[Circular cyclic_0]"
          ]
        }
      ]
    }
  ]
}
```

<a id="schema-workspace"></a>

### Workspace

Represents a workspace and import status of transactions and bank accounts.

**Type:** `object`

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `workspaceId` | `string` | No | Workspace ID. |
| `name` | `string` | Yes | Name of the workspace. |
| `description` | `string` | Yes | Description of the workspace. |
| `importLog` | `object` | Yes | Log details of the import process. |
| `importLog.date` | `string` | Yes | Timestamp of when the import log was created. Format: `date-time`. |
| `importLog.logs` | Array of `string` | Yes | Collection of log entries for the import process. |
| `importLog.items` | `integer` | Yes | Number of items processed during the import. |
| `importLog.status` | `string` | Yes | Status of the import process. |
| `importStatus` | `string` | Yes | Overall status of the import. |
| `lastImport` | `string` | Yes | Timestamp of the last import process. Format: `date-time`. |
| `bankAccounts` | `integer` | Yes | Number of bank accounts in this workspace. |
| `transactions` | `integer` | Yes | Number of transactions in this workspace. |

#### Example

```json
{
  "workspaceId": "string",
  "name": "string",
  "description": "string",
  "importLog": {
    "date": "2026-01-15T10:30:00.000Z",
    "logs": [
      "string"
    ],
    "items": 1,
    "status": "string"
  },
  "importStatus": "string",
  "lastImport": "2026-01-15T10:30:00.000Z",
  "bankAccounts": 1,
  "transactions": 1
}
```

<a id="schema-error"></a>

### Error

Error Schema

**Type:** `object`

| Property | Type | Required | Description |
| --- | --- | --- | --- |
| `error` | `string` | No | The error resp. code |
| `message` | `string` | No | A message describing the error |

#### Example

```json
{
  "error": "string",
  "message": "string"
}
```

<a id="schema-workspace-id"></a>

### workspaceId

**Type:** `string`  
Pattern: `^[-a-zA-Z0-9_]+$`.

This schema has no documented object properties.

#### Example

```json
"a"
```

<a id="schema-blz"></a>

### blz

**Type:** `string`

This schema has no documented object properties.

#### Example

```json
"string"
```

<a id="schema-bic"></a>

### bic

**Type:** `string`

This schema has no documented object properties.

#### Example

```json
"string"
```

<a id="schema-offset"></a>

### offset

**Type:** `integer`  
Default: `0`.

This schema has no documented object properties.

#### Example

```json
0
```

<a id="schema-limit"></a>

### limit

**Type:** `integer`  
Default: `100`. Maximum: `250`.

This schema has no documented object properties.

#### Example

```json
100
```

<a id="schema-custom-schema"></a>

### customSchema

**Type:** `string`  
Format: `json`.

This schema has no documented object properties.

#### Example

```json
"string"
```

<a id="schema-x-total-count"></a>

### X-Total-Count

**Type:** `integer`

This schema has no documented object properties.

#### Example

```json
1
```

<a id="schema-identifier"></a>

### identifier

**Type:** `string`  
Pattern: `^[-a-zA-Z0-9_]+$`.

This schema has no documented object properties.

#### Example

```json
"a"
```

<a id="schema-category-63-61-74-65-67-6f-72-79"></a>

### category

**Type:** `string`

This schema has no documented object properties.

#### Example

```json
"string"
```

<a id="schema-parent-category"></a>

### parentCategory

**Type:** `string`

This schema has no documented object properties.

#### Example

```json
"string"
```

<a id="schema-valued-before"></a>

### valuedBefore

**Type:** `string`  
Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`.

This schema has no documented object properties.

<a id="schema-valued-after"></a>

### valuedAfter

**Type:** `string`  
Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`.

This schema has no documented object properties.

<a id="schema-booked-before"></a>

### bookedBefore

**Type:** `string`  
Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`.

This schema has no documented object properties.

<a id="schema-booked-after"></a>

### bookedAfter

**Type:** `string`  
Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`.

This schema has no documented object properties.

<a id="schema-imported-before"></a>

### importedBefore

**Type:** `string`  
Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`.

This schema has no documented object properties.

<a id="schema-imported-after"></a>

### importedAfter

**Type:** `string`  
Format: `date-time`. Pattern: `^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$`.

This schema has no documented object properties.

<a id="schema-order"></a>

### order

**Type:** `string`  
Default: `desc`. Allowed: `asc`, `desc`, `1`, `-1`.

This schema has no documented object properties.

#### Example

```json
"desc"
```

<a id="schema-sort-by"></a>

### sortBy

**Type:** `string`  
Default: `_id`. Allowed: `bookingDate`, `valueDate`, `importDate`, `amount`, `_id`.

This schema has no documented object properties.

#### Example

```json
"_id"
```

<a id="schema-query"></a>

### query

**Type:** `string`

This schema has no documented object properties.

#### Example

```json
"string"
```

<a id="schema-transaction-id"></a>

### transactionId

**Type:** `string`  
Pattern: `^[-a-zA-Z0-9_]+$`.

This schema has no documented object properties.

#### Example

```json
"a"
```

<a id="schema-iban"></a>

### iban

**Type:** `string`  
Pattern: `^[-a-zA-Z0-9_]+$`.

This schema has no documented object properties.

#### Example

```json
"a"
```

<a id="schema-query-8ba1eeba-e9ae-48b6-9990-f99b67bc08f0"></a>

### query-8ba1eeba-e9ae-48b6-9990-f99b67bc08f0

**Type:** `string`  
Minimum length: `2`. Maximum length: `256`.

This schema has no documented object properties.

#### Example

```json
"string"
```

<a id="schema-offset-e0223173-8549-4300-a75c-d449253632b4"></a>

### offset-e0223173-8549-4300-a75c-d449253632b4

**Type:** `integer`  
Default: `0`. Minimum: `0`.

This schema has no documented object properties.

#### Example

```json
0
```

<a id="schema-limit-07fc66b5-ce6f-4d01-90b0-4b5f7cb9a93e"></a>

### limit-07fc66b5-ce6f-4d01-90b0-4b5f7cb9a93e

**Type:** `integer`  
Default: `10`. Minimum: `1`. Maximum: `50`.

This schema has no documented object properties.

#### Example

```json
10
```

<a id="schema-threshold"></a>

### threshold

**Type:** `number`  
Default: `0.6`. Minimum: `0`. Maximum: `1`.

This schema has no documented object properties.

#### Example

```json
0.6
```

<a id="schema-query-2b180d48-f3ac-4ea7-8aa5-a029bc245575"></a>

### query-2b180d48-f3ac-4ea7-8aa5-a029bc245575

**Type:** `string`  
Minimum length: `2`. Maximum length: `256`.

This schema has no documented object properties.

#### Example

```json
"string"
```

<a id="schema-offset-c976dbf0-2a2a-4b44-98c7-ad904f2e9ccb"></a>

### offset-c976dbf0-2a2a-4b44-98c7-ad904f2e9ccb

**Type:** `integer`  
Default: `0`. Minimum: `0`.

This schema has no documented object properties.

#### Example

```json
0
```

<a id="schema-limit-3e570fed-ab53-4d77-b4ed-6841f110a07d"></a>

### limit-3e570fed-ab53-4d77-b4ed-6841f110a07d

**Type:** `integer`  
Default: `10`. Minimum: `1`. Maximum: `50`.

This schema has no documented object properties.

#### Example

```json
10
```

<a id="schema-query-c7fd835b-a856-4b37-884a-1df33ae6b50b"></a>

### query-c7fd835b-a856-4b37-884a-1df33ae6b50b

**Type:** `string`  
Minimum length: `2`. Maximum length: `256`.

This schema has no documented object properties.

#### Example

```json
"string"
```

<a id="schema-offset-d79a8e31-aea4-44e6-9bae-f83e58f33362"></a>

### offset-d79a8e31-aea4-44e6-9bae-f83e58f33362

**Type:** `integer`  
Default: `0`. Minimum: `0`.

This schema has no documented object properties.

#### Example

```json
0
```

<a id="schema-limit-1eba390f-7b5a-4210-b27d-6db8f3f9be0c"></a>

### limit-1eba390f-7b5a-4210-b27d-6db8f3f9be0c

**Type:** `integer`  
Default: `10`. Minimum: `1`. Maximum: `50`.

This schema has no documented object properties.

#### Example

```json
10
```

<a id="schema-category-id"></a>

### categoryId

**Type:** `number`  
Pattern: `^[0-9]+$`.

This schema has no documented object properties.

#### Example

```json
"0"
```

<a id="schema-workspace-id-38c327d9-4b9a-465a-ae4e-c3427f7b5eff"></a>

### workspaceId-38c327d9-4b9a-465a-ae4e-c3427f7b5eff

**Type:** `string`

This schema has no documented object properties.

#### Example

```json
"string"
```

---

_Generated from the OpenAPI contract by the Kontoflux.io API reference._
