Is it possible to remove or update existing association of contact with Deal from an API call. I am creating a deal and associating contact at the same time. However, it is possibl the association needs to change. How can we change it via API call.
Hi there,
I don’t think you can do an update in one API call. Take a look at this document: Accounts Dashboard | HubSpot, under the sections
- Associate an object with another object
- Remove an association between two objects
I was able to do something similar before, running the nodejs library, and it was something along this line (in your case):
hubspotClient.crm.objects.associationsApi.archive("deal", <dealId>, "contact", <contactId>, "deal_to_contact");
hubspotClient.crm.objects.associationsApi.create("deal", <dealId>, "contact", <contactId>, "deal_to_contact");
Cheers
WL