Skip to main content
GET
Home > Overview revenue-by-order-type card (two parallel stacked bars)

Authorizations

Authorization
string
header
required

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

country
string

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.

Example:

"US"

Response

Order-composition card payload

daily_by_source
object[]
required

One entry per day of the current calendar month up through today. Each day's buckets are keyed by order source (subscription, enrollment, web, mobile, backoffice, admin).

daily_by_buyer
object[]
required

One entry per day. Each day's buckets are keyed by buyer type (rep_bought, customer_bought) — the same order can appear in daily_by_source under its source bucket and here under its buyer bucket; the two axes overlap by design (spec decision D-2 option A).

source_totals
object
required

MTD totals + percentage shares keyed by source. All source buckets are present, including ones with zero orders (so the frontend can render a stable legend).

buyer_totals
object
required

MTD totals + percentage shares keyed by buyer bucket.

currency
string
required

ISO 4217 three-letter code (uppercase).

Required string length: 3
Example:

"USD"

meta
object