iotoms Docs

Get return rate per item

GET
/api/v1/reports/sales/return-rate

Returns, per item, returned quantity as a percentage of sold quantity for the range. limit caps the number of items (default 50, max 200). 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
limit?integer

Max items to return (default 50)

Formatint32
Default50

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<>|

Items sold in the range with their return rate, highest rate first.

Example Request
curl -X GET 'https://beta.iotoms.com/api/v1/reports/sales/return-rate' \  -H 'X-TenantID: your-tenant-code'
Example Response
{  "status": "string",  "message": "string",  "data": [    {      "itemId": "string",      "itemName": "string",      "totalSold": 0,      "totalReturned": 0,      "returnRate": 0    }  ]}