Get Details of Customers in Bulk

Fetch multiple customer profiles in one request by providing a list of customer IDs.

📘

Note

To fetch multiple customers, this endpoint must be called with a POST request and the list of customer IDs in the body. This API is intended for internal Capillary services and should not be used by external integrations.

Prerequisites

  • Authentication: Basic or OAuth credentials
  • Default access group

Resource information

URI/v2/bulk/getCustomers
HTTP MethodPOST
PaginationNA
Batch supportNA
Rate limit informationNA

Sample API cURL

curl --location 'https://eu.api.capillarytech.com/v2/bulk/getCustomers?format=json&format=json&identifierName=mobile&identifierValue=9400488244&source=WHATSAPP' \
--header 'Authorization: Basic Z2VvcmdlLmpvaG5zb246OTg4OTU2NWI4ODVhMmY4ZWE1MTk1MjA2NWEwYTEzNzg=' \
--header 'Content-Type: application/json' \
--header 'Cookie: _cfuvid=pG2dUTv9AmZsbCWt8RQ1DqWpR2Clfbg.S4lVYFcivvI-1726479424405-0.0.1.1-604800000; _cfuvid=TsciSMonFzukHfHftQcO_JuWhgCktLLqX53atcboO64-1749190644325-0.0.1.1-604800000' \
--data '[564332013,565338404]'

Request query parameters

NameTypeDescription
formatstringResponse format. Supported value: json.
identifierNamestringIdentifier type to match customers. Supported: mobile, email, externalId.
identifierValuestringValue for the chosen identifier (e.g., a mobile number or email address).
sourcestringOrigin of this request. Examples: WECHAT.
accountIdstringMerchant or application account ID

Response parameters

ParameterData TypeDescription
dataarrayList of individual customer‐fetch result objects (one per requested ID).
data.entity.idintegerInternal customer ID.
data.entity.profilesarrayArray of profile objects for this customer.
data.entity.loyaltyInfo.loyaltyTypestringLoyalty program type.
data.entity.loyaltyInfo.lifetimePurchasesnumberTotal purchase amount over the customer’s lifetime.
data.entity.segmentsobjectSegmentation attributes for the customer (key/value pairs).
data.entity.associatedWithstringTill or POS from which this customer was last associated.
data.entity.extendedFieldsobjectAdditional extended fields (key/value pairs) for this customer.
data.entity.cardDetailsarrayList of loyalty or payment card objects attached to this customer.
data.successbooleanTrue if this customer‐fetch succeeded; false otherwise.

Response body

{
  "data": [
    {
      "entity": {
        "id": 382137011,
        "profiles": [
          {
            "firstName": "firstName_2184396",
            "lastName": "lastName_2184396",
            "fields": {
              "gender": "MALE"
            },
            "allFields": {},
            "identifiers": [
              {
                "type": "email",
                "value": "[email protected]"
              },
              {
                "type": "mobile",
                "value": "918392184396"
              }
            ],
            "commChannels": [
              {
                "type": "email",
                "value": "[email protected]",
                "primary": true,
                "verified": true,
                "meta": {
                  "residence": true,
                  "office": false
                },
                "attributes": {}
              }
            ],
            "source": "WECHAT",
            "userId": 382137011,
            "accountId": "1234",
            "conflictingProfileList": [],
            "autoUpdateTime": "2024-09-16T11:59:27Z",
            "identifiersAll": [
              {
                "type": "email",
                "value": "[email protected]"
              },
              {
                "type": "mobile",
                "value": "918392184396"
              }
            ]
          }
        ],
        "loyaltyInfo": {
          "loyaltyType": "loyalty",
          "lifetimePurchases": 2400.0
        },
        "segments": {},
        "associatedWith": "staging2.till1",
        "extendedFields": {},
        "cardDetails": []
      },
      "warnings": [],
      "errors": [],
      "success": true
    },
    {
      "entity": {
        "id": 382137012,
        "profiles": [
          {
            "firstName": "firstName_9976383",
            "lastName": "lastName_9976383",
            "fields": {
              "gender": "MALE"
            },
            "allFields": {},
            "identifiers": [
              {
                "type": "mobile",
                "value": "918679976383"
              },
              {
                "type": "email",
                "value": "[email protected]"
              }
            ],
            "commChannels": [],
            "source": "WECHAT",
            "userId": 382137012,
            "accountId": "1234",
            "conflictingProfileList": [],
            "autoUpdateTime": "2024-09-16T11:59:32Z",
            "identifiersAll": [
              {
                "type": "mobile",
                "value": "918679976383"
              },
              {
                "type": "email",
                "value": "[email protected]"
              }
            ]
          }
        ],
        "loyaltyInfo": {
          "loyaltyType": "loyalty",
          "lifetimePurchases": 0.0
        },
        "segments": {},
        "associatedWith": "staging2.till1",
        "extendedFields": {},
        "cardDetails": []
      },
      "warnings": [],
      "errors": [],
      "success": true
    },
    {
      "entity": {
        "id": 382137013,
        "profiles": [
          {
            "firstName": "firstName_6268323",
            "lastName": "lastName_6268323",
            "fields": {
              "gender": "MALE"
            },
            "allFields": {},
            "identifiers": [
              {
                "type": "mobile",
                "value": "918746268323"
              },
              {
                "type": "email",
                "value": "[email protected]"
              }
            ],
            "commChannels": [
              {
                "type": "email",
                "value": "[email protected]",
                "primary": true,
                "verified": true,
                "meta": {
                  "residence": true,
                  "office": false
                },
                "attributes": {}
              }
            ],
            "source": "WECHAT",
            "userId": 382137013,
            "accountId": "1234",
            "conflictingProfileList": [],
            "autoUpdateTime": "2024-09-16T11:59:36Z",
            "identifiersAll": [
              {
                "type": "mobile",
                "value": "918746268323"
              },
              {
                "type": "email",
                "value": "[email protected]"
              }
            ]
          }
        ],
        "loyaltyInfo": {
          "loyaltyType": "loyalty",
          "lifetimePurchases": 100.0
        },
        "segments": {},
        "associatedWith": "staging2.till1",
        "extendedFields": {},
        "cardDetails": []
      },
      "warnings": [],
      "errors": [],
      "success": true
    }
  ],
  "warnings": [],
  "errors": []
}

API specific error codes

CodeDescriptionReason
400Invalid RequestThe request parameters or format were invalid.
404Resource not foundThe requested API endpoint or resource does not exist.
500UNEXPECTED_ERRORAn unexpected error occurred on the server.
Language
Credentials
Basic
base64
:
URL
Click Try It! to start a request and see the response here!