Authentication
All endpoints require a valid session JWT:403 brand_not_in_org. The maximum
window allowed is 12 months + 31 days; larger ranges return 400 window_too_large.
Common Query Parameters
Endpoints
Overview
GET /v1/analytics/casino/overview
Returns the 10 KPIs of the redesign + variations vs M-1 and vs D-1 (both
returned in a single response — frontend toggles without re-fetch).
Query params: from, to, brand_id[], variation (vs_m1/vs_d1,
informational only).
Response (200):
Channel Composition
GET /v1/analytics/casino/channel-composition
Returns 4 buckets (Slots, Live, Tables, Outros) with GGR/Stake/Hold/share +
Δpp vs M-1. Buckets always returned in fixed order, even when empty.
Response (200):
game_type):
Video Slots→slotsLive Games→liveBaccarat,Roulette,Blackjack,Table Games,Poker,Video Poker→tablesCrash Games,Video Bingo,Other Games,Lottery,Fast Games,Instant Games,Scratch Card,Jackpots→outros- unknown →
outros+casino_unknown_game_typewarn log
Top Games
GET /v1/analytics/casino/top-games?limit=5
Top N games by GGR DESC with tiebreaker rounds_count DESC. limit defaults
to 5, max 100 (returns 422 above).
Response (200):
Rankings
GET /v1/analytics/casino/rankings?tab=top_stake&limit=20&offset=0
Game-level ranking with 4 tabs and optional filters.
Query params: tab (top_stake/top_rounds/ggr_positive/ggr_negative,
default top_stake), provider[] (multi), game_type[] (multi: slots/live/tables/outros),
limit (default 20, max 100), offset (default 0).
Invalid tab → 422 invalid_tab. Invalid bucket in game_type[] →
422 invalid_game_type_bucket.
Response (200):
Providers
GET /v1/analytics/casino/providers?tab=top_ggr
Provider-level ranking with 2 tabs.
Query params: tab (top_ggr/top_volume, default top_ggr),
limit (default 20, max 100), offset.
Response (200):
Players Summary
GET /v1/analytics/casino/players-summary
Active players + churn rolling D7/D14/D30 + sessions per player.
Response (200):
snapshot_age_days > 1 indicates the daily refreshable MV has not run
recently. Frontends should show a soft warning. has_snapshot=false means no
churn data has been computed yet (first-time setup or pipeline failure).
Volume by Hour
GET /v1/analytics/casino/volume-by-hour?game_type=slots&timezone=America/Sao_Paulo
24 buckets in the requested timezone (default BRT). Response always contains
exactly 24 rows; hours without data return zeros.
Query params: game_type (single bucket: slots/live/tables/outros),
timezone (default America/Sao_Paulo).
Response (200):
GGR/NGR Accumulated
GET /v1/analytics/casino/ggr-ngr-accumulated
Daily cumulative series for GGR and NGR, with M-1 baseline aligned by
day-of-period index.
Response (200):
New vs Returning
GET /v1/analytics/casino/new-vs-returning
Monthly breakdown for up to 12 months: total_players minus
new_players = returning_players.
Response (200):
Weekly Heatmap
GET /v1/analytics/casino/weekly-heatmap
7×24 matrix (day-of-week × hour BRT) of GGR. ClickHouse convention:
day_of_week=1 is Monday, day_of_week=7 is Sunday. Hour is BRT (0..23).
Response (200):
min and max are pre-computed for direct gradient rendering on the client.
Errors
Performance
- Latency target: P95 < 1s for windows up to 31 days, < 3s for 12 months.
- Server-side ClickHouse timeout: 30s. Excess returns
503. - Polling default off in the dashboard. When enabled, requests share the same brand/period scope and aborted on filter change.
Related
- Financial Reports — Revenue layer
- Player Behavior — Engagement layer
- Tracking Casino — Event prerequisites