Accounting

Resolve a Klara master account by its chart-of-account code.

This operation remains available until <b>2027-08-14</b> and is removed after that date. Use <code>GET /core/v1/accounting/accounts/by-code/{accountCode}</code> instead.<br/><br/>Loads a single master account row from Klara's global chart of accounts, identified by its numeric <code>accountCode</code>. The data is global — the same chart of accounts is shared across every tenant, so there are no tenant or company path parameters. When the optional <code>legal-form</code> query parameter is supplied, the <code>name</code> field is resolved from the legal-form-specific translation column instead of the generic one. The <code>Accept-Language</code> header selects which translation is used; if absent or unsupported the platform default applies. The endpoint is a pure read — idempotent, no side effects. Any authenticated bearer token is accepted; the downstream service declares no role or permission requirement on this endpoint.

get/core/latest/accounting/accounts/by-code/{accountCode}

Request

  • Base URL: https://api.klara.ch
  • URL: https://api.klara.ch/core/latest/accounting/accounts/by-code/{accountCode}
  • Auth: one of:
    • API key in header X-API-KEY
    • HTTP bearer

Path parameters

accountCodestring required
Example:6000

Numeric chart-of-account code as printed on the Klara master chart of accounts (e.g. <code>1000</code> for cash, <code>6000</code> for material expense).

Query parameters

legal-form'LIMITED_LIABILITY' | 'CORPORATION' | 'OR' | 'INDIVIDUALLY_OWNED_COMPANY' | 'ASSOCIATION' | 'SIMPLE_PARTNERSHIP' | 'GENERAL_PARTNERSHIP' | 'LIMITED_PARTNERSHIP' | 'COOPERATIVE_COMPANY' | 'FOUNDATION'
Example:CORPORATION

When supplied, resolves <code>name</code> from the legal-form-specific translation column. Allowed values: <code>LIMITED_LIABILITY</code>, <code>CORPORATION</code>, <code>OR</code>, <code>INDIVIDUALLY_OWNED_COMPANY</code>, <code>ASSOCIATION</code>, <code>SIMPLE_PARTNERSHIP</code>, <code>GENERAL_PARTNERSHIP</code>, <code>LIMITED_PARTNERSHIP</code>, <code>COOPERATIVE_COMPANY</code>, <code>FOUNDATION</code>.

Headers

Accept-Languagestring
Example:de-CH

IETF language tag used to resolve the localized <code>name</code> field of the account. Examples: <code>de-CH</code>, <code>fr-CH</code>, <code>it-CH</code>, <code>en</code>.

Response

The master account matching <code>accountCode</code>.

idinteger

Internal identifier of the master account.

codeinteger

Numeric account code as printed on the chart of accounts.

namestring

Localized account name. Resolved against the request's <code>Accept-Language</code> and, when <code>legal-form</code> is supplied, against the legal-form-specific translation.

tagsstring

Free-text keyword tokens associated with the account, used by client-side search. Tokens are delimited by comma or semicolon.

linksstring

Linked-account references used by report computations.

accountReportLinksstring

Report-grouping references used to assemble balance-sheet / P&L groupings.

initialBalanceSheetboolean

True when the account is part of the initial opening-balance sheet.

visibleFirstFiscalYearboolean

True when the account is visible during the first fiscal year of a new company.

visibleFromSecondFiscalYearboolean

True when the account becomes visible from the second fiscal year onwards.

vatAccountboolean

True when the account is reserved for VAT postings.

notManuallyAddedboolean

True when the account was seeded automatically (not added by an end user).

Example response

{
  "id": 42,
  "code": 1020,
  "name": "Bank",
  "tags": "bank;konto",
  "links": "bank_account",
  "accountReportLinks": "bank_account",
  "visibleFirstFiscalYear": true,
  "visibleFromSecondFiscalYear": true,
  "accountReportFilters": [
    {
      "display": "Operating expenses",
      "linkAccountValue": "6000"
    }
  ],
  "notManuallyAdded": true
}

Changes

No recorded changes to this operation across all 1 revision of this API.