Get profile data
Description
Retrieves customer profile data, including database fields and subscriptions.
Request URL
Method: POST
https://example.com/api/v1.1/profiles/get/
Request parameters
Parameter | Type | Example | Required | Description |
---|---|---|---|---|
token | string | "abcdefghijklmnqrstuvwxyz" | Yes | API token |
db_id | int | 1 | Yes | Database ID |
Profile matching mode | ||||
matching | string | "email" "email_profile" "email_sub" "phone" "phone_sub" "profile_id" "push_sub" "custom" "custom_sub" "email_phone" "email_phone_sub" | No, if matched by email | Profile matching mode By default - email |
string | "john@example.com" | "matching":"email" | Email address | |
phone | string | "+79000000000" | "matching":"phone" | Phone number |
profile_id | string | "abcdefghijklmnqrstuvwxyz" | "matching":"profile_id" | Profile ID |
field_name | string | "CRM_ID" | "matching":"custom" | Custom profile data field name |
field_value | int/string | "123420" | "matching":"custom" | Custom profile data field value. tip Searching by combination of tags is available for tag type profile fields. Values are recorded as a string: "tag-1, tag-2". |
resource_id | int | 24 | No | Resource ID for email and phone matching |
Request example
{
"db_id": 1,
"email": "john@example.com",
"token": "abcdefghijklmnqrstuvwxyz"
}
Response example
{
"data": {
"_domaingroup": "other",
"_emaildomain": "example.org",
"_fname": "Marisa",
"_md5": "f42459cb52c9c307ba4a97d56182821c",
"_regdate": "2018-01-19T13:54:05.468Z",
"_status": 0,
"_xxh": "aa05bb4b309bec57",
"_xxm": 8663,
"custom_date": "2010-10-20T00:00:00Z",
"custom_enum": 4,
"Custom_ID": "bqHHwjZNjuioNKrV_1516370045348477",
"custom_ip": "8.8.8.8",
"custom_number": -888,
"custom_string": "マリサ",
"db_id": 24,
"email": "example@example.org",
"id": "5a61f87d69d42678a8dc6dd9",
"phones": [
"+508370045348179"
],
"subscriptions": [
{
"channel": "email",
"email_data": {
"domain": "example.org",
"domain_group": "other",
"email": "example_email@example.org",
"md5": "47f85837cc89cbe1818e7449af633750"
},
"hash_id": "37885611",
"is_delete": false,
"priority": 0,
"reg_info": {
"date": "2018-01-19T13:54:05.466Z"
},
"resource_id": 46,
"status": "subscribed"
},
{
"channel": "push",
"hash_id": "d8360fc4",
"is_delete": false,
"priority": 0,
"push_data": {
"provider": "IOSFirebase",
"subscription_id": "1516370045348387"
},
"reg_info": {
"date": "2018-01-19T13:54:05.466Z"
},
"resource_id": 48,
"status": "subscribed",
"custom_fields": {
"_browser_name": "Firefox",
"_device_type": "web",
"custom_field_1": "test value"
},
"cats": [
"category_1",
"category_2"
]
},
{
"channel": "sms",
"hash_id": "5d9bf5ff",
"is_delete": false,
"phone_data": {
"md5": "58c9e54c684e475decbc0eff5c05b6b9",
"phone": "+508370045348365"
},
"priority": 0,
"reg_info": {
"date": "2018-01-19T13:54:05.466Z"
},
"resource_id": 57,
"status": "subscribed"
}
]
},
"error": 0,
"error_text": "Successful operation"
}
Response parameters
Parameter | Type | Description |
---|---|---|
data | JSON object | Profile data |
error | int | Error code |
error_text | string | Error text |