<?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 Getting 400 on insert deals in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Getting-400-on-insert-deals/m-p/746749#M60717</link>
    <description>&lt;P&gt;Hi,&amp;nbsp; getting 400 error while inserting deals using v3 API. Can anyone help on this thanks.&lt;BR /&gt;Error:&amp;nbsp;{"status":"error","message":"Invalid input JSON on line 1, column 18: Cannot deserialize value of type `java.util.ArrayList&amp;lt;com.hubspot.crmpublic.core.models.associations.PublicAssociationsForObject&amp;gt;` from Object value (token `JsonToken.START_OBJECT`)","correlationId":"5929f674-90e1-4797-a9ef-dc3a37d53b20"}&lt;/P&gt;</description>
    <pubDate>Wed, 25 Jan 2023 14:54:59 GMT</pubDate>
    <dc:creator>MPrasad9</dc:creator>
    <dc:date>2023-01-25T14:54:59Z</dc:date>
    <item>
      <title>Getting 400 on insert deals</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Getting-400-on-insert-deals/m-p/746749#M60717</link>
      <description>&lt;P&gt;Hi,&amp;nbsp; getting 400 error while inserting deals using v3 API. Can anyone help on this thanks.&lt;BR /&gt;Error:&amp;nbsp;{"status":"error","message":"Invalid input JSON on line 1, column 18: Cannot deserialize value of type `java.util.ArrayList&amp;lt;com.hubspot.crmpublic.core.models.associations.PublicAssociationsForObject&amp;gt;` from Object value (token `JsonToken.START_OBJECT`)","correlationId":"5929f674-90e1-4797-a9ef-dc3a37d53b20"}&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jan 2023 14:54:59 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Getting-400-on-insert-deals/m-p/746749#M60717</guid>
      <dc:creator>MPrasad9</dc:creator>
      <dc:date>2023-01-25T14:54:59Z</dc:date>
    </item>
    <item>
      <title>Re: Getting 400 on insert deals</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Getting-400-on-insert-deals/m-p/746929#M60721</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/281662"&gt;@MPrasad9&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Are you able to reply with your JSON payload? You can redact some information if you need. We will need that to help diagnose your issue.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;-T&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jan 2023 18:58:18 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Getting-400-on-insert-deals/m-p/746929#M60721</guid>
      <dc:creator>tominal</dc:creator>
      <dc:date>2023-01-25T18:58:18Z</dc:date>
    </item>
    <item>
      <title>Re: Getting 400 on insert deals</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Getting-400-on-insert-deals/m-p/748020#M60820</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/153634"&gt;@tominal&lt;/a&gt;&amp;nbsp;, Below is the payload which we sent&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;"associations": {&lt;BR /&gt;"company": {&lt;BR /&gt;"ids": "2664404286"&lt;BR /&gt;}&lt;BR /&gt;},&lt;BR /&gt;"properties": {&lt;BR /&gt;"amount": 294,&lt;BR /&gt;"createdate": 1671067793063,&lt;BR /&gt;"dealname": "Urban Sync (Business to Enterprise) ",&lt;BR /&gt;"expansion_type": "Uplift: BE &amp;gt; EE",&lt;BR /&gt;"hubspot_owner_id": "51651368",&lt;BR /&gt;"pipeline": "788269"&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2023 13:43:49 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Getting-400-on-insert-deals/m-p/748020#M60820</guid>
      <dc:creator>MPrasad9</dc:creator>
      <dc:date>2023-01-27T13:43:49Z</dc:date>
    </item>
    <item>
      <title>Re: Getting 400 on insert deals</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Getting-400-on-insert-deals/m-p/748653#M60883</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/153634"&gt;@tominal&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is the payload which we sent, can you check this thanks&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;"associations": {&lt;BR /&gt;"company": {&lt;BR /&gt;"ids": "2664404286"&lt;BR /&gt;}&lt;BR /&gt;},&lt;BR /&gt;"properties": {&lt;BR /&gt;"amount": 294,&lt;BR /&gt;"createdate": 1671067793063,&lt;BR /&gt;"dealname": "Urban Sync (Business to Enterprise) ",&lt;BR /&gt;"expansion_type": "Uplift: BE &amp;gt; EE",&lt;BR /&gt;"hubspot_owner_id": "51651368",&lt;BR /&gt;"pipeline": "788269"&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2023 06:15:16 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Getting-400-on-insert-deals/m-p/748653#M60883</guid>
      <dc:creator>MPrasad9</dc:creator>
      <dc:date>2023-01-30T06:15:16Z</dc:date>
    </item>
    <item>
      <title>Re: Getting 400 on insert deals</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Getting-400-on-insert-deals/m-p/749047#M60914</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/281662"&gt;@MPrasad9&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Apologies, I wrote up a response to this, but it must have been lost.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The gist of it was that you are not able to pass associations in your POST request like that. You will have to follow the steps:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Insert your deal record which will return a Deal ID in the response&lt;/LI&gt;
&lt;LI&gt;Use that Deal ID in a separate POST request to the Associations API&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your deal payload would look like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;/crm/v3/objects/deals&lt;/STRONG&gt;&lt;/P&gt;
&lt;PRE&gt;{
  "properties": {
    "amount": 294,
    "createdate": 1671067793063,
    "dealname": "Urban Sync (Business to Enterprise) ",
    "expansion_type": "Uplift: BE &amp;gt; EE",
    "hubspot_owner_id": "51651368",
    "pipeline": "788269"
  }
}&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And then your associations API request would look like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;/crm/v3/associations/deals/companies/batch/create&lt;/STRONG&gt;&lt;/P&gt;
&lt;PRE&gt;{
  "inputs": [
    {
      "from": {
        "id": "&amp;lt;INSERT DEAL ID HERE&amp;gt;"
      },
      "to": {
        "id": "&lt;SPAN&gt;2664404286&lt;/SPAN&gt;"
      },
      "type": "deal_to_company"
    }
  ]
}&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope that helps!&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2023 20:24:49 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Getting-400-on-insert-deals/m-p/749047#M60914</guid>
      <dc:creator>tominal</dc:creator>
      <dc:date>2023-01-30T20:24:49Z</dc:date>
    </item>
    <item>
      <title>Re: Getting 400 on insert deals</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Getting-400-on-insert-deals/m-p/749871#M60996</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/153634"&gt;@tominal&lt;/a&gt;&amp;nbsp;, Thanks. Its very helpful&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2023 07:41:07 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Getting-400-on-insert-deals/m-p/749871#M60996</guid>
      <dc:creator>MPrasad9</dc:creator>
      <dc:date>2023-02-01T07:41:07Z</dc:date>
    </item>
  </channel>
</rss>

