Company Merges

Get All Company Merges

Changed on

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

Request

  • Base URL
    https://api.affinity.co
  • URL
    https://api.affinity.co/v2/company-merges
  • Auth
    HTTP bearer

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"
  }
}

Changes

    • info

      added authentication authorization bad-request conflict method-not-allowed not-acceptable not-found not-implemented rate-limit server timeout unprocessable-entity unsupported-media-type validation discriminator mapping keys to the / response property for the response status

    • info

      added bad-request validation discriminator mapping keys to the / response property for the response status