Query analytics
Executes a time-series analytics query for a given metric.
Authorizations
Long-lived Admin API key issued from the Juo merchant portal. Pass as the X-Juo-Admin-Api-Key header.
Headers
Unique identifier of the tenant in the system (usually a store identifier)
Body
The metric to compute, e.g. subscriptions:mrr, customers:count, subscriptions:purchased.
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 Time bucket granularity used to group results.
day, week, month, year, total Optional list of dimension keys to group results by, e.g. ["plan_id", "billing_interval"].
- SegmentNode
- SegmentNode
IANA timezone name used to align bucket boundaries, e.g. America/New_York. Defaults to UTC.
ISO 4217 currency code to convert monetary metrics to, e.g. USD. When omitted, values are returned in the tenant's default currency.
Optional cohort definition. When present, returns a retention triangle or LTV-by-cohort matrix.
Aggregation function to apply over time buckets (default: sum). Only applies to metrics that support it.
sum, avg, min, max, last