Get a customer's purchase history
Returns the purchases of one customer between from and to (both default to today). Pass either customerNumber or storeId; use storeId for shops visited on a route, which often have no customer number.
BearerAuthAuthorizationBearer <JWT>customerNumber?stringCustomer number (customerNumber or storeId required)
storeId?integercustomer_stores.id (customerNumber or storeId required) — needed for route visits, which rarely carry a real CRM customerNumber
int64from?stringStart date (YYYY-MM-DD), defaults to today
dateto?stringEnd date (YYYY-MM-DD), defaults to today
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?array<>|One entry per sale to the customer or store in the date range.
curl -X GET 'https://beta.iotoms.com/api/v1/reports/customer/purchase-history' \ -H 'X-TenantID: your-tenant-code'{ "status": "string", "message": "string", "data": [ { "customerNumber": "string", "customerName": "string", "businessDate": "2019-08-24", "transactionId": "string", "invoiceNumber": "string", "grandTotal": 0, "channel": "string" } ]}