Description of the new system


In this new version the booking engine and its structure have changed drastically and therefore the way to make requests it's different.


We keep some compatibility with the older booking engine such as the basic parameters, like MyBusiness, but other parameters have changed.


So we can have easy requests to make basic landings with static parameters but if we need to add availability parameters  we will have to "program" the URL because it is made in Json format.


Static parameters


To build the correct call for an availability request we will always have to start with the base URL. The new URL from the booking engine will be built by the hotel dns + the page itself from the booking engine. For example:


https://demo.new.hotetec.com/bet0

The bet0 parameter is customisable and each hotel/chain can have a different one. You can get this parameter by doing an availability search on the website and you will find it right after the DNS.



At this URL we can add the static parameters, which are:


Parameters

Description

Optional

Values

bookingEngine

Booking engine code associated with the page.

No

Number

currency

This is used to set up the currency in which we want to display prices (as long as the website has the virtual currency active). Remember that the user will always pay in the original currency of the rate.


It works with ISO codes 

No

{EUR, GBP, USD,…}

language

Language in which the content of the booking engine will be displayed. It will be necessary to know the languages of the website, as otherwise the translations of labels and certain contents may not be correct and therefore may not be displayed correctly in the booking process.


It works with ISO codes

No

{es, de, en,…}

system

This parameter is to indicate the system with which we are going to ask for the availability (desktop or mobile).

The right way to do it would be making differentiated requests, one prepared for the desktop version and another for the mobile version.

No

{HPH/MPH}
Desktop/Mobile

UTM’s

We consider up to 5 different types of UTM's to track and segment our landings or redirections, these are:


utm_source

utm_medium

utm_campaign

utm_term

utm_content

Yes

Text




Availability parameters


This would be the most complex part, as it is an object in Json format with a base structure that it's mandatory to respect.


A basic example is shown below, with all the necessary parameters. From this example we can build the different type of URL's we need just adding nodes and changing values as needed.


{

  "dateFrom": "2022-09-05T00:00:00.000Z",

  "dateTo": "2022-09-10T00:00:00.000Z",

  "distribution": [

    {

      "id": 1,

      "person": [

        {

          "id": 1,

          "type": "Adult",

          "age": 30

        },

        {

          "id": 2,

          "type": "Adult",

          "age": 30

        }

      ]

    }

  ],

  "mealPlan": {"code":"HB"},

  "selectedItem": {

     "type": "Hotel",

    "code": "45501"

  },

  "promotionalCode":"prueba_david", 

  "logged": true,

  "execute": true,

  "fromLink": true

}

 

Here you will find the meaning of each parameter.


Parameter

Descripton

Optional

Value/Format

dateFrom

Check in date of the availability request

No

Date + Hour
(Year-Month-Day+T (HH:MI:SS.CEN)

dateTo

Check out date of the availability request


No

Date + Hour
(Year-Month-Day+T (HH:MI:SS.CEN)

distribution

Object to set up the configuration about the different rooms and guests.


The right way to do it, it's not to duplicate room ID's, so if we add the guest type we can have:

  • Adult (default age to be set at 30)
  • Child (set the right age to differentiate children vs babies)


As many rooms as necessary can be added, with their respective distributions of people.

No


 "id": 1,

      "person": [

        {

          "id": 1,

          "type": "Adult",

          "age": 30

        }

mealPlan

Objet to set up the mealplan by default

Yes

{BB, HB, FB, TI, …}

selectedItem

Here we set up the filters we want to have in the availability. We can filter by:

  • Hotel
  • Destination/Location
  • Thematic 


These values depend on the configuration of each hotel.

No

Type: {Hotel, Location, Thematic}

cod: {ask for the values to the hotel}

 

*All the hotels
type:{Hotel}

cod:{ALL}

promotionalCode

This parameter is to set up the request with a promotional code associate.

Yes

Promotional_Code

logged

This parameter allows to get the registration rates directly with the request.

No

{true/false}

execute

This parameter is use for the execution of the availability, so it must be always "true".

No

{true}

fromLink

This parameter is use to indicate that the request comes from an external link, so it must be always "true". 

No

{true}



URL examples of different availabilities


Here we are going to show different functional examples. 

Remember that it is enough to update the dates for the request in case that the ones used in the example have already expired.


The HTMLs used as examples allow us to generate different type of deeplinks just changing the values needed and we will obtain the desired result. With these HTLMs we will have the URL prepared at the clipboard (See the document attach)


Just take into account that the examples are made using the Hotel filter (as we think that is the most common). But this can be change to Destination parameter or Thematic parameter as we have seen in the definition.


Here you will find the URLs with different type of requests that come from the HTLMs mentioned before.