v1

latestOpenAPI 3.0.12026-07-24501176.6 MB

Get Customer Tier

Retrieves tier details of a customer for a single program or across all programs of the org.

This is a light API.

get/customers/lookup/tierDetails

Query parameters

source'FACEBOOK' | 'WEB_ENGAGE' | 'WECHAT' | 'INSTORE' | 'MARTJACK' | 'TMALL' | 'TAOBAO' | 'JD' | 'ECOMMERCE' | 'WEBSITE' | 'LINE' | 'MOBILE_APP' required

Source in which the customer identifier is available.

accountIdstring

Account in which the customer details are available (Required only for sources with multiple accounts).

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

Identifier type used for the customer.

identifierValuestring required

Value of the respective identifier. For example if identifierName is email, then the identifierValue needs to be the email ID of the customer.

programIdinteger

Unique ID of the loyalty program from which tier details need to retrieve. If not passed, it shows the points balance in the default program.

entityType'CUSTOMER' | 'FLEET'

Pass CUSTOMER to fetch tier details of the individual, FLEET to fetch details of the user group. Default value is CUSTOMER.

fetchDataForAllProgramsboolean

Pass true to fetch tier details from all the available programs of the org. Default value is false.

Headers

X-CAP-API-OAUTH-TOKENstring

Response

200

entityIdinteger
entityTypestring

Example response

{
  "entityId": 374844123,
  "entityType": "CUSTOMER",
  "programTiers": [
    {
      "programId": 1933,
      "currentTierName": "C",
      "currentTierSerialNumber": 3,
      "tierExpiryDate": "2022-05-02 23:59:59",
      "nextTierSerialNumber": -1
    }
  ]
}