Contacts API not accepting timestamp


#1

This is the response I get when I submit this timestamp. The timestamp looks fine when I test it here. What's the problem guys?

Hubspot::RequestError: Response body: {"status":"error","message":"Errors found processing batch update","correlationId":"c3497755-4296-4062-8259-70c1804a4922","failureMessages":[{"index":0,"propertyValidationResult":{"isValid":false,"message":"1526947200 is at 16:9:7.200 UTC, not midnight!","error":"INVALID_DATE","name":"first_booking_date"}}],"requestId":"8315a8306ec70b2fe1ab03ff75e57c5d"}

Thanks,
Andrew


#2

HubSpot has two types of contact properties for storing times, date and datetime. Any properties created in the HubSpot application in Contact Settings would be date properties.

Date properties will only store the date, and must be set to midnight UTC for the date you want. For example, May 1 2015 would be 1430438400000 (01 May 2015 00:00:00 UTC). If you try to set a value that is not midnight UTC, you will receive an error.

more you can find here