iotoms Docs

List store credit history

GET
/api/v1/payments/store-credits/ledger

Returns store credit issue and redemption entries for a customer or store; at least one of customerNumber or storeId is required. Optional fromDate/toDate filter. Paginated with 0-based page (default 0) and size (default 20).

Authorization

BearerAuth
headerAuthorizationBearer <JWT>

Query Parameters

customerNumber?string

Customer account to show history for. Required unless storeId is sent.

storeId?integer

Customer store ID to show history for. Required unless customerNumber is sent.

Formatint64
fromDate?string

Earliest entry date to include (YYYY-MM-DD, inclusive, UTC day). Optional.

Formatdate
toDate?string

Latest entry date to include (YYYY-MM-DD, inclusive, UTC day). Optional.

Formatdate
page?integer

Page number, starting at 0. See Paging.

Formatint32
Default0
size?integer

Number of records per page.

Formatint32
Default20

Header Parameters

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?

One page of store credit issue and redemption entries.

Example Request
curl -X GET 'https://beta.iotoms.com/api/v1/payments/store-credits/ledger'
Example Response
{  "status": "string",  "message": "string",  "data": {    "page": 0,    "size": 0,    "totalElements": 0,    "totalPages": 0,    "rows": [      {        "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"      }    ]  }}