**Source URL:** https://general.veevavault.dev/clinical/vault-api/api-reference/25.2/clinical-operations/initiate-clinical-record-merge.md

# Initiate Clinical Record Merge



Initiate a record merge operation in bulk to eliminate duplicate Global Directory data in your Clinical Operations Vault. When merging two records together, you must select one record to be the `main_record_id` and one record to be the `duplicate_record_id`. The merging process updates all inbound references (including attachments) from other objects that point to the `duplicate` record and moves those over to the `main` record. Field values on the `main` record are not changed, and when the process is complete, the `duplicate` record is deleted. Record merges do not trigger [record triggers](/vault-sdk/entry-points/triggers/record-triggers/).

You can only merge two records together in a single operation, one `main` record and one `duplicate` record. This is called a merge set. If you have multiple `duplicate` records you wish to merge into the same `main` record, you need to create multiple merge sets and execute multiple record merges.

* The values in the input must be UTF-8 encoded.

* CSVs must follow the standard RFC 4180 format, with some [exceptions](/vault-api/references/csv-rfc-deviations).

* The maximum batch size is 10 merge sets.

* The maximum number of concurrent merge requests is 500.

This request only supports record merges for the following objects:

* *Person* (`person__sys`)

* *Organization* (`organization__v`)

* *Location* (`location__v`)

* *Contact Information* (`contact_information__clin`)

Each object above must have **Enable Merges** configured and the initiating user must have the *Application: Object: Merge Records* permission. To merge records for other objects in your Vault, use [Initiate Record Merge](/vault-api/api-reference/25.2/vault-objects/merge-object-records/initiate-record-merge). Learn more about [record merges for Clinical Operations in Vault Help](https://clinical.veevavault.help/en/gr/31637).

<Endpoint path="/api/{version}/app/clinical/objects/{object_name}/actions/merge" method="POST"></Endpoint>

## Headers {#headers}

<FieldTable>
| Name | Description |
| --- | --- |
| `Content-Type` | `application/json` or `text/csv` |
| `Accept` | `application/json` (default) or `text/csv` |
</FieldTable>

## URI Path Parameters {#uri-path-parameters}

<FieldTable>
| Name | Description |
| --- | --- |
| `{object_name}` | The name of the object to merge. Possible values are `person__sys`, `organization__v`, `location__v`, and `contact_information__clin`. |
</FieldTable>

## Body Parameters {#body-parameters}

Upload parameters as a JSON or CSV file. You can merge up to 10 merge sets at once.

<FieldTable>
| Name | Description |
| --- | --- |
| `duplicate_record_id` | The ID of the `duplicate` record. Each `duplicate_record_id` can only be merged into one `main_record_id` record. When the merging process is complete, Vault deletes this record. |
| `main_record_id` | The ID of the `main` record. The merging process updates all inbound references (including attachments) from other objects that point to the `duplicate` record and moves those over to the `main` record. Vault does not change field values on the `main` record. |
</FieldTable>

## Request {#request}

<CodeExample title="">
```
curl -X POST -H "Authorization: {SESSION_ID}" \
--data-binary @"clinical-records-to-merge.json" \
https://myvault.veevavault.com/api/v25.1/app/clinical/objects/person__sys/actions/merge

```
</CodeExample>

## Example JSON Request Body {#example-json-request-body}

<CodeExample title="">
```
[
   {
       "duplicate_record_id" : "V0B000000008002",
       "main_record_id" : "V0B000000007001"
   },
   {
       "duplicate_record_id" : "V0B000000008001",
       "main_record_id" : "V0B000000007001"
   }
]

```
</CodeExample>

## Response {#response}

<CodeExample title="">
```
{
    "responseStatus": "SUCCESS",
    "responseMessage": "Success",
    "data": {
        "jobID": "511601"
    }
}

```
</CodeExample>

## Response Details {#response-details}

On `SUCCESS`, the job has successfully started and the response includes a `jobID`. On `FAILURE`, the job failed to start. There is no partial success.



---

**Previous:** [Populate Procedure Definitions](/clinical/vault-api/api-reference/25.2/clinical-operations/populate-procedure-definitions)  
**Next:** [Enable Study Migration Mode](/clinical/vault-api/api-reference/25.2/clinical-operations/enable-study-migration-mode)