Get Journal Entry Aggregates
GET/api/ledger/entries/aggregates
Compute summary aggregations over the full filtered journal entries list in a single request.
This endpoint currently requires session authentication; Personal Access Token scope support is in progress.
Accepts the same filter and search parameters as List Journal Entries, plus an aggregates map of column => calculation. Discarded and reversed entries are excluded by default, matching List Journal Entries.
Calculations: sum, avg, min, max, range (max - min), count_all (matching entries), count_values / count_not_empty (entries with a value), count_unique (distinct values), count_empty (entries without a value).
Aggregatable columns: id, total_debit, line_count.
Unknown columns are silently ignored. A null value means no matching entries carried a value for that column. An unsupported calculation returns a 422 validation error.
Authentication: Requires Bearer token. Supply ids[] to constrain the calculation to specific records; omit it to cover the whole filtered set.
Request
Responses
- 200
- 401
- 403
- 422
- 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.
Unprocessable Content
Response Headers
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.