For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Get API key
HomeAPI Reference
HomeAPI Reference
  • Overview
    • API reference
  • API Reference
      • GETList bank accounts and cash registers
      • POSTCreate a bank account or cash register
      • GETGet a bank account or cash register
      • DELSoft-delete a bank account
      • PATCHUpdate a bank account or cash register
Get API key
LogoLogo
API ReferenceBank Accounts

Create a bank account or cash register

||View as Markdown|
POST
https://app.lucanto.eu/api/v1/accounts/:account_id/bank_accounts
POST
/api/v1/accounts/:account_id/bank_accounts
$curl -X POST https://app.lucanto.eu/api/v1/accounts/42/bank_accounts \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "bank_account": {
> "name": "Tatra Bank EUR"
> }
>}'
1{
2 "id": 12345,
3 "account_type": "bank",
4 "created_at": "2024-01-15T09:30:00Z",
5 "updated_at": "2024-01-15T09:30:00Z",
6 "name": "Tatra Bank EUR",
7 "owner_name": "Jan Novak",
8 "currency": "EUR",
9 "iban": "SK6807200002891000000018",
10 "swift_code": "TATRSKBX",
11 "account_number": "289100000018",
12 "prefix_number": "19",
13 "bank_code": "0720",
14 "balance_available": "15234.56",
15 "balance_booked": "15000.00",
16 "last_balance_sync_at": "2024-01-15T09:30:00Z",
17 "default": true,
18 "invoice_display": true,
19 "tenant": false
20}
Creates either a bank account (with IBAN/account number) or a cash register. Two validation paths driven by the model's `account_type` enum (currently set via attribute, not via the API surface — defaults to `bank`): - **Bank**: requires `iban` OR `account_number` (one of them). `iban` is unique within the workspace if provided. - **Cash**: `name` is unique within the workspace's cash registers. Per-workspace caps: bank accounts hit the `bank_accounts` feature limit. Hitting the cap returns `402` with an `upgrade_url` pointing at the billing plans page.
Was this page helpful?
Previous

List bank accounts and cash registers

Next

Get a bank account or cash register

Built with

Creates either a bank account (with IBAN/account number) or a cash register. Two validation paths driven by the model’s account_type enum (currently set via attribute, not via the API surface — defaults to bank):

  • Bank: requires iban OR account_number (one of them). iban is unique within the workspace if provided.
  • Cash: name is unique within the workspace’s cash registers.

Per-workspace caps: bank accounts hit the bank_accounts feature limit. Hitting the cap returns 402 with an upgrade_url pointing at the billing plans page.

Authentication

AuthorizationBearer

Devise JWT issued via POST /api/v1/auth/sign_in. Used by mobile and SPA clients. Revoked tokens are tracked in api_jwt_denylists.

OR
AuthorizationBearer
Lucanto API key. Three prefixes: - `lct_pat_<random><checksum>` — personal access token (owner: User) - `lct_live_<random><checksum>` — workspace token, live data - `lct_test_<random><checksum>` — workspace token, sandbox account (Phase 3) Issue keys at `/settings/api_keys` (personal) or `/:account_id/settings/api_keys` (workspace). Plaintext token is shown once and never again.

Path parameters

account_idlongRequired>=1

Workspace (account) ID. The numeric ID shown in your URLs.

Request

This endpoint expects an object.
bank_accountobjectRequired

Response

Created
idlong
account_typeenum

bank — traditional bank account with IBAN / account number, potentially PSD2-synced. cash — cash register for manual cash-movement tracking.

Allowed values:
created_atdatetime
updated_atdatetime
namestring or null

Display name. Required for cash registers (where it must be unique within the workspace); optional for bank accounts where the IBAN/account_number identifies the record.

owner_namestring or null

Name on the account / register.

currencystring or null

ISO-4217 currency code. Defaults to workspace currency.

ibanstring or null

IBAN — required for bank-type accounts (or account_number must be set). Null for cash registers.

swift_codestring or null

SWIFT/BIC. Optional for bank accounts; null for cash.

account_numberstring or null

Local account number — required for bank-type accounts if iban is not set. SK/CZ banks accept legacy non-IBAN format. Null for cash registers.

prefix_numberstring or null

CZ-style prefix on legacy account numbers (e.g. 19- in 19-2000945399/0800).

bank_codestring or null

Local bank code (SK: 4-digit, CZ: 4-digit). Null for cash registers.

balance_availablestring or nullformat: "decimal"

Available balance from the most recent PSD2 sync, if connected. Null for cash registers and non-synced bank accounts. Stringified BigDecimal.

balance_bookedstring or nullformat: "decimal"

Booked balance from the most recent PSD2 sync. Differs from balance_available for accounts with pending transactions. Same null/format semantics as balance_available.

last_balance_sync_atdatetime or null
Timestamp of the last successful balance sync. Null for cash registers and bank accounts that have never synced.
defaultboolean or null

Whether this account is the workspace’s default for new documents. Each account_type has independent defaults (one default bank + one default cash register per workspace).

invoice_displayboolean or null
Whether the account's payment details should be rendered on invoice PDFs. Defaults to true for the workspace's own accounts.
tenantboolean or null

true for tenant accounts (used internally by the realities/rents feature for property-management workflows); false for the workspace’s own accounts. Most workspaces only have own (tenant: false) accounts.

Errors

401
Unauthorized Error
402
Payment Required Error
403
Forbidden Error
422
Unprocessable Entity Error
429
Too Many Requests Error

Lucanto API key. Three prefixes:

  • lct_pat_<random><checksum> — personal access token (owner: User)
  • lct_live_<random><checksum> — workspace token, live data
  • lct_test_<random><checksum> — workspace token, sandbox account (Phase 3)

Issue keys at /settings/api_keys (personal) or /:account_id/settings/api_keys (workspace). Plaintext token is shown once and never again.