Skip to main content
POST
Query analytics metrics

Authorizations

X-Juo-Admin-Api-Key
string
header
required

Long-lived Admin API key issued from the Juo merchant portal. Pass as the X-Juo-Admin-Api-Key header.

Headers

X-Tenant-ID
string
required

Unique identifier of the tenant in the system (usually a store identifier)

Body

application/json
metric
enum<string>
required

The metric to compute, e.g. subscriptions:mrr, customers:count, subscriptions:purchased.

Available options:
customers:count,
customers:status-changes,
customers:churned,
subscriptions:count,
subscriptions:purchased,
subscriptions:renewed,
subscriptions:canceled,
order-items:revenue,
subscriptions:cancellation-flow,
customers:ltv,
orders:lifetime-aov,
customers:avg-lifetime-orders,
subscriptions:churned,
subscriptions:unique-churned,
subscriptions:churned-mrr,
orders:with-items,
orders:item-aov,
subscriptions:mrr,
customers:revenue-per-customer,
orders:count,
orders:revenue,
orders:aov,
order-items:count,
order-items:units,
orders:avg-units,
customers:new,
customers:reactivations,
customers:resumes,
customers:pauses,
customers:churn-transitions,
subscriptions:status-changes,
subscriptions:pauses,
subscriptions:current-mrr,
subscription-items:count
grain
enum<string>
required

Time bucket granularity used to group results.

Available options:
day,
week,
month,
year,
total
range
object
required
dimensions
string[]

Optional list of dimension keys to group results by, e.g. ["plan_id", "billing_interval"].

filter
SegmentNode · object
timezone
string

IANA timezone name used to align bucket boundaries, e.g. America/New_York. Defaults to UTC.

currency
string

ISO 4217 currency code to convert monetary metrics to, e.g. USD. When omitted, values are returned in the tenant's default currency.

cohort
object

Optional cohort definition. When present, returns a retention triangle or LTV-by-cohort matrix.

rollup
enum<string>

Aggregation function to apply over time buckets (default: sum). Only applies to metrics that support it.

Available options:
sum,
avg,
min,
max,
last

Response

Default Response

series
object[]
required

Ordered list of time-bucketed data points.

meta
object
required