v1

latestOpenAPI 3.0.12026-07-24501176.6 MB

Get Customer Details

Retrieves the details of a customer from a specific source. Use embed to other parameters to fetch specific details required.

get/customers/{customerId}

Path parameters

customerIdinteger required

Unique ID of the customer to fetch details.

Query parameters

source'INSTORE' | 'MARTJACK' | 'WECHAT' | 'LINE' | 'ALL' required
accountIdstring
embedstring[]

Details to include in the response. Supported value: points, subscriptions, mlp, userGroup, gapDetails, promotionalPoints, expirySchedules, expiredPoints, customerImage, 'returnedPoints', 'associatedImages'

includedAllUserGroup2boolean

Pass true to see the customer details in all user groups.

userGroup2Idinteger

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

includedUserGroup2LoyaltyDetailsboolean

Pass true to include loyalty details of user groups.

includedFraudDetailsboolean

Pass true to include fraud details of the customer in the response.

includedOnlyCurrentProfileboolean

Pass true to fetch details of the current source. It hides information from other sources.

ug2JoinedStartDatestring date

Start date for filtering customers who joined user groups.

ug2JoinedEndDatestring date

End date for filtering customers who joined user groups.

ug2Offsetinteger

Specifies the offset for pagination of user group results.

ug2Limitinteger

Sets the maximum number of results to retrieve per page for user groups.

ug2SortBystring

Specifies the field by which the user group results should be sorted.

ug2SortOrder'ASC' | 'DESC'

Specifies the sorting order for the user group results.

ug2PaginationDetailsboolean

Pass true to include pagination details for user groups.

Headers

X-CAP-API-OAUTH-TOKENstring required
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
OR

Example response

{
  "id": 17742,
  "profiles": [
    {
      "firstName": "Tom",
      "lastName": "Sawyer",
      "attribution": {
        "createDate": "2016-06-23T19:11:18+08:00",
        "createdBy": {
          "code": "rr.till",
          "name": "rr.till",
          "type": "TILL"
        },
        "modifiedBy": {
          "code": "rr.till",
          "name": "rr.till",
          "type": "TILL"
        },
        "modifiedDate": "2016-08-12T18:50:23+08:00"
      },
      "fields": {
        "Gender": "Male",
        "Favorite Color": "Green"
      },
      "identifiers": [
        {
          "type": "line",
          "value": "lineAS6"
        }
      ],
      "commChannels": [
        {
          "type": "wechat",
          "value": "ojOPTwFOX-aBmdRlE9MHptPjt2w19",
          "primary": true,
          "verified": true
        }
      ],
      "source": "WECHAT",
      "userId": 17742,
      "accountId": "wechat-con1",
      "autoUpdateTime": "2016-08-12T18:50:23+08:00",
      "identifiersAll": [
        {
          "type": "mobile",
          "value": "916722173368"
        }
      ]
    }
  ],
  "loyaltyInfo": {
    "loyaltyType": "non_loyalty",
    "attributionV2": {
      "createDate": "2016-06-23T19:11:18+08:00",
      "createdBy": {
        "code": "rr.till",
        "name": "rr.till"
      },
      "modifiedBy": {
        "code": "rr.till",
        "name": "rr.till"
      },
      "modifiedDate": "2016-08-12T18:50:23+08:00"
    },
    "lifetimePurchases": 230
  },
  "extendedFields": {
    "city": "Bangalore",
    "gender": "Male"
  },
  "cardDetails": [
    {
      "cardId": 418,
      "issuedDate": "2021-11-23T10:01:33Z",
      "createdDate": "2021-11-23",
      "seriesName": "sushicard",
      "customerId": 341594630,
      "maxActiveCards": 60,
      "cardExternalId": "orea7",
      "extendedFields": {
        "advance_card_personalisation": "yes",
        "card_balance": 1000,
        "year_of_registration": 18
      },
      "customFields": {
        "cardname": "sushi",
        "cardscope": "global",
        "cardtype": "pro card"
      },
      "type": "DIGITAL",
      "cardNumber": "visasushi006",
      "seriesId": 23,
      "seriesCode": "422",
      "orgId": 50247,
      "entityId": 50016843,
      "statusInfo": {
        "createdBy": 50016843,
        "autoUpdateTime": "2021-11-23",
        "createdOn": "2021-11-23T10:01:33Z",
        "entityId": 418,
        "id": 478,
        "isActive": true,
        "labelId": 31,
        "label": "ACTIVE",
        "status": "ACTIVE"
      },
      "id": 418,
      "transactionNotAllowed": true
    }
  ]
}