That page mentions associationType with the following information - The ID of the association type between the task and the other object type. You can retrieve this value through the associations API
Clicking through that link takes me to a BETA v4 with more calls that can be made. I can then click through the page for the stable v3 which has no mention of IDs for associationType.
Hello @LZentar,
I’ve been in the same boat with nowhere to find the right ID for the association to work on the v3 or v4 documentation. However, I’ve successfully created associations between engagements and contacts and deals end of 2021 using the legacy list you mention.
If you don’t want to rely on that legacy documentation (which I completely understand), I guess your best bet would be first to use this call to get all associations (it returns the associationTypeId) :
Which is the same ID as the one listed in the legacy doc, so I guess unless specified otherwise by Hubspot, it should be safe to use for now. And if you want to build something more “future proof”, you still have the option to include a check call before you push the association and retrieve the typeId everytime.
To conclude, to associate a task with a ticket, you should use the associationTypeId 17 or 18 (depending on the direction of your association).
Hope this helps !
If it does, please consider marking this a solution
Have a good day,
Thank you @LMeert - unfortunately this hasn’t worked for me.
I have run the API call you have suggested, and it returns code 18 which matches the legacy list. But this doesn’t work in practice.
To test, I have run it as well for Engagement to Contact and it shows code 10, which doesn’t work.
When I use code 204 for Engagement to Contact, which was mentioned as an example in the API documents, it does work. But this isn’t what comes back from the GET API call for v4.
Super frustrating - firstly I cannot understand why a list of the codes isn’t easily available, and two that the codes returned from the API call are not working.