curl --request GET \
--url https://api.affinity.co/v2/company-merges/{mergeId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.affinity.co/v2/company-merges/{mergeId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.affinity.co/v2/company-merges/{mergeId}', 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.affinity.co/v2/company-merges/{mergeId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.affinity.co/v2/company-merges/{mergeId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.affinity.co/v2/company-merges/{mergeId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.affinity.co/v2/company-merges/{mergeId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": 12345,
"status": "success",
"taskId": "1ac19acd-674c-49a0-819a-cd674cc9a042",
"startedAt": "2025-06-03T10:30:00Z",
"primaryCompanyId": 12345,
"duplicateCompanyId": 67890,
"completedAt": "2025-06-03T10:32:15Z",
"errorMessage": null
}Get Company Merge
Retrieve the status and details of a specific company merge.
Returns information about the company merge including its current status, the companies involved, timestamps, and any error information if the merge failed.
The mergeId can be obtained from the response of the Get All Company Merges endpoint, or by filtering company merges by task ID using /v2/company-merges?filter=taskId={taskId} after initiating a merge.
Requires the “Manage duplicates” permission and organization admin role.
curl --request GET \
--url https://api.affinity.co/v2/company-merges/{mergeId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.affinity.co/v2/company-merges/{mergeId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.affinity.co/v2/company-merges/{mergeId}', 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.affinity.co/v2/company-merges/{mergeId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.affinity.co/v2/company-merges/{mergeId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.affinity.co/v2/company-merges/{mergeId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.affinity.co/v2/company-merges/{mergeId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": 12345,
"status": "success",
"taskId": "1ac19acd-674c-49a0-819a-cd674cc9a042",
"startedAt": "2025-06-03T10:30:00Z",
"primaryCompanyId": 12345,
"duplicateCompanyId": 67890,
"completedAt": "2025-06-03T10:32:15Z",
"errorMessage": null
}Authorizations
A static Affinity API key, presented as a bearer token.
Path Parameters
Company merge ID
1 <= x <= 900719925474099112345
Response
OK
Entity representing the state of an individual company merge
The unique identifier for the merge
1 <= x <= 900719925474099112345
Current status of the merge
in-progress, success, failed "success"
Identifier for the task this merge belongs to
"789e0123-e45b-67c8-d901-234567890123"
Timestamp when the merge started
"2025-06-03T10:30:00Z"
ID of the primary company that other profiles were merged into
1 <= x <= 900719925474099112345
ID of the duplicate company that was merged into the primary company
1 <= x <= 900719925474099167890
Timestamp when the merge completed (success or failure)
"2025-06-03T10:32:15Z"
Error message if the merge failed
"Primary company not found"
Was this page helpful?