Get Points Ledger Information

Retrieves the points ledger entries of a customer, usergroup or alternate currencies for each event.

👍

For detailed information about our APIs and for hands-on testing, refer documentation in API overview and step-by-step guide on making your first API call in Make your first API call .

Prerequisites

API Specification

HTTP MethodGET
PaginationYes
Batch supportNo
Rate limit informationRefer to rate limit documentation .

API endpoint example

  • User group - /v2/pointsLedger/getCustomerLedgerInfo?type=USERGROUP2&identifierName=id&identifierValue=381335652&source=INSTORE&offset=0&limit=10&sortOrder=ASC
  • Customer - v2/pointsLedger/getCustomerLedgerInfo?identifierName=id&identifierValue=98662653&source=INSTORE&limit=10
  • Alternate Currencies- /v2/pointsLedger/getCustomerLedgerInfo?identifierName=id&identifierValue=423725119&source=INSTORE&includeAlternateCurrencies=true or /v2/pointsLedger/getCustomerLedgerInfo?identifierName=id&identifierValue=423725119&source=INSTORE&alternateCurrencyNames=acNjnkvfgfdeun

Query parameter (Customer)

Parameter
(Parameters marked with * sign are mandatory)
Description
identifierName*Identifier type to identify the customer.
identifierValue*Value of the specified identifier type of the customer.
source*Source in which the identifier is available.
acountId*For sources with multiple accounts, pass the specific accountId.
tillIdGet the customer’s ledger information of a specific TILL. Pass the unique till ID.
limitPass the number of results to retrieve.
offsetPage number to retrieve. Page Number.
programIdRetrieve the ledger details of a specific program.
isFilterBasedOnDateIndicates whether the date filter should be applied when fetching data from the database. When the start date and end date are not passed in the API request parameters, the value of isFilterBasedOnDate becomes false and the API fetches the user’s entire past purchase history.
Default value: True
includeLastOneYearDataIf includeLastOneYearData is set to true, the API response will include data from the last year instead of the last 90 days when only startDate or endDate is passed in the API query parameter.
Default value: False
startDateGet ledger information from on or after a specific date. Pass the start date in YYYY-MM-DDThh:mm:ss format.
Notes:
- The maximum difference between startDate and endDate should not be more than 90 days.
- If only startDate or endDate is passed in the API query parameter, the ledger data for 90 days is retrieved based on the provided startDate or endDate. If includeLastOneYearData is set to true, the API response will include data from the last year instead of the last 90 days.
- When the start date and end date are not passed in the API request parameters, the value of isFilterBasedOnDate becomes false and the API fetches the user’s entire past purchase history.
endDateGet ledger information until a specific date. Pass the end date in YYYY-MM-DDThh:mm:ss format.
Notes:
- The maximum difference between startDate and endDate should not be more than 90 days.
- If only startDate or endDate is passed in the API query parameter, the ledger data for 90 days is retrieved based on the provided startDate or endDate.. If includeLastOneYearData is set to true, the API response will include data from the last year instead of the last 90 days.
-When the start date and end date are not passed in the API request parameters, the value of isFilterBasedOnDate becomes false and the API fetches the user’s entire past purchase history.
includeTillConceptEventsPass true to fetch 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. Default value is false. When true, pass the programId also, else it will be qualified as invalid input combination.
ledgerEntryTypeSpecify the type of ledger entries you want to fetch. Supported values: CREDIT, DEBIT, OPENING_BALANCE. By default, it fetches all the ledger entry types.
pointCategoryTypeSpecify the point category type for which you want to fetch ledger details. Supported values: REGULAR, PROMISED, TRIGGER_BASED. By default, it fetches all the points category details.

Query parameter (User group)

Parameter
(Parameters marked with * sign are mandatory)
Description
typeType of entity.
identifierName*The identifier of the group to search for the ledger information. The following identifiers are applicable: groupId, externalId, and primaryUserId
identifierValue*The value of the identifier.
source*The origin of the information. For example, INSTORE, MARTJACK, WECHAT, FACEBOOK , WEB_ENGAGE, , TMALL, TAOBAO, JD, ECOMMERCE, WEBSITE, LINE, ALL
limitThe maximum number of items to be retrieved.
offsetThe starting index for data retrieval.
sortSort the order of entries from date. The supported values are ASC and DESC.
roleThese are the roles defined by the brands for members in a user group.Pa For example, PRIMARY, SECONDARY, and so on.

Request query parameter (Alternate currencies)

ParameterData typeDescription
identifierName*StringIdentifier type to identify the customer.
identifierValue*StringValue of the specified identifier type of the customer.
sourceEnumSource in which the identifier is available. Supported values: NSTORE, WECHAT, FACEBOOK, WEB_ENGAGE, ECOMMERCE, WEBSITE, LINE
includeAlternateCurrenciesBooleanPass includeAlternateCurrencies=true to retrieve all alternate currencies available with the customer.
alternateCurrencyNamesStringFilter alternate currencies for the customer based on the name. You can also pass a list of comma-separated alternate currency names. Set the parameter includeAlternateCurrencies to false when you use this. If the value is true, includeAlternateCurrencies lists all the available currencies.
pointCategoryTypeEnumSpecify the point category type for which you want to fetch ledger details. By default, it fetches all the points category details.
https://eucrm.cc.capillarytech.com/v2/pointsLedger/getCustomerLedgerInfo?includeAlternateCurrencies=true
https://eucrm.cc.capillarytech.com/v2/pointsLedger/getCustomerLedgerInfo?alternateCurrencyNames=acNjnkvfgfdeun

Response parameter (Customer)

ParameterDescription
customerDetailsDetails of the current customer.
firstNameName of the customer.
lastNameLast name of the customer.
userIdUnique ID of the customer.
externalIdExternal ID of the customer.
entityTypeWhether the points are issued to an individual (CUSTOMER), or group (FLEET).
pageNumberCurrent page number. Default value - 0 (first page).
pageSizeNumber of entries shown on the current page.
totalEntriesTotal number of ledger entries available for the customer.
pageCountTotal number of pages according to the page size.
eventLogIdUnique log ID of the current event.
eventNameName of the event associated with the points. Example - TransactionAdd, PointsRedemption, DelayedAccrual, PointsExpiry, CustomerRegistration, ReturnBill.
ledgerCreatedDateDate and time when the points ledger entry was created.
entryDetailsDetails of the points ledger.
ledgerClosingBalanceDetails of closing ledger balance on a specific date.
pointsCategoryCategory from which points are issued. Supported values: Main (redeemable account), DelayedAccrualPointCategory (promised points), ExternalTriggerBasedPointCategory (promised points).
programNameName of the loyalty program associated with points.
programIdUnique ID of the loyalty program.
closingBalanceAvailable closing balance on that particular end date.
netPointsOnEventNet points in the current event (by adding credits and subtracting debits).
transactionDetailsTransaction details of the current points. Applicable for transaction related events.
transactionIdTransaction ID associated with the points.
transactionNumberTransaction number associated with the points.
dateDate of the transaction.
amountNet transaction amount.
storeName of the store associated with the points.
storeCodeUnique code of the store associated with points.
tillCodeUnique TILL code associated with points.

Response parameter (User group)

ParameterDescription
ledgerDetailsContains details about the pagination of the ledger entries.
pageNumberThe current page number in the pagination.
pageSizeThe number of entries per page in the pagination.
totalEntriesThe total number of entries in the ledger.
pageCountThe total number of pages in the pagination.
ledgerEntriesAn array containing the ledger entries.
eventLogIdA unique identifier for the event.
eventNameThe name of the event.
customerIdThe identifier of the customer associated with the event.
ledgerCreatedDateThe date and time when the ledger entry was created.
customerDetailsDetails of the customer.
entryDetailsAn array containing the details about the ledger entry.
ledgerEntryTypeThe type of the ledger entry.
pointsThe number of points associated with the entry.
pointsCategoryThe category of the points.
programNameThe name of the program associated with the entry.
programIdThe identifier of the program is associated with the entry.
netPointsOnEventThe net points associated with the event.
transactionDetailsDetails about the transaction.
storeThe store associated with the event.
storeCodeThe code of the store associated with the event.
tillCodeThe code of the till associated with the event.
eventDetailsDetails about the event.
reasonThe reason for the event.
warningsAn array containing any warning messages.
Language
Authorization
Basic
base64
:
URL
Click Try It! to start a request and see the response here!