Get sales by route
GET
Returns revenue per van-sales route plan for the date range. Only sales made during a day cycle that ran on a route plan are counted; voided sales are excluded. from and to are dates (YYYY-MM-DD) and both default to today.
BearerAuthheader
AuthorizationBearer <JWT>from?stringStart date, YYYY-MM-DD.
Format
dateto?stringEnd date, YYYY-MM-DD.
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 call: SUCCESS when it worked, ERROR when it failed.
message*stringShort human-readable message describing the outcome, for example "Vendor created". Do not parse it.
data?array<>|One row per route plan that had sales in the range.
Example Request
curl -X GET 'https://beta.iotoms.com/api/v1/reports/sales/by-route' \ -H 'X-TenantID: your-tenant-code'Example Response
{ "status": "string", "message": "string", "data": [ { "routePlanId": "string", "routePlanCode": "string", "routePlanName": "string", "totalRevenue": 0, "transactionCount": 0, "storesVisited": 0 } ]}