API Reference
The current LedgerHQ-ready DollarBooks REST API contract.
DollarBooks serves the public integration API from the same deployed app that users sign into. The current public contract is the LedgerHQ-ready accounting surface: organization scoping, accounts, entries, LedgerHQ bank activity, transaction reclass/reconciliation actions, report packet JSON, MCP, and webhooks.
OpenAPI
Machine-readable contract:
https://go.dollarbooks.app/api/openapi.jsonThe OpenAPI document intentionally covers the validated LedgerHQ integration surface first. Routes outside that contract are not public partner docs yet.
Base URL
https://go.dollarbooks.app/api/v1Authentication
Server-to-server requests use a DollarBooks API key:
Authorization: Bearer dk_live_your_key
x-organization-id: org_idBrowser-session requests can call the same routes with the signed-in user's
cookies. Include x-organization-id when the user has access to more than
one organization.
Response Shape
Errors use:
{ "error": "Message" }Money values in the documented integration contract are integer cents unless a
field says otherwise. Example: 1250 means $12.50.
Supported REST Surface
Health
| Method | Path | Purpose |
|---|---|---|
GET | /api/health | Public deployment health check |
Accounts
| Method | Path | Purpose |
|---|---|---|
GET | /api/v1/accounts | List accounts for classification and reporting |
POST | /api/v1/accounts | Create an account |
GET | /api/v1/accounts/:id | Get account and ledger detail |
PATCH | /api/v1/accounts/:id | Update account metadata |
DELETE | /api/v1/accounts/:id | Delete an unused account |
Journal Entries
| Method | Path | Purpose |
|---|---|---|
GET | /api/v1/entries | List entries |
POST | /api/v1/entries | Create a draft entry |
GET | /api/v1/entries/:id | Get an entry with lines |
POST | /api/v1/entries/:id/post | Post a draft entry |
POST | /api/v1/entries/:id/void | Void a posted entry |
LedgerHQ Bank Activity
| Method | Path | Purpose |
|---|---|---|
GET | /api/v1/bank-accounts | List bank accounts that can receive LedgerHQ rows |
POST | /api/v1/bank-accounts | Create a bank account |
GET | /api/v1/bank-accounts/:id/transactions | List bank transactions |
GET | /api/v1/integrations/ledgerhq/bank-feed | List LedgerHQ-sourced transactions |
POST | /api/v1/integrations/ledgerhq/bank-feed | Import normalized LedgerHQ rows |
DollarBooks does not connect directly to bank providers. LedgerHQ supplies the
bank activity, and DollarBooks stores it as bank transactions with
sourceType: "ledgerhq_bank_feed".
Bank Transaction Actions
| Method | Path | Purpose |
|---|---|---|
POST | /api/v1/bank-transactions/:id/reclassify | Update account/contact/tax classification and linked editable journal line |
POST | /api/v1/bank-transactions/:id/match | Match a transaction to an invoice or bill payment |
POST | /api/v1/bank-transactions/:id/split | Split a transaction across invoices or bills |
POST | /api/v1/bank-transactions/:id/reconcile | Mark a transaction reconciled |
POST | /api/v1/bank-transactions/:id/exclude | Mark a transaction excluded |
Reports
| Method | Path | Purpose |
|---|---|---|
GET | /api/v1/reports/financial-packet | LedgerHQ-ready financial packet JSON |
GET | /api/v1/reports/trial-balance | Trial balance |
GET | /api/v1/reports/balance-sheet | Balance sheet |
GET | /api/v1/reports/profit-and-loss | Profit and loss |
GET | /api/v1/reports/general-ledger | General ledger |
GET | /api/v1/reports/bank-reconciliation-status | Bank reconciliation status |
Webhooks
| Method | Path | Purpose |
|---|---|---|
GET | /api/v1/webhooks | List webhook subscriptions |
POST | /api/v1/webhooks | Create webhook subscription |
Example: Import LedgerHQ Rows
curl -X POST \
-H "Authorization: Bearer dk_live_your_key" \
-H "x-organization-id: org_id" \
-H "Content-Type: application/json" \
-d '{
"bankAccountId": "bank_account_id",
"feedName": "LedgerHQ checking activity",
"ledgerHqAccountId": "ledgerhq_account_id",
"rows": [
{
"externalTransactionId": "txn_123",
"postedDate": "2026-06-07",
"description": "Office supplies",
"amount": -4299,
"currencyCode": "USD"
}
]
}' \
https://go.dollarbooks.app/api/v1/integrations/ledgerhq/bank-feedExample: Reclassify Transaction
curl -X POST \
-H "Authorization: Bearer dk_live_your_key" \
-H "x-organization-id: org_id" \
-H "Content-Type: application/json" \
-d '{ "accountId": "expense_account_id", "reason": "LedgerHQ review" }' \
https://go.dollarbooks.app/api/v1/bank-transactions/bank_transaction_id/reclassifyExample: Fetch Report Packet
curl -H "Authorization: Bearer dk_live_your_key" \
-H "x-organization-id: org_id" \
"https://go.dollarbooks.app/api/v1/reports/financial-packet?startDate=2026-01-01&endDate=2026-06-30"