v1

latestOpenAPI 3.0.12026-07-24501176.6 MB

Get Customer Details (copy)

Retrieves all the details of a customer. Use embed and other parameters to get a specific information as per needed.

get/customers/lookup/customerDetails

Query parameters

source'INSTORE' | 'MARTJACK' | 'WECHAT' | 'ALL' required

Source on which the customer identifier is available.

accountIdstring

Account ID for sources with multiple accounts.

embed'points' | 'subscriptions' | 'mlp' | 'promotionalPoints' | 'expirySchedules' | 'expiredPoints' | 'segments' | 'userGroup' | 'gapDetails' | 'customerImage' | 'cardLoyaltyDetails' | 'fleetParentDetails' | 'ignoreCardDetails' | 'customerStatus' | 'alternateCurrencies'

Details to be included in the response. <br>Values: points, subscriptions, mlp, promotionalPoints, expirySchedules, expiredPoints, segments, userGroup, gapDetails, customerImage, cardLoyaltyDetails, fleetParentDetails, ignoreCardDetails, customerStatus.

identifierName'mobile' | 'email' | 'externalId' | 'wechat' required

Identifier type used to get the customer details.

identifierValuestring required

Value of the specified identifier.

includedFraudDetailsboolean

Pass true to fetch fraud details of the customer if available.

includedUserGroup2LoyaltyDetailsboolean

Pass true to include group loyalty details in the response.

userGroup2Idinteger

Unique ID of the user group to fetch customer details of that specific group.

includedAllUserGroup2boolean

Pass true to fetch customer details across all the groups of the customer.

Headers

X-CAP-API-OAUTH-TOKENstring
languagestring

Specify the ISO language code to get customer level extended field details in your preferred language. For example, zh for Chinese, id for Indonesian, ar for Arabic. English is the default language.

Response

200

OR

Example response

{
  "id": 481220846,
  "profiles": [
    {
      "attribution": {
        "createDate": "2021-02-18T20:31:15+05:30",
        "createdBy": {
          "id": 12970395,
          "code": "sit.admin",
          "name": "sit.admin",
          "type": "TILL"
        },
        "modifiedBy": {
          "id": 12970395,
          "code": "sit.admin",
          "name": "sit.admin",
          "type": "TILL"
        },
        "modifiedDate": "2021-02-22T13:27:29+05:30"
      },
      "fields": {
        "ihcl_active": "true",
        "tcp_active": "true",
        "tierup_airasia": "2"
      },
      "identifiers": [
        {
          "type": "externalId",
          "value": "888555888555898855"
        }
      ],
      "commChannels": [
        {
          "type": "mobile",
          "value": "919999000001",
          "primary": true
        }
      ],
      "source": "INSTORE",
      "userId": 481220846,
      "autoUpdateTime": "2021-09-14T17:53:13+05:30",
      "identifiersAll": [
        {
          "type": "externalId",
          "value": "888555888555898855"
        }
      ]
    }
  ],
  "loyaltyInfo": {
    "loyaltyType": "loyalty",
    "attributionV2": {
      "createDate": "2021-02-18T20:31:15+05:30",
      "createdBy": {
        "id": 12970395,
        "code": "sit.admin",
        "name": "sit.admin",
        "type": "TILL"
      },
      "modifiedBy": {
        "id": 12970395,
        "code": "sit.admin",
        "name": "sit.admin",
        "type": "TILL"
      },
      "modifiedDate": "2021-02-22T13:27:29+05:30",
      "createdFromSource": "instore"
    },
    "lifetimePurchases": 24000
  },
  "fraudDetails": {
    "modifiedOn": "2019-09-23T15:13:14+05:30",
    "status": "NOT_FRAUD"
  },
  "associatedWith": "sit.admin",
  "extendedFields": {
    "city": "Bangalore",
    "gender": "Male"
  },
  "loyaltyProgramDetails": [
    {
      "cumulativePurchases": 24000,
      "loyaltyId": 143032714,
      "currentSlab": "Default",
      "nextSlabSerialNumber": -1,
      "slabSNo": 1,
      "slabExpiryDate": "2121-02-18T23:59:59+05:30",
      "programId": 1414,
      "programTitle": "Tata Digital SITDefaultProgram",
      "programDescription": "Default program for Tata Digital SIT",
      "programPointsToCurrencyRatio": 1
    }
  ],
  "groupLoyaltyProgramDetails": [
    {
      "groupProgramId": 1414,
      "title": "Tata Digital SITDefaultProgram",
      "description": "Default program for Tata Digital SIT",
      "programsList": [
        {
          "id": 1414,
          "name": "Tata Digital SITDefaultProgram",
          "description": "Default program for Tata Digital SIT"
        }
      ],
      "lifetimePoints": 420,
      "loyaltyPoints": 420,
      "pointsToCurrencyRatio": 1
    }
  ]
}