/api/public/v1/analytics/reportGet the analytics report
Ask for up to three metrics over one range and get a series per metric on a shared time axis, plus a summary comparing the window against the one before it. Everything is derived on read; nothing here is a stored figure. Unknown metric keys are dropped rather than rejected, so retiring one never breaks a saved call — and because one plot has one y-scale, the first metric decides the unit and any later one that disagrees is dropped too. Ask with no metric at all and you get whichever chart this company actually has data behind. The `locationId` filter can only narrow what the token already reaches.
Required scope
The access token must carry this scope. A token missing it gets 403 Forbidden. Grant them to an API client under Settings → Company → API, and to a teammate under Employee → Permissions.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
metric | string | Optional | Repeatable, up to three. From the metrics endpoint. |
range | string | Optional | From the metrics endpoint’s `ranges`. |
locationId | string | Optional | Repeatable. Omit for every location the token can reach. |
chart | string area bar line | Optional | Carried through to the response for rendering. |
curl -X GET "https://www.pxb.app/api/public/v1/analytics/report" \
-H "Authorization: Bearer your_access_token"{
"message": "Analytics report retrieved successfully!",
"content": {
"config": {
"metrics": [
"revenue"
],
"range": "30d",
"chart": "area",
"locationIds": []
},
"points": [
{
"bucket": "2026-08-01T00:00:00.000Z",
"revenue": 1420000
}
],
"summaries": [
{
"key": "revenue",
"current": 4210000,
"previous": 3880000,
"percent": 8.5
}
],
"empty": false,
"rangeNoun": "the last 30 days"
}
}In the console
The same thing done by hand, for anyone comparing the API against the screen they already use.