Home > Overview cumulative-revenue trend chart with comparators + band
Returns the cumulative-revenue trend chart that sits below the header tiles on the Home > Overview tab. One payload holds the current month’s daily line, two comparator curves (vs last month, vs last year), and a DOW-derived expected-range band — the frontend toggles between comparators locally without a second fetch.
The plan-overlay line and the ”+$X vs plan” annotation from
the design depend on the not-yet-migrated revenue_budgets
table and are not returned here; the frontend renders without
them until that table lands (spec decision D-1).
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
Trend chart payload
One entry per day of the current calendar month up through today. cumulative_revenue is a running sum reset on the first of the month.
The full previous calendar month's cumulative-revenue curve, for the vs-last-month toggle.
The same calendar month one year ago, for the vs-last-year toggle.
Cumulative expected-range envelope for the current month, computed from the DOW-based Q1/median/Q3 of the trailing 180 days of paid revenue. Empty when the tenant has no history in the trailing window yet.
ISO 4217 three-letter code (uppercase).
3"USD"