CDP REST APIAPI Reference
Brand RFM
Brand-relative recency, frequency, and monetary tiers computed from completed orders.
GET /cdp/insights/rfm returns the brand-wide RFM tier distribution. Scores are
computed from completed orders only and are relative to customers in your brand.
Requires the beta:cdp-commerce permission on your brand.
Request
GET /cdp/insights/rfm
Authorization: Bearer vyg_…| Param | Type | Default | Description |
|---|---|---|---|
as_of | string | now | Optional ISO 8601 timestamp used for recency age. |
Response 200
{
"scope": "your-shop.myshopify.com",
"as_of": "2026-07-05T00:00:00.000Z",
"customer_count": 1234,
"distribution": [
{ "tier": "champion", "customer_count": 42, "share": 0.034 },
{ "tier": "at_risk", "customer_count": 88, "share": 0.0713 }
],
"definitions": [
{
"tier": "champion",
"description": "Recent, frequent, high-value purchaser.",
"rule": "R >= 4, F >= 4, M >= 4"
}
]
}Every published tier is always present in distribution and definitions; tiers
with no customers have customer_count: 0 and share: 0.
Errors
| Status | When |
|---|---|
400 | as_of is not a valid ISO 8601 date/time. |
401 | Missing or invalid credential. |
403 | Brand not enrolled in the commerce beta (beta_not_enabled), or no connected Shopify integration (integration_not_connected). |
405 | Non-GET method. |
See RFM for tier definitions.