Merging multiple profiles
Description
Combining multiple profiles into a new profile or existing one.
caution
- The profiles generated by merging are not imports. Import trigger does not work on them.
- Email: localhost - as an absent field, it is created if necessary and is not copied to another profile.
- Not localhost email is copied like any other field, but in order to avoid any conflicts, it disappears from the source profile, changes to empty (that is, localhost).
Data field rules
The rules apply to the data objects inside each element of the source array and inside the destination object.
- The field value must be valid for the field type: numeric fields accept a number, "list" fields accept a variant name from the list or its ordinal number, etc. If the value does not match the field type (for example, a string that is not in the list of variants is passed to a list field), the request returns an error. Value formats for custom fields are listed in the Custom field value formats section.
- Only the fields explicitly passed in
dataare updated. If some profile fields should not change, do not pass them in the request. - For more flexible field value management, use database fields functional update.
URL
Method: POST
https://example.com/api/v1.1/profiles/merge
Request parameters
| Parameter | Type | Example | Required | Description |
|---|---|---|---|---|
| data | JSON object | "data":{ | No | Profile data that will change after merging. Set inside each element of the source array and inside destination |
| db_id | int | 1 | Yes | Database ID |
| skip_triggers | bool | true | No | Skip trigger events By default – false |
| source | array | "source": [ |