Skip to main content
POST
Merge two candidates

Authorizations

Authorization
string
header
required

Supabase JWT — Authorization: Bearer <token>.

Body

application/json
keep_id
string<uuid>
required

Candidate id (profile_interview.id) of the record that stays.

merge_id
string<uuid>
required

Candidate id (profile_interview.id) of the record merged into it; it is archived and points to the kept record afterwards.

preview_token
string
required

The preview_token of merchant-candidate-merge-preview for the same pair. When the records changed since the preview, the merge is refused with 409: preview it again.

Maximum string length: 200
field_choices
object

Per field, 'keep' (the default) keeps the kept record's value and 'merge' takes the merged record's. date_of_birth applies when both records have identity data.

Example:
duplicate_id
string<uuid>

Duplicate pair id (profile_interview_duplicate.id) this merge resolves; found from the pair when left out.

Response

The records were merged.

merge_record_id
string
required

Id of the merge record (profile_interview_merge.id).

keep_id
string
required

Candidate id (profile_interview.id) of the record that stayed.

merge_id
string
required

Candidate id (profile_interview.id) of the merged, now archived, record.

moved
object
required

Records moved to the kept candidate, by kind (table name: count).

Example:
not_moved
object
required

Records that stayed with the merged record because the kept one already had one in that place (table name: count). Usually empty.

repeated
boolean
required

True when this pair was already merged the same way; nothing changed again.