> ## Documentation Index
> Fetch the complete documentation index at: https://docs.infinity.swiss/llms.txt
> Use this file to discover all available pages before exploring further.

# List the chart of accounts

> Lists the current chart of accounts: every account that exists in at least one open fiscal year. Accounts that only exist in closed fiscal years are not included.

The chart of accounts is returned as a whole, without pagination.

## The current chart of accounts

The chart of accounts is returned independently of fiscal years: it contains every account that exists in at least one open fiscal year, sorted by account number. Accounts that only exist in closed fiscal years are no longer part of the chart of accounts and are not returned.

Accounts are identified by their account number, which is also what you use as `debitAccount` and `creditAccount` when [posting a ledger entry](/api/accounting/create).

<Note>
  Balances depend on the fiscal year and are therefore not part of the chart
  of accounts.
</Note>


## OpenAPI

````yaml GET /v1/accounts
openapi: 3.1.0
info:
  title: infinity.swiss Open API
  version: '1.0'
  summary: ''
servers:
  - url: https://api.infinity.swiss
security:
  - apiKey: []
paths:
  /v1/accounts:
    get:
      tags: []
      summary: List the chart of accounts
      description: >-
        Lists the current chart of accounts: every account that exists in at
        least one open fiscal year. Accounts that only exist in closed fiscal
        years are not included.


        The chart of accounts is returned as a whole, without pagination.
      operationId: find-accounts-v1
      responses:
        '200':
          description: >-
            The accounts of the current chart of accounts, sorted by account
            number.
          content:
            application/json:
              schema:
                type: object
                required:
                  - accounts
                properties:
                  accounts:
                    type: array
                    items:
                      $ref: '#/components/schemas/Account'
        '401':
          $ref: '#/components/responses/Unauthorised'
components:
  schemas:
    Account:
      title: Account
      type: object
      description: >-
        An account of the chart of accounts. Accounts are identified by their
        account number.
      required:
        - number
        - name
        - type
        - currency
        - isSystemAccount
        - isTaxApplicable
      properties:
        number:
          type: integer
          minimum: 1000
          maximum: 9999
          description: The four-digit account number.
          example: 1020
        name:
          type: string
          description: The name of the account.
          example: Bank
        type:
          type: string
          enum:
            - assets
            - liabilities
            - income
            - expense
          description: The type of the account.
        description:
          type: string
          description: >-
            A description of what is booked to this account, if one was
            provided.
        colour:
          type: string
          description: >-
            The hex colour code used to display the account in the app, if one
            was set.
          example: '#0746c8'
        currency:
          type: string
          description: >-
            The 3-character currency code (ISO 4217) of the account. `CHF`
            unless the account is a foreign currency account.
          example: CHF
        isSystemAccount:
          type: boolean
          description: >-
            Whether Infinity relies on this account, e.g. for VAT. System
            accounts cannot be deleted.
        isTaxApplicable:
          type: boolean
          description: >-
            Whether ledger entries booked to this account may carry a VAT tax
            code.
  responses:
    Unauthorised:
      description: >-
        An unauthorised request was submitted. You may be using an incorrect or
        expired API token, or are attempting to access a document outside of the
        scope of the token.
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: string
                x-stoplight:
                  id: 08hkw8ukmi2lp
                description: Specific error code
          examples:
            Unauthorised request:
              value:
                code: general/unauthorised
  securitySchemes:
    apiKey:
      name: x-api-token
      type: apiKey
      in: header
      description: >-
        API token for authentication. Obtain from your Infinity account
        settings.

````