Metric
The shop's metrics over a date range: MRR, gross cash flow, refunds, churn rates, LTV, subscriptions, new subscriptions, cancellations and customers, abandoned cart reminders and failed payments, each with a headline value and one point per day, week or month.
Money is an integer in minor units of the shop base currency. Ratios are decimals (0.042 is 4.2%). Counts are integers. null means not computable.
Days are calendar days in UTC. The most recent day can still change.
Every metric, or only those in keys[], from date[gte] to date[lte], in the order MetricKey lists them. A day without data is 0, or null for ltv and ltv_with_early_churn. A range that starts before the shop's first recorded day starts on that day.
Query parameters
date[gte]RequiredstringFirst day of the range, Y-m-d.
Format: date.
date[lte]RequiredstringLast day of the range, Y-m-d, on or after date[gte] and before today (UTC).
Format: date.
intervaloptionalstringWhat one point covers: a day (the default), a week (Monday to Sunday) or a calendar month. The first and last points are cut to the range.
Possible values: day, week, month.
Defaults to "day".
keys[]optionalMetricKey[]Only these metrics. Values must be distinct.
ReturnsMetric[]
Metrics list response
Error responses
401objectThe X-API-KEY header is missing or the key is invalid (invalid_api_key), or the shop has no active Subbly subscription (inactive_subscription).
403objectThe connected app may not use this endpoint (plan_unauthorized).
422objectValidation failed: date[gte] or date[lte] is missing or not in Y-m-d format, date has another key, date[lte] is before date[gte] or not before today, interval is not day, week or month, or keys[] has an unknown or repeated key.
One metric from date[gte] to date[lte]. A day without data is 0, or null for ltv and ltv_with_early_churn. A range that starts before the shop's first recorded day starts on that day.
Path parameters
metricRequiredMetricKeyMetric key
Possible values: mrr, gross_cash_flow, refunds, subscription_churn_rate, daily_subscription_churn_rate, ltv, ltv_with_early_churn, subscriptions, new_subscriptions, new_cancellations, new_customers, abandoned_cart_reminders, failed_payments.
Query parameters
date[gte]RequiredstringFirst day of the range, Y-m-d.
Format: date.
date[lte]RequiredstringLast day of the range, Y-m-d, on or after date[gte] and before today (UTC).
Format: date.
intervaloptionalstringWhat one point covers: a day (the default), a week (Monday to Sunday) or a calendar month. The first and last points are cut to the range.
Possible values: day, week, month.
Defaults to "day".
ReturnsMetric
Metric object response
Error responses
401objectThe X-API-KEY header is missing or the key is invalid (invalid_api_key), or the shop has no active Subbly subscription (inactive_subscription).
403objectThe connected app may not use this endpoint (plan_unauthorized).
404objectNo metric has this key.
422objectValidation failed: date[gte] or date[lte] is missing or not in Y-m-d format, date has another key, date[lte] is before date[gte] or not before today, or interval is not day, week or month.