v1

latestOpenAPI 3.0.12026-07-24501176.6 MB

Get Customer Ledger Balance

Retrieves category-wise points’ ledger balance details of a customer for a given time.

get/pointsLedger/getCustomerLedgerBalance

Query parameters

identifierName'mobile' | 'email' | 'externalId' | 'cardnumber' | 'cardExternalId' required

Identifier type to identify the customer.

identifierValuestring required

Value of the specified identifier type of the customer.

source'INSTORE' | 'MARTJACK' | 'WECHAT' | 'FACEBOOK' | 'WEB_ENGAG' | 'TMALL' | 'TAOBAO' | 'JD' | 'ECOMMERCE' | 'WEBSITE' | 'LINE' | 'ALL' required

Source in which the identifier is available.

accountIdstring

For sources with multiple accounts, pass the specific accountId in which the identifier is registered.

tillIdstring

Get the customer’s ledger balance of a specific TILL. Pass the unique till ID.

limitinteger

Number of results to retrieve. Max value supported is also 10.

offsetinteger

Number of pages to be ignored from the top (page number).

endDatestring

Get the closing balance of a specific date. Pass the end date in YYYY-MM-DDThh:mm:ss format. Default value, startDate plus 7 days.

includeTillConceptEventsboolean

Fetches the deduction entries that were triggered at the tills mapped to the Concept of the Program ID even if the deductions are from a different program.

ledgerEntryType'CREDIT' | 'DEBIT' | 'OPENING_BALANCE'

Specify the type of ledger entries you want to fetch. By default, it fetches all the ledger entry types.

pointCategoryType'REGULAR' | 'PROMISED' | 'TRIGGER_BASED'

Specify the point category type for which you want to fetch ledger details. By default, it fetches all the points category details.

alternateCurrencyNamesstring

Pass includeAlternateCurrencies=true to retrieve all alternate currencies of the customer.

includeAlternateCurrenciesboolean

Pass includeAlternateCurrencies=true to retrieve all alternate currencies available with the customer.

Request body

{"stackTrail":"paths:/pointsLedger/getCustomerLedgerBalance:get:requestBody:content:application/json:schema","oasType":"schema","type":"unknown"}

Response

200

Example response

{
  "customerDetails": {
    "userId": 502522264,
    "externalId": "tomanatest2",
    "entityType": "CUSTOMER"
  },
  "ledgerDetails": {
    "pageSize": 10,
    "totalEntries": 17,
    "pageCount": 2,
    "ledgerClosingBalance": [
      {
        "pointsCategory": "DelayedAccrualPointCategory",
        "programName": "Tata Ginger Loyalty",
        "programId": 1568,
        "closingBalance": "0.000"
      }
    ]
  }
}