Skip to main content
GET
Get ledger analytics

Authorizations

Authorization
string
header
required

Portal API key minted in portal Settings → API access. Scope read or write; pinned to one company. Send as Authorization: Bearer lac_sk_....

Query Parameters

customer_id
string

Target company. Optional — API keys are pinned to one company, and single-company sessions default to it.

range
string

Period selector: YYYY-MM, YYYY-Qn, YYYY, all, this_month, or last_6_months.

Response

Analytics payload.

Aggregated ledger analytics for charting. by_category is retained as the response key for compatibility, but its rows identify actual expense accounts and include every non-zero account in the range. Amounts are signed integer cents.

by_category
object[]