Get account ledger

GEThttps://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

accountIdstringrequired
Account ID (e.g. acc_1200). Returns the ledger for this account.

Query parameters

fromstringoptional
Ledger start date (YYYY-MM-DD). Transactions before this date are summarised as the opening balance.
date
pageintegeroptionalDefault: 1
Page number. Default 1.
min: 1
perPageintegeroptionalDefault: 50
Results per page. Default 50, maximum 100.
min: 1 · max: 100
tostringoptional
Ledger end date (YYYY-MM-DD).
date

Response

200Account ledger with opening balance, per-entry debit/credit/running balance, and closing balance. All amounts in pence.
Show response fields
accountobject
Show child attributes
accountTypestring
codestring
idstring
namestring
closingBalanceinteger
entriesarray<object>
Show child attributes
balanceinteger
contactNamestring
creditstringnullable
datestring
debitinteger
descriptionstring
lineDescriptionstringnullable
referencestring
transactionIdstring
metaobject
Show child attributes
pageinteger
pagesinteger
perPageinteger
totalinteger
openingBalanceinteger

Error codes

400Invalid account ID format.
404Account not found.