Support

Home Forums Event Espresso Premium Recent REST changes that would cause erroneous error regarding invalid date?

Recent REST changes that would cause erroneous error regarding invalid date?

Posted: November 23, 2021 at 10:33 am

Viewing 3 reply threads


Daniel

November 23, 2021 at 10:33 am

Hello!

I have a battle-tested set of scripts I use to bulk upload events using the REST API.

Today I went to use those scripts and the first row in the bulk upload replied with this unusual error regarding REST and invalid dates:

The first part is the JSON data, the second is the REST response.

`

{
“TKT_max”: 1,
“TKT_price”: “290”,
“TKT_required”: “true”,
“TKT_order”: 0,
“TKT_qty”: “12”,
“TKT_name”: “All Sessions”,
“TKT_end_date”: “2022-01-04T17:30:00”,
“TKT_start_date”: “2021-23-05T05:00:00”
}
{
“message”: “Invalid parameter(s): TKT_start_date”,
“code”: “rest_invalid_param”,
“data”: {
“status”: 400,
“params”: {
“TKT_start_date”: “Invalid date.”
},
“details”: {
“TKT_start_date”: {
“message”: “Invalid date.”,
“code”: “rest_invalid_date”,
“data”: null
}
}
}
}

`

I noticed one unusual thing in the newly created event (created using REST API) was that it contained the default ticket that gets added when a new Event is created using the UI! That is a new twist and something unexpected. Maybe that is related to this error? Is is possible that the REST code was changed to make it so that it inserts the default ticket? If this is what happened, how can I turn off this behavior? It is unexpected, to say the least. I would expect the API to create an event without any default ticket.

Thank you!
D


Daniel

November 23, 2021 at 10:36 am

Also, how would I roll back if I just want to get the EE version back to pre-November release?


Daniel

November 23, 2021 at 11:17 am

Ugh. Facepalm. Sorry. I can usually type dates correctly.
Please close this ticket ASAP! LOL.


Tony

  • Support Staff

November 24, 2021 at 2:56 am

Hi Daniel,

Lol, I’m glad you figure out the problem 🙂

I’ll mark this thread resolved.

Viewing 3 reply threads

The support post ‘Recent REST changes that would cause erroneous error regarding invalid date?’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso