Get profile relations info
Description
Get information about a Database A profile's relations (initiated by Database B profiles) and their properties.
URL
Method: POST.
https://example.com/api/v1.1/relations/get_counter
Request parameters
Parameter | Type | Example | Required | Description |
---|---|---|---|---|
token | string | "abcdefghijklmnqrstuvwxyz" | Yes | API token |
rel_id | int | 3 | Yes | Relation ID |
Profile matching mode | ||||
matching | string | "email" "email_profile" "phone" "profile_id" "custom" | No, if matched by email from profile or subscriptions | Profile matching mode By default - email |
string | "john@example.com" | "matching":"email" - both profile data and subscriptions "matching":"email_profile" - profile data only | 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. |
resource_id | int | 24 | No | Resource ID for email and phone matching |
Request example
- JSON
- XML
{
"token": "abcdefghijklmnqrstuvwxyz",
"rel_id": 3,
"profile_id": "5d63dbdb439e7306b596c5d0"
}
<xml>
<token>abcdefghijklmnqrstuvwxyz</token>
<rel_id>3</rel_id>
<profile_id>5d63dbdb439e7306b596c5d0</profile_id>
</xml>
Response example
- JSON
- XML
{
"data": {
"profile_id": "669e6968ebf4ac52b623a997",
"profile_xxh": "5af1023c84f66195",
"props": {}
},
"error": 0,
"error_text": "Successful operation"
}
<xml>
<data>
<profile_id>669e6968ebf4ac52b623a997</profile_id>
<profile_xxh>5af1023c84f66195</profile_xxh>
<props/>
</data>
<error>0</error>
<error_text>Successful operation</error_text>
</xml>
Response parameters
Parameter | Type | Description |
---|---|---|
error | int | Error code |
error_text | string | Error text |
data | object | Profile relations info |
data.profile_id | string | Profile identifier |
data.profile_xxh | string | Hashed profile ID |
data.props | object | Relation properties |
Relation properties: numeric {#Getprofilerelationsinfo-Relationproperties:numeric}
Parameter | Type | Description |
---|---|---|
top | object | Property top records |
sum | int/float | Sum total of property values |