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
| Parameter | Type | Example | Required | Description |
|---|---|---|---|---|
| rel_id | int | 3 | Yes | Relation ID |
| profile_id | string | "669e6968ebf4ac52b623a997" | Yes, if no other search type is specified | Profile identifier from database A for the search |
| 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
{
"rel_id": 2,
"profile_id": "669e6968ebf4ac52b623a997"
}
<xml>
<rel_id>2</rel_id>
<profile_id>669e6968ebf4ac52b623a997</profile_id>
</xml>
Response example
- JSON
- XML
{
"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
}
<xml>
<data>
<profile_id_a>669e6968ebf4ac52b623a997</profile_id_a>
<xxh_a>5af1023c84f66195</xxh_a>
<profile_id_b>6751b8f1c5e3db9bcb75befa</profile_id_b>
<xxh_b>879cebbb0e6b6723</xxh_b>
<db_b>9</db_b>
<props>
<exr>
<value>11323123</value>
</exr>
</props>
</relation>
</data>
<error>0</error>
<error_text>Successful operation</error_text>
<total_count>1</total_count>
</data>
<error>0</error>
<error_text>Successful operation</error_text>
</xml>