Profitability

Get Customer Spend by Purchase Frequency

GET
/v1/profitability/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.

Authorization

ClientIdAuthClientSecretAuth
headerx-client-id<token>

Client ID

headerx-client-secret<token>

Client secret

Query Parameters

organizationId*string

Organization identifier (required)

startDate*string

First day of the period, inclusive (YYYY-MM-DD, UTC). Required.

Formatdate
endDate*string

Last day of the period, inclusive (YYYY-MM-DD, UTC). Required. At most 366 days from startDate.

Formatdate
gtmMotionId?string

GTM motion of the organization (UUID), as listed by GET /v1/gtm-motions. Optional: without it, the response covers the organization's default GTM motion. This endpoint is not split by GTM motion yet: the default motion is answered with the organization's data, the same numbers as when the parameter is omitted, and any other GTM motion of the organization returns 422 GTM_MOTION_DATA_NOT_AVAILABLE. Not a UUID: 400. Not a live GTM motion of the organization: 403 GTM_MOTION_NOT_IN_ORGANIZATION.

Formatuuid

Response Body

Purchase frequency retrieved successfully

application/json
  1. response
period*
customers*integer

Identified 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&gtmMotionId=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    }  ]}