v1

latestOpenAPI 3.0.12026-07-24501176.6 MB

Get Points Ledger Information in Connected Orgs

get/v2.1/pointsLedger/getCustomerLedgerInfo

Query parameters

identifierNamestring required

Identifier type to identify the customer or group. For user groups, the following identifiers are applicable: groupId, externalId, and primaryUserId. For customers, the applicable identifiers include mobile, email, externalId, cuid, and id.

identifierValuestring required

Value of the specified identifier type of the customer.

sourcestring required

Source in which the identifier is available.

accountIdstring

For a source with multiple accounts, pass the specific accountId in which the customer identifier is available.

tillIdinteger

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

limitinteger

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

offsetinteger

Page number to show.

programIdinteger

Retrieve the ledger details of a specific program. By default, details of all programs will be retrieved.

startDatestring

Get ledger information from on or after a specific date. Pass the start date in YYYY-MM-DDThh:mm:ss format. Default value is 90 days

endDatestring

Get ledger information until a specific date. Pass the end date in YYYY-MM-DDThh:mm:ss format. Default value is 90 days

includeTillConceptEventsboolean

Pass 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.

ledgerEntryTypestring

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

pointCategoryTypestring

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

typestring

Setting this field returns entries for type of user, whether individual customer or a group. Only two values are allowed here - CUTSOMER, USERGROUP2

isPrimaryUserboolean

Returns entry for the primary member of a group, in case of usergroups.

excludeEventsstring

Exclude certain events if you dont want to retrieve entries from that event.

eventFilterstring

Retrieves the value of that particular event, which is passed in this filed. Eg. TransactionAdd, CustomerRegistration etc.

rolesstring

These are the roles defined by the brands for members in a user group. For example, PRIMARY, SECONDARY, and so on.

includeLastOneYearDataboolean

If 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.

orderstring

Sort the order of entries from date. ASC or DESC

isFilterBasedOnDateboolean

Indicates whether the date filter should be applied when fetching data from the database.

includeAlternateCurrenciesboolean

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

alternateCurrencyNamesstring

Filter 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.

Headers

DATA-SCOPE-ORGstring

List of Organization IDs

DATA-SCOPEstring required

The scope to authorize access (SELF, OTHER, ALL)

Response

200

Example response

{
  "customerDetails": {
    "firstName": "Sushant",
    "lastName": "Raj",
    "userId": 347297848,
    "entityType": "CUSTOMER"
  },
  "ledgerDetails": {
    "pageSize": 10,
    "totalEntries": 2,
    "pageCount": 1
  },
  "ledgerEntries": [
    {
      "eventLogId": 13499091,
      "eventName": "TransactionAdd",
      "customerId": 347297848,
      "ledgerCreatedDate": "Fri Aug 30 11:17:57 GMT 2024",
      "entryDetails": [
        {
          "ledgerEntryType": "CREDIT",
          "points": "100.000",
          "pointsCategory": "Main",
          "programName": "ChildOrg1DefaultProgram",
          "programId": 1148
        }
      ],
      "netPointsOnEvent": "100.000",
      "transactionDetails": {
        "transactionId": 36363905,
        "transactionNumber": "1725016677",
        "date": "2024-08-30 11:17:57.0",
        "amount": 5000,
        "grossBillAmount": 5000,
        "source": "instore"
      },
      "store": "Store1",
      "storeCode": "store1",
      "tillCode": "childorgtill1",
      "sourceProgramId": 1148,
      "sourceProgramName": "ChildOrg1DefaultProgram",
      "orgId": 50406
    }
  ]
}