Accounting

List the account-displaying picker rows for the authenticated company.

This operation remains available until <b>2027-08-14</b> and is removed after that date. Use <code>GET /core/v1/accounting/accounts/account-displaying</code> instead.<br/><br/>Returns a flat list of <code>AccountDisplaying</code> rows for every account in the caller's company chart of accounts. Each row represents one selectable combination that a bookkeeper can pick when entering a manual journal line. Tenant and company are derived from the bearer token — there are no tenant or company path parameters.<p><strong>How rows are produced:</strong> For each master account the downstream service checks whether the account carries any linked sub-account definitions (e.g. a bank account linked to specific bank-accounts, a VAT account linked to VAT-rate items). If the account has <em>no</em> sub-account definitions, exactly one bare row is emitted with <code>combinedCode</code> equal to the bare account code (e.g. <code>"3000"</code>), <code>linkType</code> equal to <code>null</code>, and <code>specificationItem</code> equal to <code>null</code>. If the account has one or more sub-account link specifications, one row is emitted per individual sub-account entry, numbered sequentially across <em>all</em> link types with a 0-based counter suffix: <code>"1020-0"</code>, <code>"1020-1"</code>, …</p><p><strong>combinedCode:</strong> <code>"<accountCode>-<i>"</code> when a sub-account exists (e.g. <code>"1020-0"</code>), or the bare account code string (e.g. <code>"3000"</code>) when <code>linkType</code> is <code>null</code>. The suffix index is a flat 0-based counter per account, spanning all link types in declaration order.</p><p><strong>combinedName:</strong> <code>"<accountName> (<subAccountDisplay>)"</code> when a sub-account exists (e.g. <code>"Bank (UBS)"</code>), or the bare account name (e.g. <code>"Bürobedarf"</code>) when <code>linkType</code> is <code>null</code>.</p><p><strong>parentAccount:</strong> the full master account this row belongs to. Always populated, including for bare rows.</p><p><strong>linkType:</strong> the link-type category name (e.g. <code>"BANK"</code>, <code>"CUSTOMER"</code>, <code>"VAT_RATE"</code>). <code>null</code> when the account has no sub-account definitions.</p><p><strong>linkDisplay:</strong> the human-readable label for the link type in the current locale (e.g. <code>"Bank account"</code>). Falls back to the German label when no translation exists for the requested language. <code>null</code> when <code>linkType</code> is <code>null</code>.</p><p><strong>linkOptional:</strong> <code>true</code> when the sub-account selection is optional for the user (link keys are separated by <code>;</code> in the account definition); <code>false</code> when selecting a sub-account is mandatory (link keys separated by <code>,</code>); <code>null</code> when the account has no sub-account definitions.</p><p><strong>specificationItem:</strong> the resolved sub-account entry for this row. Its <code>link</code> field is the URI that must be round-tripped back to the booking endpoint when the user selects this row. Its <code>display</code> field is the human-readable label shown to the bookkeeper (e.g. <code>"UBS"</code>, <code>"8.1 %"</code>). <code>null</code> when <code>linkType</code> is <code>null</code>.</p><p>Row order is stable: accounts are sorted by code ascending (same order as <code>GET /core/latest/accounting/accounts</code>); sub-account rows within each account preserve the link-type declaration order and then the entry order returned by the underlying service.</p>The endpoint is a pure read — idempotent, no side effects. The caller must hold the <code>ACCOUNTING</code> permission on the company in scope.

get/core/latest/accounting/accounts/account-displaying

Request

  • Base URL: https://api.klara.ch
  • URL: https://api.klara.ch/core/latest/accounting/accounts/account-displaying
  • Auth: one of:
    • API key in header X-API-KEY
    • HTTP bearer

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, restricts the result to accounts that carry a translation for the given Swiss legal form and resolves the <code>parentAccount.name</code> field from the legal-form-specific translation column. When omitted, all accounts are returned and <code>account.name</code> is resolved from the generic language 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 localize the <code>parentAccount.name</code> field of each row and the <code>linkDisplay</code> label. Falls back to German when no translation exists for the requested language. Examples: <code>de-CH</code>, <code>fr-CH</code>, <code>it-CH</code>, <code>en</code>.

Response

Flat list of account-displaying rows, sorted by account code ascending. Each row contains <code>combinedCode</code>, <code>combinedName</code>, <code>parentAccount</code>, and the link fields populated for sub-account rows or <code>null</code> for bare rows. Returns an empty array when no accounts match the supplied <code>legal-form</code>.

combinedCodestring

Picker key. <code>"<accountCode>-<i>"</code> when a sub-account exists (e.g. <code>"1020-0"</code>); the bare account code string (e.g. <code>"3000"</code>) when <code>linkType</code> is <code>null</code>. The suffix index is a flat 0-based counter per account, spanning all link types in declaration order.

combinedNamestring

Picker label. <code>"<accountName> (<subAccountDisplay>)"</code> when a sub-account exists (e.g. <code>"Bank (UBS)"</code>); the bare account name (e.g. <code>"Bürobedarf"</code>) when <code>linkType</code> is <code>null</code>.

linkTypestring

Link-type category. Identifies the kind of entity the sub-account refers to. Common values: <code>VAT_RATE</code>, <code>VAT_CASE</code>, <code>BANK</code>, <code>CUSTOMER</code>, <code>SUPPLIER</code>, <code>EMPLOYEE</code>, <code>SOCIAL_INSURANCE</code>, <code>TAX_AT_SOURCE</code>, <code>EQUITY</code>, <code>TANGIBLE_ASSET</code>, <code>IMMOBILE_TANGIBLE_ASSET</code>, <code>UNFINISHED_PRODUCTS</code>, <code>FINISHED_PRODUCTS</code>, <code>NON_BILLED_SERVICES</code>, <code>INVENTORY_CHANGE_MATERIAL</code>, <code>INVENTORY_CHANGE_GOODS</code>, <code>LONG_TERM_INTEREST_BEARING</code>, <code>OTHER_LONG_TERM_INTEREST_BEARING</code>, <code>GIFT_CARD</code>, <code>VARIOUS</code>. <code>null</code> when the account has no sub-account definitions.

linkDisplaystring

Human-readable label for the link type in the requested <code>Accept-Language</code>. Falls back to the German label when no translation exists for the requested language. <code>null</code> when <code>linkType</code> is <code>null</code>.

linkOptionalboolean

<code>true</code> when the sub-account selection is optional for the user (link keys are separated by <code>;</code> in the account definition); <code>false</code> when selecting a sub-account is mandatory (link keys separated by <code>,</code>); <code>null</code> when the account has no sub-account definitions.

Example response

[
  {
    "combinedCode": "1020-0",
    "combinedName": "Bank (UBS)",
    "parentAccount": {
      "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
    },
    "linkType": "BANK",
    "linkDisplay": "Bank account",
    "specificationItem": {
      "id": "42",
      "display": "UBS",
      "link": "bank_account:/luz_finance/api/5fe76717-60a0-4b20-9819-255a957f3eb9/companies/1/bank-accounts/42",
      "value": "8.1",
      "validFrom": "2024-01-01",
      "validTo": "2024-12-31"
    }
  }
]

Changes

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