Hi,
I’m trying to post events to my site via the API but I keep getting the following response:
{
"code": "rest_invalid_param",
"message": "Invalid parameter(s): repeat_x",
"data": {
"status": 400,
"params": {
"repeat_x": "repeat_x is not one of 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30."
}
}
}
I understand that repeat_x is a child of the recurring_dates object, but I can’t seem to work out the correct schema to use for it. In this case the event is not recurring. I’ve looked at the output from a GET request and it spits out a PHP serialized recurring_dates object and converting this to JSON, we get:
"recurring_dates": {"is_recurring":false,"event_start":"2018-08-15","event_end":"2018-08-15","event_recurring_dates":"2018-08-15","all_day":false,"starttime":"00:00","endtime":"00:00","different_times":false,"starttimes":[],"endtimes":[],"repeat_type":"","repeat_x":1,"duration_x":"","repeat_end_type":"","max_repeat":"","repeat_end":"","repeat_days":[],"repeat_weeks":[]}
But posting with this still results in the above error. Any suggestions? Also, any guidance as to the minimum fields required to post an event and what the field names are?
Thanks,
Louis