<?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: Can't add new contacts, &amp;quot;property cannot be missing or null&amp;quot; in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Can-t-add-new-contacts-quot-property-cannot-be-missing-or-null/m-p/238921#M17817</link>
    <description>&lt;P&gt;This has helped me on multiple occasions now &lt;IMG src="https://community.hubspot.com/legacyfs/online/emojis/twitter/smile.png?v=6" title=":smile:" class="emoji" alt=":smile:" /&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 18 Oct 2018 00:49:15 GMT</pubDate>
    <dc:creator>Charlie_Stanard</dc:creator>
    <dc:date>2018-10-18T00:49:15Z</dc:date>
    <item>
      <title>Can't add new contacts, "property cannot be missing or null"</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Can-t-add-new-contacts-quot-property-cannot-be-missing-or-null/m-p/238915#M17811</link>
      <description>&lt;P&gt;Here is my code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;?php

$propArr = array(
        'properties' =&amp;gt; array(
            array(
                "name" =&amp;gt; "email",
                "value" =&amp;gt; "testingapis@hubspot.com"
            ),
            array(
              "name" =&amp;gt; "firstname",
              "value" =&amp;gt; "Adrian"
            ),
            array(
              "name" =&amp;gt; "lastname",
              "value" =&amp;gt; "Mott"
            ),
            array(
              "name" =&amp;gt; "website",
              "value" =&amp;gt; "http =&amp;gt;//hubspot.com"
            ),
            array(
              "name" =&amp;gt; "company",
              "value" =&amp;gt; "HubSpot"
            ),
            array(
              "name" =&amp;gt; "phone",
              "value" =&amp;gt; "555-122-2323"
            ),
            array(
             "name" =&amp;gt; "address",
              "value" =&amp;gt; "25 First Street"
            ),
            array(
              "name" =&amp;gt; "city",
              "value" =&amp;gt; "Cambridge"
            ),
            array(
              "name" =&amp;gt; "state",
              "value" =&amp;gt; "MA"
            ),
            array(
              "name" =&amp;gt; "zip",
              "value" =&amp;gt; "02139"
            )
        )
    );

    echo "Adding Contact \n\n";
    $endpoint = 'https://api.hubapi.com/contacts/v1/contact/?hapikey=' . $hapikey;
    $ch = @curl_init();
    @curl_setopt($ch, CURLOPT_POST, true);
    $post_json = json_encode($propArr);
    @curl_setopt($ch, CURLOPT_POSTFIELDS, $post_json);
    @curl_setopt($ch, CURLOPT_URL, $endpoint);
    @curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
    @curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    $response = @curl_exec($ch);
    $status_code = @curl_getinfo($ch, CURLINFO_HTTP_CODE);
    $curl_errors = curl_error($ch);
    @curl_close($ch);
    echo "curl Errors: " . $curl_errors;
    echo "\nStatus code: " . $status_code;
    echo "\nResponse: " . $response . "\n\n";
}
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And the error message I’m getting:&lt;/P&gt;
&lt;P&gt;Response: {“status”:“error”,“message”:“property cannot be missing or null”, etc.}&lt;/P&gt;
&lt;P&gt;I’m not sure what property the msg is referring to, have tried to add/remove different properties from the array to no avail.&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sun, 03 Dec 2017 06:03:36 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Can-t-add-new-contacts-quot-property-cannot-be-missing-or-null/m-p/238915#M17811</guid>
      <dc:creator>vbhubspotuser</dc:creator>
      <dc:date>2017-12-03T06:03:36Z</dc:date>
    </item>
    <item>
      <title>Re: Can't add new contacts, "property cannot be missing or null"</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Can-t-add-new-contacts-quot-property-cannot-be-missing-or-null/m-p/238916#M17812</link>
      <description>&lt;P&gt;Nevermind, I am dumb. Needed to switch out the “name” property with “property.” Wish there was a way to delete the post, as it’s sort of useless at this point.&lt;/P&gt;</description>
      <pubDate>Sun, 03 Dec 2017 20:42:48 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Can-t-add-new-contacts-quot-property-cannot-be-missing-or-null/m-p/238916#M17812</guid>
      <dc:creator>vbhubspotuser</dc:creator>
      <dc:date>2017-12-03T20:42:48Z</dc:date>
    </item>
    <item>
      <title>Re: Can't add new contacts, "property cannot be missing or null"</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Can-t-add-new-contacts-quot-property-cannot-be-missing-or-null/m-p/238917#M17813</link>
      <description>&lt;P&gt;&lt;A class="mention" href="https://community.hubspot.com/u/vbhubspotuser"&gt;@vbhubspotuser&lt;/A&gt; I can remove the post for you if you’d like?  I’d argue keeping it as others have run into or will run into the same error message at some point and I believe this could help future developers trying to interface with the HubSpot APIs.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Dec 2017 14:17:52 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Can-t-add-new-contacts-quot-property-cannot-be-missing-or-null/m-p/238917#M17813</guid>
      <dc:creator>3PETE</dc:creator>
      <dc:date>2017-12-04T14:17:52Z</dc:date>
    </item>
    <item>
      <title>Re: Can't add new contacts, "property cannot be missing or null"</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Can-t-add-new-contacts-quot-property-cannot-be-missing-or-null/m-p/238918#M17814</link>
      <description>&lt;P&gt;&lt;A class="mention" href="https://community.hubspot.com/u/pmanca"&gt;@pmanca&lt;/A&gt; Sure, we can keep it up. Hopefully it will help others.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Dec 2017 18:53:05 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Can-t-add-new-contacts-quot-property-cannot-be-missing-or-null/m-p/238918#M17814</guid>
      <dc:creator>vbhubspotuser</dc:creator>
      <dc:date>2017-12-04T18:53:05Z</dc:date>
    </item>
    <item>
      <title>Re: Can't add new contacts, "property cannot be missing or null"</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Can-t-add-new-contacts-quot-property-cannot-be-missing-or-null/m-p/238919#M17815</link>
      <description>&lt;P&gt;Yeah thanks for keeping this up because I had the same "dumb" question!&lt;/P&gt;</description>
      <pubDate>Sun, 15 Apr 2018 02:00:21 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Can-t-add-new-contacts-quot-property-cannot-be-missing-or-null/m-p/238919#M17815</guid>
      <dc:creator>gillytech</dc:creator>
      <dc:date>2018-04-15T02:00:21Z</dc:date>
    </item>
    <item>
      <title>Re: Can't add new contacts, "property cannot be missing or null"</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Can-t-add-new-contacts-quot-property-cannot-be-missing-or-null/m-p/238920#M17816</link>
      <description>&lt;P&gt;It's not a dumb question! I found myself with the same issue... typed the word "property" wrong! So, after read this post, it's fixed. Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 21 Aug 2018 19:01:40 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Can-t-add-new-contacts-quot-property-cannot-be-missing-or-null/m-p/238920#M17816</guid>
      <dc:creator>hiltonrrn</dc:creator>
      <dc:date>2018-08-21T19:01:40Z</dc:date>
    </item>
    <item>
      <title>Re: Can't add new contacts, "property cannot be missing or null"</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Can-t-add-new-contacts-quot-property-cannot-be-missing-or-null/m-p/238921#M17817</link>
      <description>&lt;P&gt;This has helped me on multiple occasions now &lt;IMG src="https://community.hubspot.com/legacyfs/online/emojis/twitter/smile.png?v=6" title=":smile:" class="emoji" alt=":smile:" /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Oct 2018 00:49:15 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Can-t-add-new-contacts-quot-property-cannot-be-missing-or-null/m-p/238921#M17817</guid>
      <dc:creator>Charlie_Stanard</dc:creator>
      <dc:date>2018-10-18T00:49:15Z</dc:date>
    </item>
    <item>
      <title>Re: Can't add new contacts, "property cannot be missing or null"</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Can-t-add-new-contacts-quot-property-cannot-be-missing-or-null/m-p/256106#M22747</link>
      <description>&lt;P&gt;Actually it's the fault of the HS person who architected the system; s/he is probaly either junior or did not pay attention to details.&amp;nbsp;&lt;BR /&gt;Several issues that will waste a lot of your time:&lt;/P&gt;&lt;P&gt;1) JSON format inconsistencies: some uploads require "name/value" pair; others "property/value" pair - it is not consistent! So if you copy your code for "contact" and use it for 'deal', you will get misleading error!!! I've spet tones of time searching for solution just to find out this stupid discrepancy.&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) Inconsistent Error Behavior - if you use the incorrect JSON format (i.e. if you pass "name/value" instead of "property/value"), some API calls (such as Deals) will cause an error, while others (such as Company) will silently accept the API and will return NO errors (which causes confusion since you assume that the API call works)&lt;/P&gt;&lt;P&gt;3) Misleading errors: if you use the wrong JSON format, the error will NOT tell you that the value pair names are wrong, but rather will tell you that the property/name is missing with an "emtpy" string - which is useless and misleading.&lt;/P&gt;&lt;P&gt;4) Inconsistent use of HTTP verbs - some UPDATE API calls use "POST", others "PUT"&amp;nbsp;&lt;BR /&gt;5) Idiotic calculation of milliseconds from 1970-01-01 using UTC time - that's a good one.&amp;nbsp; I followed the instructions but my client is complaining that I am one day off. I manually add an extra day and it works in some cases but not in other.&amp;nbsp; If you convert it to UTC, the system comes back and states that it requires MIDNIGHT time and fails the API call.&amp;nbsp; &amp;nbsp;I was not able to figure this one out so I told the client to contact HS. I gave up.&amp;nbsp; I guess it's very difficult ot accept a standard date like every other modern system.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Since the issues are still there, I guess it's very difficult to either fix the inconsistencies, or even better, allow both "name/value" and "property/value" to be accepted as an input!!!&lt;BR /&gt;&lt;BR /&gt;I spent a lot of time figuring out the immaturity of the system; I don't like it but a client want it.&amp;nbsp; &amp;nbsp;I was very disappoint when I ask for help, and HubSpot offered me 1500$ for 4 hours for JScirpt development - i.e. 400$/hour support for trivial development?!&amp;nbsp; &amp;nbsp;I wish I could send them my 20+ hours at their rate of researching their bad design at my expense &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Their test guys should have caught this issues and address them, if not fixing them in the syste, at least document them in the useless forum.&lt;BR /&gt;&lt;BR /&gt;Your post was one of the few that actually help.&amp;nbsp; Thank you!&amp;nbsp; The rest of it is mostly content to fill the pages...so you can say that there is something published (better than nothing) &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Good luck&lt;/P&gt;</description>
      <pubDate>Thu, 28 Feb 2019 13:32:52 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Can-t-add-new-contacts-quot-property-cannot-be-missing-or-null/m-p/256106#M22747</guid>
      <dc:creator>koseto</dc:creator>
      <dc:date>2019-02-28T13:32:52Z</dc:date>
    </item>
    <item>
      <title>Re: Can't add new contacts, "property cannot be missing or null"</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Can-t-add-new-contacts-quot-property-cannot-be-missing-or-null/m-p/455083#M44819</link>
      <description>&lt;P&gt;this help me today hahaha&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jul 2021 21:40:29 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Can-t-add-new-contacts-quot-property-cannot-be-missing-or-null/m-p/455083#M44819</guid>
      <dc:creator>ramonpego</dc:creator>
      <dc:date>2021-07-05T21:40:29Z</dc:date>
    </item>
    <item>
      <title>Re: Can't add new contacts, "property cannot be missing or null"</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Can-t-add-new-contacts-quot-property-cannot-be-missing-or-null/m-p/502919#M47298</link>
      <description>&lt;P&gt;just lost some hours in the same issue. hubspot needs to improve those error messages&lt;/P&gt;</description>
      <pubDate>Wed, 29 Sep 2021 18:34:55 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Can-t-add-new-contacts-quot-property-cannot-be-missing-or-null/m-p/502919#M47298</guid>
      <dc:creator>LdePaulaLima</dc:creator>
      <dc:date>2021-09-29T18:34:55Z</dc:date>
    </item>
    <item>
      <title>Re: Can't add new contacts, "property cannot be missing or null"</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Can-t-add-new-contacts-quot-property-cannot-be-missing-or-null/m-p/523445#M48544</link>
      <description>&lt;P&gt;All of this is still true in nov. 2021. This post helped me a lot today&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Tue, 09 Nov 2021 16:32:21 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Can-t-add-new-contacts-quot-property-cannot-be-missing-or-null/m-p/523445#M48544</guid>
      <dc:creator>JHUSSON</dc:creator>
      <dc:date>2021-11-09T16:32:21Z</dc:date>
    </item>
  </channel>
</rss>

