Get Customer Spend by Purchase Frequency
Takes the identified customers whose first purchase falls in the period and folds them by how many orders they placed from that first purchase to the end of the period: one (one), two (two), three or more (three_or_more). For each bucket: how many customers and the average spend per customer (averageSpend = revenue ÷ customers). Aggregates only: no customer identifier or personal data is returned. Revenue is the official one (SUM(revenue) of analytics.fct_transactions, days in UTC). Customers who first bought before the period are out, even when they bought again inside it; sales without a customer identity (e.g. marketplace orders) are out too. Orders and spend after endDate do not count. Both dates are required; the period spans at most 366 days.
ClientIdAuthClientSecretAuthx-client-id<token>Client ID
x-client-secret<token>Client secret
organizationId*stringIdentificador da organização (obrigatório)
startDate*stringFirst day of the period, inclusive (YYYY-MM-DD, UTC). Required.
dateendDate*stringLast day of the period, inclusive (YYYY-MM-DD, UTC). Required. At most 366 days from startDate.
dategtmMotionId?stringGTM motion da organização (UUID), como listada por GET /v1/gtm-motions. Opcional: sem ele, a resposta cobre a GTM motion padrão da organização. Este endpoint ainda não é recortado por GTM motion: a motion padrão responde com os dados da organização, os mesmos números de quando o parâmetro é omitido, e qualquer outra GTM motion da organização recebe 422 GTM_MOTION_DATA_NOT_AVAILABLE. Não UUID: 400. GTM motion que não é uma motion ativa da organização: 403 GTM_MOTION_NOT_IN_ORGANIZATION.
uuidPurchase frequency retrieved successfully
application/json- response
period*customers*integerIdentified customers whose first purchase is in the period (the base of the buckets)
buckets*array<>Always three items, one, two, three_or_more; zeros when the period has no new identified customer
curl -X GET "https://example.com/v1/profitability/purchase-frequency?organizationId=c0ad4763-173e-4a05-9cff-5208c8ea5f6a&startDate=2025-11-01&endDate=2026-10-31>mMotionId=019a5b2e-7c4d-7abc-8def-0123456789ab"{ "period": { "startDate": "2025-11-01", "endDate": "2026-10-31" }, "customers": 48200, "buckets": [ { "key": "one", "customers": 38560, "customerShare": 80, "revenue": 19280000, "orders": 38560, "averageSpend": 500 }, { "key": "two", "customers": 7230, "customerShare": 15, "revenue": 6507000, "orders": 14460, "averageSpend": 900 }, { "key": "three_or_more", "customers": 2410, "customerShare": 5, "revenue": 3856000, "orders": 9158, "averageSpend": 1600 } ]}