Custom Booking Widget

Modified on Thu, 08 Feb 2024 at 12:26 PM

The standard Book Now link that you use looks like this:

 

https://bookings.hopsoftware.com/property/[property-code]

 

Sometimes, however, you may want to be able to have a date search widget on your website rather than just a simple hyperlink. If that is the case, if you can create a widget yourself that can pass through the arrival & departure dates and the numbers of adults and children, using the following URL.

 

https://bookings.hopsoftware.com/Home/Index?propertyId=[XXX]&dateFrom=[YYYY-MM-DD]&dateTo=[YYYY-MM-DD]&numberOfAdults=[X]&numberOfChildren=[X]

 

You would need to replace the content in the square brackets with the required data. For example, the URL could look like the following.

https://bookings.hopsoftware.com/Home/Index?propertyId=6&dateFrom=2024-01-01&dateTo=2024-01-02&numberOfAdults=2&numberOfChildren=1

 

The Property ID is the numerical character in the PMS URL 

 

If you want to do this for a specific rate plan with a promo code, then add the promoCode parameter as below:

 

https://bookings.hopsoftware.com/Home/Index?propertyId=6&dateFrom=2024-01-01&dateTo=2024-01-02&numberOfAdults=2&numberOfChildren=1&promoCode=Winter1Offer

 

If you want to provide a room specific search (e.g. two adults in the first room and one adult in the second room) then you can use the rooms parameter:

 

https://bookings.hopsoftware.com/Home/Index?propertyId=6&dateFrom=2024-01-01&dateTo=2024-01-02&rooms=[base64 encoded string value]

This is a Base64-encoded string of the JSON object:

 

[
          {
              "NumberOfAdults": "2",
              "NumberOfChildren": "0",
              "NumberOfInfants": "0"
          },
          {
              "NumberOfAdults": "1",
              "NumberOfChildren": "1",
              "NumberOfInfants": "0"
          }
]

JavaScript

Note that the rooms parameter will take precedence over the numberOfAdults and numberOfChildren parameters, and if the rooms parameter is invalid (e.g. incorrect encoding or invalid JSON) it will be ignored.

 

 

 

 

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article