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.
Authentication
Send an API token with each request using a bearer token header.
- Header
Authorization: Bearer <token>- Base URL
NEXT_PUBLIC_API_URLsuch ashttp://localhost:8787
/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. |
/organisations/:organisationId/invoices
Creates a draft sales invoice or purchase bill with document lines and tax treatment.
/organisations/:organisationId/invoices/:invoiceId/pdf
Exports an invoice or bill as a generated PDF attachment.
/organisations/:organisationId/bank-statement-lines/import-csv
Imports CSV rows into immutable bank statement lines with import-batch tracking and dedupe.
/organisations/:organisationId/reconciliation/suggestions
Suggests unreconciled payments and bank transactions for a bank statement line.
/organisations/:organisationId/reconciliation
Confirms a match and writes a bank reconciliation audit link.
/organisations/:organisationId/hmrc-vat-returns
Submits an MTD VAT return when HMRC OAuth credentials are configured by the operator.