POST /v1/contacts/{id}/merge-preview
const url = 'https://api.asap.cool/v1/contacts/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/merge-preview';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"duplicate_ids":["2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.asap.cool/v1/contacts/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/merge-preview \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "duplicate_ids": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ] }'Authorizations
Section intitulée « Authorizations »Parameters
Section intitulée « Parameters »Path Parameters
Section intitulée « Path Parameters »Surviving (primary) contact.
Request Body required
Section intitulée « Request Body required »Body of POST /v1/contacts/{id}/merge.
object
Duplicate contacts to fold into the primary (must not include it).
Example generated
{ "duplicate_ids": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ]}Responses
Section intitulée « Responses »Predicted merge effect (nothing mutated).
Predicted effect of a merge, returned by the dry-run preview endpoint: how many references each duplicate would move onto the primary, computed and then rolled back so nothing is mutated.
object
Bookings that would be reassigned to the primary.
Chat sessions that would be reassigned to the primary.
Duplicate contacts that would be tombstoned.
Duplicates that would be folded in.
Draft invoices that would be reassigned to the primary.
Surviving (primary) contact id.
Example generated
{ "bookings_reassigned": 1, "chat_sessions_reassigned": 1, "contacts_tombstoned": 1, "duplicate_ids": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "invoices_reassigned": 1, "primary_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}No active org.
Generic error body returned by API handlers when they fail. code is a
stable machine-readable token; message is human-friendly and meant for
surfacing to end users.
object
Stable machine token (e.g. invalid_credentials).
Offending request field for validation errors, when known.
Human-readable message.
Example generated
{ "code": "example", "field": "example", "message": "example"}Missing contacts:write scope.
Generic error body returned by API handlers when they fail. code is a
stable machine-readable token; message is human-friendly and meant for
surfacing to end users.
object
Stable machine token (e.g. invalid_credentials).
Offending request field for validation errors, when known.
Human-readable message.
Example generated
{ "code": "example", "field": "example", "message": "example"}Primary not found, cross-org, or not active.
Generic error body returned by API handlers when they fail. code is a
stable machine-readable token; message is human-friendly and meant for
surfacing to end users.
object
Stable machine token (e.g. invalid_credentials).
Offending request field for validation errors, when known.
Human-readable message.
Example generated
{ "code": "example", "field": "example", "message": "example"}A duplicate id equals the primary.
Generic error body returned by API handlers when they fail. code is a
stable machine-readable token; message is human-friendly and meant for
surfacing to end users.
object
Stable machine token (e.g. invalid_credentials).
Offending request field for validation errors, when known.
Human-readable message.
Example generated
{ "code": "example", "field": "example", "message": "example"}