Get All Person Merges
curl --request GET \
--url https://api.affinity.co/v2/person-merges \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.affinity.co/v2/person-merges"
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/person-merges', 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/person-merges",
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/person-merges"
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/person-merges")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.affinity.co/v2/person-merges")
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{
"data": [
{
"id": 12,
"status": "success",
"taskId": "789e0123-e45b-67c8-d901-234567890123",
"startedAt": "2025-06-03T10:30:00Z",
"primaryPersonId": 12345,
"duplicatePersonId": 67890,
"completedAt": "2025-06-03T10:32:15Z",
"errorMessage": null
},
{
"id": 13,
"status": "failed",
"taskId": "456e7890-1234-5678-9012-345678901234",
"startedAt": "2025-06-03T09:15:00Z",
"primaryPersonId": 54321,
"duplicatePersonId": 98765,
"completedAt": "2025-06-03T09:16:30Z",
"errorMessage": "Primary person not found"
}
],
"pagination": {
"nextUrl": "https://api.affinity.co/v2/persons/merge?cursor=eyJpZCI6NDU2ZTc4OTAtZTEyYi0zNGM1LWQ2NzgtOTAxMjM0NTY3ODkwfQ==",
"prevUrl": null
}
}{
"errors": [
{
"code": "bad-request",
"message": "<string>"
}
]
}{
"errors": [
{
"code": "authorization",
"message": "<string>"
}
]
}{
"errors": [
{
"code": "authentication",
"message": "<string>"
}
]
}Person Merges
Get All Person Merges
Retrieve paginated person merges for the organization.
Returns all person merges initiated by users in your organization, including their current
status, the persons involved, and merge details. You can filter person merges using the filter query parameter. The filter parameter is a string that you can specify conditions based on the following properties:
| Property Name | Type | Allowed Operators | Examples |
|---|---|---|---|
status | enum | = | status=in-progress, status=success, status=failed |
taskId | text | = | taskId=789e0123-e45b-67c8-d901-234567890123 |
Person merges are returned in reverse chronological order (most recent first).
Requires the “Manage duplicates” permission and organization admin role.
GET
/
v2
/
person-merges
Get All Person Merges
curl --request GET \
--url https://api.affinity.co/v2/person-merges \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.affinity.co/v2/person-merges"
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/person-merges', 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/person-merges",
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/person-merges"
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/person-merges")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.affinity.co/v2/person-merges")
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{
"data": [
{
"id": 12,
"status": "success",
"taskId": "789e0123-e45b-67c8-d901-234567890123",
"startedAt": "2025-06-03T10:30:00Z",
"primaryPersonId": 12345,
"duplicatePersonId": 67890,
"completedAt": "2025-06-03T10:32:15Z",
"errorMessage": null
},
{
"id": 13,
"status": "failed",
"taskId": "456e7890-1234-5678-9012-345678901234",
"startedAt": "2025-06-03T09:15:00Z",
"primaryPersonId": 54321,
"duplicatePersonId": 98765,
"completedAt": "2025-06-03T09:16:30Z",
"errorMessage": "Primary person not found"
}
],
"pagination": {
"nextUrl": "https://api.affinity.co/v2/persons/merge?cursor=eyJpZCI6NDU2ZTc4OTAtZTEyYi0zNGM1LWQ2NzgtOTAxMjM0NTY3ODkwfQ==",
"prevUrl": null
}
}{
"errors": [
{
"code": "bad-request",
"message": "<string>"
}
]
}{
"errors": [
{
"code": "authorization",
"message": "<string>"
}
]
}{
"errors": [
{
"code": "authentication",
"message": "<string>"
}
]
}Authorizations
A static Affinity API key, presented as a bearer token.
Query Parameters
Cursor for the next or previous page
Number of items to include in the page
Required range:
1 <= x <= 100Filter person merges using Affinity Filtering Language
Was this page helpful?