iotoms Docs

Get refunds report

GET
/api/v1/reports/financial/refunds

Returns returns with a business date between from and to (both default to today): total value, count and average, plus a breakdown by refund method (store credit, cash, digital, mixed) and by return reason, largest first.

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

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?

Refund totals for the range, broken down by refund method and by return reason.

Example Request
curl -X GET 'https://beta.iotoms.com/api/v1/reports/financial/refunds' \  -H 'X-TenantID: your-tenant-code'
Example Response
{  "status": "string",  "message": "string",  "data": {    "from": "2019-08-24",    "to": "2019-08-24",    "totalRefunds": 0,    "refundCount": 0,    "avgRefundValue": 0,    "breakdownByPaymode": [      {        "paymodeCode": "string",        "paymodeLabel": "string",        "totalAmount": 0,        "transactionCount": 0,        "percentageOfTotal": 0.1      }    ],    "breakdownByReason": [      {        "reason": "string",        "count": 0,        "totalAmount": 0      }    ]  }}