Get Profile API
This page talks about how to use HCL CDP User Profile API to pull data from HCL CDP.
What is the Get Profile API?
The Get Profile API retrieves user profile information and associated segments based on a specified campaign and tenant ID.
Authentication
In any of the API requests, pass the mandatory parameters as below in the authentication request header.
Request headers:
| Parameter | Type | Description |
| auth_key | String | API key for authentication. Shared by HCL CDP |
Endpoints
GET
/getProfileAndSegments?campaign=%3CTenantID%3E&key=%3CKey%3E&lock_type=none&auth_key=%3CAuthKey%3E&lookup=multi
Sample Endpoint URL:
GET
https://<base_url>/api/v1/getProfileAndSegments?campaign=<TenantID>&key=<KEY>&lock_type=none&auth_key=<AuthKey>&lookup=multi
Get the profile of the user which includes online behavioral data and third-party taxonomy data.
Query String parameters:
| Parameter | Type | Description |
| key | String | The identifier for the user. It can be either of HCL CDP Cookie or hashed crmid or hashed email-id or hashed phone number. |
| campaign | String | The ID of the campaign (Tenant ID). |
| lock_type | String | The type of lock (default is "none"). |
| auth_key | String | The authentication key Shared by HCL CDP. |
| lookup | String | Type of lookup, e.g., "multi" |
Response Content-Type: application/json
Response body parameters:
| Parameter | Type | Description |
| message | String | The status of the request. “Success” in case of 200 OK response. |
| data | JSON | The profile data in JSON format. The attributes of data mentioned below |
Example Request:
GET https://<base_url>/api/v1/getProfileAndSegments?campaign=ABCVFM6325&key=959465553364&lock_type=none&auth_key=L8sgGeRcnfjf1BDTFNyT6Ej8NvE&lookup=multi
Response:
{
"data": {
"seg": {
"segList": [
{
"94698": "testSegment"
},
{
"94697": "citySegment"
}
]
},
"pf": {
"key_type": "crmid",
"city": "Nashik,India",
"ls": "2024-09-17-08:45:19",
"dtyp": "DESKTOP",
"mid": "b3b52310-c297-4e6a-9253-cd7eca8637b2",
"cont_uaov": "Windows 11",
"typ": "track",
"oid": [
{
"id": "viz_66682a576100335",
"type": "vizid",
"ts": 1726562719544
}
],
"sourcets": "2024-09-17-08:45:19",
"fs": "2024-09-17-08:33:06",
"crmid": "85748556955",
"cont_libnm": "javascript",
"actts": 1726562619518,
"cont_libv": "0.02",
"evnt": [
"ccSubmit"
],
"wosvs": {
"Windows 11": {
"ts": "2024-09-17-08:45:19.541"
}
},
"key": "85748569955",
"cont_ip": "103.182.196.1",
"apid": "b3b52319-c287-4e6a-9253-cd7eca8637b2",
"cont_servts": 1726562519518,
"cont_uabrv": "Chrome",
"lastname": "Sunil R",
"zipcode": "422009",
"vizid": "viz_66683a476100335",
"wotyp": {
"Windows": {
"ts": "2024-09-17-08:45:19.542"
}
},
"cont_uaot": "Windows",
"lsts": "2024-09-17-08:45:19",
"name": "Yes1",
"tpv": "5.0",
"cont_srcid": "1223",
"nm": []
}
},
"id": "20osya3LIJ3hvXWROKzy",
"key": "85748556955"
}