Skip to content

Brand LTV

GET /cdp/insights/ltvbrand-wide lifetime-value aggregates across all of your purchasing customers: total revenue, the number of customers who have purchased, average LTV, and the distribution of customers across LTV buckets.

Requires the beta:cdp-commerce permission on your brand.

Aggregates are computed over completed orders only (state = "complete"); orders in any other state — pending, cancelled, refunded — are excluded. Each customer’s LTV is the sum of their completed-order totals; orders not attributed to a customer are excluded from the customer grouping. Amounts are denominated in the store’s currency as dollar-value decimal strings (e.g. "2050.00", not cents).

Metrics are computed on read from your synced orders, so they always reflect your current data. The response contract is stable: if computation is later cached or materialized, the shape below does not change (a cache would carry at most a few minutes of staleness).

GET /cdp/insights/ltv
Authorization: Bearer vyg_…

This endpoint takes no path or query parameters.

{
"scope": "your-shop.myshopify.com",
"total_revenue": "2050.00",
"customer_count": 4,
"average_ltv": "512.50",
"currency_code": "USD",
"distribution": [
{ "label": "0-100", "min": 0, "max": 100, "customer_count": 1 },
{ "label": "100-250", "min": 100, "max": 250, "customer_count": 1 },
{ "label": "250-500", "min": 250, "max": 500, "customer_count": 1 },
{ "label": "500-1000", "min": 500, "max": 1000, "customer_count": 0 },
{ "label": "1000+", "min": 1000, "max": null, "customer_count": 1 }
]
}
FieldTypeDescription
scopestring | nullYour connected shop domain.
total_revenuestringSum of all customers’ lifetime value, as a decimal string.
customer_countintegerNumber of distinct customers with at least one completed order.
average_ltvstringtotal_revenue / customer_count, as a decimal string ("0.00" when there are no customers).
currency_codestring | nullCurrency of the completed orders, or null when there are none.
distributionarrayFixed LTV buckets over dollar-denominated LTV; every bucket is always present, even with count 0.
distribution[].labelstringHuman-readable bucket label, e.g. "0-100" / "1000+".
distribution[].minnumberInclusive lower bound of the bucket, in dollars.
distribution[].maxnumber | nullExclusive upper bound in dollars; null for the open-ended top bucket.
distribution[].customer_countintegerNumber of customers whose LTV falls in this bucket.

The bucket customer_count values always sum to the top-level customer_count.

Terminal window
curl -s "https://cdp.vyg.app/cdp/insights/ltv" \
-H "Authorization: Bearer vyg_your_key_here"
StatusWhen
401Missing or invalid credential.
403Brand not enrolled in the commerce beta (beta_not_enabled), or no connected Shopify integration (integration_not_connected).
405Non-GET method.

See Customer Insights for the per-customer summary, and Tenant Isolation & Scope for how each brand’s aggregate is computed only over its own orders.