How to use REST API ?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #1473941

    Hello, I’m very confused about the REST API Documentation. on my website, I’ve just created the API Keys in Accommodation > Settings > Advanced, And the QR Code gave me a url ink of : [API_KEY] %7C [API_SECRET]

    However this alone gives an error of :

    {“code”:”rest_no_route”,”message”:”No route was found matching the URL and request method.”,”data”:{“status”:404}}

    Using the REST API Docs, I’ve tried using that URL as the endpoint and appending /bookings at the end it, But It’s still giving me the same response. ie : [API_KEY] %7C [API_SECRET] /bookings

    Then in the Docs, It says something about this id : , Where z8p5rxxxx7xfeck is the demo-id .

    I’m incredibly frustrated at this. WHAT IS THE ENDPOINT ??? I’ve been asking our wordpress developer for over 2 months now to just tell me WHAT IS THE ENDPOINT FOR THIS API ????? and I haven’t gotten a single response. Is this Demo-id part applicable to a Live website’s REST API or is it JUST for testing purposes. If it’s ONLY for some BS Authorization on a demo website and doesn’t exist in a production environment API endpoint, which I suspect is the case, Please make that very clear and PUT A REAL PRODUCTION ENVIRONMENT API EXAMPLE !

    The API Page Description also states :

    “The Consumer Key and Consumer Secret may be entered in the application using the Hotel Booking API”

    WHERE DO I ENTER THESE CREDENTIALS INTO THE APPLICATION THEN? What is “The Application”? The Hotel Booking WordPress Application, which somehow gives access to the API in a different location, Or An External 3rd Party Application using the Rest API to get the Data?

    For the 80th time in the past 2 months, WHAT IS URL ENDPOINT FOR THIS API ????

    Apologies as I myself am extremely unfamiliar with WordPress.


    I’m trying to post a response to this with the answer and it’s not showing up ………

    I’ve always worked in code and frameworks for the last 10 years. I’ve never really given wordpress a chance, but doing so in a real project for my company for the first time, Just wow, Incredibly confusing, ambiguous and frustrating at every level. What’s happening, And Where, And Why? Nobody’s telling me because apparently Nobody seems to know. Is working in wordpress this garbage all the time? I’ve never had such a hard time finding a basic answer to a simple question in my entire career. I’ve also never seen so many things so easily broken in my entire career.

    Sorry to rant like this on a random thread about a thing nobody’s going to even see, But this is a level of bad on the internet that I haven’t seen since 2005.


    I’ve finally resolved this myself.


    Required : Basic Authentication

    Via Curl (Successful):
    curl –user “API_KEY:API_SECRET”

    It’d be great if you could Add this information to the REST API Documentation so other users don’t need to spend Hours to Months trying to figure it out blind and from scratch.


    Okay and now, For WHATEVER THE REASON, Because NOBODY KNOWS WHAT THAT REASON IS, my ability to Edit posts has disappeared. Wonderful User experience here. *clap* *clap* *clap*


    FOR SOME REASON PUTTING A BASIC AUTH URL IN THE TEXT HERE BREAKS THE POST. The format is https:// Followed by your API_KEY Then : Then API_SECRET Then @ Then The Endpoint URL Does that work for you random 3rd party form security filter plugin? Thanks for giving me ABSOLUTELY ZERO WARNING OR NOTIFICATION OR ERROR whatsoever, just Randomly break, and Like everything in wordpress leave me to blindly guess at and stumble upon the answer on my own and find a workaround based on that.

    EDIT : Somehow, NO, It didn’t let me EDIT this into the original post. And took away my edit ability. But it DID let me post it into a new post, And let me edit it here. Where’s the Logic? Nowhere, This is wordpress!

    If it’ll just let me post this I’ll be done.

    J. Davis

    Hi Stone,

    Thanks for your questions. In order to use REST API you need to have some basic knowledge on how to use it. Please try using Postman or other software for testing API requests.
    As for the ID of HBDemo so it is for the users who do not have a Hotel Booking plugin yet and want to test Rest API with our trial demo before the purchase. Could you please clarify what exactly you try to achieve by using REST API and what exactly questions or difficulties you have?

    best regards,
    John Davis

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.