v1

latestOpenAPI 3.1.1Proprietary2026-07-2687313591.4 KB
Company Merges

Get All Company Merges

Retrieve paginated company merges for the organization.

Returns all company merges initiated by users in your organization, including their current status, the companies involved, and merge details. You can filter company merges using the filter query parameter. The filter parameter is a string that you can specify conditions based on the following properties:

Property NameTypeAllowed OperatorsExamples
statusenum=status=in-progress, status=success, status=failed
taskIdtext=taskId=789e0123-e45b-67c8-d901-234567890123

Company merges are returned in reverse chronological order (most recent first).

Requires the "Manage duplicates" permission and organization admin role.

get/v2/company-merges

Query parameters

cursorstring

Cursor for the next or previous page

limitinteger

Number of items to include in the page

filterstring

Filter company merges using Affinity Filtering Language

Response

OK

Example response

{
  "data": [
    {
      "id": 12345,
      "status": "success",
      "taskId": "789e0123-e45b-67c8-d901-234567890123",
      "startedAt": "2025-06-03T10:30:00Z",
      "primaryCompanyId": 12345,
      "duplicateCompanyId": 67890,
      "completedAt": "2025-06-03T10:32:15Z",
      "errorMessage": "Primary company not found"
    }
  ],
  "pagination": {
    "prevUrl": "https://api.affinity.co/v2/foo?cursor=ICAgICAgYmVmb3JlOjo6Nw",
    "nextUrl": "https://api.affinity.co/v2/foo?cursor=ICAgICAgIGFmdGVyOjo6NA"
  }
}