Get Customer Segment Summary
GET/api/crm/segments/summary
Customers and revenue per RFM segment, with totals, over the customers you can see.
customers:readGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Authentication: Requires Bearer token with the customers scope.
The CRM activities feature must be switched on for the account; otherwise every CRM endpoint returns 404.
Customers covered: the active (not archived) customers you can see. Without permission to view all customers, that is only the customers whose default sales rep is your own sales rep (plus the reps in the sales rep groups you manage, with team access).
How segments are worked out: every active customer with at least one qualifying order (not a draft, not cancelled, at least one product line) gets three scores from 1 to 5, recalculated every night: recency (date of the last order), frequency (orders in the lookback window, 24 months by default, set in CRM Settings as rfm_lookback_months) and monetary (product-line revenue less discounts and credits in that window, base currency, excluding tax and shipping). Scores are quintiles across every customer in the account who has ordered, so customers with the same value share a score. The segment comes from the recency score and the rounded average of the frequency and monetary scores. Segment keys: champions, loyal, potential_loyalists, new_customers, promising, needs_attention, about_to_sleep, at_risk, cant_lose, hibernating, lost. A customer with no qualifying order has no segment.
Response: computed_at (null when segments have never been calculated), lookback_months (window the current figures used), current_lookback_months (the setting now; differs until the next recalculation), population_size (every customer in the account with an order; null when you only see your own customers), totals (customers, revenue, moved_recently = customers whose segment changed in the last moved_recently_days days, champions_loyal_revenue_share), and segments (all eleven, best first, each with key, label, description, action, color, customers, revenue, customer_share, revenue_share).
Requires the customers.index permission.
Request
Responses
- 200
- 401
- 403
- 422
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Unprocessable Entity
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.