So if I had a Company with two association defintions both to Customers: One Hubspot_defined (Company To Contact, unlabeled) and one User_defined (Company To Contact, labeled: VIP). I don't have a way of just deleting just the VIP association?
After some testing, it looks like you are right that you can't target a specific association with the v4 endpoint, you either delete all or not (all but the association labelled primary)
On the other hand, the v3 is still very much usable :
first run a v4 call to get associations between two records to get the list of association with labels and associationTypeID (cf. below for contact object with ID 37601)
Then run your v3 call to delete the association and specify the TypeID you want to delete in lieu of the {associationType} parameter. If I take the example above, I'll make a DELETE call to this endpoint : crm/v3/objects/contact/37601/associations/company/7725139306/57
I agree that this is weird to find out that the v4 of the associations API adds the label feature but in the process becomes less flexible than the v3.
Maybe that's something @Jaycee_Lewis can report to the product team ?
Unless of course I'm wrong and someone figured out how to do it ? @Teun or @Anonymous maybe ?
Best,
Ludwig
CTO @ Mi4 Hubspot Platinum Partner and Integration Expert
Passionate human, very curious about everything data and automation.
After some testing, it looks like you are right that you can't target a specific association with the v4 endpoint, you either delete all or not (all but the association labelled primary)
On the other hand, the v3 is still very much usable :
first run a v4 call to get associations between two records to get the list of association with labels and associationTypeID (cf. below for contact object with ID 37601)
Then run your v3 call to delete the association and specify the TypeID you want to delete in lieu of the {associationType} parameter. If I take the example above, I'll make a DELETE call to this endpoint : crm/v3/objects/contact/37601/associations/company/7725139306/57
I agree that this is weird to find out that the v4 of the associations API adds the label feature but in the process becomes less flexible than the v3.
Maybe that's something @Jaycee_Lewis can report to the product team ?
Unless of course I'm wrong and someone figured out how to do it ? @Teun or @Anonymous maybe ?
Best,
Ludwig
CTO @ Mi4 Hubspot Platinum Partner and Integration Expert
Passionate human, very curious about everything data and automation.