Dashboard
Preview a customer segment
Materialises a segment filter and reports its size and value, without saving it.
Authorization
HTTPBearer AuthorizationBearer <token>
JWT access token
In: header
Query Parameters
merchant_id?|
Optional merchant to act on. Must be one you are a member of.
Format
uuidHeader Parameters
X-Merchant-ID?string|null
Request Body
application/json
The filter used to materialise an audience. Validated server-side.
active_dayparts?array<string>
active_within_days?|
Range
1 <= value <= 730dayparts?array<string>
limit?integer
Range
1 <= value <= 20000Default
5000max_orders?|
Range
0 <= valuemax_recency_days?|
Range
0 <= valuemin_orders?|
Range
0 <= valuemin_recency_days?|
Range
0 <= valuemin_total_spend?|
Range
0 <= valuename*string
Length
length <= 200opted_in_only?boolean
Default
trueproduct_ids?array<>
segments?array<string>
Response Body
application/json
application/json
curl -X POST "https://example.com/api/v1/customers/segment/preview" \ -H "Content-Type: application/json" \ -d '{ "name": "string" }'{ "data": { "avg_order_value": 0, "definition": { "active_dayparts": [ "string" ], "active_within_days": 1, "dayparts": [ "string" ], "limit": 5000, "max_orders": 0, "max_recency_days": 0, "min_orders": 0, "min_recency_days": 0, "min_total_spend": 0, "name": "string", "opted_in_only": true, "product_ids": [ "026d7765-cea5-4b36-a2c4-f616e464c692" ], "segments": [ "string" ] }, "estimated_revenue_30d": 0, "sample": [ { "acquisition_channel": "string", "avg_order_value": 0, "external_ref": "string", "first_order_at": "2019-08-24T14:15:22Z", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "is_opted_in": true, "last_order_at": "2019-08-24T14:15:22Z", "masked_phone": "string", "name": "string", "preferred_daypart": "string", "recency_days": 0, "segment": "string", "total_orders": 0, "total_spend": 0 } ], "size": 0 }, "meta": {}, "success": true}Customer health GET
Repeat rate, retention, cohorts, churn risk and per-slot behaviour.
Growth Command Center GET
Everything the main dashboard needs in one call: KPIs with period-over-period deltas, revenue and order trends, segment breakdown, top and declining products, customer health and detected anomalies.