Analytics
Aggregate stats over the org's usage events and extracted receipts.
JWT-only, all under analytics:read.
| Method | Path | Permission |
|---|---|---|
GET | /v1/analytics/usage | analytics:read |
GET | /v1/analytics/categories | analytics:read |
GET | /v1/analytics/top-vendors | analytics:read |
GET /v1/analytics/usage
Daily count of usage events over the last days days.
Query parameters
| Name | Type | Default | Notes |
|---|---|---|---|
days | int | 30 | 1–365. |
curl "https://api.receipts.oligontech.com/v1/analytics/usage?days=7" \
-H "Authorization: Bearer $JWT"Response — 200 OK
{
"series": [
{ "day": "2026-06-03T00:00:00+00:00", "count": 127 },
{ "day": "2026-06-04T00:00:00+00:00", "count": 204 }
]
}Days with zero events are omitted from the series.
GET /v1/analytics/categories
Counts of receipts grouped by category. Receipts whose category is
NULL are excluded.
curl https://api.receipts.oligontech.com/v1/analytics/categories \
-H "Authorization: Bearer $JWT"Response — 200 OK
{
"items": [
{ "category": "meals", "count": 412 },
{ "category": "transport", "count": 187 }
]
}GET /v1/analytics/top-vendors
Top merchants by total spend across all receipts.
Query parameters
| Name | Type | Default | Notes |
|---|---|---|---|
limit | int | 10 | 1–100. |
curl "https://api.receipts.oligontech.com/v1/analytics/top-vendors?limit=5" \
-H "Authorization: Bearer $JWT"Response — 200 OK
{
"items": [
{ "merchant": "Padaria Bom Pão Ltda", "receipts": 42, "total_spent": 1842.75 },
{ "merchant": "Uber", "receipts": 31, "total_spent": 987.10 }
]
}total_spent is the sum of Receipt.total (currency-agnostic — if you
mix currencies you need to convert client-side).