---
title: "Merge a duplicate customer or vendor into another"
method: POST
path: "/contacts/{id}/merge"
tags: ["Contacts"]
---

# Merge a duplicate customer or vendor into another

`POST /contacts/{id}/merge`

## Request

- Base URL: `https://ledgerhq.pro/api/v1`
- URL: `https://ledgerhq.pro/api/v1/contacts/{id}/merge`
- Auth: one of:
  - HTTP bearer and API key in header `x-organization-id`
  - HTTP bearer and API key in header `x-organization-id`

Moves every record that points at this contact to intoContactId, fills blank fields on the kept contact (email, phone, address, defaults, TIN, W-9 status, 1099 settings) from this one, makes the kept contact a customer and vendor when the two roles differ, and removes this contact. The kept contact's own name and values win. Amounts and journals do not change. Audit-logged as action merge on both contacts.

## Path parameters

- `id` string, uuid, required

## Request body

- object
  - `intoContactId` string, uuid, required: Contact UUID to keep

## Response `200`

merged: true with the duplicate, kept contact, moved record counts, and filled fields

## Other responses

- `404`: Not found
- `default`: Error response

---

[API](https://skmtc.dev/ledgerhq-pro/apis/ledgerhq-bookkeeping-api.md) · [All operations](https://skmtc.dev/ledgerhq-pro/apis/ledgerhq-bookkeeping-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ledgerhq-pro/apis/ledgerhq-bookkeeping-api/revisions/9a8269f0a586?raw)
