<?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: How to get newly created Contacts and their associated Deals in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/How-to-get-newly-created-Contacts-and-their-associated-Deals/m-p/437791#M43369</link>
    <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/152955"&gt;@zaklein&lt;/a&gt; , any chance you could help out here?&lt;/P&gt;</description>
    <pubDate>Fri, 14 May 2021 19:47:28 GMT</pubDate>
    <dc:creator>dennisedson</dc:creator>
    <dc:date>2021-05-14T19:47:28Z</dc:date>
    <item>
      <title>How to get newly created Contacts and their associated Deals</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/How-to-get-newly-created-Contacts-and-their-associated-Deals/m-p/437706#M43353</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hello experts,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;My use case is to Get all contacts that were created every 5 mins and return the contacts and their associated Deals properties. I can get all Contact properties, but I wonder how to get all Deals properties that are associated with those newly created contacts. So is this correct? 1. Make an API call first to associate Contacts and Deals. 2. Make another call to get the newly created Contacts and their associate Deals. What is the second step request should look like? I used the Search Contact API but what should be the filers?&amp;nbsp;&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="YFeng_0-1621018559986.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/42685i95839CA622DB41CE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="YFeng_0-1621018559986.png" alt="YFeng_0-1621018559986.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Yvonne&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 May 2021 18:56:18 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/How-to-get-newly-created-Contacts-and-their-associated-Deals/m-p/437706#M43353</guid>
      <dc:creator>YFeng</dc:creator>
      <dc:date>2021-05-14T18:56:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to get newly created Contacts and their associated Deals</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/How-to-get-newly-created-Contacts-and-their-associated-Deals/m-p/437791#M43369</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/152955"&gt;@zaklein&lt;/a&gt; , any chance you could help out here?&lt;/P&gt;</description>
      <pubDate>Fri, 14 May 2021 19:47:28 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/How-to-get-newly-created-Contacts-and-their-associated-Deals/m-p/437791#M43369</guid>
      <dc:creator>dennisedson</dc:creator>
      <dc:date>2021-05-14T19:47:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to get newly created Contacts and their associated Deals</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/How-to-get-newly-created-Contacts-and-their-associated-Deals/m-p/438243#M43401</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/185462"&gt;@YFeng&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unfortunately, the Search CRM endpoint does not support the "associations" parameter in the query string &lt;EM&gt;(not all HubSpot API endpoints support the same query string parameters - you'll need to check each endpoint individually using &lt;A href="https://developers.hubspot.com/docs/api/overview" target="_blank" rel="noopener"&gt;HubSpot API docs&lt;/A&gt;)&lt;/EM&gt;. As such, you'll probably have to perform a couple more API calls than you were originally expecting. Based on how you've described your case, here's an option you may like to pursue (assuming the Contact records are already associated with the relevant Deal records):&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Perform a CRM Search to return recently created Contacts (as per the screenshot you've already shared)&lt;/LI&gt;
&lt;LI&gt;Use the returned Contact IDs from Step 1 to &lt;STRONG&gt;&lt;A href="https://developers.hubspot.com/docs/api/crm/associations" target="_blank" rel="noopener"&gt;"read a batch of associations"&lt;/A&gt;&lt;/STRONG&gt;&lt;/LI&gt;
&lt;LI&gt;Use the returned Deal IDs from Step 2 to &lt;STRONG&gt;&lt;A href="https://developers.hubspot.com/docs/api/crm/deals" target="_blank" rel="noopener"&gt;"read a batch of deals by internal ID"&lt;/A&gt;&amp;nbsp;&lt;/STRONG&gt;(you'd specify your target Deal properties within the query string of this request)&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;I hope that's helpful. Let me know if you have any follow up questions.&lt;/P&gt;
&lt;P&gt;All the best,&lt;/P&gt;
&lt;P&gt;Zach&lt;/P&gt;</description>
      <pubDate>Mon, 17 May 2021 15:34:05 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/How-to-get-newly-created-Contacts-and-their-associated-Deals/m-p/438243#M43401</guid>
      <dc:creator>zaklein</dc:creator>
      <dc:date>2021-05-17T15:34:05Z</dc:date>
    </item>
  </channel>
</rss>

