iotoms Docs

Get a transaction summary

GET
/api/v1/transaction/transactions/summary

Returns total sales, transaction count, cash collected, credit issued and the most recent sales (limit, default 5). Requires businessDate or both businessDateFrom and businessDateTo; optionally narrow by dayCycleId, registerId or channel.

Authorization

BearerAuth
headerAuthorizationBearer <JWT>

Query Parameters

businessDate?string

Single trading date to summarise, YYYY-MM-DD. Required unless both businessDateFrom and businessDateTo are given.

businessDateFrom?string

Start of a trading date range, YYYY-MM-DD. Must be sent with businessDateTo.

businessDateTo?string

End of a trading date range, YYYY-MM-DD (inclusive). Must be sent with businessDateFrom.

dayCycleId?string

Only count sales of this day cycle. The recent list then shows that day cycle's latest sales, whatever their date.

Formatuuid
registerId?integer

Only count sales from this register (totals only; the recent list is not narrowed).

Formatint64
channel?string

Only count one channel: LINE_DISTRIBUTION, POS, ECOM or OTHER (case-insensitive). Totals only.

limit?integer

How many recent sales to return. Default 5.

Formatint32
Default5

Header Parameters

Response Body

OK

*/*
  1. response
status*string

Outcome of the call: SUCCESS when the request was handled, ERROR otherwise.

message*string

Short human-readable message describing the outcome, e.g. which record was fetched or saved.

data?

Sales totals and the most recent sales for the requested period.

Example Request
curl -X GET 'https://beta.iotoms.com/api/v1/transaction/transactions/summary'
Example Response
{  "status": "string",  "message": "string",  "data": {    "businessDate": "2019-08-24",    "businessDateFrom": "2019-08-24",    "businessDateTo": "2019-08-24",    "dayCycleId": "bbed7a30-80be-4ccf-810d-a33c370a67d1",    "totalSales": 0,    "transactionCount": 0,    "cashCollected": 0,    "creditTotal": 0,    "recent": [      {        "transactionId": "75906707-8c31-479c-b354-aa805c4cefbc",        "storeName": "string",        "invoiceNumber": "string",        "amount": 0,        "paymentMode": "string",        "syncStatus": "string",        "createdAt": "2019-08-24T14:15:22Z"      }    ]  }}