RFM (Recency, Frequency, Monetary) segmentation groups your registered customers by how recently they purchased, how often they purchase, and how much they spend. This endpoint scans allDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/ALEJ4NDRO2025/urban-store/llms.txt
Use this file to discover all available pages before exploring further.
purchase events from authenticated users over the last 90 days and assigns each customer to one of four actionable segments. Use the output to drive targeted retention campaigns, loyalty rewards, or win-back sequences.
Endpoint
Authentication
Bearer token required withis_admin: true in the JWT payload. Returns 403 if the user is not an admin.
Analysis Window
The lookback period is always the last 90 days from the time of the request. Onlypurchase events where user_id is not null are included — anonymous sessions are excluded because they cannot be attributed to a specific customer.
Segmentation Rules
Segments are evaluated in priority order. A customer is placed in the highest matching segment.| Segment | Criteria |
|---|---|
| VIP | Recency ≤ 7 days AND Frequency ≥ 2 purchases AND Monetary ≥ 100,000 COP |
| Leal | Recency ≤ 30 days AND Frequency ≥ 1 purchase |
| En riesgo | Recency ≤ 60 days |
| Perdido | Recency > 60 days |
- Recency — days since the customer’s most recent
purchaseevent. - Frequency — total number of
purchaseevents in the 90-day window. - Monetary — sum of the
pricefield across allpurchaseevents in the window, in COP.
Response
Array of customer segment objects, sorted by
recency ascending (most recent purchasers first).ISO 8601 timestamp of the start of the 90-day window.
ISO 8601 timestamp representing now (end of the window).