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 |
|---|---|---|---|---|
| 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 | "example@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
- JSON
- XML
{
"db_id": 1,
"email": "example@example.com"
}
<xml>
<db_id>1</db_id>
<email>example@example.com</email>
</xml>
Response example
- JSON
- XML
{
"data": {
"LOYALTY_SCORE": 500,
"New_field_7": "00016",
"_acid": "FBFLR5Z8BxgvNPxBJZgL",
"_bdate": "1990-07-06T11:15:25.526Z",
"_browser": "Chrome",
"_city": "Beijing",
"_click_exist": false,
"_click_push_exist": false,
"_click_sms_exist": false,
"_confirm_exist": false,
"_country": "CN",
"_createtime": "2024-04-08T10:48:05.418Z",
"_deliv_date": "2024-04-18T10:18:29.809Z",
"_deliv_exist": true,
"_deliv_push_exist": false,
"_deliv_sms_date": "2024-05-06T10:00:05.548Z",
"_deliv_sms_exist": true,
"_domaingroup": "other",
"_emaildomain": "example.com",
"_fname": "Christopher",
"_ip": "106.12.21.70",
"_is_desktop": true,
"_is_test": true,
"_lat": 34.7732,
"_lname": "Lambert",
"_lon": 113.722,
"_md5": "1118e73b34d3f9a9030b9e4da6dcfb29",
"_open_date": "2024-04-18T10:18:29.727Z",
"_open_exist": true,
"_open_push_exist": false,
"_os": "Windows 10",
"_pixel_open_exist": false,
"_platform": "Other",
"_postal_code": "17",
"_ps_wf": [
12,
11,
10
],
"_ps_wfs": [
{
"di": "2024-04-08T10:48:07.093Z",
"do": "2024-04-13T10:48:22.359Z",
"et": "",
"ln": 8,
"s": 1,
"wId": 12
},
{
"di": "2024-04-08T19:35:04.15Z",
"do": "2024-04-12T19:37:19.821Z",
"et": "",
"ln": 8,
"s": 1,
"wId": 11
},
{
"di": "2024-04-16T14:42:49.063Z",
"do": "2024-04-17T14:42:52.438Z",
"et": "",
"ln": 8,
"s": 1,
"wId": 10
}
],
"_read_date": "2024-04-18T10:18:29.727Z",
"_read_exist": true,
"_regdate": "2024-04-08T10:48:05.418Z",
"_region": "Beijing",
"_reply_exist": false,
"_send_date": "2024-04-10T09:32:06.275960407Z",
"_send_exist": true,
"_send_push_exist": false,
"_send_sms_date": "2024-04-12T12:17:05.995339508Z",
"_send_sms_exist": true,
"_sex": 1,
"_status": 0,
"_subscribetime": "2024-04-08T10:48:05.418Z",
"_tz": "Asia/Shanghai",
"_undeliv_date": "2024-04-17T11:49:42.098Z",
"_undeliv_exist": true,
"_updatetime": "2024-04-19T14:25:22.185Z",
"_xxh": "5ce324d8407a8e2b",
"_xxm": 8507,
"db_id": 1,
"email": "example@example.com",
"id": "6613cb65dc4594c2934db63f",
"phones": [
"+79568150396"
],
"subscriptions": [
{
"resource_id": 24,
"channel": "email",
"email_data": {
"email": "example@example.com",
"domain": "example.com",
"domain_group": "other",
"md5": "1118e73b34d3f9a9030b9e4da6dcfb29"
},
"priority": 0,
"status": "unsubscribed",
"reg_info": {
"date": "2024-04-10T09:28:55.743Z"
},
"hash_id": "4a3c5813",
"is_delete": false
},
{
"resource_id": 25,
"channel": "sms",
"phone_data": {
"phone": "+79568150396",
"md5": "06ec7f059dae6f002d06a2f62a4320d8"
},
"priority": 0,
"status": "subscribed",
"reg_info": {
"date": "2024-04-12T12:16:44.086Z"
},
"hash_id": "f67a97c1",
"is_delete": false
}
],
"unsub": {
"c": 115,
"dt": "2024-04-18T10:18:29.727Z",
"m": 15
}
},
"error": 0,
"error_text": "Successful operation"
}
<xml>
<data>
<CRM_ID>66</CRM_ID>
<LOYALTY_SCORE>500</LOYALTY_SCORE>
<_acid>HWbGhUN1jKAdY8iNjdYf</_acid>
<_browser>Chrome</_browser>
<_city>St Petersburg</_city>
<_click_exist>false</_click_exist>
<_click_push_exist>false</_click_push_exist>
<_click_sms_exist>false</_click_sms_exist>
<_confirm_exist>false</_confirm_exist>
<_country>RU</_country>
<_createtime>2024-04-08T10:24:09.087Z</_createtime>
<_deliv_date>2024-05-06T10:00:06.623Z</_deliv_date>
<_deliv_exist>true</_deliv_exist>
<_deliv_push_exist>false</_deliv_push_exist>
<_deliv_sms_date>2024-05-06T10:00:05.274Z</_deliv_sms_date>
<_deliv_sms_exist>true</_deliv_sms_exist>
<_domaingroup>other</_domaingroup>
<_emaildomain>example.com</_emaildomain>
<_fname>Alina</_fname>
<_ip>92.53.90.8</_ip>
<_is_desktop>true</_is_desktop>
<_is_mobile>true</_is_mobile>
<_is_test>true</_is_test>
<_lat>59.939095</_lat>
<_lname>Lambert</_lname>
<_lon>30.315868</_lon>
<_md5>c5278382ce8972b4cd23b447c0e58989</_md5>
<_open_date>2024-05-06T10:00:06.481Z</_open_date>
<_open_exist>true</_open_exist>
<_open_push_exist>false</_open_push_exist>
<_os>Windows 10</_os>
<_pixel_open_exist>false</_pixel_open_exist>
<_platform>Other</_platform>
<_postal_code>1042</_postal_code>
<_ps_wf>12</_ps_wf>
<_ps_wf>11</_ps_wf>
<_ps_wfs>
<di>2024-04-08T10:24:10.069Z</di>
<do>2024-04-19T10:24:43.381Z</do>
<et/>
<ln>8</ln>
<s>1</s>
<wId>12</wId>
</_ps_wfs>
<_ps_wfs>
<di>2024-04-08T19:35:04.091Z</di>
<do>2024-04-18T19:37:37.428Z</do>
<et/>
<ln>8</ln>
<s>1</s>
<wId>11</wId>
</_ps_wfs>
<_read_date>2024-05-06T10:00:06.481Z</_read_date>
<_read_exist>true</_read_exist>
<_regdate>2024-04-08T10:24:09.087Z</_regdate>
<_region>Saint Petersburg</_region>
<_reply_exist>false</_reply_exist>
<_sbounce_date>2024-04-28T10:00:03.452Z</_sbounce_date>
<_sbounce_exist>true</_sbounce_exist>
<_send_date>2024-04-10T09:32:05.531223661Z</_send_date>
<_send_exist>true</_send_exist>
<_send_push_exist>false</_send_push_exist>
<_send_sms_date>2024-04-18T11:14:02.172438444Z</_send_sms_date>
<_send_sms_exist>true</_send_sms_exist>
<_status>0</_status>
<_subscribetime>2024-04-08T10:24:09.087Z</_subscribetime>
<_tz>Europe/Moscow</_tz>
<_undeliv_date>2024-04-17T11:49:39.091Z</_undeliv_date>
<_undeliv_exist>true</_undeliv_exist>
<_undeliv_sms_date>2024-04-22T10:00:02.62Z</_undeliv_sms_date>
<_undeliv_sms_exist>true</_undeliv_sms_exist>
<_updatetime>2024-04-18T12:36:31.7Z</_updatetime>
<_xxh>507a01069df7046e</_xxh>
<_xxm>7902</_xxm>
<db_id>1</db_id>
<email>example@example.com</email>
<id>6613c5c94a5d12bd6cc09171</id>
<phones>+79006574081</phones>
<subscriptions>
<channel>email</channel>
<email_data>
<domain>example.com</domain>
<domain_group>other</domain_group>
<email>example@example.com</email>
<md5>c5278382ce8972b4cd23b447c0e58989</md5>
</email_data>
<hash_id>fcc69fe5</hash_id>
<is_delete>false</is_delete>
<priority>0</priority>
<reg_info>
<date>2024-04-10T09:28:55.706Z</date>
</reg_info>
<resource_id>24</resource_id>
<status>subscribed</status>
</subscriptions>
</data>
<error>0</error>
<error_text>Successful operation</error_text>
</xml>
Response parameters
Main fields
| Parameter | Type | Description |
|---|---|---|
error | int | Error code. 0 — successful operation |
error_text | string | Error text |
data | object | Profile data |
data object
Contains information about the profile: contact data, geolocation, data on interactions with messages, and other information.
| Parameter | Type | Description |
|---|---|---|
id | string | Unique profile identifier (MongoDB ObjectId) |
db_id | int | Database identifier |
email | string | Profile email address |
phones | array | Profile phone numbers |
_status | int | Global subscription status |
_is_test | bool | Test profile flag. Returns true if the profile was created in test mode |
gcg_is_exists | bool | Duplicate of the _flags.gcg_is_exists flag: whether the profile is currently in the global control group |
_fname | string | First name |
_lname | string | Last name |
_bdate | string | Birth date in RFC 3339 format |
_sex | int | Gender (according to the gender identities list) |
_avatar_set | bool | Indicates whether the profile avatar is set |
_city | string | City. Returned when geolocation data is available |
_country | string | Country in TLD format. Returned when geolocation data is available |
_region | string | Region. Returned when geolocation data is available |
_postal_code | string | Postal code. Returned when geolocation data is available |
_lat | float | Geographic latitude. Returned when geolocation data is available |
_lon | float | Geographic longitude. Returned when geolocation data is available |
_tz | string | Time zone |
_regdate | string | Profile registration date in RFC 3339 format |
_createtime | string | Profile creation time in RFC 3339 format |
_subscribetime | string | Subscription time in RFC 3339 format |
_updatetime | string | Time of the last profile update in RFC 3339 format |
_ip | string | IP address. Returned when tracking data is available |
_browser | string | Browser. Returned when tracking data is available |
_os | string | Operating system. Returned when tracking data is available |
_platform | string | Platform. Returned when tracking data is available |
_is_desktop | bool | Indicates whether a desktop device is used. Returned when tracking data is available |
_is_mobile | bool | Indicates whether a mobile device is used. Returned when tracking data is available |
_emaildomain | string | Email address domain |
_domaingroup | string | Domain group |
_acid | string | Unique Altcraft identifier |
_md5 | string | MD5 hash of the email address |
_xxh | string | XXH hash profile identifier |
_xxm | int | XXH hash profile identifier (numeric representation) |
_send_exist | bool | Indicates whether an email was sent |
_send_date | string | Date of the last email send in RFC 3339 format. Returned when a send exists |
_deliv_exist | bool | Indicates whether an email was delivered |
_deliv_date | string | Date of the last email delivery in RFC 3339 format. Returned when a delivery exists |
_open_exist | bool | Indicates whether an email was opened |
_open_date | string | Date of the last email open in RFC 3339 format. Returned when an open exists |
_read_exist | bool | Indicates whether an email was read |
_read_date | string | Date of the last email read in RFC 3339 format. Returned when a read exists |
_click_exist | bool | Indicates whether a link in an email was clicked |
_click_date | string | Date of the last link click in an email in RFC 3339 format. Returned when a click exists |
_confirm_exist | bool | Indicates whether the subscription was confirmed |
_confirm_date | string | Date of the last subscription confirmation in RFC 3339 format. Returned when a confirmation exists |
_reply_exist | bool | Indicates whether an email was replied to |
_reply_date | string | Date of the last email reply in RFC 3339 format. Returned when a reply exists |
_sbounce_exist | bool | Indicates whether a soft bounce (temporary delivery failure) occurred |
_sbounce_date | string | Date of the last soft bounce in RFC 3339 format. Returned when a soft bounce exists |
_undeliv_exist | bool | Indicates whether an email was not delivered |
_undeliv_date | string | Date of the last email non-delivery in RFC 3339 format. Returned when a non-delivery exists |
_pixel_open_exist | bool | Indicates whether the tracking pixel fired |
_pixel_date | string | Date of the last pixel firing in RFC 3339 format. Returned when a firing exists |
_send_sms_exist | bool | Indicates whether an SMS was sent |
_send_sms_date | string | Date of the last SMS send in RFC 3339 format. Returned when a send exists |
_deliv_sms_exist | bool | Indicates whether an SMS was delivered |
_deliv_sms_date | string | Date of the last SMS delivery in RFC 3339 format. Returned when a delivery exists |
_click_sms_exist | bool | Indicates whether a link in an SMS was clicked |
_click_sms_date | string | Date of the last link click in an SMS in RFC 3339 format. Returned when a click exists |
_undeliv_sms_exist | bool | Indicates whether an SMS was not delivered |
_undeliv_sms_date | string | Date of the last SMS non-delivery in RFC 3339 format. Returned when a non-delivery exists |
_send_push_exist | bool | Indicates whether a push notification was sent |
_send_push_date | string | Date of the last push notification send in RFC 3339 format. Returned when a send exists |
_open_push_exist | bool | Indicates whether a push notification was opened |
_open_push_date | string | Date of the last push notification open in RFC 3339 format. Returned when an open exists |
_read_push_exist | bool | Indicates whether a push notification was read |
_read_push_date | string | Date of the last push notification read in RFC 3339 format. Returned when a read exists |
_deliv_push_exist | bool | Indicates whether a push notification was delivered |
_deliv_push_date | string | Date of the last push notification delivery in RFC 3339 format. Returned when a delivery exists |
_click_push_exist | bool | Indicates whether a push notification was clicked |
_click_push_date | string | Date of the last push notification click in RFC 3339 format. Returned when a click exists |
_ps_wf | array | Identifiers of marketing scenarios the profile participated in |
_ps_wfs | array of objects | Details of participation in marketing scenarios (see the _ps_wfs object) |
_segs | array | Identifiers of static segments the profile belongs to |
_flags | object | Profile flags (see the _flags object) |
subscriptions | array of objects | Profile subscriptions to resources (see the subscriptions array) |
unsub | object | Profile unsubscription data (see the unsub object) |
In addition to standard fields, custom database fields may be present in the response. Their names and types depend on the structure of the specific database. Information about database fields can be obtained via /api/v1.1/databases/fields_get/.
subscriptions array
Contains profile subscriptions to resources. One object is one subscription.
| Parameter | Type | Description |
|---|---|---|
resource_id | int | Resource identifier |
channel | string | Channel type (email, sms, push, whatsapp, viber, telegram_bot, notify) |
email_data | object | Email subscription data. Returned for the email channel |
phone_data | object | SMS subscription data. Returned for the sms channel |
priority | int | Subscription priority |
status | string | Subscription status |
reg_info | object | Subscription registration information |
hash_id | string | Subscription hash identifier |
is_delete | bool | Indicates whether the subscription is deleted |
email_data — Email subscription data
| Parameter | Type | Description |
|---|---|---|
email | string | Email address |
domain | string | Email domain |
domain_group | string | Domain group |
md5 | string | Email MD5 hash |
phone_data — SMS subscription data
| Parameter | Type | Description |
|---|---|---|
phone | string | Phone number |
md5 | string | Phone MD5 hash |
reg_info — Subscription registration information
| Parameter | Type | Description |
|---|---|---|
date | string | Registration date in RFC 3339 format |
unsub object
Contains profile unsubscription data. Returned when unsubscription data is available.
| Parameter | Type | Description |
|---|---|---|
c | int | Number of unsubscriptions |
dt | string | Date of the last unsubscription in RFC 3339 format |
m | int | Identifier of the message the profile unsubscribed from |
_flags object
Contains profile flags: participation statuses in the global control group and channel action flags.
| Parameter | Type | Description |
|---|---|---|
channel_actions.email | object | Email channel action flags (send, deliv, open, read, click, confirm, confirmsub, reply, unsub) |
channel_actions.push | object | Push channel action flags (send, deliv, open, click) |
channel_actions.sms | object | SMS channel action flags (send, deliv, click, unsub) |
gcg_is_exists | bool | Indicates whether the profile is currently in the global control group |
gcg_ca_is_exists | bool | Indicates whether the profile is in the global control group audience |
gcg_once_is_exists | bool | Indicates whether the profile has ever been in the global control group |
gcg_is_from_file | bool | Indicates whether the profile was added to the global control group using the "from file" method |
scamp_once_exist | bool | Indicates whether the profile has ever been in a campaign audience |
web_actions.pixel_open | bool | Indicates whether the web pixel fired |
_ps_wfs object (array element)
Contains information about the profile's participation in marketing automation scenarios.
| Parameter | Type | Description |
|---|---|---|
wId | int | Automation scenario identifier |
di | string | Date the profile entered the scenario in RFC 3339 format |
do | string | Date the profile exited the scenario in RFC 3339 format. Returned when the participation is completed |
et | string | Reason for exiting the scenario |
ln | int | Number of the last passed step (node) of the scenario |
s | int | Profile participation status in the scenario |