v1

latestOpenAPI 3.0.12026-07-24501176.6 MB

Get Customer Loyalty Details

Retrieves the loyalty information of a customer across all loyalty programs of the org . You can also fetch details of a specific loyalty program.

get/customers/lookup/loyaltyDetails

Query parameters

programIdinteger

Unique ID of the program to get loyalty details of a specific program.

source'INSTORE' | 'WECHAT' | 'MARTJACK' | 'WEB_ENGAGE' | 'JD' | 'TAOBAO' | 'TMALL' | 'FACEBOOK' | 'WEBSITE' | 'OTHERS' | '' required

Source in which the customer details are available.

accountIdstring

For sources with multiple accounts (such as MARTJACK, WECHAT), pass the respective account ID. Not applicable for INSTORE source.

identifierName'mobile' | 'email' | 'externalId' | 'id' | 'wechat' | 'martjackId' | 'fbId' | 'cardnumber' | 'cardExternalId' required

Registered identifier name of the customer with respect to the source.

identifierValuestring required

Pass the respective identifier value. For example if identifierType is mobile, identifierValue is mobile number.

includedAllFleetGroupboolean

Pass true to include loyalty details of all groups. By default, it shows the loyalty details associated with the till.

fleetGroupIdinteger

Unique ID of the fleet group to get the customer's loyalty details for a specific group.

Response

200

Example response

{
  "data": [
    {
      "cumulativePurchases": 24000,
      "loyaltyId": 143032714,
      "currentSlab": "Default",
      "nextSlabSerialNumber": -1,
      "slabSNo": 1,
      "slabExpiryDate": "2121-02-18T23:59:59+05:30",
      "programId": 1414
    }
  ]
}