LumaBill Reports API
Financial reports (P&L, Balance Sheet, VAT, Trial Balance)
Financial reports (P&L, Balance Sheet, VAT, Trial Balance)
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
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.curl "https://apis.io/api/v1/apis/lumabill-ch:lumabill-ch-reports-api"
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.
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: 3.2.0
info:
title: Lumabill Reports 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: Reports
description: Financial reports (P&L, Balance Sheet, VAT, Trial Balance)
paths:
/reports:
parameters:
- $ref: '#/components/parameters/ProfileIdHeader'
get:
operationId: listReports
summary: List available report types
tags:
- Reports
responses:
'200':
description: List of available report types
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ReportType'
example:
- type: pnl
name: Profit & Loss
- type: balance-sheet
name: Balance Sheet
- type: vat
name: VAT Report
- type: trial-balance
name: Trial Balance (Saldenliste)
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'429':
$ref: '#/components/responses/RateLimitExceeded'
'500':
$ref: '#/components/responses/InternalError'
/reports/{type}:
parameters:
- $ref: '#/components/parameters/ProfileIdHeader'
- name: type
in: path
required: true
description: Report type identifier
schema:
type: string
enum:
- pnl
- balance-sheet
- vat
- trial-balance
example: pnl
get:
operationId: getReport
summary: Generate a report
tags:
- Reports
description: Generate the report as the app shows it, amounts in CHF. pnl and vat are period reports (`dateFrom`, `dateTo`); balance-sheet is a point-in-time report (`asOfDate`); trial-balance (Saldenliste) takes `fiscalYearId` and / or `asOfDate` (clamped into the year; one of them is required, 400 INVALID_FISCAL_YEAR_ID for a malformed id, 404 for a year that does not exist) and needs a double-entry profile (403 DOUBLE_ENTRY_REQUIRED otherwise).
parameters:
- name: dateFrom
in: query
description: pnl / vat - start of the period (inclusive)
schema:
type: string
format: date
example: '2025-01-01'
- name: dateTo
in: query
description: pnl / vat - end of the period (inclusive)
schema:
type: string
format: date
example: '2025-12-31'
- name: asOfDate
in: query
description: balance-sheet / trial-balance - the as-of date
schema:
type: string
format: date
example: '2025-12-31'
- name: fiscalYearId
in: query
description: trial-balance - the fiscal year (see /fiscal-years)
schema:
type: string
format: uuid
responses:
'200':
description: Generated report
content:
application/json:
schema:
anyOf:
- $ref: '#/components/schemas/Report'
- $ref: '#/components/schemas/TrialBalance'
'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:
Report:
type: object
description: 'The report as the app shows it; the structure varies by type (`sections` / `subtotals` for pnl, assets and liabilities for balance-sheet, the MWST ciphers for vat, see TrialBalance for trial-balance). All amounts are in CHF. pnl adds `fxResult`, balance-sheet adds `fxNote`. In vat every invoice, credit note, expense or revenue (CHF or foreign currency) with a live recognition entry declares the net and VAT its entry booked (2200 / 1170, under the Saldosteuersatz the booked SSS share), so the ciphers equal the ledger; `filingStatus.filedDifferences` lists every cipher of the form (rate ciphers by turnover) that differs from the figures stored when the period was filed (null without a filing).
'
additionalProperties: true
properties:
fxResult:
$ref: '#/components/schemas/PnlFxResult'
fxNote:
$ref: '#/components/schemas/BalanceSheetFxNote'
TrialBalance:
type: object
description: 'trial-balance (Saldenliste) of one fiscal year as of `asOfDate`: for every account with lines in scope the opening balance (from the year''s opening balance entry), debit and credit movements and the closing balance, in CHF and in the natural direction of the account type. Foreign-currency accounts add their FW saldo, book rate (CHF / FW) and the closing rate of the live revaluation run dated asOfDate. Debit = credit for openings, movements and closings (`isBalanced`).
'
properties:
baseCurrency:
$ref: '#/components/schemas/Currency'
fiscalYear:
type: object
properties:
id:
type: string
format: uuid
year:
type: integer
startDate:
type: string
format: date
endDate:
type: string
format: date
status:
type: string
enum:
- OPEN
- CLOSED
asOfDate:
type: string
format: date
accounts:
type: array
items:
type: object
properties:
chartAccountId:
type: string
format: uuid
code:
type: string
example: '1021'
name:
type: string
type:
type: string
enum:
- ASSET
- LIABILITY
- EQUITY
- REVENUE
- EXPENSE
isActive:
type: boolean
openingBalance:
type: number
format: double
debit:
type: number
format: double
credit:
type: number
format: double
closingBalance:
type: number
format: double
currency:
allOf:
- $ref: '#/components/schemas/Currency'
fwBalance:
type:
- number
- 'null'
format: double
bookRate:
type:
- number
- 'null'
format: double
closingRate:
type:
- number
- 'null'
format: double
rateSource:
type:
- string
- 'null'
description: See FxRateSource
rateDate:
type:
- string
- 'null'
format: date
totals:
type: object
properties:
openingDebit:
type: number
format: double
openingCredit:
type: number
format: double
debit:
type: number
format: double
credit:
type: number
format: double
closingDebit:
type: number
format: double
closingCredit:
type: number
format: double
isBalanced:
type: boolean
priorYearNotClosed:
type: boolean
description: The prior year is not closed, so balance-sheet accounts open at 0
revaluationRun:
$ref: '#/components/schemas/FxRevaluationRunRef'
ratesUsed:
type: array
items:
$ref: '#/components/schemas/FxRateUsed'
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
FxRateSource:
type: string
description: 'Where a rate came from: `BAZG` (ESTV/BAZG daily or monthly average sell rate), `BAZG_CROSS` (derived through a cross rate), `ICTAX` (ESTV year-end list, mid rate), `ACTUAL` (the CHF amount actually moved), `MANUAL` (entered by you).
'
example: BAZG
BalanceSheetFxNote:
type:
- object
- 'null'
description: 'balance-sheet only, for the Anhang (OR 959c Abs. 1 Ziff. 1): each foreign-currency account with its saldo in that currency, CHF book value, book rate and the closing rate used, plus the rates block. Null without FW accounts or when no fiscal year covers asOfDate.
'
properties:
asOfDate:
type: string
format: date
accounts:
type: array
items:
type: object
properties:
chartAccountId:
type: string
format: uuid
code:
type: string
example: '1021'
name:
type: string
type:
type: string
currency:
$ref: '#/components/schemas/Currency'
fwBalance:
type: number
format: double
chfBalance:
type: number
format: double
bookRate:
type:
- number
- 'null'
format: double
closingRate:
type:
- number
- 'null'
format: double
rateSource:
$ref: '#/components/schemas/FxRateSource'
rateDate:
type:
- string
- 'null'
format: date
ratesUsed:
type: array
items:
$ref: '#/components/schemas/FxRateUsed'
revaluationRun:
$ref: '#/components/schemas/FxRevaluationRunRef'
PnlFxResult:
type: object
description: 'pnl only. Exchange differences of the period by origin, income sign (positive = gain): `realized` = lines with fxKind realized (payments, transfers), `unrealized` = fxKind revaluation (year-end revaluation), `other` = the untagged rest of an FX result account (conversion rounding of documents, manual postings), so per account realized + unrealized + other = its saldo. Computed when the period has FX-tagged lines; without them every figure is 0 and accounts is empty. Additive: sections and subtotals are unchanged.
'
properties:
realized:
type: number
format: double
unrealized:
type: number
format: double
other:
type: number
format: double
example: -0.01
comparisonRealized:
type:
- number
- 'null'
format: double
comparisonUnrealized:
type:
- number
- 'null'
format: double
comparisonOther:
type:
- number
- 'null'
format: double
accounts:
type: array
items:
type: object
properties:
code:
type: string
example: '6960'
name:
type: string
realized:
type: number
format: double
unrealized:
type: number
format: double
other:
type: number
format: double
comparisonRealized:
type:
- number
- 'null'
format: double
comparisonUnrealized:
type:
- number
- 'null'
format: double
comparisonOther:
type:
- number
- 'null'
format: double
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.
ReportType:
type: object
required:
- type
- name
properties:
type:
type: string
enum:
- pnl
- balance-sheet
- vat
- trial-balance
example: pnl
name:
type: string
example: Profit & Loss
FxRateUsed:
type: object
properties:
currency:
$ref: '#/components/schemas/Currency'
rate:
type: number
format: double
rateSource:
$ref: '#/components/schemas/FxRateSource'
rateDate:
type:
- string
- 'null'
format: date
retrievedAt:
type:
- string
- 'null'
format: date-time
FxRevaluationRunRef:
type:
- object
- 'null'
description: The live year-end revaluation run the closing rates come from
properties:
id:
type: string
format: uuid
runDate:
type: string
format: date
valuationPolicy:
type: string
enum:
- stichtag
- niederstwert
threshold:
type: number
format: double
journalEntryId:
type:
- string
- 'null'
format: uuid
entrySeq:
type:
- integer
- '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:
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