<?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: Associating contact on deal creation API V3 in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Associating-contact-on-deal-creation-API-V3/m-p/785698#M63394</link>
    <description>&lt;P&gt;Hey,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/556914"&gt;@IoanaBob&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt; Welcome to the community! Thanks for your question. Do you still need an example? If so, what you are after is a simple working example of:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;creating a new Deal&lt;/LI&gt;
&lt;LI&gt;associating the new Deal to an existing Contact&lt;/LI&gt;
&lt;LI&gt;doing it in one-shot&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Is that correct?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;Jaycee&lt;/P&gt;</description>
    <pubDate>Mon, 24 Apr 2023 17:00:32 GMT</pubDate>
    <dc:creator>Jaycee_Lewis</dc:creator>
    <dc:date>2023-04-24T17:00:32Z</dc:date>
    <item>
      <title>Associating contact on deal creation API V3</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Associating-contact-on-deal-creation-API-V3/m-p/784700#M63337</link>
      <description>&lt;P&gt;After creating both the deal and the contacts, I am stuck at connecting the deal with the already existing contact.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From what I see in the documentation associations are possible directly on create (&lt;A href="https://developers.hubspot.com/docs/api/crm/deals#associations" target="_blank" rel="noopener"&gt;https://developers.hubspot.com/docs/api/crm/deals#associations&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However when I create a deal with an association to the contact as stated in the documentaion, the deal gets created without errors, but the association not. Below are the params:&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;request_body&lt;/SPAN&gt; =&amp;nbsp; {&lt;/SPAN&gt;&lt;SPAN class=""&gt;:properties&lt;/SPAN&gt;&lt;SPAN class=""&gt;=&amp;gt;{&lt;/SPAN&gt;&lt;SPAN class=""&gt;:dealname&lt;/SPAN&gt;&lt;SPAN class=""&gt;=&amp;gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;Ioana Bob - Couple DE&lt;STRONG&gt;"&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;, &lt;/SPAN&gt;&lt;SPAN class=""&gt;:amount&lt;/SPAN&gt;&lt;SPAN class=""&gt;=&amp;gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;0.8e5&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;, &lt;/SPAN&gt;&lt;SPAN class=""&gt;:dealstage&lt;/SPAN&gt;&lt;SPAN class=""&gt;=&amp;gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;170367959&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;, &lt;/SPAN&gt;&lt;SPAN class=""&gt;:pipeline&lt;/SPAN&gt;&lt;SPAN class=""&gt;=&amp;gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;default&lt;STRONG&gt;"&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;, &lt;/SPAN&gt;&lt;SPAN class=""&gt;:hubspot_owner_id&lt;/SPAN&gt;&lt;SPAN class=""&gt;=&amp;gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;834297809&lt;STRONG&gt;"&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;},&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;:associations&lt;/SPAN&gt;&lt;SPAN class=""&gt;=&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp; &lt;/SPAN&gt;[{&lt;/SPAN&gt;&lt;SPAN class=""&gt;:to&lt;/SPAN&gt;&lt;SPAN class=""&gt;=&amp;gt;{&lt;/SPAN&gt;&lt;SPAN class=""&gt;:id&lt;/SPAN&gt;&lt;SPAN class=""&gt;=&amp;gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;2251&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;}, &lt;/SPAN&gt;&lt;SPAN class=""&gt;:types&lt;/SPAN&gt;&lt;SPAN class=""&gt;=&amp;gt;[{&lt;/SPAN&gt;&lt;SPAN class=""&gt;:associationCategory&lt;/SPAN&gt;&lt;SPAN class=""&gt;=&amp;gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;HUBSPOT_DEFINED&lt;STRONG&gt;"&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;, &lt;/SPAN&gt;&lt;SPAN class=""&gt;:associationTypeId&lt;/SPAN&gt;&lt;SPAN class=""&gt;=&amp;gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;3&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;}]},&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;{&lt;/SPAN&gt;&lt;SPAN class=""&gt;:associated_objects&lt;/SPAN&gt;&lt;SPAN class=""&gt;=&amp;gt;[&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;"&lt;/STRONG&gt;CONTACT&lt;STRONG&gt;"&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;]}]}&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;Ruby API call:&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;hubspot_api_client.crm.deals.basic_api.create(&lt;/SPAN&gt;&lt;SPAN class=""&gt;body&lt;/SPAN&gt;&lt;SPAN class=""&gt;: request_body)&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;Could you share what am I missing here? I attempted to perform the curl request with the association through the website, and I couldn't make it work in raw format either.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;&lt;P class=""&gt;&lt;SPAN class=""&gt;As a note, I would like to avoid making another API call to create the association separately, because it would be a waste of resources.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Apr 2023 23:22:54 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Associating-contact-on-deal-creation-API-V3/m-p/784700#M63337</guid>
      <dc:creator>IoanaBob</dc:creator>
      <dc:date>2023-04-20T23:22:54Z</dc:date>
    </item>
    <item>
      <title>Re: Associating contact on deal creation API V3</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Associating-contact-on-deal-creation-API-V3/m-p/785698#M63394</link>
      <description>&lt;P&gt;Hey,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/556914"&gt;@IoanaBob&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt; Welcome to the community! Thanks for your question. Do you still need an example? If so, what you are after is a simple working example of:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;creating a new Deal&lt;/LI&gt;
&lt;LI&gt;associating the new Deal to an existing Contact&lt;/LI&gt;
&lt;LI&gt;doing it in one-shot&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Is that correct?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;Jaycee&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2023 17:00:32 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Associating-contact-on-deal-creation-API-V3/m-p/785698#M63394</guid>
      <dc:creator>Jaycee_Lewis</dc:creator>
      <dc:date>2023-04-24T17:00:32Z</dc:date>
    </item>
  </channel>
</rss>

