Skip to content

Analytics

Datasets of the reports constructor for analytics clients such as the Analytics MCP: the query language capabilities, the dataset catalog and cards, and ordering dataset builds. Every operation needs the reports constructor permission of the Location.

Get analytics capabilities

Request

Returns what the analytics query language offers for the Location: its version, the datasets the acting user may read (each needs its own permission, e.g. finances or loyalty), the time kinds and the result limits. Requires the reports constructor permission of the Location.

Security
OAuth2(Required scopes: analytics:read) or ApiKey
Path
location_idintegerrequired

Identifier of the Location. Verified against the credential on every call — a Location the credential cannot access responds with 404.

curl -i -X GET \
  'https://developer.alteg.io/_mock/en/b2b-v3/openapi/locations/{location_id}/analytics/capabilities' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Query language version, readable datasets, time kinds and limits.

Headers
RateLimit-Remaininginteger, (int32), >= 0

Requests left in the most constrained policy window that applies to this request.

RateLimit-Resetinteger, (int32), >= 0

On 429, seconds until the most constrained policy frees up; it equals Retry-After there. On a successful response it reports the length of that policy's window rather than the time left in the current one, so treat it as the window size, not as a countdown — the counter to pace against is RateLimit-Remaining.

RateLimit-Policystring

Most constrained policy applied to the request, as <limit>;w=<window in seconds>.

Example:"10;w=60"
X-Request-Idstring

Request identifier for support and log correlation.

Bodyapplication/json
objectstringrequired
Value:"analytics_capabilities"
language_versionstringrequired
datasetsArray of stringsrequired

Datasets the acting user may read.

time_kindsArray of stringsrequired
max_page_sizeintegerrequired
max_result_rowsintegerrequired
result_ttl_secondsintegerrequired
Response
{ "object": "analytics_capabilities", "language_version": "1", "datasets": [ "visits", "appointments" ], "time_kinds": [ "period", "snapshot" ], "max_page_size": 1000, "max_result_rows": 10000, "result_ttl_seconds": 86400 }