Event posting Rest API issue

This topic contains 4 replies, has 3 voices, and was last updated by  Louis 5 years, 8 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #442578

    Louis
    Expired Member
    Post count: 28

    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

    #442583

    Louis
    Expired Member
    Post count: 28

    p.s. I changed repeat_x to 1 from “” as that’s what the error was telling me it would accept but that still didn’t work.

    #442588

    Paolo
    Site Admin
    Post count: 31206

    Hi Louis,

    a developer has been alerted and he’ll reply asap.

    Thanks for your patience,

    #442628

    Kiran
    Moderator
    Post count: 7069

    Hello Louis,

    The issue has been fixed.

    Please download develpment version from here and overwrite files under /plugins/geodir_api/ plugin: https://github.com/kprajapatii/geodir_api/

    Thanks,
    Kiran

    #442633

    Louis
    Expired Member
    Post count: 28

    Excellent, thank you. I’ve updated the plugin with the files above and it’s working as expected.

    Thanks 🙂

Viewing 5 posts - 1 through 5 (of 5 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket