List Batches
GET/api/ledger/batches
Paginated ledger batches listing: the grouping key (type, period, channel, currency), lifecycle status with the derived is_dirty flag, members_count and the aggregate journal entry summary.
Any valid API token can call this endpoint — no specific scope required. Manage tokens.
Authentication: Requires Bearer token.
Filters (Spatie QueryBuilder):
filter[type]— exact entry typefilter[period_type]— daily | monthlyfilter[status]— open | dirty | closing | posted | reopenedfilter[currency_code]— exact currencyfilter[channel]— exact integration_instance_idfilter[date_from]/filter[date_to]— m/d/Y on period_start (invalid dates silently ignored)filter[dirty]— boolean; true = status dirty or reopened (the needs-rebuild indicator), false = everything else
Sorts: id, period_start, type, members_count, created_at (default: -period_start).
Pagination: per_page default 10, clamped to max 100.
entry is the batch's current aggregate journal entry summary (null when not yet built). channel is null for batches not scoped to a channel.
Advanced filters (filter_groups): base64-encoded JSON tree of AND/OR groups via GroupedFilterSupport (same stack as the entries index).
Filterable columns: batch_type, batch_status, batch_period_type, currency (text operators); id, members_count (numeric operators); period_start, period_end (date operators); created_at (datetime operators). Unregistered columns are rejected with HTTP 400.
Search: filter[search] matches the batch type and the aggregate journal entry's reference.
Sorts: id, period_start, type, members_count, currency_code, status, created_at, channel (channel name via subquery) — prefix with - for DESC; default -period_start.
Provider sync (entry object): each batch's entry includes provider_status — the accounting provider's own status for the synced document (e.g. AUTHORISED, POSTED, PAID; null when never synced) — and provider_link, the linked provider document (provider, label, link_route, remote_url; null when never synced).
Request
Responses
- 200
- 401
- 403
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.