<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to associate tasks with tickets in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/How-to-associate-tasks-with-tickets/m-p/575083#M50853</link>
    <description>&lt;P&gt;I'm not sure if I've missed something, but have been banging my head against a wall with making a cURL call to associate a task with a ticket.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have everything I need except for the value for the association type, which seems impossible to find.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The page that describes how to associate tasks with other objects is&amp;nbsp;&lt;A href="https://developers.hubspot.com/docs/api/crm/tasks" target="_blank" rel="noopener"&gt;https://developers.hubspot.com/docs/api/crm/tasks&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That page mentions associationType with the following information - &lt;EM&gt;The ID of the association type between the task and the other object type. You can retrieve this value through the&amp;nbsp;&lt;A href="https://developers.hubspot.com/docs/api/crm/associations/v4" target="_blank" rel="noopener"&gt;associations API&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there really no simple list of IDs similar to this legacy list? -&amp;nbsp;&lt;A href="https://legacydocs.hubspot.com/docs/methods/crm-associations/crm-associations-overview" target="_blank" rel="noopener"&gt;https://legacydocs.hubspot.com/docs/methods/crm-associations/crm-associations-overview&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have been able to associate a task with a contact because this ID is used in the example on the tasks API documentation page:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;For example, your request URL might look similar to the following:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;A href="https://api.hubspot.com/crm/v3/objects/tasks/17687016786/associations/contacts/104901/204" target="_blank" rel="noopener"&gt;https://api.hubspot.com/crm/v3/objects/tasks/17687016786/associations/contacts/104901/204&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 12 Feb 2022 20:18:36 GMT</pubDate>
    <dc:creator>LZentar</dc:creator>
    <dc:date>2022-02-12T20:18:36Z</dc:date>
    <item>
      <title>How to associate tasks with tickets</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/How-to-associate-tasks-with-tickets/m-p/575083#M50853</link>
      <description>&lt;P&gt;I'm not sure if I've missed something, but have been banging my head against a wall with making a cURL call to associate a task with a ticket.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have everything I need except for the value for the association type, which seems impossible to find.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The page that describes how to associate tasks with other objects is&amp;nbsp;&lt;A href="https://developers.hubspot.com/docs/api/crm/tasks" target="_blank" rel="noopener"&gt;https://developers.hubspot.com/docs/api/crm/tasks&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That page mentions associationType with the following information - &lt;EM&gt;The ID of the association type between the task and the other object type. You can retrieve this value through the&amp;nbsp;&lt;A href="https://developers.hubspot.com/docs/api/crm/associations/v4" target="_blank" rel="noopener"&gt;associations API&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there really no simple list of IDs similar to this legacy list? -&amp;nbsp;&lt;A href="https://legacydocs.hubspot.com/docs/methods/crm-associations/crm-associations-overview" target="_blank" rel="noopener"&gt;https://legacydocs.hubspot.com/docs/methods/crm-associations/crm-associations-overview&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have been able to associate a task with a contact because this ID is used in the example on the tasks API documentation page:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;For example, your request URL might look similar to the following:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;A href="https://api.hubspot.com/crm/v3/objects/tasks/17687016786/associations/contacts/104901/204" target="_blank" rel="noopener"&gt;https://api.hubspot.com/crm/v3/objects/tasks/17687016786/associations/contacts/104901/204&lt;/A&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 12 Feb 2022 20:18:36 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/How-to-associate-tasks-with-tickets/m-p/575083#M50853</guid>
      <dc:creator>LZentar</dc:creator>
      <dc:date>2022-02-12T20:18:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to associate tasks with tickets</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/How-to-associate-tasks-with-tickets/m-p/575546#M50861</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/162724"&gt;@LZentar&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;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) :&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;/crm/v4/associations/{fromObjectType}/{toObjectType}/labels&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've run this call on my test account from "CONTACT" to "ENGAGEMENT" and this is the response I got :&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;{
    "results": [
        {
            "category": "HUBSPOT_DEFINED",
            "typeId": 9,
            "label": null
        }
    ]
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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.&lt;BR /&gt;&lt;BR /&gt;To conclude, to associate a task with a ticket, you should use the associationTypeId 17 or 18 (depending on the direction of your association).&lt;BR /&gt;&lt;BR /&gt;Hope this helps !&lt;BR /&gt;If it does, please consider marking this a solution &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;Have a good day,&lt;/P&gt;
&lt;P&gt;Ludwig&lt;/P&gt;</description>
      <pubDate>Mon, 14 Feb 2022 10:07:28 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/How-to-associate-tasks-with-tickets/m-p/575546#M50861</guid>
      <dc:creator>LMeert</dc:creator>
      <dc:date>2022-02-14T10:07:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to associate tasks with tickets</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/How-to-associate-tasks-with-tickets/m-p/575643#M50869</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/257487"&gt;@LMeert&lt;/a&gt;&amp;nbsp;- unfortunately this hasn't worked for me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To test, I have run it as well for Engagement to Contact and it shows code 10, which doesn't work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Feb 2022 13:35:39 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/How-to-associate-tasks-with-tickets/m-p/575643#M50869</guid>
      <dc:creator>LZentar</dc:creator>
      <dc:date>2022-02-14T13:35:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to associate tasks with tickets</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/How-to-associate-tasks-with-tickets/m-p/575649#M50870</link>
      <description>&lt;P&gt;I tried to call Task to Ticket and got the code 230 which has worked.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Feb 2022 13:42:24 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/How-to-associate-tasks-with-tickets/m-p/575649#M50870</guid>
      <dc:creator>LZentar</dc:creator>
      <dc:date>2022-02-14T13:42:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to associate tasks with tickets</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/How-to-associate-tasks-with-tickets/m-p/575656#M50871</link>
      <description>&lt;P&gt;Good to know it worked out in the end !&lt;BR /&gt;Well done &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Feb 2022 13:49:31 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/How-to-associate-tasks-with-tickets/m-p/575656#M50871</guid>
      <dc:creator>LMeert</dc:creator>
      <dc:date>2022-02-14T13:49:31Z</dc:date>
    </item>
  </channel>
</rss>

