<?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 Re: Tickets associations in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Tickets-associations/m-p/952625#M72388</link>
    <description>&lt;P&gt;You probably need to add the associations param in your call.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;api_response = client.crm.objects.basic_api.get_by_id(&lt;SPAN&gt;object_type&lt;/SPAN&gt;=&lt;SPAN&gt;"tickets"&lt;/SPAN&gt;, &lt;SPAN&gt;object_id&lt;/SPAN&gt;=&lt;SPAN&gt;"2545436276"&lt;/SPAN&gt;, associations=["emails", "notes", ....], &lt;SPAN&gt;archived&lt;/SPAN&gt;=&lt;SPAN&gt;False&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 01 Apr 2024 08:44:48 GMT</pubDate>
    <dc:creator>ChrisMagtoto</dc:creator>
    <dc:date>2024-04-01T08:44:48Z</dc:date>
    <item>
      <title>Tickets associations</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Tickets-associations/m-p/952588#M72384</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I've been trying to pull emails, tasks, and notes for each of my tickets through the HubSpot API. Basically, I wanted to obtain the association IDs and then call the Engagements API to retrieve that data.&amp;nbsp;I was following this process:&amp;nbsp;&lt;A href="https://community.hubspot.com/t5/APIs-Integrations/Get-all-emails-for-a-ticket/m-p/829716" target="_blank" rel="noopener"&gt;https://community.hubspot.com/t5/APIs-Integrations/Get-all-emails-for-a-ticket/m-p/829716&amp;nbsp;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;However, I'm encountering a problem: for all my tickets, the associations section shows a 'None' value. What could be the problem? Could it be a very specific issue with my account?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2024-03-31 at 00.41.58.png" style="width: 998px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/114241iBF58E4E0D9D51985/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2024-03-31 at 00.41.58.png" alt="Screenshot 2024-03-31 at 00.41.58.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;I&amp;nbsp;&lt;/SPAN&gt;am using Python, and this is the offical code provided by HubSpot:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;import &lt;/SPAN&gt;hubspot&lt;BR /&gt;&lt;SPAN&gt;from &lt;/SPAN&gt;pprint &lt;SPAN&gt;import &lt;/SPAN&gt;pprint&lt;BR /&gt;&lt;SPAN&gt;from &lt;/SPAN&gt;hubspot.crm.objects &lt;SPAN&gt;import &lt;/SPAN&gt;ApiException&lt;BR /&gt;&lt;BR /&gt;client = hubspot.Client.create(&lt;SPAN&gt;access_token&lt;/SPAN&gt;=&lt;SPAN&gt;"----API----"&lt;/SPAN&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;try&lt;/SPAN&gt;:&lt;BR /&gt;api_response = client.crm.objects.basic_api.get_by_id(&lt;SPAN&gt;object_type&lt;/SPAN&gt;=&lt;SPAN&gt;"tickets"&lt;/SPAN&gt;, &lt;SPAN&gt;object_id&lt;/SPAN&gt;=&lt;SPAN&gt;"2545436276"&lt;/SPAN&gt;, &lt;SPAN&gt;archived&lt;/SPAN&gt;=&lt;SPAN&gt;False&lt;/SPAN&gt;)&lt;BR /&gt;pprint(api_response)&lt;BR /&gt;&lt;SPAN&gt;except &lt;/SPAN&gt;ApiException &lt;SPAN&gt;as &lt;/SPAN&gt;e:&lt;BR /&gt;&lt;SPAN&gt;print&lt;/SPAN&gt;(&lt;SPAN&gt;"Exception when calling basic_api-&amp;gt;get_by_id: %s&lt;/SPAN&gt;&lt;SPAN&gt;\n&lt;/SPAN&gt;&lt;SPAN&gt;" &lt;/SPAN&gt;% e)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 01 Apr 2024 13:40:55 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Tickets-associations/m-p/952588#M72384</guid>
      <dc:creator>RRompich</dc:creator>
      <dc:date>2024-04-01T13:40:55Z</dc:date>
    </item>
    <item>
      <title>Re: Tickets associations</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Tickets-associations/m-p/952625#M72388</link>
      <description>&lt;P&gt;You probably need to add the associations param in your call.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;api_response = client.crm.objects.basic_api.get_by_id(&lt;SPAN&gt;object_type&lt;/SPAN&gt;=&lt;SPAN&gt;"tickets"&lt;/SPAN&gt;, &lt;SPAN&gt;object_id&lt;/SPAN&gt;=&lt;SPAN&gt;"2545436276"&lt;/SPAN&gt;, associations=["emails", "notes", ....], &lt;SPAN&gt;archived&lt;/SPAN&gt;=&lt;SPAN&gt;False&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2024 08:44:48 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Tickets-associations/m-p/952625#M72388</guid>
      <dc:creator>ChrisMagtoto</dc:creator>
      <dc:date>2024-04-01T08:44:48Z</dc:date>
    </item>
    <item>
      <title>Re: Tickets associations</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Tickets-associations/m-p/952876#M72411</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/736839"&gt;@RRompich&lt;/a&gt;&amp;nbsp;- honestly, I don't think you are making the API call you think you are here. Its a bit obscured by the hubspot client code library conventions.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Although the original thread suggested a v3 objects API, I would be very tempted to directly use the most current v4 API code for this:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;GET/crm/v4/objects/{objectType}/{objectId}/associations/{toObjectType}&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Which will list all types of associations - HubSpot and user defined - although that may not be as useful here as it is in other places.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I tested this out and it seems to provide full information required.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Hope this works for you!&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Steve&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;STRONG class=""&gt;&lt;CODE class=""&gt;&lt;/CODE&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Apr 2024 19:05:48 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Tickets-associations/m-p/952876#M72411</guid>
      <dc:creator>SteveHTM</dc:creator>
      <dc:date>2024-04-01T19:05:48Z</dc:date>
    </item>
  </channel>
</rss>

