Guides
API Integration
Build the current LedgerHQ integration flow against DollarBooks REST.
This guide covers the public REST flow that exists today for LedgerHQ developers. It does not document older app modules or unvalidated internal routes.
Setup
Read the OpenAPI contract
https://go.dollarbooks.app/api/openapi.jsonAuthenticate
Use API-key bearer auth for server-to-server calls and include the selected organization:
Authorization: Bearer dk_live_your_key
x-organization-id: org_idResolve accounts
Call /api/v1/accounts and /api/v1/bank-accounts to map LedgerHQ source
accounts to DollarBooks chart accounts and bank accounts.
LedgerHQ Bank Activity Flow
- List or create the DollarBooks bank account.
- Import normalized LedgerHQ rows into
/api/v1/integrations/ledgerhq/bank-feed. - List LedgerHQ-sourced rows from the same route or bank-account transaction list.
- Reclassify account/contact/tax fields when LedgerHQ review changes a category.
- Match, split, reconcile, or exclude transactions.
- Pull
/api/v1/reports/financial-packetfor report rendering.
Import 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-feedRows are deduplicated and stored with sourceType: "ledgerhq_bank_feed".
Reclassify
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",
"journalLineId": "journal_line_id",
"reason": "LedgerHQ account review"
}' \
https://go.dollarbooks.app/api/v1/bank-transactions/bank_transaction_id/reclassifyBehavior:
- Updates the bank transaction classification fields.
- Updates the selected editable non-bank journal line when a linked entry exists.
- Requires
journalLineIdfor multi-line linked entries. - Rejects period-locked or void entries.
Financial Packet JSON
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"DollarBooks returns report packet JSON with integer-cent amounts. LedgerHQ is expected to render PDF or HTML packets from that JSON.