<?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: HubSpot API PHP Client Libraries for V3 - Create a contact with associations in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/HubSpot-API-PHP-Client-Libraries-for-V3-Create-a-contact-with/m-p/909910#M70489</link>
    <description>&lt;P&gt;I read your linked page and I check my code but I don't find where is the problem... Have you got any idea ?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Tanguy&lt;/P&gt;</description>
    <pubDate>Tue, 23 Jan 2024 08:11:50 GMT</pubDate>
    <dc:creator>TCOLINS</dc:creator>
    <dc:date>2024-01-23T08:11:50Z</dc:date>
    <item>
      <title>HubSpot API PHP Client Libraries for V3 - Create a contact with associations</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/HubSpot-API-PHP-Client-Libraries-for-V3-Create-a-contact-with/m-p/907519#M70392</link>
      <description>&lt;P&gt;I try to create a new contact and to associat this contact with an existing company ID.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my code :&lt;/P&gt;&lt;P&gt;$contactInput = new \HubSpot\Client\Crm\Contacts\Model\SimplePublicObjectWithAssociations();&lt;BR /&gt;$contactInput-&amp;gt;setProperties([&lt;BR /&gt;'salutation' =&amp;gt; $genre1,&lt;BR /&gt;'lastname' =&amp;gt; $nom1,&lt;BR /&gt;'firstname' =&amp;gt; $prenom1,&lt;BR /&gt;'job_function' =&amp;gt; $fonction1,&lt;BR /&gt;'phone' =&amp;gt; $tel1,&lt;BR /&gt;'mobilephone' =&amp;gt; $mobile1,&lt;BR /&gt;'email' =&amp;gt; $email1&lt;BR /&gt;]);&lt;BR /&gt;$contactInput-&amp;gt;setAssociations([&lt;BR /&gt;'to' =&amp;gt; ['id' =&amp;gt; $idsociete],&lt;BR /&gt;'types' =&amp;gt; ['associationCategory' =&amp;gt; "HUBSPOT_DEFINED", 'associationTypeId' =&amp;gt; 279]&lt;BR /&gt;]);&lt;BR /&gt;$contact = $hubspot-&amp;gt;crm()-&amp;gt;contacts()-&amp;gt;basicApi()-&amp;gt;create($contactInput);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;AND here is the error message :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Fatal error&lt;/STRONG&gt;&lt;SPAN&gt;: Uncaught HubSpot\Client\Crm\Contacts\ApiException: [400] Client error: `POST &lt;A href="https://api.hubapi.com/crm/v3/objects/contacts" target="_blank" rel="noopener"&gt;https://api.hubapi.com/crm/v3/objects/contacts&lt;/A&gt;` resulted in a `400 Bad Request` response: {"status":"error","message":"Invalid input JSON on line 1, column 278: Cannot deserialize value of type `java.util.Array (truncated...) in /homepages/15/d475713241/htdocs/code-events-tools/SETT24/vendor/hubspot/api-client/codegen/Crm/Contacts/Api/BasicApi.php:393 Stack trace: #0 /homepages/15/d475713241/htdocs/code-events-tools/SETT24/vendor/hubspot/api-client/codegen/Crm/Contacts/Api/BasicApi.php(369): HubSpot\Client\Crm\Contacts\Api\BasicApi-&amp;gt;createWithHttpInfo() #1 /homepages/15/d475713241/htdocs/code-events-tools/SETT24/api_hubspot.php(275): HubSpot\Client\Crm\Contacts\Api\BasicApi-&amp;gt;create() #2 {main} thrown in&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;/homepages/15/d475713241/htdocs/code-events-tools/SETT24/vendor/hubspot/api-client/codegen/Crm/Contacts/Api/BasicApi.php&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;on line&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;393&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you help me to fix this?&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2024 10:20:55 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/HubSpot-API-PHP-Client-Libraries-for-V3-Create-a-contact-with/m-p/907519#M70392</guid>
      <dc:creator>TCOLINS</dc:creator>
      <dc:date>2024-01-18T10:20:55Z</dc:date>
    </item>
    <item>
      <title>Re: HubSpot API PHP Client Libraries for V3 - Create a contact with associations</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/HubSpot-API-PHP-Client-Libraries-for-V3-Create-a-contact-with/m-p/908580#M70437</link>
      <description>&lt;P&gt;Hey, &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/694545"&gt;@TCOLINS&lt;/a&gt;&lt;/SPAN&gt; &lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt; That error looks like it's unhappy with how you are setting up your associations. If you try using the on-page example here — Contacts API, do you get the same error?&amp;nbsp;&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>Fri, 19 Jan 2024 17:49:56 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/HubSpot-API-PHP-Client-Libraries-for-V3-Create-a-contact-with/m-p/908580#M70437</guid>
      <dc:creator>Jaycee_Lewis</dc:creator>
      <dc:date>2024-01-19T17:49:56Z</dc:date>
    </item>
    <item>
      <title>Re: HubSpot API PHP Client Libraries for V3 - Create a contact with associations</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/HubSpot-API-PHP-Client-Libraries-for-V3-Create-a-contact-with/m-p/908996#M70450</link>
      <description>&lt;P&gt;Hi Jaycee&lt;/P&gt;&lt;P&gt;Thanks for your answer.&lt;/P&gt;&lt;P&gt;I don't see the page you're talking about.&lt;/P&gt;&lt;P&gt;Maybe the link is missing...&lt;/P&gt;&lt;P&gt;Tanguy&lt;/P&gt;</description>
      <pubDate>Sun, 21 Jan 2024 10:11:48 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/HubSpot-API-PHP-Client-Libraries-for-V3-Create-a-contact-with/m-p/908996#M70450</guid>
      <dc:creator>TCOLINS</dc:creator>
      <dc:date>2024-01-21T10:11:48Z</dc:date>
    </item>
    <item>
      <title>Re: HubSpot API PHP Client Libraries for V3 - Create a contact with associations</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/HubSpot-API-PHP-Client-Libraries-for-V3-Create-a-contact-with/m-p/909558#M70473</link>
      <description>&lt;P&gt;Here you go &lt;A href="https://developers.hubspot.com/docs/api/crm/contacts" target="_blank"&gt;https://developers.hubspot.com/docs/api/crm/contacts&lt;/A&gt; It won't link directly to the endpoints tab, you'll need to do that manually.&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, 22 Jan 2024 18:27:25 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/HubSpot-API-PHP-Client-Libraries-for-V3-Create-a-contact-with/m-p/909558#M70473</guid>
      <dc:creator>Jaycee_Lewis</dc:creator>
      <dc:date>2024-01-22T18:27:25Z</dc:date>
    </item>
    <item>
      <title>Re: HubSpot API PHP Client Libraries for V3 - Create a contact with associations</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/HubSpot-API-PHP-Client-Libraries-for-V3-Create-a-contact-with/m-p/909910#M70489</link>
      <description>&lt;P&gt;I read your linked page and I check my code but I don't find where is the problem... Have you got any idea ?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Tanguy&lt;/P&gt;</description>
      <pubDate>Tue, 23 Jan 2024 08:11:50 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/HubSpot-API-PHP-Client-Libraries-for-V3-Create-a-contact-with/m-p/909910#M70489</guid>
      <dc:creator>TCOLINS</dc:creator>
      <dc:date>2024-01-23T08:11:50Z</dc:date>
    </item>
  </channel>
</rss>

