Get account ledger

GET https://app.speybooks.com/api/v1/transactions/account/{accountId}

Returns a traditional account ledger for the specified account. Only posted transactions are included. Results are sorted by date ascending with a running balance calculated from the opening balance. Default pagination: page 1, 50 per page.

If a from date is provided, the opening balance is calculated as the sum of all posted transaction lines before that date. Without a from date, the opening balance is zero (showing all transactions from the beginning).

All monetary values (opening balance, debit, credit, running balance, closing balance) are in minor units (pence).

Path parameters

accountId string required
Account ID (e.g. acc_1200). Returns the ledger for this account.

Query parameters

from string optional
Ledger start date (YYYY-MM-DD). Transactions before this date are summarised as the opening balance.
date
page integer optional Default: 1
Page number. Default 1.
min: 1
perPage integer optional Default: 50
Results per page. Default 50, maximum 100.
min: 1 · max: 100
to string optional
Ledger end date (YYYY-MM-DD).
date

Response

200 Account ledger with opening balance, per-entry debit/credit/running balance, and closing balance. All amounts in pence.
Show response fields
account object
Show child attributes
accountType string
code string
id string
name string
closingBalance integer
entries array<object>
Show child attributes
balance integer
credit string nullable
date string
debit integer
description string
transactionId string
meta object
Show child attributes
page integer
pages integer
perPage integer
total integer
openingBalance integer

Error codes

400 Invalid account ID format.
404 Account not found.