Skip to main content

Get profile relations info

Description

The request brings a list of all existing links for the specified profile from the database A, including identifiers of linked profiles, types of links and their characteristics.

URL

Method: POST.

https://example.com/api/v1.1/relations/get

Request parameters

ParameterTypeExampleRequiredDescription
tokenstring"abcdefghijklmnqrstuvwxyz"YesAPI token
rel_idint3YesRelation ID
profile_idstring"669e6968ebf4ac52b623a997"Yes, if no other search type is specifiedProfile identifier from database A for the search
Profile matching mode
matchingstring"email"
"email_profile"
"phone"
"profile_id"
"custom"
No, if matched by email from profile or subscriptionsProfile matching mode
By default - email
emailstring"john@example.com""matching":"email" - both profile data and subscriptions
"matching":"email_profile" - profile data only
Email address
phonestring"+79000000000""matching":"phone"Phone number
profile_idstring"abcdefghijklmnqrstuvwxyz""matching":"profile_id"Profile ID
field_namestring"CRM_ID""matching":"custom"Custom profile data field name
field_valueint/string"123420""matching":"custom"

Custom profile data field value.

Searching by combination of tags is available for tag type profile fields. Values are recorded as a string: "tag-1, tag-2".

resource_idint24NoResource ID for email and phone matching

Request example

{
"token": "8a28168486844c8bae2673a51d4433ff",
"rel_id": 2,
"profile_id": "669e6968ebf4ac52b623a997"
}

Response example

{
"data": [
{
"profile_id_a": "669e6968ebf4ac52b623a997",
"xxh_a": "5af1023c84f66195",
"profile_id_b": "6751b8f1c5e3db9bcb75befa",
"xxh_b": "879cebbb0e6b6723",
"db_b": 9,
"props": {
"exr": {
"value": 11323123
}
}
}
],
"error": 0,
"error_text": "Successful operation",
"total_count": 1
}

Response parameters

ParameterTypeDescription
errorintError code
error_textstringError message
dataobjectInformation about profile relations
data.profile_id_astringID of profile A (the profile to which the relation is directed)
data.xxh_astringHashed ID of profile A
data.profile_id_bstringID of profile B (the profile initiating the relation)
data.xxh_bstringHashed ID of profile B
data.db_bintID of the database containing profile B
data.propsobjectConnection properties
data.total_countintNumber of relations with other profiles