Skip to main content
POST
Merge customers

Authorizations

X-API-KEY
string
header
required

Headers

Idempotency-Key
string

Optional. A unique value (a UUID works well) identifying this operation. If the request is repeated with the same key, the original response is replayed instead of the operation running again, so a retry cannot create a duplicate record. Results are replayable for 48 hours. Reusing a key with a different request body returns 422.

Maximum string length: 255

Body

application/json
target_customer_id
integer
required

The ID of the customer that stays. It keeps its ID, code and records.

source_customer_ids
integer[]
required

The IDs of the duplicate customers. The merge moves their records to the survivor, then archives them.

Required array length: 1 - 25 elements
field_sources
Field Sources · object

For each field, the ID of the customer that gives the value to the survivor. A field that you do not name keeps the survivor value. When that value is empty, the field gets the first duplicate value.

custom_field_sources
Custom Field Sources · object

For each custom field ID, the ID of the customer that gives the value to the survivor.

Response

OK

target_customer_id
integer
required
merged_customer_ids
integer[]
required
moved_counts
Moved Counts · object
required
applied_field_sources
Applied Field Sources · object
required
applied_custom_field_sources
Applied Custom Field Sources · object
required
success
boolean
default:true