Home > Field "Leaderboard" card (Phase 003 Card 5)
Returns up to 50 reps ranked by current-calendar-month attributed revenue, desc. Each row carries visitors (distinct share.visited sessions), orders (attributed order count), revenue, a 12-point spark, an optional top-asset preview, and a rank-change vs prior month (null = “new” this month). Rows are pre-sorted by revenue; the FE applies search / sort / filter client-side.
When country is set: the ranking, spark, and rank-
change all filter on orders.country_id — both the
current-month AND prior-month scans, so the delta stays
honest under the pick. visitors (distinct share.visited
sessions) and the top-asset preview remain aggregate
because analytics_events.country_code and the rep
rollup tables are unreliably country-tagged today. The
rank itself is country-scoped; the visitor number on
each row still reflects company-wide share activity —
useful for scale but not directly comparable to the
country-scoped revenue.
Authorizations
Bearer token authentication. Requires a company-admin token
whose role holds reports.view. Additionally, the caller's
company must have ANALYTICS_DASHBOARD enabled — otherwise
every endpoint returns 404.
Query Parameters
ISO alpha-2 code of one of the requesting company's configured
countries (see GET /countries). When present, every service
on this endpoint filters its data to that country and reports
money in the country's own currency. Omit (or send "all")
for the aggregate-across-countries view, which is the default
and matches pre-Phase-004 behavior. Unknown ISO codes or ones
the company is not configured for return 400.
"US"
Response
Leaderboard payload
Home > Field "Leaderboard" card (Phase 003 Card 5). Up to 50
reps ranked by current-calendar-month attributed revenue,
desc. Each row carries visitors (distinct share.visited
sessions), orders (attributed order count), revenue, a
12-point spark, an optional top-asset preview, and a
rank-change vs the prior calendar month (null when the
rep had zero activity last month — the FE renders that as
a "new" badge). Rows are pre-sorted by revenue; the FE
applies search / sort / move-type filtering client-side.