Bookkeeping reference
Reference for the Bookkeeping endpoints. All paths start with https://<your-instance>/api/v1. Every request carries Authorization: Bearer hek_…. Formats, paging, deletion lists and error codes are on Conventions.
Reading needs read permission on the Bookkeeping module, every writing request needs write permission (otherwise 403 with no_write_permission).
What the API may do here
- Read: chart of accounts, VAT codes, fiscal years and VAT periods (with the figures of form 605), bank accounts, journal, account balances, Income statement and Balance sheet, all Receivables (including those from Shopify), all Payables with their documents, supplier profiles and bank transactions.
- Payables in the inbox: upload invoices, create entries, change them, attach files and delete them while the entry is in the Inbox.
Nothing is booked through the API. Manual journal entries, payments, approving, booking and paying payables, bank reconciliation (camt import, matching, confirming) and settings such as the chart of accounts, fiscal years and bank accounts are done by a person in the app. Moving a payable to Pending (finishing the entry) is part of that too: a person always checks an invoice before it reaches the books.
Formats in this module
- Amounts are decimal strings with two places (
"108.10"). Journal lines come without trailing zeros ("4000","8.1"). - VAT rates are fractions, not percentages:
"0.081". - Numbers sent as JSON numbers (
108.1instead of"108.10") are refused with422. - Status and source values (
status,source) are text. More values may be added.
Master data
| Endpoint | Content |
|---|---|
GET /api/v1/accounting/accounts | Chart of accounts: number, name, type (asset, liability, equity, revenue, expense), category, is_active. Parameters: is_active, account_type, number. |
GET /api/v1/accounting/accounts/{account_id} | One account |
GET /api/v1/accounting/vat-codes | The VAT codes of form 605 with their rate (205, 220, 221, 225) and 400 for input tax |
GET /api/v1/accounting/fiscal-years and /{fiscal_year_id} | Fiscal years |
GET /api/v1/accounting/vat-periods and /{vat_period_id} | VAT periods with method (vereinbart agreed, vereinnahmt received) and status. Parameters: fiscal_year_id, status. |
GET /api/v1/accounting/vat-periods/{vat_period_id}/form-605 | The form 605 figures of this period, as in the app |
GET /api/v1/accounting/bank-accounts and /{bank_account_id} | Bank accounts: name, IBAN, currency, ledger account, default and invoice account. Never credentials. |
GET /api/v1/accounting/bank-accounts/deleted?since=… | Deleted bank accounts |
An account removed in the app stays in the list with "is_active": false: the app never deletes accounts, it deactivates them.
Journal
GET /api/v1/accounting/journal-entries and GET /api/v1/accounting/journal-entries/{journal_entry_id}
Parameters: date_from, date_to (entry date), account (account number: entries with a line on this account), source, vat_period_id, limit, cursor, updated_since. When an entry is locked because its VAT period was submitted, that counts as a change.
{ "id": "5b0c9e1a-…", "entry_date": "2026-11-02", "description": "Rechnung RE_2026110012", "reference": "RE_2026110012", "source": "local_invoice", "source_ref_type": "local_invoice", "source_ref_id": "8d1f3a52-…", "vat_period_id": "c71e…", "is_locked": false, "lines": [ {"account_number": "1100", "account_name": "Debitoren", "debit": "108.1", "credit": "0", "vat_code": null}, {"account_number": "3200", "account_name": "Handelsertrag", "debit": "0", "credit": "100", "vat_code": "220"}, {"account_number": "2200", "account_name": "MWST geschuldet", "debit": "0", "credit": "8.1", "vat_code": "220"} ], "created_at": "2026-11-02T09:30:05+00:00", "updated_at": "2026-11-02T09:30:05+00:00"}Examples of source: local_invoice, ar_payment, ap_payment, bank_manual, manual, payroll_run, payroll_payment. Entries are never deleted: a reversal is a new entry.
Account balances and reports
| Endpoint | Content |
|---|---|
GET /api/v1/accounting/account-balances?as_of=2026-12-31 | Debit, credit and balance per account with bookings up to that date. With date_from, only the movements from that date. |
GET /api/v1/accounting/reports/profit-and-loss?date_from=…&date_to=… | Income statement with the same figures as the app |
GET /api/v1/accounting/reports/balance-sheet?as_of=… | Balance sheet with the same figures as the app, with is_balanced |
The balance’s sign follows the account type: debit minus credit for assets and expenses, credit minus debit for liabilities, equity and revenue. A contra account (for example a value adjustment among the assets) therefore shows a negative balance.
Receivables
GET /api/v1/accounting/receivables and GET /api/v1/accounting/receivables/{receivable_id}
Every customer invoice, wherever it comes from: invoices from Quotes & Invoices (source local_invoice, with sales_document_id pointing at the document) and from Shopify (source shopify, with source_order_id). Each one has its amounts, VAT lines, paid_amount, open_amount, the payments (channel bank, shopify_payout or manual) and dunning (dunning with level and fees).
Parameters: status (draft, issued, partially_paid, paid, cancelled), overdue=true (issued and past due, like Overdue in the app; partially paid invoices are not included, as there), source, invoice_date_from, invoice_date_to, customer, limit, cursor, updated_since. A payment added or removed counts as a change to the invoice.
GET /api/v1/accounting/receivables/{receivable_id}/dunning-pdf returns the current reminder or dunning letter as PDF.
Payables
Reading
| Endpoint | Content |
|---|---|
GET /api/v1/accounting/payables | Every payable in every status (eingang inbox, pending, approved, booked, paid, cancelled). Parameters: status, due_date_from, due_date_to, supplier. |
GET /api/v1/accounting/payables/{payable_id} | One payable with amounts, VAT lines, payment details (payment with IBAN, QR-IBAN, reference and message), tags, document and attachments |
GET /api/v1/accounting/payables/{payable_id}/document | The uploaded invoice document |
GET /api/v1/accounting/payables/{payable_id}/attachments/{attachment_id} | One attachment |
GET /api/v1/accounting/payables/deleted?since=… | Deleted payables |
GET /api/v1/accounting/supplier-profiles and /{supplier_profile_id} | Supplier profiles with default account, VAT rate and IBAN |
Uploading invoices to the inbox
POST /api/v1/accounting/payables/inbox (multipart, field files)
Every file becomes an entry in the Inbox, exactly like an upload in the app. At most 20 files per request, PDFs at most 10 MB each, images are reduced to 1600 px and then at most 10 MB (a raw upload can be up to 15 MB), PDF, JPEG, PNG, TIFF or WebP. If one file is not allowed, the API stores none of the request’s files and answers 422.
The AI recognition fills the entry in the background, only with your business’s own Anthropic key (under Settings). Without a key the entry stays empty (scan_status skipped) and a person fills it in. A file that was already uploaded answers duplicate with the id of the existing entry.
curl -X POST "https://<your-instance>/api/v1/accounting/payables/inbox" \ -H "Authorization: Bearer hek_…" \Response 201 Created:
{"results": [{"filename": "mill-invoice.pdf", "status": "created", "payable_id": "3f2a…"}]}scan_status shows how far the recognition is: queued, running, done, failed or skipped.
Creating and changing entries
| Endpoint | Purpose |
|---|---|
POST /api/v1/accounting/payables | Create an inbox entry from fields (supports Idempotency-Key) |
PATCH /api/v1/accounting/payables/{payable_id} | Change an inbox entry: only the fields sent, null clears a field. "payment": null changes nothing: clear payment fields one by one, for example {"payment": {"reference": null}}. |
POST /api/v1/accounting/payables/{payable_id}/attachments | Attach files (multipart, field files, same limits as the upload) |
DELETE /api/v1/accounting/payables/{payable_id} | Delete an entry in the Inbox or Pending, as in the app |
Fields: supplier_name, supplier_invoice_number, invoice_date, due_date, currency, amount_excl_vat, vat_amount, amount_incl_vat, vat_rate, vat_lines, expense_account_id, payment (type iban or qr, iban, qr_iban, reference, message, debtor_bank_account_id), crm_company_id or crm_contact_id, tags, service_period_from, service_period_to, notes.
curl -X PATCH "https://<your-instance>/api/v1/accounting/payables/3f2a…" \ -H "Authorization: Bearer hek_…" \ -H "Content-Type: application/json" \ -d '{"expense_account_id": "…", "payment": {"message": "Customer 4711"}}'If the AI recognition is still running, it only fills empty fields: what you set through the API stays. An entry in another status answers 409 with payable_not_draft.
Bank
| Endpoint | Content |
|---|---|
GET /api/v1/accounting/bank-accounts/{bank_account_id}/transactions | A bank account’s transactions. Parameters: status (unmatched, suggested, matched, booked, ignored), date_from, date_to, limit, cursor, updated_since. |
GET /api/v1/accounting/bank-transactions/{bank_transaction_id} | One transaction |
Each transaction shows date, amount, direction (credit incoming, debit outgoing), counterparty, reference, status and the matched receivable or payable (receivable_id, payable_id) or journal entry. When a match is undone in the app, the status is back to unmatched and the transaction counts as changed.
Error codes in this module
| Status | Code | Meaning |
|---|---|---|
409 | payable_not_draft | The payable is no longer in the inbox (delete: no longer in the inbox or pending). |
409 | no_dunning_level | The invoice has no dunning level. |
409 | dunning_pdf_not_available | The dunning PDF cannot be built because company or bank details are missing. |
422 | attachment_type_not_allowed | A file is not a PDF or image. details says which. |
422 | attachment_too_large | A file is empty, a PDF or image is larger than 10 MB, or the raw upload is larger than 15 MB. |
413 | storage_full | The business’s storage is full; files can be added again once storage is freed or extended. |
422 | validation_error | Invalid request, for example an amount as a JSON number or too many files. |
404 | not_found | The entry, an account, bank account or CRM contact does not exist (also: belongs to another business). |