iotoms Docs

Get store credit ledger

GET
/api/v1/reports/financial/store-credit-ledger

Returns store credit issued, redeemed and the net balance per customer for a date range. from and to are ISO dates (YYYY-MM-DD) and both default to today.

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?

The store credit result. See the endpoint description for its exact shape.

Example Request
curl -X GET 'https://beta.iotoms.com/api/v1/reports/financial/store-credit-ledger' \  -H 'X-TenantID: your-tenant-code'
Example Response
{  "status": "string",  "message": "string",  "data": {    "entryId": "09a8b554-45ca-4bab-a638-265db4b3e828",    "entryType": "ISSUE",    "customerNumber": "string",    "storeId": 0,    "amount": 0,    "contextType": "STORE_VISIT",    "contextId": "84451116-c600-49e2-9c60-5b6b34fae0d6",    "sourceReturnId": "5b288ae1-0cef-4f97-a8fb-6349478b481a",    "clientRedemptionId": "string",    "notes": "string",    "createdBy": "string",    "createdAt": "2019-08-24T14:15:22Z"  }}