APIs & Integrations

enrico_bianchet
Member

Update Associations in a Deal

SOLVE

Hello,
when i use the API https://developers.hubspot.com/docs/methods/deals/associate_deal all
all the previous contacts / companies association are deleted or the posted associations are added to the existing?

I need to sync with our legacy CRM and the contacts / companies could be changed from our system.

Thanks

0 Upvotes
1 Accepted solution
Derek_Gervais
Solution
HubSpot Alumni
HubSpot Alumni

Update Associations in a Deal

SOLVE

Hi @enrico.bianchetti,

If I’m understanding correctly, you want to replace existing associations with your own? What you could do is use the Remove Association endpoint to disassociate the deal from it’s existing associations, and then update the deal with your new associations from your legacy CRM.

Removes a deal's association with a contact or company | Deals API

DELETE deals/v1/deal/:dealId/associations/:OBJECTTYPE?id=:objectId&id=:objectId

View solution in original post

0 Upvotes
4 Replies 4
Derek_Gervais
Solution
HubSpot Alumni
HubSpot Alumni

Update Associations in a Deal

SOLVE

Hi @enrico.bianchetti,

If I’m understanding correctly, you want to replace existing associations with your own? What you could do is use the Remove Association endpoint to disassociate the deal from it’s existing associations, and then update the deal with your new associations from your legacy CRM.

Removes a deal's association with a contact or company | Deals API

DELETE deals/v1/deal/:dealId/associations/:OBJECTTYPE?id=:objectId&id=:objectId

0 Upvotes
enrico_bianchet
Member

Update Associations in a Deal

SOLVE

Thanks @Derek_Gervais , you’ll right.

0 Upvotes
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Update Associations in a Deal

SOLVE

Hi @enrico.bianchetti,

Using the associate deal endpoint to associate a deal with another object will add associations to existing associations, it will not clear/delete any existing associations.

0 Upvotes
enrico_bianchet
Member

Update Associations in a Deal

SOLVE

Thanks @Derek_Gervais,
not good news.
So i need to goes by differences for sync with our system.

0 Upvotes