Company Merges

Get Company Merge

Changed on

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.

get/v2/company-merges/{mergeId}

Request

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

Path parameters

mergeIdinteger required
Example:12345

Company merge ID

Response

OK

idinteger required

The unique identifier for the merge

status'in-progress' | 'success' | 'failed' required

Current status of the merge

taskIdstring uuid required

Identifier for the task this merge belongs to

startedAtstring date-time required

Timestamp when the merge started

primaryCompanyIdinteger required

ID of the primary company that other profiles were merged into

duplicateCompanyIdinteger required

ID of the duplicate company that was merged into the primary company

completedAtstring date-time nullable required

Timestamp when the merge completed (success or failure)

errorMessagestring nullable required

Error message if the merge failed

Example response

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

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