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
accountIdstringrequiredAccount ID (e.g. acc_1200). Returns the ledger for this account.
Query parameters
fromstringoptionalLedger start date (YYYY-MM-DD). Transactions before this date are summarised as the opening balance.
pageintegeroptionalDefault: 1Page number. Default 1.
perPageintegeroptionalDefault: 50Results per page. Default 50, maximum 100.
tostringoptionalLedger end date (YYYY-MM-DD).
Response
200Account ledger with opening balance, per-entry debit/credit/running balance, and closing balance. All amounts in pence.
Show response fields
accountobjectShow child attributes
accountTypestringcodestringidstringnamestringclosingBalanceintegerentriesarray<object>Show child attributes
balanceintegercontactNamestringcreditstringnullabledatestringdebitintegerdescriptionstringlineDescriptionstringnullablereferencestringtransactionIdstringmetaobjectShow child attributes
pageintegerpagesintegerperPageintegertotalintegeropeningBalanceintegerError codes
400Invalid account ID format.
404Account not found.