Hubspot API returning empty dates


#1

We noticed a problem for some date fields when retrieving data from the Companies endpoints. For some reason, some of the dates were coming back with a value of “”. We think this is likely a bug with the API as other null dates simply do not return. For instance:

“hubspot_owner_assigneddate”:{“value”:"“
vs
"hubspot_owner_assigneddate”:{“value”:“1421247426372”

In most of the response companies, there is no value at all for hubspot_owner_assigneddate. For the ones that do come back, most of the results have a valid value like the 2nd one shown. A few do not have any value but still come back with an empty string as the value. The client we are working with that reported this issue mentioned they saw the same problem for these date fields. Most of them are added by HubSpot:

[Became a Lead Date] --> hs_lifecyclestage_lead_date
[Close Date] --> closedate
[Last Meeting Booked] --> engagements_last_meeting_booked
[Owner Assigned Date] --> hubspot_owner_assigneddate
[Training: Partner Sales Training Date] --> tx_partner_sales_training
[Training: Partner Technical Training Date] --> tx_training_partner_technical

For a concrete example in the testapi@hubspot.com account, see the hubspot_owner_assigneddate property on CompanyId 156839581.