LumaBill Chart of Accounts API

Swiss chart of accounts (Kontenplan KMU) lookup

GitHub OpenAPI

Operations 4

GET /chart-accounts List the chart of accounts #
POST /chart-accounts Add an account to the chart of accounts #
PUT /chart-accounts/{id} Rename, regroup or deactivate a chart account #
DELETE /chart-accounts/{id} Delete a custom chart account #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/lumabill-ch:lumabill-ch-chart-of-accounts-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

lumabill-ch-chart-of-accounts-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Lumabill Chart of Accounts API
  version: '1.0'
  description: 'The Lumabill API gives **Pro and Lifetime** subscribers programmatic access to

    Swiss invoicing and bookkeeping data. You can create and manage invoices,

    clients, expenses, journal entries, and more - the same data you see in the

    Lumabill dashboard. ## Authentication


    All requests must carry a Bearer API key in the `Authorization` header:


    ```

    Authorization: Bearer lmb_your_api_key_here

    ```


    API keys are created in **Settings → API Keys** inside the Lumabill dashboard. ## Profile scoping


    A Lumabill account can have multiple profiles (companies). By default the key

    is scoped to the profile it was created for. If a key has access to multiple

    profiles, supply the `X-Profile-Id` header with the UUID of the target profile. ## Rate limits


    | Operation | Limit |

    |-----------|-------|

    | Reads (GET) | 60 requests / minute per API key |

    | Writes (POST, PUT, DELETE) | 20 requests / minute per API key |


    When the limit is exceeded the API returns `429 Too Many Requests` with a

    `Retry-After` header indicating when you may retry (seconds from now). ## Pagination


    List endpoints support cursor-free page-based pagination via query parameters:


    | Parameter | Default | Maximum |

    |-----------|---------|---------|

    | `page` | 1 | - |

    | `per_page` | 50 | 100 |


    Responses include a top-level `meta` object:


    ```json

    {

    "data": [...],

    "meta": { "page": 1, "per_page": 50, "total": 243 }

    }

    ```


    ## Errors


    All error responses share a common shape:


    ```json

    {

    "error": {

    "code": "ERROR_CODE",

    "message": "Human-readable description"

    }

    }

    ```


    Common error codes: `INVALID_API_KEY`, `FORBIDDEN`, `NOT_FOUND`,

    `VALIDATION_ERROR`, `RATE_LIMIT_EXCEEDED`, `SUBSCRIPTION_REQUIRED`,

    `READ_ONLY_KEY`, `CLIENT_NOT_FOUND`, `INTERNAL_ERROR`. ## Smart defaults


    When creating invoices or offers the API auto-resolves most fields from

    your profile so you can send minimal payloads. Only `lines` is required. | Field | Auto-resolved from |

    |-------|-------------------|

    | `invoice_number` | Profile prefix + sequential counter (e.g. `IV-010`) |

    | `issue_date` | Today |

    | `due_date` | `issue_date` + profile payment deadline (default 30 days) |

    | `currency` | Profile default currency (default `CHF`) |

    | `vat_rate` (on lines) | Profile default tax rate |

    | Sender details | Profile company name, address, IBAN, etc. |

    | Payment info | Profile payment template and deadline |


    **`client_id` shorthand** - pass a `client_id` UUID instead of a full

    client object. The API fetches the client and snapshots the data

    automatically. Returns `404` with code `CLIENT_NOT_FOUND` if the client

    does not exist in your profile. **Minimal example:**


    ```json

    POST /invoices

    {

    "client_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",

    "lines": [

    { "description": "Consulting", "quantity": 2, "price": 150 }

    ]

    }

    ```


    Any field you explicitly provide overrides the auto-resolved default. ## MCP Server (AI Assistant Integration)


    Connect your Lumabill account to AI assistants like Claude, ChatGPT, and Cursor

    using the Model Context Protocol (MCP). **Endpoint:** `https://mcp.lumabill.ch/mcp?key={your_api_key}`


    **Setup for Claude Desktop** - add to `claude_desktop_config.json`:

    ```json

    {

    "mcpServers": {

    "lumabill": {

    "type": "streamable-http",

    "url": "https://mcp.lumabill.ch/mcp?key=lmb_your_key_here"

    }

    }

    }

    ```


    **Setup for Claude Code** - add to `.mcp.json` in your project:

    ```json

    {

    "mcpServers": {

    "lumabill": {

    "type": "streamable-http",

    "url": "https://mcp.lumabill.ch/mcp?key=lmb_your_key_here"

    }

    }

    }

    ```


    **Setup for Cursor** - add to MCP settings:

    - Name: `lumabill`

    - Type: `streamable-http`

    - URL: `https://mcp.lumabill.ch/mcp?key=lmb_your_key_here`


    The MCP server exposes all API endpoints as tools. Your AI assistant can:

    - Create and manage invoices, offers, and expenses

    - Look up clients and vendors

    - Generate financial reports (P&L, balance sheet, VAT)

    - Import bank transactions

    - Query revenue data


    **API key permissions apply:** Read-only keys only expose read tools.'
  contact:
    name: Lumabill Support
    url: https://lumabill.com/contact
  license:
    name: Proprietary
servers:
- url: https://api.lumabill.ch/v1
  description: Production
- url: https://api.dev.lumabill.ch/v1
  description: Development / Sandbox
security:
- BearerAuth: []
tags:
- name: Chart Of Accounts
  description: Swiss chart of accounts (Kontenplan KMU) lookup
paths:
  /chart-accounts:
    parameters:
    - $ref: '#/components/parameters/ProfileIdHeader'
    get:
      operationId: listChartAccounts
      summary: List the chart of accounts
      tags:
      - Chart Of Accounts
      description: Returns the profile's chart of accounts (Swiss Kontenplan KMU) with account UUIDs, codes, names and types. Account UUIDs are required for bank transaction adjustments, categorization, expense lines, and expense payments.
      parameters:
      - name: includeBalances
        in: query
        description: Include the current balance per account
        schema:
          type: boolean
      - name: fiscalYearId
        in: query
        description: Restrict balances to a fiscal year (with includeBalances=true)
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: List of chart accounts
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ChartAccount'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimitExceeded'
        '500':
          $ref: '#/components/responses/InternalError'
    post:
      operationId: createChartAccount
      summary: Add an account to the chart of accounts
      tags:
      - Chart Of Accounts
      description: 'Adds a custom account to the profile''s Kontenplan, e.g. a liability account the default chart lacks (2270 Geschuldete Sozialversicherungen). The 4-digit code must match the type per Swiss Kontenrahmen KMU: 1xxx ASSET, 2000-2799 LIABILITY, 2800-2999 EQUITY, 3xxx REVENUE, 4xxx-7xxx EXPENSE. Codes are unique per profile. Permission `bookkeeping.create`; needs a read-write key.'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChartAccountWrite'
      responses:
        '201':
          description: Account created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChartAccount'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '409':
          description: The code already exists for this profile (`DUPLICATE_ACCOUNT_CODE`)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          $ref: '#/components/responses/RateLimitExceeded'
        '500':
          $ref: '#/components/responses/InternalError'
  /chart-accounts/{id}:
    parameters:
    - $ref: '#/components/parameters/ProfileIdHeader'
    - $ref: '#/components/parameters/ResourceId'
    put:
      operationId: updateChartAccount
      summary: Rename, regroup or deactivate a chart account
      tags:
      - Chart Of Accounts
      description: 'Code and type are fixed once created. Deactivating (`isActive: false`) is refused for system accounts (`ACCOUNT_IS_SYSTEM`) and for accounts that still carry a balance (`ACCOUNT_HAS_BALANCE`). Permission `bookkeeping.update`.'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChartAccountUpdate'
      responses:
        '200':
          description: Account updated
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimitExceeded'
        '500':
          $ref: '#/components/responses/InternalError'
    delete:
      operationId: deleteChartAccount
      summary: Delete a custom chart account
      tags:
      - Chart Of Accounts
      description: Only accounts without journal lines can be deleted; otherwise the API answers 400 `ACCOUNT_HAS_ENTRIES`. System accounts are refused. Deactivate those via PUT instead. Permission `bookkeeping.delete`.
      responses:
        '200':
          description: Account deleted
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimitExceeded'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    Currency:
      type: string
      description: 'ISO 4217 code of a currency the API converts (ESTV/BAZG rates). The same list applies to every currency field of the API.

        '
      enum:
      - CHF
      - EUR
      - USD
      - GBP
      - JPY
      - CAD
      - AUD
      - SEK
      - NOK
      - DKK
      - HUF
      example: CHF
    ChartAccountUpdate:
      type: object
      description: Only the fields sent are changed. Code and type cannot change.
      properties:
        name:
          type: string
        parentCode:
          type:
          - string
          - 'null'
        isActive:
          type: boolean
        currency:
          allOf:
          - $ref: '#/components/schemas/Currency'
          description: 'Set or remove the account currency. 409 ACCOUNT_CURRENCY_LOCKED once FW lines exist, 409 ACCOUNT_CURRENCY_CONFLICT (with `count`) when existing lines carry no amount in that currency, 409 BANK_ACCOUNT_CURRENCY_MISMATCH when a bank account in another currency posts to it.

            '
    ErrorResponse:
      type: object
      required:
      - error
      properties:
        error:
          type: object
          required:
          - code
          - message
          properties:
            code:
              type: string
              example: NOT_FOUND
            message:
              type: string
              example: The requested resource was not found.
    ChartAccount:
      type: object
      required:
      - id
      - code
      - name
      - type
      properties:
        id:
          type: string
          format: uuid
        code:
          type: string
          description: Swiss chart of accounts (Kontenplan KMU) account number
          example: '6940'
        name:
          type: string
          example: Bankspesen
        type:
          type: string
          enum:
          - ASSET
          - LIABILITY
          - EQUITY
          - REVENUE
          - EXPENSE
        parentCode:
          type:
          - string
          - 'null'
        isSystem:
          type: boolean
        isActive:
          type: boolean
        currency:
          allOf:
          - $ref: '#/components/schemas/Currency'
          description: 'Set on a foreign-currency (FW) account, e.g. 1021 Bank EUR; null = CHF. Every line on an FW account carries its amount in that currency.

            '
        createdAt:
          type: string
          format: date-time
        balance:
          type:
          - number
          - 'null'
          format: double
          description: Only present when includeBalances=true (CHF)
        fwBalance:
          type:
          - number
          - 'null'
          format: double
          description: 'FW accounts with includeBalances=true only: the saldo in the account currency, over the requested fiscalYearId, else as of today over the fiscal year covering today (null when no year covers today).

            '
        carryForwardMissing:
          type: boolean
          description: 'FW accounts with includeBalances=true only: true when the previous fiscal year is still open, so the year holds no Saldovortrag and `balance` / `fwBalance` show only this year''s movements.

            '
    ChartAccountWrite:
      type: object
      required:
      - code
      - name
      - type
      properties:
        code:
          type: string
          pattern: ^[0-9]{4}$
          description: 4-digit account code; the range must match `type`
          example: '2270'
        name:
          type: string
          example: Geschuldete Sozialversicherungen
        type:
          type: string
          enum:
          - ASSET
          - LIABILITY
          - EQUITY
          - REVENUE
          - EXPENSE
        parentCode:
          type:
          - string
          - 'null'
          description: Parent account code for grouping
          example: '2200'
        currency:
          allOf:
          - $ref: '#/components/schemas/Currency'
          description: 'Makes the account a foreign-currency account. Only for your own ASSET / LIABILITY accounts (400 CURRENCY_NOT_ALLOWED for P&L and seeded system accounts, 400 INVALID_CURRENCY); the base currency is stored as null.

            '
  responses:
    ValidationError:
      description: Validation error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: VALIDATION_ERROR
              message: The field 'due_date' must be on or after 'issue_date'.
    RateLimitExceeded:
      description: Rate limit exceeded
      headers:
        Retry-After:
          description: Number of seconds to wait before retrying
          schema:
            type: integer
          example: 30
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: RATE_LIMIT_EXCEEDED
              message: Rate limit exceeded. Please retry after 30 seconds.
    Forbidden:
      description: Subscription required or read-only key on a write endpoint
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            subscription_required:
              summary: Subscription required
              value:
                error:
                  code: SUBSCRIPTION_REQUIRED
                  message: A Pro or Lifetime subscription is required to use this endpoint.
            read_only_key:
              summary: Read-only key
              value:
                error:
                  code: READ_ONLY_KEY
                  message: This API key is read-only and cannot perform write operations.
    Unauthorized:
      description: Invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: INVALID_API_KEY
              message: The provided API key is invalid or has been revoked.
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: NOT_FOUND
              message: The requested resource was not found.
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: INTERNAL_ERROR
              message: An unexpected error occurred. Please try again later.
  parameters:
    ResourceId:
      name: id
      in: path
      required: true
      description: UUID of the resource
      schema:
        type: string
        format: uuid
      example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
    ProfileIdHeader:
      name: X-Profile-Id
      in: header
      description: 'UUID of the target profile. Required when the API key is not already scoped to a single profile.

        '
      required: false
      schema:
        type: string
        format: uuid
      example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: lmb_...
      description: API key obtained from Lumabill dashboard → Settings → API Keys