Skip to main content

Get Journal Entry Aggregates

GET 

/api/ledger/entries/aggregates

Compute summary aggregations over the full filtered journal entries list in a single request.

Not yet available to API tokens

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

OK

Response Headers
    Content-Type