iotoms Docs

Get expenses summary

GET
/api/v1/reports/financial/expenses-summary

Returns total route-day expenses for a date range plus a per-category breakdown, sorted by value. Amounts are integer minor units (cents). Rejected expenses are excluded unless you pass status; optionally narrow by routePlanId or salesExecutiveId. An empty range returns zeros and an empty list.

Authorization

BearerAuth
headerAuthorizationBearer <JWT>

Query Parameters

from?string

ISO date (YYYY-MM-DD), defaults to today

Formatdate
to?string

ISO date (YYYY-MM-DD), defaults to today

Formatdate
routePlanId?string

Optional route scope — day_cycles.route_plan_id (UUID)

Formatuuid
salesExecutiveId?string

Optional sales-executive scope (username)

status?string

Optional approval status: PENDING | APPROVED | REJECTED. Omit for PENDING+APPROVED.

Value in"PENDING""APPROVED""REJECTED"

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?

Route-day expense total for the range and the per-category breakdown, in minor units.

Example Request
curl -X GET 'https://beta.iotoms.com/api/v1/reports/financial/expenses-summary' \  -H 'X-TenantID: your-tenant-code'
Example Response
{  "status": "string",  "message": "string",  "data": {    "from": "2019-08-24",    "to": "2019-08-24",    "totalAmountMinor": 0,    "expenseCount": 0,    "categories": [      {        "categoryId": "string",        "categoryName": "string",        "amountMinor": 0,        "expenseCount": 0,        "percentageOfTotal": 0.1      }    ]  }}