<?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: Error: Cannot Deserialize in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Error-Cannot-Deserialize/m-p/1063584#M77853</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/849607"&gt;@NSaad&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You'll need to ensure your request follows the exact format from the HubSpot API documentation:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
  "inputs": [
    {
      "properties": {
        "phone": "5555555555"
      },
      "id": "test@test.com",
      "idProperty": "email"
    }
  ]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The order of properties in the request matters. You should put properties first, followed by id and idProperty. Also, remember&amp;nbsp;to remove any extra whitespace or formatting.&lt;/P&gt;</description>
    <pubDate>Fri, 01 Nov 2024 02:23:17 GMT</pubDate>
    <dc:creator>GiantFocal</dc:creator>
    <dc:date>2024-11-01T02:23:17Z</dc:date>
    <item>
      <title>Error: Cannot Deserialize</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Error-Cannot-Deserialize/m-p/1063503#M77844</link>
      <description>&lt;P&gt;I'd like to know why the following request fails with this error. It's not clear as to what's going on, as it matches the expected format.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Error:&lt;/P&gt;&lt;P&gt;`{"status":"error","message":"Invalid input JSON on line 1, column 17: 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":"REDACTED"}`&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Request Sent (Sent as one line, but multiline here for ease of viewing):&lt;/P&gt;&lt;P&gt;```&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;"inputs": [&lt;BR /&gt;{&lt;BR /&gt;"idProperty": "email",&lt;BR /&gt;"id": "aaa@aaa.com",&lt;BR /&gt;"properties": {&lt;BR /&gt;"email": "aaa@aaa.com",&lt;BR /&gt;"firstname": "Aaa",&lt;BR /&gt;"lastname": "Bbb",&lt;BR /&gt;"address": "123 Main St",&lt;BR /&gt;"city": "Edmonton",&lt;BR /&gt;"state": "AB ",&lt;BR /&gt;"zip": "T6W2R6",&lt;BR /&gt;"phone": "+11231231234"&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;```&lt;/P&gt;&lt;P&gt;This page shows the following sample format:&amp;nbsp;&lt;A href="https://developers.hubspot.com/beta-docs/guides/api/crm/objects/contacts#upsert-contacts" target="_blank"&gt;https://developers.hubspot.com/beta-docs/guides/api/crm/objects/contacts#upsert-contacts&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;```&lt;/P&gt;&lt;P&gt;// Example request body with email&lt;BR /&gt;// POST /crm/v3/objects/contacts/batch/upsert&lt;BR /&gt;{&lt;BR /&gt;"inputs": [&lt;BR /&gt;{&lt;BR /&gt;"properties": {&lt;BR /&gt;"phone": "5555555555"&lt;BR /&gt;},&lt;BR /&gt;"id": "test@test.com",&lt;BR /&gt;"idProperty": "email"&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"properties": {&lt;BR /&gt;"phone": "7777777777"&lt;BR /&gt;},&lt;BR /&gt;"id": "example@hubspot.com",&lt;BR /&gt;"idProperty": "email"&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;```&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please note that I have tried truncating the properties to just send the email. So, it's not that. Any help is greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2024 20:36:32 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Error-Cannot-Deserialize/m-p/1063503#M77844</guid>
      <dc:creator>NSaad</dc:creator>
      <dc:date>2024-10-31T20:36:32Z</dc:date>
    </item>
    <item>
      <title>Re: Error: Cannot Deserialize</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Error-Cannot-Deserialize/m-p/1063584#M77853</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/849607"&gt;@NSaad&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You'll need to ensure your request follows the exact format from the HubSpot API documentation:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
  "inputs": [
    {
      "properties": {
        "phone": "5555555555"
      },
      "id": "test@test.com",
      "idProperty": "email"
    }
  ]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The order of properties in the request matters. You should put properties first, followed by id and idProperty. Also, remember&amp;nbsp;to remove any extra whitespace or formatting.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Nov 2024 02:23:17 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Error-Cannot-Deserialize/m-p/1063584#M77853</guid>
      <dc:creator>GiantFocal</dc:creator>
      <dc:date>2024-11-01T02:23:17Z</dc:date>
    </item>
  </channel>
</rss>

