Skip to main content
GET
Home > Live "Today so far" chart (cumulative today + same-DOW typical baseline)

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"

tz
string

IANA timezone name (e.g. America/Denver) or Rails-style alias (Eastern Time (US & Canada)) used to anchor "today" boundaries and hour-of-day bucketing. The frontend sends Intl.DateTimeFormat().resolvedOptions().timeZone. Unknown or malformed values silently fall back to UTC — callers omit the param when the endpoint doesn't need wall-clock alignment (see CURRENT-3077).

Example:

"America/Denver"

Response

Intraday-chart payload

Two 24-point series over the store-local day: today's cumulative revenue and the same-DOW 12-week average baseline. typical is null when the tenant has fewer than four matching-DOW dates on record (baseline below the noise floor). revenue_today and typical_by_now duplicate the cumulative values at the current hour so the FE cursor callout doesn't have to walk the array.

today
object[]
required
Required array length: 24 elements
typical
object[] | null
required
Required array length: 24 elements
weekday
integer
required

Sunday = 0 … Saturday = 6. Lets the FE label the typical line ("Typical Friday") without a second call.

Required range: 0 <= x <= 6
revenue_today
string
required

Decimal amount, expressed as a string to preserve arbitrary precision across the wire. Parsed to Number on the client and formatted with Intl.NumberFormat. Once the in-flight money-cents-migration lands, this will switch to a { amount_cents: integer, currency: string } object.

Example:

"180.25"

typical_by_now
string | null
required

Decimal amount, expressed as a string to preserve arbitrary precision across the wire. Parsed to Number on the client and formatted with Intl.NumberFormat. Once the in-flight money-cents-migration lands, this will switch to a { amount_cents: integer, currency: string } object.

Example:

"180.25"

currency
string
required

ISO 4217 three-letter code (uppercase).

Required string length: 3
Example:

"USD"

meta
object