<?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: associate a company to contact without making it primary in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/associate-a-company-to-contact-without-making-it-primary/m-p/836776#M66597</link>
    <description>&lt;P&gt;I have used V4 association API to create association from Company to contact. with the following body. but still it is creating the primary contact. I want to create a association with out&amp;nbsp; making it a primary contact.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[&lt;BR /&gt;{&lt;BR /&gt;"associationCategory": "HUBSPOT_DEFINED",&lt;BR /&gt;"associationTypeId": 280&lt;BR /&gt;}&lt;BR /&gt;]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 18 Aug 2023 18:22:43 GMT</pubDate>
    <dc:creator>hpolice</dc:creator>
    <dc:date>2023-08-18T18:22:43Z</dc:date>
    <item>
      <title>associate a company to contact without making it primary</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/associate-a-company-to-contact-without-making-it-primary/m-p/595560#M51669</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;im using php SDK to make the association&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;wherein the $company_id and&amp;nbsp;&lt;SPAN&gt;$contact_id&lt;/SPAN&gt;&amp;nbsp;are the actual IDs :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;$hubSpot&lt;/SPAN&gt;&lt;SPAN&gt;-&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;crm&lt;/SPAN&gt;&lt;SPAN&gt;()-&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;companies&lt;/SPAN&gt;&lt;SPAN&gt;()-&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;associationsApi&lt;/SPAN&gt;&lt;SPAN&gt;()-&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;create&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;$company_id&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;"contact"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;$contact_id&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;"company_to_contact"&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;it works fine, but my problem is, whenever I associate multiple company to the same contact, it makes the last company associated to be the contact's primary company (which i dont want to).&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;question:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;1. is there a way to make association w/o affecting the primary company of the contact?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;2. How do i set the primary company of a contact? (just in case #1 is not possible, and i want to "revert" back the original primary company)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Many thanks&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 16 Mar 2022 00:28:55 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/associate-a-company-to-contact-without-making-it-primary/m-p/595560#M51669</guid>
      <dc:creator>DBiler</dc:creator>
      <dc:date>2022-03-16T00:28:55Z</dc:date>
    </item>
    <item>
      <title>Re: associate a company to contact without making it primary</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/associate-a-company-to-contact-without-making-it-primary/m-p/596679#M51727</link>
      <description>&lt;P&gt;Hey &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/341808"&gt;@DBiler&lt;/a&gt; ,&lt;/P&gt;
&lt;P&gt;I would suggest taking a look at the &lt;A href="https://developers.hubspot.com/docs/api/crm/associations/v4" target="_blank" rel="noopener"&gt;new v4 endpoints&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;If you want to set the company as primary, you would apply the label "Primary" and use the corresponding associationTypeID which in this case should be 1.&amp;nbsp; You can verify that by doing a request for all the labels of the association between Contacts and Companies by hitting this endpoint:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;SPAN&gt;&lt;A href="https://api.hubapi.com/crm/v4/associations/contacts/companies/labels" target="_blank"&gt;https://api.hubapi.com/crm/v4/associations/contacts/companies/labels&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The json you would send to create a company as the primary would look like&amp;nbsp; this:&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;[
  {
    "associationCategory": "HUBSPOT_DEFINED",
    "associationTypeId": 1,
    "label": "Primary"
  }
]&lt;/LI-CODE&gt;
&lt;P&gt;If you did not want to set the label to primary, it would look like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;[
  {
    "associationCategory": "HUBSPOT_DEFINED",
    "associationTypeId": 279
  }
]&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And if you have created new labels, the associationCategory&amp;nbsp; would be USER_DEFINED and the ID would need to be collected with the previously mentioned request.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2022 14:13:30 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/associate-a-company-to-contact-without-making-it-primary/m-p/596679#M51727</guid>
      <dc:creator>dennisedson</dc:creator>
      <dc:date>2022-03-17T14:13:30Z</dc:date>
    </item>
    <item>
      <title>Re: associate a company to contact without making it primary</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/associate-a-company-to-contact-without-making-it-primary/m-p/771658#M62432</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/13982"&gt;@dennisedson&lt;/a&gt;&amp;nbsp;I have the "opposite" problem, perhaps you have some thouhts?&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.hubspot.com/t5/APIs-Integrations/Create-Primary-Contact-Association/m-p/771638#M62429" target="_blank"&gt;https://community.hubspot.com/t5/APIs-Integrations/Create-Primary-Contact-Association/m-p/771638#M62429&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2023 12:47:20 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/associate-a-company-to-contact-without-making-it-primary/m-p/771658#M62432</guid>
      <dc:creator>Lyndwode</dc:creator>
      <dc:date>2023-03-21T12:47:20Z</dc:date>
    </item>
    <item>
      <title>Re: associate a company to contact without making it primary</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/associate-a-company-to-contact-without-making-it-primary/m-p/836776#M66597</link>
      <description>&lt;P&gt;I have used V4 association API to create association from Company to contact. with the following body. but still it is creating the primary contact. I want to create a association with out&amp;nbsp; making it a primary contact.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[&lt;BR /&gt;{&lt;BR /&gt;"associationCategory": "HUBSPOT_DEFINED",&lt;BR /&gt;"associationTypeId": 280&lt;BR /&gt;}&lt;BR /&gt;]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2023 18:22:43 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/associate-a-company-to-contact-without-making-it-primary/m-p/836776#M66597</guid>
      <dc:creator>hpolice</dc:creator>
      <dc:date>2023-08-18T18:22:43Z</dc:date>
    </item>
  </channel>
</rss>

