post https://api.chartmogul.com/v1/contacts//merge/
Accepts details of two contact
objects you want to merge.
Example
curl -X POST "https://api.chartmogul.com/v1/contacts/con_653af916-dea0-11ed-845b-3be1ac0039ac/merge/con_36c9f236-ea66-11ed-b81d-cf0d715ced77" \
-u YOUR_API_KEY: \
into_uuid = 'con_653af916-dea0-11ed-845b-3be1ac0039ac'
from_uuid = 'con_36c9f236-ea66-11ed-b81d-cf0d715ced77'
ChartMogul::Contact.merge!(into_uuid: into_uuid, from_uuid: from_uuid)
const intoUuid = "con_653af916-dea0-11ed-845b-3be1ac0039ac";
const fromUuid = "con_36c9f236-ea66-11ed-b81d-cf0d715ced77";
ChartMogul.Contact.merge(config, intoUuid, fromUuid);
<?php
$into_uuid = "con_653af916-dea0-11ed-845b-3be1ac0039ac";
$from_uuid = "con_36c9f236-ea66-11ed-b81d-cf0d715ced77";
ChartMogul\Contact::merge($into_uuid, $from_uuid);
?>
intoUUID := "con_653af916-dea0-11ed-845b-3be1ac0039ac"
fromUUID := "con_36c9f236-ea66-11ed-b81d-cf0d715ced77"
api.MergeContacts(intoUUID, fromUUID)
chartmogul.Contact.merge(
config,
into_uuid="con_653af916-dea0-11ed-845b-3be1ac0039ac",
from_uuid="con_36c9f236-ea66-11ed-b81d-cf0d715ced77"
)
Result Format
{
"uuid": "con_653af916-dea0-11ed-845b-3be1ac0039ac",
"customer_uuid": "cus_5915ee5a-babd-406b-b8ce-d207133fb4cb",
"customer_external_id": "customer_001",
"data_source_uuid": "ds_fef05d54-47b4-431b-aed2-eb6b9e545430",
"position": 9,
"first_name": "Adam",
"last_name": "Smith",
"title": "CEO",
"email": "[email protected]",
"phone": "+1234567890",
"linked_in": "https://linkedin.com/example",
"twitter": "https://twitter.com/example",
"notes": "Heading\nBody\nFooter",
"custom": {
"Facebook": "https://www.facebook.com/example/",
"date_of_birth": "1985-01-22"
}
}
#<ChartMogul::Contact:0x0000000128fada38
@custom={
:Facebook=>'https://www.facebook.com/example',
:date_of_birth=>'1985-01-22'
},
@customer_external_id="cus_0001",
@customer_uuid="cus_5915ee5a-babd-406b-b8ce-d207133fb4cb",
@data_source_uuid="ds_fef05d54-47b4-431b-aed2-eb6b9e545430",
@email="[email protected]",
@first_name='Adam',
@last_name='Smith',
@linked_in='https://linkedin.com/example',
@notes='Heading\nBody\nFooter',
@phone='+1234567890',
@position=9,
@title='CEO',
@twitter='https://twitter.com/example',
@uuid="con_653af916-dea0-11ed-845b-3be1ac0039ac">
{
"uuid": "con_653af916-dea0-11ed-845b-3be1ac0039ac",
"customer_uuid": "cus_5915ee5a-babd-406b-b8ce-d207133fb4cb",
"customer_external_id": "customer_001",
"data_source_uuid": "ds_fef05d54-47b4-431b-aed2-eb6b9e545430",
"position": 9,
"first_name": "Adam",
"last_name": "Smith",
"title": "CEO",
"email": "[email protected]",
"phone": "+1234567890",
"linked_in": "https://linkedin.com/example",
"twitter": "https://twitter.com/example",
"notes": "Heading\nBody\nFooter",
"custom": {
"Facebook": "https://www.facebook.com/example/",
"date_of_birth": "1985-01-22"
}
}
class ChartMogul\Contact (15) {
protected $uuid =>
string(40) "con_653af916-dea0-11ed-845b-3be1ac0039ac"
protected $customer_uuid =>
string(40) "cus_5915ee5a-babd-406b-b8ce-d207133fb4cb"
protected $data_source_uuid =>
string(39) "ds_fef05d54-47b4-431b-aed2-eb6b9e545430"
protected $customer_external_id =>
string(8) "cus_0001"
protected $first_name =>
string(4) "Adam"
protected $last_name =>
string(5) "Smith"
protected $position =>
int(1)
protected $email =>
string(16) "[email protected]"
protected $title =>
string(3) "CEO"
protected $notes =>
string(19) "Heading\nBody\nFooter"
protected $phone =>
string(11) "+1234567890"
protected $linked_in =>
string(29) "https://linkedin.com/example"
protected $twitter =>
string(27) "https://twitter.com/example"
protected $custom =>
array(2) {
"Facebook" =>
string(35) "https://www.facebook.com/example"
"date_of_birth" =>
string(10) "1985-01-22"
}
}
(*chartmogul.Contact)(0x14000268000)({
UUID: (string) (len=40) "con_653af916-dea0-11ed-845b-3be1ac0039ac",
CustomerExternalID: (string) (len=12) "customer_001",
CustomerUUID: (string) (len=40) "cus_5915ee5a-babd-406b-b8ce-d207133fb4cb",
DataSourceUUID: (string) (len=39) "ds_fef05d54-47b4-431b-aed2-eb6b9e545430",
FirstName: (string) (len=4) "Adam",
LastName: (string) (len=5) "Smith",
LinkedIn: (string) (len=29) "https://linkedin.com/example",
Notes: (string) (len=19) "Heading\nBody\nFooter",
Phone: (string) (len=11) "+1234567890",
Position: (uint32) 1,
Title: (string) (len=3) "CEO",
Twitter: (string) (len=27) "https://twitter.com/example",
Custom: (map[string]interface {}) (len=2) {
(string) (len=8) "Facebook": (string) (len=35) "https://www.facebook.com/example",
(string) (len=13) "date_of_birth": (string) (len=10) "1985-01-22"
}
})
<Contact{
custom={'Facebook': 'https://www.facebook.com/example','date_of_birth': '1985-01-22'},
customer_external_id='external_001',
customer_uuid='cus_5915ee5a-babd-406b-b8ce-d207133fb4cb',
data_source_uuid='ds_fef05d54-47b4-431b-aed2-eb6b9e545430',
email='[email protected]',
first_name='Adam',
last_name='Smith',
linked_in='https://linkedin.com/example',
notes='Heading\nBody\nFooter',
phone='+1234567890',
position=9,
title='CEO',
twitter='https://twitter.com/example'
uuid='cus_5915ee5a-babd-406b-b8ce-d207133fb4cb'}>
In the response, the JSON object contains the following data:
uuid
: The UUID of the contact.customer_uuid
: The UUID of the customer to which this contact belongs.customer_external_id
: The external id of the customer to which this contact belongs.data_source_uuid
: The UUID of the data source of the customer to which this contact belongs. A user can have multiple data sources, and the contact should only be associated to one of them.position
: Position of the contact in the customer’s profile.first_name
: The first name of the contact.last_name
: The last name of the contact.title
: The job title of the contact.email
: The email address of the contact.phone
: The phone number of the contact.linked_in
: The URL of the contact's LinkedIn profile.twitter
: The URL of the contact's Twitter profile.notes
: Additional notes or comments about the contact.custom
: A dictionary of custom fields and their values that are specific to this contact.