List top customers by spend
GET
Returns the top customers ranked by net spend between from and to (both default to today). limit caps the list (default 10).
BearerAuthheader
AuthorizationBearer <JWT>from?stringStart date (YYYY-MM-DD), defaults to today
Format
dateto?stringEnd date (YYYY-MM-DD), defaults to today
Format
datelimit?integerMax results, default 10
Format
int32Default
10X-TenantID*stringYour merchant's tenant code — the value typed in the Domain field on the iotoms login screen. See Concepts.
OK
*/*- response
status*stringOutcome of the request: SUCCESS when it worked; errors return an error status with the reason in message.
message*stringShort human-readable message describing the outcome.
data?array<>|Customers ranked by net spend, highest first.
Example Request
curl -X GET 'https://beta.iotoms.com/api/v1/reports/customer/top' \ -H 'X-TenantID: your-tenant-code'Example Response
{ "status": "string", "message": "string", "data": [ { "rank": 0, "customerNumber": "string", "customerName": "string", "totalSpend": 0, "orderCount": 0, "avgOrderValue": 0 } ]}