API Reference

BetterThanNothing API

Static reference documentation for the self-hosted accounting API: invoices, purchase bills, bank-statement import, reconciliation, and operator-configured UK VAT / HMRC MTD paths.

Auth

Authentication

Send an API token with each request using a bearer token header.

Header
Authorization: Bearer <token>
Base URL
NEXT_PUBLIC_API_URL such as http://localhost:8787
GET

/organisations/:organisationId/invoices

Lists sales invoices or purchase bills for an organisation.

Query Type Description
direction string SALES for invoices or PURCHASE for bills.
limit number Optional maximum number of rows to return.
POST

/organisations/:organisationId/invoices

Creates a draft sales invoice or purchase bill with document lines and tax treatment.

GET

/organisations/:organisationId/invoices/:invoiceId/pdf

Exports an invoice or bill as a generated PDF attachment.

POST

/organisations/:organisationId/bank-statement-lines/import-csv

Imports CSV rows into immutable bank statement lines with import-batch tracking and dedupe.

GET

/organisations/:organisationId/reconciliation/suggestions

Suggests unreconciled payments and bank transactions for a bank statement line.

POST

/organisations/:organisationId/reconciliation

Confirms a match and writes a bank reconciliation audit link.

POST

/organisations/:organisationId/hmrc-vat-returns

Submits an MTD VAT return when HMRC OAuth credentials are configured by the operator.