---
title: "Get ledger analytics"
method: GET
path: "/analytics"
tags: ["Books"]
---

# Get ledger analytics

`GET /analytics`

## Request

- Base URL: `https://api.app.lastaccountingcompany.com/portal`
- URL: `https://api.app.lastaccountingcompany.com/portal/analytics`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/lastaccountingcompany/apis/lac-customer-api/docs/analytics/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns aggregated ledger analytics (trends, category breakdowns) for the selected range, suitable for charting. Amounts are integer cents.

## Query parameters

- `customer_id` string
- `range` string

## Response `200`

Analytics payload.

- AnalyticsLedgerData: Aggregated ledger analytics for charting. Interiors are returned as-is; amounts are integer cents.

## Other responses

- `401`: Missing or invalid bearer token.
- `403`: Insufficient scope or role — e.g. a read-scoped key on a mutating method, or an API key on an admin/approver-only endpoint.

---

[API](https://skmtc.dev/lastaccountingcompany/apis/lac-customer-api.md) - [All operations](https://skmtc.dev/lastaccountingcompany/apis/lac-customer-api/llms.txt) - [OpenAPI document](https://skmtc.dev/lastaccountingcompany/apis/lac-customer-api/revisions/52e277b4f031?raw)
