Skip to content

Merge two contacts

POST
/api/v1/contacts/{id}/merge
curl --request POST \
--url https://digize.com/api/v1/contacts/example/merge \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: 5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69' \
--header 'x-api-key: <x-api-key>' \
--data '{ "duplicateId": "example" }'

Merges a duplicate into a contact: the contact keeps its details, takes the ones it lacks, and gets the duplicate’s tags, custom values, notes, timeline, opportunities and orders. The duplicate is deleted. Can’t be undone.

Needs the crm:write permission. It can’t be undone.

id
required

The contact that stays.

string
>= 1 characters <= 64 characters
Idempotency-Key
string
>= 1 characters <= 255 characters

Makes the request safe to send again: for 24 hours the same key and request answer the first response without repeating the change.

Example

5f1c2a8e-3b7d-4c55-9a0e-1f2d3c4b5a69
Media typeapplication/json
object
duplicateId
required

The contact merged into it and deleted.

string
>= 1 characters <= 64 characters

Example generated

{
"duplicateId": "example"
}

Done

Media typeapplication/json
object
id
required
string
firstName
required
string
lastName
required
string
name
required
string
email
required
string | null
phone
required

In E.164, such as +15125550142.

string | null
city
required
string | null
companyId
required
string | null
companyName
required
string | null
ownerId
required

The member who looks after them, by user id.

string | null
source
required
string
Allowed values: checkout form booking import manual message
tags
required
Array<string>
stage
required

Lead: hasn’t ordered; customer: one or two orders; repeat: three or more.

string
Allowed values: lead customer repeat
orders
required
number
lifetimeValue
required

What they’ve paid, less refunds, in minor units.

number
lastOrderAt
required
Any of:
string format: date-time
lastActivityAt
required
string format: date-time
custom
required

Custom field values by field key.

object
key
additional properties
Any of:
string
createdAt
required
string format: date-time

Example

{
"source": "checkout",
"stage": "lead"
}

What was sent isn’t valid (invalid).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

No key, or one that’s unknown, off or expired.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

The key doesn’t have the permission this needs.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

Nothing has that id (not_found).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

A request with the same Idempotency-Key is still running (conflict).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

The Idempotency-Key was used with a different request.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}

Over the rate limit; see retry-after.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: invalid unauthorized forbidden not_found conflict too_large rate_limited unavailable internal
message
required
string
details
object
key
additional properties
any

Example

{
"error": {
"code": "invalid"
}
}