Get a customer's spend summary
GET
Returns aggregated spend for one customer (customerNumber, required) between from and to (both default to today).
BearerAuthheader
AuthorizationBearer <JWT>customerNumber*stringCustomer number
from?stringStart date (YYYY-MM-DD), defaults to today
Format
dateto?stringEnd date (YYYY-MM-DD), defaults to today
Format
dateX-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?The customer's spend summary for the date range.
Example Request
curl -X GET 'https://beta.iotoms.com/api/v1/reports/customer/spend?customerNumber=string' \ -H 'X-TenantID: your-tenant-code'Example Response
{ "status": "string", "message": "string", "data": { "customerNumber": "string", "customerName": "string", "totalSpend": 0, "orderCount": 0, "totalReturns": 0, "netSpend": 0, "avgOrderValue": 0, "lastPurchaseDate": "2019-08-24" }}