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.
/v1/parties/{id}/mergeBody fields
Response fields
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 }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.
/v1/parties/{id}/membersBody fields
/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"}'