Get ledger analytics
Returns aggregated ledger analytics (trends and signed journal-line expense-account breakdowns) for the selected range, suitable for charting. Amounts are integer cents.
Authorizations
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
Target company. Optional — API keys are pinned to one company, and single-company sessions default to it.
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.