Team analytics and revenue (admin)
Changed onOne payload for the web Analytics and Revenue tabs and native d-sports-engage-native#1245 (Analytics) and #1246 (Revenue). Gate: canAccessTeam (decided 2026-11-11, Option A), also re-checked inside getTeamAnalytics. Owner, editor, viewer and legacy admin members of the team, plus platform admin/superadmin, get 200; outsiders 403 FORBIDDEN; anonymous 401. Web and native hide the Analytics and Revenue rows from editors and viewers in the UI only; do not tighten the server check to owner-only. period is 7d, 30d or all; missing or invalid values become 30d (never 400). Totals and trends are lifetime or last 6 months; period only sets the comparison window of followerGrowth30d, packGrowth30d and revenueGrowth30d and is echoed as overview.period. Revenue is DSC only; only completed or opened purchases count. There is no pagination and no server export route: web Revenue export is a client-side CSV built from packStats. Response is Cache-Control: private, no-store.
Request
- Base URLhttps://app.d-sports.org
- AuthHTTP bearer
Path parameters
Team id or slug.
Query parameters
Growth comparison window. Any other value is treated as 30d.
Response
{ success, data: TeamAnalytics }. Dates are ISO 8601 strings.
Changes
- info
endpoint added
- info