Home > Field 14-day rep activity chart (Phase 003 Card 2)
Returns a 14-day series of distinct active reps per day
alongside a same-weekday 12-week median baseline. A rep is
“active” on a date if they had a share.visited event keyed
to them via analytics_events.member_id OR a paid order with
orders.attribution_member_id = rep.id. typical per point
is null when fewer than four prior same-weekday dates
carried any activity — the FE renders a gap in the baseline
line for that weekday.
When country is set: only the order-side rep pluck
filters on orders.country_id. The share.visited half of
each daily count stays company-wide because
analytics_events.country_code is unreliably populated
today. The reps and typical numbers are therefore
blended (country-scoped orders + aggregate shares); the
Field header’s active-rep tiles carry the same blend so
the day-14 chart point matches the header’s yesterday tile
under either filter state.
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
14-day rep activity chart payload
Home > Field 14-day rep activity chart (Phase 003 Card 2).
One series of 14 daily points ending yesterday (store-local
calendar). Each point carries reps — distinct reps active
that day (a share.visited event keyed to the rep via
analytics_events.member_id OR a paid order with
orders.attribution_member_id = rep.id) — and typical, the
median across the twelve prior same-weekday dates. typical
is null when fewer than four of those same-weekday dates
carried any activity.