SEARCH FORMS

Last updated: Mar 7th, 2018

Intro

Use this documentation to generate redirect links to our booking engine

Types

There are two types of search links to be generated

  • Location
  • Hotel
  • Transfers

Hotel Availability by Location

1. Description

Use this in order to generate a link for hotel availability based on a location

2. Link Components

The link to be generated is in the following form

http://{BookingEngingURL}/#/{languageCode}/search/{checkInDate}/{checkOutDate}/{destinationName}/{destinationCode}/{searchString}
                                        


The link is formed from the following components

Field Description
BookingEngingURL Your onetourismo name
languageCode One of the following: el, en
checkInDate Checkin date with the following format "ΥΥΥΥ-ΜΜ-DD"
checkOutDate Checkout date with the following format "ΥΥΥΥ-ΜΜ-DD"
destinationName Destination name as returned from the autocomplete url
destinationCode Destination code as returned from the autocomplete url (otag_id field)
searchString A search string generated as described below

3. Generate Link

In order to generate the searchString you need to create the following javascript object


{
    "rooms": [{
        "adults": Integer,
        "children": Integer,
        "childrenAges": [Integer],
        "quantity": Integer
    }],
    "searchOnRequestRooms": Boolean,
    "stars": {
        "min": Integer, 
        "max": Integer
    }
}
                             
                                        


Then with the use of the RisonJS javascript library we convert the afforementioned object to a url-friendly string

4. Example

For the following data

Field Value
BookingEngingURL name.onetourismo.com
languageCode en
checkInDate 2018-09-01
checkOutDate 2018-09-05
destinationName Athens & Coast
destinationCode O1000000031
As well as the following searchString


{
    "rooms": [{
        "adults": 2,
        "children": 0,
        "childrenAges": [],
        "quantity": 1
    }],
    "searchOnRequestRooms": true,
    "stars": {
        "min": 5, 
        "max": 0
    }
}
                             
                                        


The following string is generated

http://name.onetourismo.com/#/en/search/2021-11-01/2021-11-05/Athens%20&%20Coast/OT-LOC-GEO-9186/(rooms:!((adults:2,children:0,childrenAges:!(),quantity:1)),searchOnRequestRooms:!t,stars:(max:5,min:0))

                                        

Hotel Availability by Hotel

1. Description

Use this in order to generate a link for hotel availability based on a hotel

2. Link Components

The link to be generated is in the following form

http://{BookingEngingURL}/#/hotel/{hotelCode}/{checkInDate}/{checkOutDate}/{searchString}
                                        


The link is formed from the following components

Field Description
BookingEngingURL Your onetourismo name
hotelCode The hotel code
checkInDate Checkin date with the following format "ΥΥΥΥ-ΜΜ-DD"
checkOutDate Checkout date with the following format "ΥΥΥΥ-ΜΜ-DD"
Search String A string generated as described below

3. Generate Link

In order to generate the searchString you need to create the following javascript object


{rooms : [{
    "adults": Integer,
    "children": Integer,
    "childrenAges": [Integer],
    "quantity": Integer
}],
lang:"EN"}
                             
                                        


Then with the use of the RisonJS javascript library we convert the afforementioned object to a url-friendly string

4. Example

For the following data

Field Value
BookingEngingURL name.onetourismo.com
languageCode en
hotelCode OT-PROP-A-10247
checkInDate 2020-11-01
checkOutDate 2020-11-05
As well as the following search-string


{rooms : [{
    "adults": 2,
    "children": 0,
    "childrenAges": [],
    "quantity": 1
}],
lang:"EN"}
                             
                                        


The following string is generated

https://name.onetourismo.com/#/hotel/OT-PROP-A-10247/2020-11-01/2020-11-05/(lang:EN,rooms:!((adults:2,children:0,childrenAges:!(),quantity:1)))

                                        

5. Other Options


No Details on Redirection Page

Given that the most common scenario is that you include this form on a page including all the available information of a hotel, you may want not to show susch information on the booking engine page that the user will be redirected. In order to achieve that, you could add a field with key hideDetails and value true on the search string (alongside lang and rooms variables). For example

{
    rooms : [{
        "adults": 2,
        "children": 0,
        "childrenAges": [],
        "quantity": 1
    }],
    lang:"EN",
    hideDetails:true
}
    


Redirect without dates

Another option is to redirect to the booking engines' hotel page without presetting the check-in and checkou-out dates. To do that you can just use "tba" as the value of checkInDate and checkOutDate variables in order to produce a url like the following one

https://name.onetourismo.com/#/hotel/OT-PROP-A-10247/tba/tba/(lang:EN,rooms:!((adults:2,children:0,childrenAges:!(),quantity:1)))

                                        

Transfers

1. Description

Use this in order to generate a link for transfers availability

2. Link Components

The link to be generated is in the following form

http://{BookingEngingURL}/#/transfers/{departureDateTime}/{returnDateTime}/{fromLocationCode}/{toLocationCode}/{numberOfAdults}/{numberOfChildren}/{childrenAges}
                                        
The link is formed from the following components

Field Description
BookingEngingURL Your onetourismo name
departureDateTime Departure date and time with the following format "ΥΥΥΥ-ΜΜ-DD|HH:mm"
returnDateTime Return date and time with the following format "ΥΥΥΥ-ΜΜ-DD|HH:mm", or "oneway" if it is a oneway transfer
fromLocationCode Location pickup code as returned from the autocomplete url (otag_id field)
toLocationCode Destination location code as returned from the autocomplete url (otag_id field)
numberOfAdults Number of Adults
numberOfChildren Number of Children
childrenAges Children ages seperated by ~

3. Example

For the following data

Field Value
BookingEngingURL name.onetourismo.com
departureDateTime 2018-09-01|10:00
returnDateTime 2018-09-05|10:00
fromLocationCode O1234
toLocationCode O1236
numberOfAdults 1
numberOfChildren 2
childrenAges 3~5


The following link is generated

http://name.onetourismo.com/#/transfers/2018-09-01|10:00/2018-09-05|10:00/O1234/O1236/1/2/3~5
                                        


In the case there is no return date the following link is generated

http://name.onetourismo.com/#/transfers/2018-09-01|10:00/oneway/O1234/O1236/1/2/3~5