iotoms Docs

Get sales by salesperson

GET
/api/v1/reports/sales/by-employee

Returns revenue, number of sales and distinct stores sold to per salesperson for the range. Only sales made during a day cycle are counted; voided sales are excluded. from and to are dates (YYYY-MM-DD) and both default to today.

Authorization

BearerAuth
headerAuthorizationBearer <JWT>

Query Parameters

from?string

Start date, YYYY-MM-DD.

Formatdate
to?string

End date, YYYY-MM-DD.

Formatdate

Header Parameters

X-TenantID*string

Your merchant's tenant code — the value typed in the Domain field on the iotoms login screen. See Concepts.

Response Body

OK

*/*
  1. response
status*string

Outcome of the call: SUCCESS when it worked, ERROR when it failed.

message*string

Short human-readable message describing the outcome, for example "Vendor created". Do not parse it.

data?array<>|

One row per sales employee who had sales in a day cycle in the range.

Example Request
curl -X GET 'https://beta.iotoms.com/api/v1/reports/sales/by-employee' \  -H 'X-TenantID: your-tenant-code'
Example Response
{  "status": "string",  "message": "string",  "data": [    {      "userId": "string",      "userName": "string",      "totalSales": 0,      "transactionCount": 0,      "storesVisited": 0,      "averageOrderValue": 0    }  ]}