API

The supported application REST surface is versioned under /api/v1. Most organization endpoints require the same-origin session cookie and then enforce organization permissions and PostgreSQL row-level security. Public quote and contract token endpoints declare no session security. Stripe webhooks use the stripe-signature header.

  • OpenAPI JSON: /api/v1/openapi.json
  • Same-origin documentation entry: /api/docs
  • Health: /health

The OpenAPI 3.1 document is generated from the same request and response schemas the API validates against, so it describes every supported route.

Errors use application/problem+json. Clients should retain requestId for log correlation, handle idempotency conflicts explicitly, and avoid treating a queued 202 operation as completed. Browser clients should use same-origin cookies; production deployments must use TLS and correctly configured trusted origins.

Report reads and report exports share one set of filters. Supply either from and to or a calendar year and quarter; the pair is exclusive and the server resolves a quarter into the same canonical range, so both forms produce identical export fingerprints. The vat-return report requires year and quarter and rejects the ledger-only accountId, journalEntryId, and fiscalPeriodId filters.

Exported files are named after the organization, report, and period, for example acme-bv-vat-return-q3-2026.pdf or acme-bv-trial-balance-2026-01-01-to-2026-11-15.csv. Artifact download links are valid for five minutes and send Content-Disposition: attachment with the artifact's file name, so browsers save files under that name rather than the storage key.

Report kinds are general-ledger, trial-balance, profit-loss, balance-sheet, vat, vat-return, receivables-aging, cash-basis, cash-flow, icp, oss, customer-insights, supplier-insights, products-services, cost-categories, and trips-timeline. Every kind returns rows, string totals, and limitations (plain-language warnings such as an ICP customer without a VAT number or overlapping trips).

GET /dashboard accepts an optional asOf date (the organization's local date). Besides balances and to-do counts, it returns payables, company (legal name, KvK number, VAT number, IBAN, and address), monthlyResults (12 months of revenue and expenses ending with the month of asOf), and last30Days (invoiced, costs, hours, and kilometres).

The vat report returns the Dutch VAT return: one row per box from 1a to 5c with turnover and vat (exact, base currency, null when the box has no such column), filedTurnover and filedVat (whole euros as filed), and the supporting journalEntryIds and taxCodeIds. Its totals are vatDue (5a), inputVat (5b), netVatDue (5c), and their filed* equivalents. The box layout is fixed, so limit does not truncate it. See Accounting for the calculation rules.