Menu

Bank accounts

The company's bank accounts (cash accounts, whose ids filter transactions), the bank connections that sync them and the Open Payments bank feed (reachable banks, connections, switch progress, the signatory link).

Endpoints


GET /api/v1/companies/:companyId/bank-connections

bank-connections.list · scope companies:read

List PSD2 bank connections with sync freshness and consent expiry.

Returns every bank connection for the company with its aggregator (enable_banking or open_payments), status, last successful sync (last_synced_at), consent expiry (consent_expires) and any user-facing error message. Connections sync automatically once a day server-side; this endpoint tells you whether that is still happening. The Open Payments rows with their accounts, the reachable banks and the switch from Enable Banking: GET /bank-feed, /bank-feed/banks, /bank-feed/switch-progress.

Use when: You need to verify bank data is current before building on it (liquidity, reconciliation, reports), or to detect a dead connection that needs BankID re-authorisation.

Don't use for: Fetching transactions (use /transactions) or account balances (use /cash-accounts). Triggering a sync: POST /bank-connections/{connectionId}/sync.

Pitfalls

  • last_synced_at is null until the first sync completes (about a minute after connecting); it does NOT mean the connection is broken.
  • A connection can hold status=active with a stale last_synced_at (older than ~36 hours): treat the data as suspect, but do NOT assume re-authorisation fixes it. Common causes are a lapsed subscription (this endpoint then answers with a capability error) or every account deselected in settings.
  • status=expired means the PSD2 consent is dead: only the user can fix it, with BankID in a browser. An open_payments row is renewed from the Kopplingar page or from a signatory link (POST /bank-feed/invites with replace_connection_id).
  • error_message is Swedish and user-facing: show it verbatim rather than translating.
  • sunset=true on an enable_banking row means the old provider has ended: the row is kept for its history but fetches nothing, and a sync is refused with 410 ENABLE_BANKING_SUNSET. Do not ask the user to renew it; they switch to the new connection on the Kopplingar page (GET /bank-feed/switch-progress has the state) or import bank statements as files where the new provider does not reach the bank.

Risk: low · Idempotent: yes · Reversible: no · Dry-run supported: no

Response fields

NameTypeDescription
bank_connections[].connection_idstring
bank_connections[].bankstring | null
bank_connections[].aggregator"enable_banking" | "open_payments"The service between Accounted and the bank. open_payments rows are managed through /bank-feed; enable_banking rows are the legacy feed and can be switched.
bank_connections[].status"pending" | "pending_selection" | "active" | "expired" | "error"
bank_connections[].sincestring
bank_connections[].last_synced_atstring | null
bank_connections[].consent_expiresstring | null
bank_connections[].error_messagestring | null
bank_connections[].sunsetboolean (optional)Present and true on an enable_banking row once that provider has ended: the connection fetches nothing any more and POST .../sync answers 410 ENABLE_BANKING_SUNSET. The person switches to the new connection (Kopplingar) or imports bank statements as files.

Example response

{
  "data": {
    "bank_connections": [
      {
        "connection_id": "4f6c…",
        "bank": "Swedbank",
        "aggregator": "open_payments",
        "status": "active",
        "since": "2026-08-01T00:00:00Z",
        "last_synced_at": "2026-08-31T05:04:12Z",
        "consent_expires": "2026-11-01T00:00:00Z",
        "error_message": null
      }
    ]
  },
  "meta": {
    "request_id": "req_…",
    "api_version": "2026-05-12"
  }
}

GET /api/v1/companies/:companyId/bank-feed

bank-feed.overview · scope transactions:read

The company's Open Payments bank connections and whether it may make one.

Answers available (and why not), the connections made through Open Payments with their accounts, and whether the calling person has a personnummer on file for BankID.

Use when: Rendering the bank connections a company reads through Open Payments.

Don't use for: Enable Banking connections.

Risk: low · Idempotent: yes · Reversible: no · Dry-run supported: no

Response fields

NameType
availableboolean
reason"no_connector" | "not_in_pilot" | "subscription" | null
connectionsobject[]
signer_knownboolean

Example response

{
  "data": {
    "available": true,
    "reason": null,
    "connections": [],
    "signer_known": true
  }
}

GET /api/v1/companies/:companyId/bank-feed/banks

bank-feed.banks · scope transactions:read

The banks a company can connect with BankID through Open Payments.

Lists the banks the account information provider reaches (BIC, name, logo, whether BankID can be signed in our screen, and reached: whether Open Payments reads the bank for this company yet). Answers OPEN_BANKING_NOT_AVAILABLE when reading through Open Payments is not switched on for the company.

Use when: Before starting a bank connection with BankID.

Don't use for: Enable Banking connections (the bank list of the enable-banking extension).

Pitfalls

  • A sparbank is reached through SWEDSESS with its affiliate id; ask bank for the list.
  • reached false: the bank is listed but not read through Open Payments for this company yet (Svea); keep its earlier connection or import statements as a file.

Risk: low · Idempotent: yes · Reversible: no · Dry-run supported: no

Response fields

NameType
banks[].bicstring
banks[].namestring
banks[].logo_urlstring | null
banks[].decoupledboolean | null
banks[].redirectboolean | null
banks[].reachedboolean

Example response

{
  "data": {
    "banks": [
      {
        "bic": "SWEDSESS",
        "name": "Swedbank",
        "logo_url": null,
        "decoupled": true,
        "redirect": false,
        "reached": true
      }
    ]
  }
}

GET /api/v1/companies/:companyId/bank-feed/banks/:bic

bank-feed.bank · scope transactions:read

One bank's details: how a person signs there, and the sparbanker behind a shared BIC.

Whether the bank signs BankID in our screen (decoupled) or on its own page (redirect), how many days of history it serves, and the savings banks reached through it (Swedbank: the sparbanker and Ölands Bank). Answered from a 24 h cache.

Use when: After a bank is picked and before BankID starts: to show the sparbank picker and choose the signing method.

Don't use for: Listing banks (bank-feed.banks).

Pitfalls

  • A sparbank is connected through SWEDSESS with its affiliate_id from this answer.
  • The BIC is upper case (SWEDSESS, not swedsess).

Risk: low · Idempotent: yes · Reversible: no · Dry-run supported: no

Response fields

NameType
bicstring
namestring
decoupledboolean | null
redirectboolean | null
affiliatesobject[]
transaction_history_max_daysnumber | null
extended_transaction_history_max_daysnumber | null

Example response

{
  "data": {
    "bic": "SWEDSESS",
    "name": "Swedbank",
    "decoupled": true,
    "redirect": true,
    "affiliates": [
      {
        "affiliate_id": "08999",
        "name": "Sparbanken Nord"
      }
    ],
    "transaction_history_max_days": 88,
    "extended_transaction_history_max_days": 760
  }
}

GET /api/v1/companies/:companyId/bank-feed/switch-progress

bank-feed.switch-progress · scope transactions:read

Where the company stands in the switch from Enable Banking to Open Payments.

The campaign (on, deadline, days left), the company's state (the Enable Banking connections still to switch, the ones at banks Open Payments does not reach) and, for an owner or admin, the totals across companies (counts per bank, no company identities). Null company when the campaign does not apply to it.

Use when: Rendering the switch deadline, the deep link to the switch, or the operators' counter.

Don't use for: Starting the switch: that is bank-feed.start with replace_connection_id, and a person's BankID.

Pitfalls

  • totals come from a service-role RPC and are null for members below admin.

Risk: low · Idempotent: yes · Reversible: no · Dry-run supported: no

Response fields

NameType
campaignobject
companyobject | null
totalsobject | null

Example response

{
  "data": {
    "campaign": {
      "on": true,
      "deadline": "2026-11-09",
      "days_left": 20,
      "passed": false
    },
    "company": null,
    "totals": null
  }
}

GET /api/v1/companies/:companyId/cash-accounts

cash-accounts.list · scope transactions:read

List bank/cash accounts with the bank-reported balance.

Returns the company's cash accounts (bank accounts, kassa) with their BAS ledger mapping and, for PSD2-connected accounts, the balance the bank itself reported at the last sync: balance (booked), available_balance, and balance_updated_at (when it was fetched). Pass ?enabled_only=true to return only accounts that sync.

Use when: You need the current bank balance per account (e.g. a covering decision before a payment run), or cash_account_id values to filter transaction listings.

Don't use for: The bookkept 19xx balance: use the trial-balance or balance-sheet reports. The two legitimately differ (pending bookings, timing).

Pitfalls

  • balance/available_balance are what the BANK reported, refreshed at most every 12h (PSD2 quota): check balance_updated_at before treating them as current.
  • balance is null for manual and SIE-imported accounts, and for PSD2 accounts that have not completed a sync since connecting.
  • available_balance is null when the bank reports no available balance type; that does not mean 0.

Risk: low · Idempotent: yes · Reversible: no · Dry-run supported: no

Query parameters

NameTypeRequiredDescription
enabled_only"true" | "false"notrue returns only enabled accounts. Default: all accounts.

Response fields

NameTypeDescription
cash_accounts[].cash_account_idstring
cash_accounts[].handlestring (optional)Typed handle of this cash account: cash_ plus its id as 32 lowercase hex. Accepted wherever the id is.
cash_accounts[].ledger_accountstring
cash_accounts[].namestring | null
cash_accounts[].currencystring
cash_accounts[].ibanstring | null
cash_accounts[].is_primaryboolean
cash_accounts[].enabledboolean
cash_accounts[].source"enable_banking" | "open_payments" | "manual" | "sie_import"
cash_accounts[].balancenumber | null
cash_accounts[].available_balancenumber | null
cash_accounts[].balance_updated_atstring | null

Example response

{
  "data": {
    "cash_accounts": [
      {
        "cash_account_id": "ca_…",
        "ledger_account": "1930",
        "name": "Företagskonto",
        "currency": "SEK",
        "iban": "SE4550000000058398257466",
        "is_primary": true,
        "enabled": true,
        "source": "enable_banking",
        "balance": 125430.5,
        "available_balance": 123930.5,
        "balance_updated_at": "2026-09-01T05:12:44.000Z"
      }
    ]
  },
  "meta": {
    "request_id": "req_…",
    "api_version": "2026-05-12"
  }
}

POST /api/v1/companies/:companyId/bank-connections/:connectionId/sync

bank-connections.sync · scope transactions:write

Sync one bank connection now instead of waiting for the nightly run.

Fetches new transactions and balances for one PSD2 bank connection right away. The window is chosen server-side: the last 7 days, widened to cover any gap since last_synced_at, capped at 90 days. Returns how many transactions were imported and the new last_synced_at. A connection synced within the last 15 minutes is refused with 429 BANK_SYNC_COOLDOWN and next_allowed_at: the data is already fresh. Not dry-runnable: the bank call itself is the side effect.

Use when: GET /bank-connections shows a stale last_synced_at on an active connection and you need current bank data before building on it (liquidity, reconciliation, a report), or the user asks for the latest transactions now.

Don't use for: Polling. Connections sync every night on their own; call this once when freshness matters, then read /transactions. Fixing a dead connection: status=expired needs BankID in a browser, not a sync.

Pitfalls

  • Idempotency-Key is optional here. If you send one, use a fresh key per attempt: a cooldown answer is never cached, but a completed sync is, and replaying it fetches nothing new.
  • 429 BANK_SYNC_COOLDOWN follows a recent successful sync OR a recent attempt that failed (the 15-minute lease is taken before the bank is called, on every instance). Compare last_synced_at from GET /bank-connections: if it is fresh, use the data you have; if it is still stale, the previous attempt failed, so retry once after next_allowed_at (Retry-After is set).
  • 429 BANK_RATE_LIMITED is the BANK limiting the consent (PSD2 banks allow only a few unattended fetches per day), not this API. The connection stays valid: do not renew it. Wait until next_allowed_at (Retry-After is set); it is our cooldown, not a reset time confirmed by the bank.
  • 409 BANK_SESSION_EXPIRED means the bank reported the consent dead during the sync; the connection is now status=expired. Hand the user the connect link; no API call revives it.
  • imported: 0 is normal on a quiet account. Banks report with up to 48 hours of delay, so today's transactions often arrive tomorrow.
  • Costs one Enable Banking call per enabled account: 403 CAPABILITY_BLOCKED when the company has no bank_sync entitlement.
  • 410 ENABLE_BANKING_SUNSET means the old provider (enable_banking rows) has ended and the connection fetches nothing any more: no retry helps. GET /bank-connections marks these rows with sunset=true; the person switches to the new connection from the Kopplingar page (or imports bank statements as files where the new provider does not reach the bank).

Risk: low · Idempotent: yes · Reversible: no · Dry-run supported: no

Response fields

NameTypeDescription
connection_idstring
bankstring | null
importednumber
duplicatesnumber
from_datestring
to_datestring
last_synced_atstring
enriched_updatednumber (optional)Open Payments only: stored rows this read updated with the bank's daily enrichment (a payer, an organisationsnummer, an OCR reference) instead of only skipping them as duplicates.
window_enrichedboolean | null (optional)Open Payments only: true when the window carried the bank's enrichment of today, false when the bank had not yet enriched it (the next read updates the rows), null when the bank says nothing.

Example response

{
  "data": {
    "connection_id": "4f6c…",
    "bank": "Swedbank",
    "imported": 3,
    "duplicates": 12,
    "from_date": "2026-08-26",
    "to_date": "2026-09-02",
    "last_synced_at": "2026-09-02T09:14:03Z"
  },
  "meta": {
    "request_id": "req_…",
    "api_version": "2026-05-12"
  }
}

POST /api/v1/companies/:companyId/bank-feed/invites

bank-feed.invite · scope transactions:write

Send the company's firmatecknare a link to connect the bank with BankID, without an Accounted login.

Creates a signed link, valid 7 days, that opens the Koppla banken flow for this company at /koppla/<token> without a login: the firmatecknare picks the bank (or gets the one named), signs the consent with BankID and chooses the accounts; the link is consumed when the accounts are selected. With recipient_email the link is mailed (template bank_connect_invite); the URL is answered either way for the sender to pass on. Owners and admins only.

Use when: A byrå or a company admin cannot sign the bank consent themselves: the firmatecknare holds the bank access.

Don't use for: Connecting the bank in person (start the consent instead), or a company not switched on for Open Payments (OPEN_BANKING_NOT_AVAILABLE).

Pitfalls

  • The URL carries the credential: hand it to the firmatecknare only.
  • replace_connection_id names the connection the new one takes over from (an Enable Banking row for a switch, an Open Payments row for a renewal).

Risk: medium · Idempotent: yes · Reversible: no · Dry-run supported: yes · Stage for approval: yes (?stage=true)

Query parameters

NameTypeRequiredDescription
dry_runstringnotrue (any case) previews the write without committing it, like the X-Dry-Run: true header. Any other value commits.
stagestringnotrue stages the write for approval instead of committing it: 202 with the pending operation to approve via POST /pending-operations/{id}/approve. Absent or false commits; other values are 400. A reason in the body (why you propose it, at most 500 characters) is shown to the approver as agent_reason and kept with the decision.

Request body

NameTypeRequiredDescription
bicstring | nullnoThe bank, as its BIC (8 or 11 characters).
replace_connection_idstring | nullno
offer_paymentsbooleanno
recipient_emailstring | nullno
bank_namestring | nullnoThe bank as the sender names it, for the mail only.

Response fields

NameType
invite_idstring
urlstring
expires_atstring
email_sentboolean

Example request

{
  "recipient_email": "anna@example.se",
  "offer_payments": true
}

Example response

{
  "data": {
    "invite_id": "4f6c1a2b-9c0d-4e8f-8a1b-2c3d4e5f6a7b",
    "url": "https://app.accounted.se/koppla/...",
    "expires_at": "2026-10-19T09:14:03Z",
    "email_sent": true
  }
}

POST /api/v1/companies/:companyId/cash-accounts

cash-accounts.create · scope companies:write

Create a bank account by hand (no bank connection), with the payee details invoices print, or a company card.

Adds a manual bank account (cash_accounts, source manual) in a currency, on the next free BAS 19xx ledger account for that currency unless ledger_account (1920-1999) is given, and adds that account to the chart if missing. payee holds what customer invoices print (bankgiro, IBAN, ...); invoice_payee defaults to true. A later bank connection with the same IBAN takes this row over in place. With kind card it adds a company card (företagskort) instead: its statement rows book against a liability account (2480-2489, 2890, 2894, 2896, 2899; the first one no account holds and no verifikat uses unless ledger_account is given), card_issuer is required and payee fields are refused. Owner/admin only. Idempotent. Dry-runnable.

Use when: The company has a bank account that is not connected through the bank integration (a savings account, a currency account, a bank without PSD2) and it should appear in Konton, the booking flows or on invoices.

Don't use for: Connecting a bank (the bank connection flow creates its own accounts), changing an existing account (PATCH /cash-accounts/{id}) or choosing which account invoices print by default (PUT /cash-accounts/payee-defaults).

Pitfalls

  • An IBAN another account of the company already carries returns 409 CASH_ACCOUNT_IBAN_DUPLICATE: one physical account must exist once.
  • A ledger_account another cash account holds returns 409 CASH_ACCOUNT_LEDGER_TAKEN; omit it to get the next free one.
  • ledger_account is a STRING in 1920-1999 ("1931"), never a number, and never a till (1910-1919) or a PSP clearing account.
  • A company card (kind card) takes ledger_account in 2480-2489, 2890, 2894, 2896 or 2899 (never 2893), and no payee or invoice_payee: a card is never printed on invoices.
  • A card purchase is stored with a negative amount (money owed grows), the payment from the bank with a positive one: the company perspective of every cash account.
  • Owner or admin only: a member key gets 403 FORBIDDEN.
  • Creating an account does not make it the default payee: set that with PUT /cash-accounts/payee-defaults.

Risk: low · Idempotent: yes · Reversible: no · Dry-run supported: yes · Stage for approval: yes (?stage=true)

Query parameters

NameTypeRequiredDescription
dry_runstringnotrue (any case) previews the write without committing it, like the X-Dry-Run: true header. Any other value commits.
stagestringnotrue stages the write for approval instead of committing it: 202 with the pending operation to approve via POST /pending-operations/{id}/approve. Absent or false commits; other values are 400. A reason in the body (why you propose it, at most 500 characters) is shown to the approver as agent_reason and kept with the decision.

Request body

NameTypeRequired
namestringyes
currency"SEK" | "EUR" | "USD" | "GBP" | "NOK" | "DKK" | "CHF" | "CAD"yes
ledger_accountstringno
invoice_payeebooleanno
payeeobjectno
kind"bank" | "card"no
card_issuer"eurocard" | "seb_kort" | "amex" | "handelsbanken" | "first_card" | "danske" | "swedbank" | "qred" | "mynt" | "pleo" | "other"no
card_last4string[]no
voucher_seriesstring | nullno

Response fields

NameTypeDescription
cash_account_idstring
handlestring (optional)Typed handle of this cash account: cash_ plus its id as 32 lowercase hex. Accepted wherever the id is.
kind"bank" | "card"bank: a bank, till or payment-provider account. card: a company card on a liability account.
ledger_accountstringBAS account the account books on, as a string: 19xx for a bank account, 2480-2489/2890/2894/2896/2899 for a company card.
card_issuerstring | nullCompany cards only: the issuer (eurocard, amex, ...).
card_last4string[] | nullCompany cards only: the last four digits of the cards billed on the statement.
namestring | null
currencystring
ibanstring | nullThe bank identity IBAN (written by the bank sync; on an account typed in by hand, the IBAN typed for it). A bank connection with this IBAN lands on this account.
source"enable_banking" | "open_payments" | "manual" | "sie_import"
bank_connectedbooleanTrue when a bank connection holds the account.
enabledboolean
is_primaryboolean
voucher_seriesstring | nullVerifikationsserie override; null follows the per-source default.
invoice_payeebooleanWhether the account may be printed as payee on customer invoices.
payeeobject

Example request

{
  "name": "Sparkonto",
  "currency": "SEK",
  "payee": {
    "bank_name": "SEB",
    "bankgiro": "5050-1234"
  }
}

Example response

{
  "data": {
    "cash_account_id": "7f3a…",
    "kind": "bank",
    "ledger_account": "1931",
    "card_issuer": null,
    "card_last4": null,
    "name": "Sparkonto",
    "currency": "SEK",
    "iban": "SE4550000000058398257466",
    "source": "manual",
    "bank_connected": false,
    "enabled": true,
    "is_primary": false,
    "voucher_series": null,
    "invoice_payee": true,
    "payee": {
      "bank_name": "SEB",
      "clearing_number": null,
      "account_number": null,
      "bankgiro": "5050-1234",
      "plusgiro": null,
      "swish": null,
      "iban": "SE4550000000058398257466",
      "bic": "ESSESESS",
      "bank_code": null,
      "foreign_account_number": null
    }
  },
  "meta": {
    "request_id": "req_…",
    "api_version": "2026-05-12"
  }
}

POST /api/v1/companies/:companyId/cash-accounts/:id/set-primary

cash-accounts.set-primary · scope companies:write

Make a bank account the company's primary.

The primary is where bookings land when nothing else says which bank account they belong to: the skattekonto counter leg and transactions with no cash account. It must be an enabled SEK giro or bank account (BAS 1920-1999). The flag moves in one transaction and the change is logged with the acting user. Only bookings made afterwards follow the new primary; nothing posted changes. Owner/admin only. Idempotent. Dry-runnable.

Use when: The company's main business account is not the one marked primary (typically the seeded 1930).

Don't use for: Choosing which account invoices print (PUT /cash-accounts/payee-defaults) or moving transactions between accounts.

Pitfalls

  • A disabled, non-SEK or non-bank account (till, PSP clearing) returns 400 CASH_ACCOUNT_PRIMARY_INELIGIBLE with details.reason.
  • Owner or admin only: a member key gets 403 FORBIDDEN.
  • Takes no body; the account id is in the path.

Risk: medium · Idempotent: yes · Reversible: yes · Dry-run supported: yes · Stage for approval: yes (?stage=true)

Query parameters

NameTypeRequiredDescription
dry_runstringnotrue (any case) previews the write without committing it, like the X-Dry-Run: true header. Any other value commits.
stagestringnotrue stages the write for approval instead of committing it: 202 with the pending operation to approve via POST /pending-operations/{id}/approve. Absent or false commits; other values are 400. A reason in the body (why you propose it, at most 500 characters) is shown to the approver as agent_reason and kept with the decision.

Response fields

NameTypeDescription
cash_account_idstring
handlestring (optional)Typed handle of this cash account: cash_ plus its id as 32 lowercase hex. Accepted wherever the id is.
kind"bank" | "card"bank: a bank, till or payment-provider account. card: a company card on a liability account.
ledger_accountstringBAS account the account books on, as a string: 19xx for a bank account, 2480-2489/2890/2894/2896/2899 for a company card.
card_issuerstring | nullCompany cards only: the issuer (eurocard, amex, ...).
card_last4string[] | nullCompany cards only: the last four digits of the cards billed on the statement.
namestring | null
currencystring
ibanstring | nullThe bank identity IBAN (written by the bank sync; on an account typed in by hand, the IBAN typed for it). A bank connection with this IBAN lands on this account.
source"enable_banking" | "open_payments" | "manual" | "sie_import"
bank_connectedbooleanTrue when a bank connection holds the account.
enabledboolean
is_primaryboolean
voucher_seriesstring | nullVerifikationsserie override; null follows the per-source default.
invoice_payeebooleanWhether the account may be printed as payee on customer invoices.
payeeobject

Example response

{
  "data": {
    "cash_account_id": "7f3a…",
    "kind": "bank",
    "ledger_account": "1931",
    "card_issuer": null,
    "card_last4": null,
    "name": "Sparkonto",
    "currency": "SEK",
    "iban": "SE4550000000058398257466",
    "source": "manual",
    "bank_connected": false,
    "enabled": true,
    "is_primary": true,
    "voucher_series": null,
    "invoice_payee": true,
    "payee": {
      "bank_name": "SEB",
      "clearing_number": null,
      "account_number": null,
      "bankgiro": "5050-1234",
      "plusgiro": null,
      "swish": null,
      "iban": "SE4550000000058398257466",
      "bic": "ESSESESS",
      "bank_code": null,
      "foreign_account_number": null
    }
  },
  "meta": {
    "request_id": "req_…",
    "api_version": "2026-05-12"
  }
}

POST /api/v1/companies/:companyId/cash-accounts/change-ledgers

cash-accounts.change-ledgers · scope companies:write

Change which 19xx ledger account bank-connected accounts book on from now on.

Moves one or more accounts that one bank connection syncs (Enable Banking or Open Payments) to other 19xx ledger accounts, as the dashboard does under Inställningar > Kopplingar. Unbooked bank rows follow the account; posted verifikat stay on the old ledger account (move a balance with a voucher if needed). Another account of the connection on a requested ledger account swaps to the mover's old one. Owner/admin only. Dry-run first: the preview lists each move with booked and unbooked row counts.

Use when: A company migrated from another system books its bank on other 19xx accounts than the bank connection chose.

Don't use for: Accounts typed in by hand or from SIE (no bank connection), or rebooking posted verifikat (gnubok_correct_entry).

Pitfalls

  • All accounts must be synced by one active bank connection: 400 VALIDATION_ERROR with details.reason several_connections or not_bank_connected; a connection not active answers BANK_LEDGER_CHANGE_NOT_ACTIVE.
  • A ledger account another bank account holds is refused with a sentence naming it; two moves to the same ledger account return BANK_SELECTION_LEDGER_CONFLICT.
  • Owner or admin only: a member key gets 403 FORBIDDEN.

Risk: medium · Idempotent: yes · Reversible: yes · Dry-run supported: yes · Stage for approval: yes (?stage=true)

Query parameters

NameTypeRequiredDescription
dry_runstringnotrue (any case) previews the write without committing it, like the X-Dry-Run: true header. Any other value commits.
stagestringnotrue stages the write for approval instead of committing it: 202 with the pending operation to approve via POST /pending-operations/{id}/approve. Absent or false commits; other values are 400. A reason in the body (why you propose it, at most 500 characters) is shown to the approver as agent_reason and kept with the decision.

Request body

NameTypeRequired
accountsobject[]yes

Response fields

NameType
connection_idstring
movesobject[]

Example request

{
  "accounts": [
    {
      "cash_account_id": "7f3a…",
      "ledger_account": "1933"
    }
  ]
}

Example response

{
  "data": {
    "connection_id": "0c1d…",
    "moves": [
      {
        "cash_account_id": "7f3a…",
        "name": "Valutakonto",
        "iban_last4": null,
        "currency": "USD",
        "from_ledger": "1930",
        "to_ledger": "1933",
        "booked_rows": 4,
        "unbooked_rows": 20,
        "swapped": false
      }
    ]
  },
  "meta": {
    "request_id": "req_…",
    "api_version": "2026-05-12"
  }
}

PATCH /api/v1/companies/:companyId/cash-accounts/:id

cash-accounts.update · scope companies:write

Edit a bank account: verifikationsserie, payee details, name, or turn it on/off.

Sparse update of one cash account. voucher_series (one letter A-Z, null clears) sets the verifikationsserie for entries booked from the account. The payee fields (bank_name, clearing_number, account_number, bankgiro, plusgiro, swish, iban, bic, bank_code, foreign_account_number), name and invoice_payee decide what customer invoices print; "" or null clears a field. enabled=false hides an account no bank connection holds from Konton and the booking flows. The ledger account (POST /cash-accounts/change-ledgers) and the primary flag are not editable here. Idempotent. Dry-runnable.

Use when: The company changes bank details customers pay to, wants its own voucher series per bank account, or stops using a manually added account.

Don't use for: Making an account the primary (POST /cash-accounts/{id}/set-primary), choosing the default payee per currency (PUT /cash-accounts/payee-defaults) or moving a transaction to another account.

Pitfalls

  • Payee fields, name, invoice_payee and enabled are owner/admin only (403 FORBIDDEN); voucher_series alone is open to any writer.
  • Payee fields on a PSP clearing account or a till return 400 INVOICE_PAYEE_ACCOUNT_INVALID: only 1920-1999 bank accounts print on invoices.
  • enabled on an account a bank connection holds returns 409 CASH_ACCOUNT_ENABLED_BANK_MANAGED; disabling the primary returns 400 CASH_ACCOUNT_DISABLE_PRIMARY, and one with unbooked transactions 400 CASH_ACCOUNT_DISABLE_UNRESOLVED.
  • An iban another account already carries (printed or as its bank identity iban, enabled or not) returns 409 CASH_ACCOUNT_IBAN_DUPLICATE with details.existing_cash_account_id. If that account was added by mistake: on it, send enabled=false and iban "" (one request is fine). On a disabled account typed in by hand, clearing or changing iban also moves its bank identity iban, which frees the IBAN for the right account.
  • Changing voucher_series only affects entries booked afterwards; nothing posted is renumbered.

Risk: medium · Idempotent: yes · Reversible: yes · Dry-run supported: yes · Stage for approval: yes (?stage=true)

Query parameters

NameTypeRequiredDescription
dry_runstringnotrue (any case) previews the write without committing it, like the X-Dry-Run: true header. Any other value commits.
stagestringnotrue stages the write for approval instead of committing it: 202 with the pending operation to approve via POST /pending-operations/{id}/approve. Absent or false commits; other values are 400. A reason in the body (why you propose it, at most 500 characters) is shown to the approver as agent_reason and kept with the decision.

Request body

NameTypeRequired
bank_namestring | nullno
clearing_numberstring | null | ""no
account_numberstring | null | ""no
bankgirostring | null | ""no
plusgirostring | null | ""no
swishstring | nullno
ibanstring | null | ""no
bicstring | null | ""no
bank_codestring | null | ""no
foreign_account_numberstring | null | ""no
voucher_seriesstring | nullno
namestring | nullno
invoice_payeebooleanno
enabledbooleanno

Response fields

NameTypeDescription
cash_account_idstring
handlestring (optional)Typed handle of this cash account: cash_ plus its id as 32 lowercase hex. Accepted wherever the id is.
kind"bank" | "card"bank: a bank, till or payment-provider account. card: a company card on a liability account.
ledger_accountstringBAS account the account books on, as a string: 19xx for a bank account, 2480-2489/2890/2894/2896/2899 for a company card.
card_issuerstring | nullCompany cards only: the issuer (eurocard, amex, ...).
card_last4string[] | nullCompany cards only: the last four digits of the cards billed on the statement.
namestring | null
currencystring
ibanstring | nullThe bank identity IBAN (written by the bank sync; on an account typed in by hand, the IBAN typed for it). A bank connection with this IBAN lands on this account.
source"enable_banking" | "open_payments" | "manual" | "sie_import"
bank_connectedbooleanTrue when a bank connection holds the account.
enabledboolean
is_primaryboolean
voucher_seriesstring | nullVerifikationsserie override; null follows the per-source default.
invoice_payeebooleanWhether the account may be printed as payee on customer invoices.
payeeobject

Example request

{
  "bankgiro": "5050-1234",
  "invoice_payee": true
}

Example response

{
  "data": {
    "cash_account_id": "7f3a…",
    "kind": "bank",
    "ledger_account": "1931",
    "card_issuer": null,
    "card_last4": null,
    "name": "Sparkonto",
    "currency": "SEK",
    "iban": "SE4550000000058398257466",
    "source": "manual",
    "bank_connected": false,
    "enabled": true,
    "is_primary": false,
    "voucher_series": null,
    "invoice_payee": true,
    "payee": {
      "bank_name": "SEB",
      "clearing_number": null,
      "account_number": null,
      "bankgiro": "5050-1234",
      "plusgiro": null,
      "swish": null,
      "iban": "SE4550000000058398257466",
      "bic": "ESSESESS",
      "bank_code": null,
      "foreign_account_number": null
    }
  },
  "meta": {
    "request_id": "req_…",
    "api_version": "2026-05-12"
  }
}

PUT /api/v1/companies/:companyId/cash-accounts/payee-defaults

cash-accounts.set-payee-default · scope companies:write

Choose which bank account invoices in a currency tell the customer to pay to.

Sets (or clears with cash_account_id null) the default payee account for one currency: every new invoice in that currency prints this account's payment details unless the invoice picks another. The account must be a bank account (1920-1999), enabled, flagged invoice_payee, and carry what the currency needs (an IBAN for anything but SEK). Answers every per-currency default after the change. Owner/admin only. Idempotent. Dry-runnable.

Use when: The company wants EUR invoices paid to its EUR account, or changes which SEK account customers pay to.

Don't use for: Editing the bank details themselves (PATCH /cash-accounts/{id}) or the primary account (set-primary).

Pitfalls

  • An account that cannot print for the currency returns 400 INVOICE_PAYEE_ACCOUNT_INVALID with details.reason (not_bank_account, disabled, not_payee, unusable_for_currency).
  • Invoices already sent keep the payment details they were sent with.
  • Owner or admin only: a member key gets 403 FORBIDDEN.

Risk: medium · Idempotent: yes · Reversible: yes · Dry-run supported: yes · Stage for approval: yes (?stage=true)

Query parameters

NameTypeRequiredDescription
dry_runstringnotrue (any case) previews the write without committing it, like the X-Dry-Run: true header. Any other value commits.
stagestringnotrue stages the write for approval instead of committing it: 202 with the pending operation to approve via POST /pending-operations/{id}/approve. Absent or false commits; other values are 400. A reason in the body (why you propose it, at most 500 characters) is shown to the approver as agent_reason and kept with the decision.

Request body

NameTypeRequiredDescription
currency"SEK" | "EUR" | "USD" | "GBP" | "NOK" | "DKK" | "CHF" | "CAD"yesInvoice currency, e.g. "SEK" or "EUR".
cash_account_idstring | nullyesThe cash account id (cash_account_id from GET /cash-accounts), not its ledger account.

Response fields

NameType
defaults[].currencystring
defaults[].cash_account_idstring

Example request

{
  "currency": "EUR",
  "cash_account_id": "7f3a…"
}

Example response

{
  "data": {
    "defaults": [
      {
        "currency": "EUR",
        "cash_account_id": "7f3a…"
      }
    ]
  },
  "meta": {
    "request_id": "req_…",
    "api_version": "2026-05-12"
  }
}