RESTful API conventions

HTTP methods, media types, status codes, error object, pagination, sorting, filtering and data formats shared by the FinologeeBKO API operations.

This page describes the conventions that all operations of the FinologeeBKO API (/v2/...) share. Operation pages describe only what is specific to each operation.

HTTP methods

MethodUsed forSuccess response
GETReading a resource by ID, or finding resources with filters200 OK with the resource, or with an array of resources
POSTCreating resources201 Created. Most create operations return the array of IDs of the created resources; the operation page states the response body
POSTPerforming an action on a resource, for example /v2/counterparties/{id}/approve200 OK with no body
PATCHUpdating a resource with the fields provided (cash accounts, account groups, counterparty accounts)200 OK with the updated resource
PUTReplacing a counterparty group200 OK with the updated resource
PUTLinking two resources, for example adding a cash account to an account group204 No Content
DELETERemoving a link between two resources204 No Content

The API has no operation that deletes a resource. Resources leave use through status changes, for example Deactivate counterparty account.

Media types

  • Request and response bodies use application/json
  • Error responses use application/problem+json
  • Upload counterparty takes a multipart/form-data request with the file
  • Responses leave out fields that have no value: a field that is null is absent from the JSON
  • FinologeeBKO ignores unknown fields in request bodies

HTTP status codes

StatusMeaning
200 OKThe read, update or action succeeded
201 CreatedThe resources were created
204 No ContentThe link was added or removed. The response has no body
400 Bad RequestThe request is malformed (invalid JSON, wrong type or format of a value, invalid parameter) or fails validation. validationErrors lists the errors
401 UnauthorizedThe Authorization header is missing, or FinologeeBKO rejects the token. See Authentication for the checks
403 ForbiddenThe API integration does not have a right that the operation requires
404 Not FoundThe resource does not exist, or is outside the scope of the API integration's rights
409 ConflictThe resource is not in a status that allows the action, or another request modified it at the same time. Read the resource again before you retry
500 Internal Server ErrorAn unexpected error occurred. Use instance of the error object when you contact support

Error object

Error responses follow RFC 7807 (Problem Details for HTTP APIs). In addition to the properties described on each operation page:

  • title defaults to the reason phrase of the status code
  • instance is the trace identifier of the request. Give it to Finologee support to locate the request

Each item of validationErrors contains errorMessage and, when applicable:

  • inputIndex: the position, starting at 0, of the item in error in the request array. Bulk operations, such as Create credit transfers, report the errors of each item with its index
  • field: the body field or query parameter in error. For a value that FinologeeBKO cannot read, field gives the path of the value in the request body, with array positions in brackets
HTTP/1.1 400 Bad Request
Content-Type: application/problem+json

{
  "title": "Bad Request",
  "status": 400,
  "instance": "ec4138ea673e11ee8c990242ac120002",
  "validationErrors": [
    {
      "inputIndex": 2,
      "errorMessage": "Account name cannot be longer than 35 characters"
    },
    {
      "inputIndex": 13,
      "errorMessage": "IBAN is invalid"
    }
  ]
}

Pagination

All Find resource API methods allow the result set to be retrieved in a paginated way. Pagination values are provided as query parameters.

Parameter nameValue
pageIndexThe index of the page that the client wants to retrieve, starting at 0. Defaults to 0
pageSizeThe size of the page (number of entries) the client wants to retrieve, from 1 to 100. Defaults to 100

A request with a pageSize above 100 is rejected with a validation error stating the maximum; the API does not reduce the value silently. Invalid or negative values fall back to the defaults.

⚠️

unpaged no longer supported

Since FinologeeBKO 6.8, the unpaged parameter is ignored and every list response is paginated. Integrations that retrieved all results in one call must now read the pages one by one, using the X-Total-Count header described below.

If a client intends to paginate through a result set, it is strongly recommended to use the same page size for all subsequent calls as for the first call to avoid unpredictable results.

The response of a paginated request will contain the header X-Total-Count informing of how many records that match the request exist. Example:

HTTP/1.1 200
Content-Type: application/json
X-Total-Count: 400

<other headers>

<response body>

Sorting

Find operations accept the sort query parameter described on each operation page. Repeat the parameter to sort on several properties, in order of priority, for example sort=id,desc.

  • Without sort, find operations return results sorted by id, ascending, unless the operation page states another order
  • The properties available for sorting depend on the operation. id is available on every find operation
  • To read all results page by page in a stable order, keep the same sort for all pages

Filtering

Find operations accept filters as query parameters, described on each operation page. A filter that accepts several values takes the parameter once per value, for example statuses=PENDING&statuses=APPROVED. Each operation page states how its filters combine and match.

Data formats

DataFormat
IdentifiersIntegers (int64), unless the operation states otherwise
AmountsJSON decimal numbers, for example 1250.5
CurrenciesThree-letter ISO 4217 codes, for example EUR
DatesISO 8601 dates, YYYY-MM-DD, for example 2025-01-16
Date and timeISO 8601 date-time strings, for example 2025-01-16T14:30:00.000Z
Statuses and typesUpper-case enumeration values, for example APPROVED

Repeated requests

The API has no idempotency key header. To avoid duplicates when you resend a request:

  • Credit transfers: set a reference. Sending a credit transfer again with the same reference updates the existing credit transfer while it is in an editable status, and fails with a duplicate-reference error otherwise. See Create credit transfers
  • Counterparty accounts: only one counterparty account in status PENDING or APPROVED can exist for the same account number and bank code in a tenant. Set externalId and use Find counterparty to check what exists before you create. See Counterparty Accounts

Webhooks

Instead of polling find operations for status changes, subscribe to webhooks. See About webhooks.