Preview an Account Merge
curl --request POST \
--url https://api.monaco.com/v1/accounts/{account_id}/merge/preview \
--header 'Content-Type: application/json' \
--data '
{
"source_account_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'import requests
url = "https://api.monaco.com/v1/accounts/{account_id}/merge/preview"
payload = { "source_account_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"] }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({source_account_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']})
};
fetch('https://api.monaco.com/v1/accounts/{account_id}/merge/preview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.monaco.com/v1/accounts/{account_id}/merge/preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'source_account_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.monaco.com/v1/accounts/{account_id}/merge/preview"
payload := strings.NewReader("{\n \"source_account_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.monaco.com/v1/accounts/{account_id}/merge/preview")
.header("Content-Type", "application/json")
.body("{\n \"source_account_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.monaco.com/v1/accounts/{account_id}/merge/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"source_account_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"target_account": {
"account_id": "<string>",
"name": "<string>",
"website": "<string>"
},
"source_accounts": [
{
"account_id": "<string>",
"name": "<string>",
"website": "<string>"
}
],
"counts": {
"contacts_moving": 123,
"contacts_merging": 123,
"opportunities_moving": 123,
"opportunities_deduped": 123,
"tasks_moving": 123,
"tags_added": 123
},
"contact_conflicts": [
{
"reason": "<string>",
"source_contact": {
"id": "<string>",
"name": "<string>",
"email": "<string>"
},
"target_contact": {
"id": "<string>",
"name": "<string>",
"email": "<string>"
}
}
],
"blocking_sequences": [
{
"sequence_id": "<string>",
"status": "<string>",
"contact": {
"id": "<string>",
"name": "<string>",
"email": "<string>"
},
"name": "<string>",
"campaign_name": "<string>"
}
],
"requires_sequence_stop": true,
"websites": {
"secondary": [
"<string>"
],
"primary": "<string>"
}
},
"meta": {
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "not_found",
"message": "Resource not found",
"completed_steps": [
"<string>"
],
"source_accounts_deleted": 123,
"blocking_sequence_count": 123
}
}{
"error": {
"code": "not_found",
"message": "Resource not found"
}
}Accounts
Preview an Account Merge
Read-only preview of merging the accounts in source_account_ids into the account in the path. Nothing is changed. Returns what the merge would do: contacts and opportunities that move or are merged, contacts that conflict, the live sequences that would be stopped, and the resulting websites. Always preview before calling merge_accounts. Requires only the api:read scope.
POST
/
v1
/
accounts
/
{account_id}
/
merge
/
preview
Preview an Account Merge
curl --request POST \
--url https://api.monaco.com/v1/accounts/{account_id}/merge/preview \
--header 'Content-Type: application/json' \
--data '
{
"source_account_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'import requests
url = "https://api.monaco.com/v1/accounts/{account_id}/merge/preview"
payload = { "source_account_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"] }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({source_account_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']})
};
fetch('https://api.monaco.com/v1/accounts/{account_id}/merge/preview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.monaco.com/v1/accounts/{account_id}/merge/preview",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'source_account_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.monaco.com/v1/accounts/{account_id}/merge/preview"
payload := strings.NewReader("{\n \"source_account_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.monaco.com/v1/accounts/{account_id}/merge/preview")
.header("Content-Type", "application/json")
.body("{\n \"source_account_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.monaco.com/v1/accounts/{account_id}/merge/preview")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"source_account_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"target_account": {
"account_id": "<string>",
"name": "<string>",
"website": "<string>"
},
"source_accounts": [
{
"account_id": "<string>",
"name": "<string>",
"website": "<string>"
}
],
"counts": {
"contacts_moving": 123,
"contacts_merging": 123,
"opportunities_moving": 123,
"opportunities_deduped": 123,
"tasks_moving": 123,
"tags_added": 123
},
"contact_conflicts": [
{
"reason": "<string>",
"source_contact": {
"id": "<string>",
"name": "<string>",
"email": "<string>"
},
"target_contact": {
"id": "<string>",
"name": "<string>",
"email": "<string>"
}
}
],
"blocking_sequences": [
{
"sequence_id": "<string>",
"status": "<string>",
"contact": {
"id": "<string>",
"name": "<string>",
"email": "<string>"
},
"name": "<string>",
"campaign_name": "<string>"
}
],
"requires_sequence_stop": true,
"websites": {
"secondary": [
"<string>"
],
"primary": "<string>"
}
},
"meta": {
"timestamp": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "not_found",
"message": "Resource not found",
"completed_steps": [
"<string>"
],
"source_accounts_deleted": 123,
"blocking_sequence_count": 123
}
}{
"error": {
"code": "not_found",
"message": "Resource not found"
}
}Path Parameters
Body
application/json
IDs of the accounts to merge into the account in the path. Each is deleted when the merge is applied. At most 100 per request.
Required array length:
1 - 100 elements