GET
/accounts/{accountId}/entries Get all entries for an account with rolling balance
Get all entries for an account with rolling balance calculation
Entries of posted and reversed transactions in effective-date order. Each entry's balance_after is the balance of its own layer after it, carried from every earlier entry of the account whatever the filters and the page.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
accountIdrequired | path | string uuid | Account UUID |
start_date | query | string date | Filter entries from the start of this day in the ledger's timezone |
end_date | query | string date | Filter entries up to the end of this day in the ledger's timezone |
layer | query | string enum: settled | pending | encumbrance | Filter by transaction layer |
limit | query | integer default: 25 · min: 1 · max: 100 | Items per page, 1 to 100. |
cursor | query | string | The previous page's meta.pagination.next_cursor; omit it for the first page. A cursor not shaped like this list's is a 422. |
transaction_created_at | query | object | Attribute filter: the window on the transaction's creation, ISO 8601 with an offset or Z, inclusive, at most 12 months, as transaction_created_at[from]=…&transaction_created_at[to]=…. Required with attributes; either one filters the list. |
attributes | query | object[] max items: 5 | Attribute filter: 1-5 predicates on the entry's transaction, ANDed, with the grammar of POST /api/v1/transactions/search: attributes[0][key]=customer_id&attributes[0][op]=eq&attributes[0][value]=C-123, or attributes[0][values][]=… for in. A filtered list has no balance_after and carries meta.filtered. |
version | query | integer enum: 2 | The report specification v2: version=2 with filter[…] in place of transaction_created_at and attributes, which it may not be mixed with. |
filter | query | object | With version=2: only created_at (a preset, local days or instants, at most 12 months) and any_of (1-5 groups of 1-5 predicates, ORed), as filter[created_at][preset]=last_month&filter[any_of][0][all_of][0][key]=…. Every other member, and sort or columns, is refused: the list keeps its own order. |
Responses
200Entries retrieved successfully
{
"success": true,
"meta": {
"account": {
"id": "01997c1e-4d2a-7c3e-9a1b-2f0e8c6d4b5a",
"code": "string",
"name": "string",
"normal_balance": "debit"
},
"pagination": {
"pagination": {
"limit": 25,
"has_more": true,
"next_cursor": "eyJpZCI6IjAxOTk3YzFlLTRkMmEtN2MzZS05YTFiLTJmMGU4YzZkNGI1YSJ9",
"previous_cursor": null
}
},
"filtered": true
},
"data": [
{
"id": "01997c1e-4d2a-7c3e-9a1b-2f0e8c6d4b5a",
"transaction_id": "01997c1e-4d2a-7c3e-9a1b-2f0e8c6d4b5a",
"account_id": "01997c1e-4d2a-7c3e-9a1b-2f0e8c6d4b5a",
"account_code": "1000",
"type": "debit",
"amount": "100.00",
"description": null,
"layer": "settled",
"effective_date": "2026-01-15",
"balance_after": "1000.00",
"metadata": null,
"transaction": {
"reference": "string",
"description": "string",
"metadata": null,
"attributes": {
"customer_id": "C-123"
}
}
}
]
} 401Unauthenticated
{
"success": false,
"message": "Validation failed",
"code": "VALIDATION_ERROR"
} 403Forbidden
{
"success": false,
"message": "Validation failed",
"code": "VALIDATION_ERROR"
} 404Account not found
{
"success": false,
"message": "Validation failed",
"code": "VALIDATION_ERROR"
} 422Validation error, an attribute filter outside its limits, or code SEARCH_TOO_BROAD when a filtered list ran past its 5 s statement timeout; or a cursor not shaped like this list's
{
"success": false,
"message": "Validation failed",
"code": "VALIDATION_ERROR"
} 429Attribute-filter rate limit exceeded (60 filtered lists or searches a minute per API key, 120 per ledger)
{
"success": false,
"message": "Validation failed",
"code": "VALIDATION_ERROR"
} Examples
curl https://ledga.io/api/v1/accounts/{accountId}/entries \
-H "Authorization: Bearer sk_xxxxxxxx_your_secret" use Ledga\Api\LedgaClient;
$ledga = new LedgaClient('sk_xxxxxxxx_your_secret');
$entries = $ledga->accounts->getEntries('01997c1e-4d2a-7c3e-9a1b-2f0e8c6d4b5a');
foreach ($entries->data as $entry) { echo $entry->balanceAfter; }