APIs & Integrations

JakeW
Contributor

Error sending Date Picker value through API

We are sending a date value to a date picker property in the form of YYYY-MM-DD (which we've confirmed with the app is ISO8601 compliant, but maybe that's intrinsic of the date when written that way - don't know what I'm talking about)

 

we are getting this error:

 

"validationResults": [
{
"isValid": false,
"message": "2020-12-01 was not a valid long. Portal xxxxxxx, object type 0-3",
"error": "INVALID_LONG",
"name": "invoice_sent"
}
],
"status": "error",
"message": "Property values were not valid",

 

The Hubspot documentation says this:

Examples:

  • 2015-05-01 would be used for May 1 2015

Not really a developer - any tips you can help me with?

0 Upvotes
5 Replies 5
AKhanduri
Member

Error sending Date Picker value through API

I am running into the same issue with using unix timestamp as well and have asked this question multiple times via support but no answer.

0 Upvotes
dennisedson
HubSpot Product Team
HubSpot Product Team

Error sending Date Picker value through API

Hey @JakeW ,

Thanks for following up on that.  Looks like we may have some contradictory messaging 🤔

Would you do me a favor and send me the endpoint that you are posting to (minus hapikey) as well as the json body?

Here is a post with a similar issue as well as the referenced docs

Once you send me the details I asked for, I will test and make sure we get some consistency 😀


Join us on March 27th at 12 PM for the Digital Essentials Lab, an interactive session designed to redefine your digital strategy!
Engage with expert Jourdan Guyton to gain actionable insights, participate in live Q&A, and learn strategies to boost your business success.
Don't miss this opportunity to connect and grow—reserve your spot today!

0 Upvotes
JakeW
Contributor

Error sending Date Picker value through API

Thanks @dennisedson  - the docs mention UNIX timestamp - I think we can do that through the app we're trying to do this with. I don't know how to determine what endpoint we are posting to, or what a hapikey and json body are, so I'm not sure I can help further o_o

For now I'll just assume that we need to send it in UNIX in milliseconds, and it's incorrect to say that date pickers can receive a straight up YYYY-MM-DD value ...

dennisedson
HubSpot Product Team
HubSpot Product Team

Error sending Date Picker value through API

Hey @JakeW 

You will want the date in the unix timestamp format as detailed here 😀

You are working your way up the ladder as a developer 😉


Join us on March 27th at 12 PM for the Digital Essentials Lab, an interactive session designed to redefine your digital strategy!
Engage with expert Jourdan Guyton to gain actionable insights, participate in live Q&A, and learn strategies to boost your business success.
Don't miss this opportunity to connect and grow—reserve your spot today!

0 Upvotes
JakeW
Contributor

Error sending Date Picker value through API

Thanks @dennisedson  - am I misreading the FAQ in this case then? One example given is in Unix as you've suggested, but it also lists a stock YYYY-MM-DD as an 'example' of how to send dates to a Date Picker property.

Here's a screenshot from this article I'm referring to

JakeW_0-1606862663943.png

 

I'm only going the extra mile to ask here because our app doesn't have an automatic means to reformat dates into a Unix timestamp

 

0 Upvotes