iotoms Docs

Get shrinkage report

GET
/api/v1/reports/inventory/shrinkage

Returns stock removed as write-off, damage or expiry within the required from/to date range (YYYY-MM-DD).

Authorization

BearerAuth
headerAuthorizationBearer <JWT>

Query Parameters

from*string

ISO date (YYYY-MM-DD)

Formatdate
to*string

ISO 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 the request worked, ERROR when it did not.

message*string

Short human-readable message describing the result, for logs or display; do not parse it.

data?

Shrinkage totals for the date range with a breakdown per item and reason.

Example Request
curl -X GET 'https://beta.iotoms.com/api/v1/reports/inventory/shrinkage?from=2019-08-24&to=2019-08-24' \  -H 'X-TenantID: your-tenant-code'
Example Response
{  "status": "string",  "message": "string",  "data": {    "from": "2019-08-24",    "to": "2019-08-24",    "totalWriteOffQty": 0,    "totalWriteOffValue": 0,    "breakdown": [      {        "itemId": "string",        "itemName": "string",        "qtyWrittenOff": 0,        "unitCost": 0,        "totalLoss": 0,        "reason": "string"      }    ]  }}