Skip to main content

Merging and Contacts

Merge a duplicate party into the survivor with a dry run, add a contact person to a company or owners' association, and remove a contact from a company.

The app matches parties by their normalized name and, when both have one, their postcode. It never merges parties on its own: parties sharing a name are listed as duplicate candidates on the party, and merging them is a person's decision. The merge route moves one party into another; the contact routes record which persons act for a company or an owners' association.

Merging Parties

POST /v1/parties/{id}/merge moves every role and contact membership of the party id onto into and marks id as merged; it keeps pointing at the survivor. A role the survivor already holds on the same contract keeps the survivor's row and takes the merged one's evidence, which the response counts as combined. With dry_run: true the route counts the moves and changes nothing. A party cannot be merged into itself (422). Later fills reuse the survivor when they meet the merged party's name.

POST/v1/parties/{id}/merge

Body fields

into*string (uuid)The surviving party.
dry_runbooleanCount the moves and change nothing.

Response fields

dry_runbooleanEchoes the request.
movesintegerRoles moved to the survivor.
combinedintegerRoles that clashed with a role of the survivor and were combined into it.
partyobjectThe survivor; absent on a dry run.

cURL: Preview a merge, then make it

curl -X POST "https://api.talonic.com/v1/parties/$DUPLICATE_ID/merge" \
  -H "Authorization: Bearer $TALONIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"into": "e5a3c7b1-2d94-4f08-b6a2-81c0d9e47f35", "dry_run": true}'

curl -X POST "https://api.talonic.com/v1/parties/$DUPLICATE_ID/merge" \
  -H "Authorization: Bearer $TALONIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"into": "e5a3c7b1-2d94-4f08-b6a2-81c0d9e47f35"}'

Response: Dry run

{ "dry_run": true, "moves": 9, "combined": 2 }
The API offers no route to undo a merge. Run the merge with dry_run first and read GET /v1/parties/{id} of both parties, which lists the duplicate candidates and the contracts that would move.

Contacts of a Company

POST /v1/parties/{id}/members records person_id as a contact of the company or owners' association id, with an optional function of up to 200 characters. A contact already recorded has its function updated. Contacts belong to a company or an owners' association, and a contact is a person; anything else is refused with 422. The membership shows on the company as members and on the person as member_of in the party detail.

POST/v1/parties/{id}/members

Body fields

person_id*string (uuid)The person who becomes a contact.
functionstring | nullUp to 200 characters. The person's function at the company.
DELETE/v1/parties/members/{memberId}

cURL: Add a contact

curl -X POST "https://api.talonic.com/v1/parties/e5a3c7b1-2d94-4f08-b6a2-81c0d9e47f35/members" \
  -H "Authorization: Bearer $TALONIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"person_id": "9d4f2a68-0b17-4c53-8e91-3a6c5d7b1f02", "function": "Property manager"}'

Frequently asked questions

Does the app merge duplicate parties automatically?+
No. A fill reuses an active party with the same name key (and postcode when both have one), but parties are never merged on their own. Same-name parties appear as duplicate candidates, and a merge is a person's decision.
What happens to roles both parties hold on the same contract?+
The survivor keeps its own role row and takes the merged role's evidence. The response counts these as combined, separately from the roles moved.
Can a person be the company in the members route?+
No. The party id in the path must be a company or an owners' association, and person_id must name a person. Other combinations are refused with 422.