DollarBooks
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.json

Authenticate

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_id

Resolve 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

  1. List or create the DollarBooks bank account.
  2. Import normalized LedgerHQ rows into /api/v1/integrations/ledgerhq/bank-feed.
  3. List LedgerHQ-sourced rows from the same route or bank-account transaction list.
  4. Reclassify account/contact/tax fields when LedgerHQ review changes a category.
  5. Match, split, reconcile, or exclude transactions.
  6. Pull /api/v1/reports/financial-packet for 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-feed

Rows 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/reclassify

Behavior:

  • Updates the bank transaction classification fields.
  • Updates the selected editable non-bank journal line when a linked entry exists.
  • Requires journalLineId for 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.

On this page