Search
This method is used for getting hotel information and properties on a specific date range (check-out - check-in), with a designated amount of people (pax) from /search endpoint.
Example(1):
GET /api/v2/search/?pax=3&checkout=2017-01-25&checkin=2017-01-20&hotel_code=10e6cc&client_nationality=tr¤cy=EUR
Response:
{
"count": 1,
"code": "20170120_5_3_1_224_9fa211e8a14f44e5ae684bf4ee4b59f2_",
"next_page_code": null,
"max_wait": "1.0",
"response_time": "0.96",
"results": [
{
"hotel_code": "10e6cc",
"checkout": "2017-01-25",
"checkin": "2017-01-20",
"destination_code": "206e4",
"products": [
{
"code": "10e6cc_56305817968661_0_3_2_2_0_1_2406044196_0_3-0-0.20170120_5_3_1_224_9fa211e8a14f44e5ae684bf4ee4b59f2_",
"offer": false,
"pay_at_hotel": false,
"price": "357.21",
"currency": "EUR",
"rooms": [
{
"pax": {
"children_ages": [],
"adult_quantity": 3
},
"room_category": "Standard",
"room_description": "Triple Room",
"nightly_prices": {
"2017-01-20": "71.44",
"2017-01-21": "71.44",
"2017-01-22": "71.44",
"2017-01-23": "71.44",
"2017-01-24": "71.44"
},
"room_type": "TB"
}
],
"nonrefundable": null,
"supports_cancellation": true,
"hotel_currency": null,
"hotel_price": null,
"meal_type": "RO",
"minimum_selling_price": null,
"taxes": [
{
"currency": "EUR",
"amount": "6.00",
"type": "VAT",
"detail": "",
"inclusive": true
},
{
"currency": "EUR",
"amount": "5.00",
"type": "City Tax",
"detail": "Example data",
"inclusive": true
}
],
"fees": [
{
"currency": "EUR",
"amount": "6.00",
"type": "Resort Fee",
"detail": "",
"inclusive": true
}
],
"view": false
}
]
}
]
}
Example(2):
GET /api/v2/search/?pax=1&checkout=2017-01-25&checkin=2017-01-20&hotel_code=103752&client_nationality=us¤cy=EUR&max_product=1
Response:
{
"count": 1,
"code": "20170120_5_1_1_232_462875c1706e462da59554d407e4774d_",
"next_page_code": null,
"max_wait": "1.0",
"response_time": "0.96",
"results": [
{
"hotel_code": "103752",
"checkout": "2017-01-25",
"checkin": "2017-01-20",
"destination_code": "206ec",
"products": [
{
"code": "103752_58502674047670_2_2_2_2_0_1_238342530_0_0-0-0.20170120_5_1_1_232_462875c1706e462da59554d407e4774d_",
"offer": false,
"pay_at_hotel": false,
"price": "559.34",
"currency": "EUR",
"rooms": [
{
"pax": {
"children_ages": [],
"adult_quantity": 1
},
"room_category": "Standard",
"room_description": "SINGLE STANDARD",
"nightly_prices": {
"2017-01-20": "111.87",
"2017-01-21": "111.87",
"2017-01-22": "111.87",
"2017-01-23": "111.87",
"2017-01-24": "111.87"
},
"room_type": "SB"
}
],
"nonrefundable": false,
"supports_cancellation": true,
"hotel_currency": null,
"hotel_price": null,
"meal_type": "RO",
"minimum_selling_price": null,
"taxes": [
{
"currency": "EUR",
"amount": "6.00",
"type": "VAT",
"detail": "",
"inclusive": true
},
{
"currency": "EUR",
"amount": "5.00",
"type": "City Tax",
"detail": "Example data",
"inclusive": true
}
],
"fees": [
{
"currency": "EUR",
"amount": "6.00",
"type": "Resort Fee",
"detail": "",
"inclusive": true
}
],
"view": false
}
]
}
]
}
Example(3):
POST /api/v2/search/?pax=3&checkout=2017-01-25&checkin=2017-01-20&client_nationality=tr¤cy=EUR
POST BODY: hotel_code=10e6cc, ...
Note : You can pass 500 hotel code in body
Response:
{
"count": 197 ,
"code": "20170120_5_3_1_224_9fa211e8a14f44e5ae684bf4ee4b59f2_",
"next_page_code": null,
"max_wait": "1.0",
"response_time": "0.96",
"results": [
{
"hotel_code": "10e6cc",
"checkout": "2017-01-25",
"checkin": "2017-01-20",
"destination_code": "206e4",
"products": [
{
"code": "10e6cc_56305817968661_0_3_2_2_0_1_2406044196_0_3-0-0.20170120_5_3_1_224_9fa211e8a14f44e5ae684bf4ee4b59f2_",
"offer": false,
"pay_at_hotel": false,
"price": "357.21",
"currency": "EUR",
"rooms": [
{
"pax": {
"children_ages": [],
"adult_quantity": 3
},
"room_category": "Standard",
"room_description": "Triple Room",
"nightly_prices": {
"2017-01-20": "71.44",
"2017-01-21": "71.44",
"2017-01-22": "71.44",
"2017-01-23": "71.44",
"2017-01-24": "71.44"
},
"room_type": "TB"
}
],
"nonrefundable": null,
"supports_cancellation": true,
"hotel_currency": null,
"hotel_price": null,
"meal_type": "RO",
"minimum_selling_price": null,
"taxes": [
{
"currency": "EUR",
"amount": "6.00",
"type": "VAT",
"detail": "",
"inclusive": true
},
{
"currency": "EUR",
"amount": "5.00",
"type": "City Tax",
"detail": "Example data",
"inclusive": true
}
],
"fees": [
{
"currency": "EUR",
"amount": "6.00",
"type": "Resort Fee",
"detail": "",
"inclusive": true
},
],
"view": false
}
]
}
]
}
Request Base Parameters
Name | Value | Required | Description |
---|---|---|---|
format | string | no | Type of the data to be received as a response. JSON is currently supported. Default setting is human readable structured plain html. The default is determined by Accept header of the HTTP Request. |
pax | custom-list | yes | Indicates amount of persons. A few input examples are as follows : pax = 4 (4 adults) pax = 2,12,11 (2 adults, 2 children with ages of 12 and 11) First integer is the number of adults, and the rest after the first comma will be taken as list of children ages. Can be used multiple times in one search separated with &. |
checkout | dateobject | yes | Indicates check-out date. Can not be greater than check-in. The range between check-in and checkout is limited to maximum 30 days. Must be in the formatted as YYYY-MM-DD |
checkin | dateobject | yes | Indicates check-in date. Can not be greater than checkout. The range between checkin and checkout is limited to maximum 30 days. Must be in the formatted as YYYY-MM-DD |
currency | string | sometimes | Indicates requested currency of the product prices. Must be one of the Consumer's account currencies. This field is required if multiple currencies are enabled on the Consumer's account. |
client_nationality | string | yes | Indicates two letter country code of the client nationality. The nationality must refer to a valid country_code within countries table. |
max_product | integer | optional | Indicates maximum amount of products per hotel returned from the API. If not set, no limit set to product count. default is no limit. |
Restrictions
- Number of children per room cannot be more than 4
- Number of adults per room must be minimum 1 maximum 6
- Number of passengers per room cannot be more than 6
- Maximum number of rooms : 5
- Maximum child age : 17
- Maximum number of hotels in search response cannot be more than 5000
- Timeout between search and booking process can occur after 30 minutes
- The cancellation policies can be in search response if our partners settled them
Primary Search Methods
There is a primary method available to limit the selection of hotels returned in the request, presented below in no particular order. The method allows an explicit set of products to be returned via a specific hotel_code. Only this method can be used at a time.
Using Multiple hotel_code(s)
A hotel code or list of hotel codes with comma separation (see: example below) can be used with this method. Hotel codes from different destinations can be used. It is possible to send multiple hotel code search request at the same time.
Name | Value | Required | Description | Restrictions |
---|---|---|---|---|
hotel_code | string | Yes* | The unique code(s) for a hotel. | Maximum 5000 hotel in one request allowed. |
(*) : Required only for this search method
Multiple Hotel Codes Search Examples
Below search beginning with 14097 hotel code (Didi Hotel/Turkey) returns rooms from Didi Hotel :
GET /api/v2/search/?hotel_code=14097e
Below search beginning with 14097 hotel code (Didi Hotel/Turkey) and 15325f hotel code (Olive Grove Resort / Greece) returns rooms from Didi Hotel and Olive Grove Resort even they are hotel codes from different destinations.
GET /api/v2/search/?hotel_code=14097e,15325f
Using destination_code
This method can be used to get hotel list on a specific destination such as London.
Name | Value | Required | Description |
---|---|---|---|
destination_code | string | Yes* | The unique code for the destination. |
(*) : Required only for this search method
Destination search example
Below search beginning with 11260 destination code (London/England) returns hotel list at London :
GET /api/v2/search/?destination_code=11260
Using Geo-Location
Geo-Code is geographic coordinating system which points the location on the map by latitude and longitude. This method can be used to get hotel list on a specific circle area.
Latitude, longitude and radius information can be used with this method.
Note that, one geo search query will return 200 hotels at maximum even if there are more hotels available at that radius.
Name | Value | Required | Description | Restrictions |
---|---|---|---|---|
lat | string | Yes* | latitude(φ) geographic coordinate that specifies the north-south position of a point on the Earth's surface. | This value must be between -90 and 90 |
lon | string | Yes* | Longitude, geographic coordinate that specifies the east-west position of a point on the Earth's surface. | This value must be between -180 and 180. |
radius | string | Yes* | Distance from given point. (in meter) | This value is maximum 20000(20km). |
(*) : Required only for this search method
Geo Codes Search Example
Search hotels around 1km radius from Eifel Tower:
GET /api/v2/search/?pax=1&checkout=2017-01-25&checkin=2017-01-20&lat=48.858543&lon=2.294502&radius=1000&client_nationality=gb¤cy=GBP
Example response for the above geo-search request is below :
Example Response
{
"count": 19,
"code": "20170120_5_1_3_76_f9ef5a5a78734d44a835e07eb99d4650_",
"next_page_code": null,
"max_wait": "1.0",
"response_time": "0.96",
"results": [
{
"hotel_code": "106f18",
"checkout": "2017-01-25",
"checkin": "2017-01-20",
"destination_code": "20a11",
"products": [
{
"code": "106f18_55217158285494_1_2_2_2_0_3_238342530_0_0-0-0.20170120_5_1_3_76_f9ef5a5a78734d44a835e07eb99d4650_",
"offer": false,
"pay_at_hotel": false,
"price": "281.94",
"currency": "GBP",
"rooms": [
{
"pax": {
"children_ages": [],
"adult_quantity": 1
},
"room_category": "Standard",
"room_description": "SINGLE STANDARD",
"nightly_prices": {
"2017-01-20": "56.39",
"2017-01-21": "56.39",
"2017-01-22": "56.39",
"2017-01-23": "56.39",
"2017-01-24": "56.39"
},
"room_type": "SB"
}
],
"nonrefundable": true,
"supports_cancellation": true,
"hotel_currency": null,
"hotel_price": null,
"meal_type": "RO",
"minimum_selling_price": null,
"taxes": [
{
"currency": "EUR",
"amount": "6.00",
"type": "VAT",
"detail": "",
"inclusive": true
},
{
"currency": "EUR",
"amount": "5.00",
"type": "City Tax",
"detail": "Example data",
"inclusive": true
}
],
"fees": [
{
"currency": "EUR",
"amount": "6.00",
"type": "Resort Fee",
"detail": "",
"inclusive": true
}
],
"view": false
}
]
}
]
}
Response Object Parameters
Name | Value | Description |
---|---|---|
checkin | string | Check-in date. Format : YYYY-MM-DD |
checkout | string | Check-out date. Format : YYYY-MM-DD |
destination_code | string | The code resembles that is the equivalentof the searched hotel destination. The unique code refers to destination_code within destinations table. |
hotel_code | string | The unique code for the hotel. |
products | list | List of products and details |
code | string | Product code of returned product |
currency | string | Currency code of returned product |
meal_type | string | Meal type code of returned product |
nonrefundable | boolean | Flag that determines whether the product can be refunded when cancelled. Some providers are returning us NULL for nonrefundable flag. You may receive NULL for some products. |
pay_at_hotel | boolean | Information of the payment either the customer can pay at the time of arrival to the hotel itself or not. If this parameter is false than hotel_currency and hotel_price will be returned as null |
hotel_currency | string | Currency of the hotel_price. Only returned in case if pay_at_hotel variable is true. |
hotel_price | decimal | The price in hotel currency that the customer will pay at the time of arrival to the hotel itself. Only returned in case if pay_at_hotel variable is true. |
price | decimal | Product price value in currency determined in search query. |
minimum_selling_price | decimal | It is the minimum selling price to the end consumer. In other words, a price that can't in any circumstances be undersold. |
rooms | list | List of returned rooms. For detailed information and example about room(s) list of the product please see section "Contents of Rooms List" |
taxes | list | List of taxes. It contains tax details if it is available. |
type | string | Tax Type. Available types: VAT, City Tax, Others |
amount | decimal | Tax Amount in related currency(Use tax currency in response) |
inclusive | boolean | It shows whether tax amount is included in price or not |
detail | string | Tax details, if it is available |
fees | list | List of fees. It contains fee details if it is available. |
type | string | Fee Type. Available types: Resort Fee, Others |
amount | decimal | Fee Amount in related currency(Use fee currency in response) |
inclusive | boolean | It shows whether fee amount is included in price or not |
detail | string | Fee details, if it is available |
view | boolean | Information about if the room has a view. |
supports_cancellation | boolean | Indicates the product whether can cancel or not over api |
policies | list | List of cancellation policies. For detailed information and example about policies list of the product, please see section "Contents of Policies List" |
next_page_code | string | This parameter is DEPRECATED, so returns null. |
max_wait | string | Your maximum wait configuration(SLA Time). |
response_time | string | Response time |
Contents of Policies List
Name | Value | Description |
---|---|---|
days_remaining | decimal | Number(s) of remaining days to check-in date. days_remaining = today - checkin (GMT+3) |
ratio | decimal | Ratio of cancellation charge. The multiplier that will be applied to price to calculate cancellation charge. |
Example Policies Response
{
"policies": [
{
"days_remaining": 1,
"ratio": "0.45"
},
{
"days_remaining": 7,
"ratio": "0.01"
}
]
}
Contents of Room List
Name | Value | Description |
---|---|---|
pax | dict | A dict consists of adult quantity, children ages keys. |
adult_quantity | int | Total number of adults |
children_ages | list | A list consisting of integers which represent children guest ages |
room_category | string | Represents the category of the room referring to room categories table. |
room_descriptions | string | Description of the room |
nightly_prices | dict | List of prices to pay for each night of the room. Dictionary contains night date and price pairs day by day. Date format is "yyyy-mm-dd" |
room_type | string | Represents the type of the room |
Important Notice
search/availability/hotel-availability/provision/book endpoints return the rooms data in the same template above.
Example Room List Response
Below example shows a multi pax search request & response for 1 adult and 2 adults 2017-01-21 to 2017-01-23.
GET /api/v2/search/?pax=1&pax=2&checkout=2017-01-23&checkin=2017-01-21&destination_code=19064&client_nationality=GB¤cy=EUR
{
"count": 52,
"code": "20170121_2_1~2_1_76_b583b11744d54725b438fdecc3f8c066_",
"next_page_code": null,
"max_wait": "1.0",
"response_time": "0.96",
"results": [
{
"hotel_code": "100ff3",
"checkout": "2017-01-23",
"checkin": "2017-01-21",
"destination_code": "19064",
"products": [
{
"code": "100ff3_242336389998_2_2_2_2_0_1_1483860825_0_0-0-0~1-0-0.20170121_2_1~2_1_76_b583b11744d54725b438fdecc3f8c066_",
"offer": false,
"pay_at_hotel": false,
"price": "84.07",
"currency": "EUR",
"rooms": [
{
"pax": {
"children_ages": [],
"adult_quantity": 1
},
"room_category": "Standard",
"room_description": "SINGLE STANDARD",
"nightly_prices": {
"2017-01-21": "18.68",
"2017-01-22": "18.68"
},
"room_type": "SB"
},
{
"pax": {
"children_ages": [],
"adult_quantity": 2
},
"room_category": "Standard",
"room_description": "DOUBLE STANDARD",
"nightly_prices": {
"2017-01-21": "23.35",
"2017-01-22": "23.35"
},
"room_type": "DB"
}
],
"nonrefundable": false,
"supports_cancellation": true,
"hotel_currency": null,
"hotel_price": null,
"meal_type": "RO",
"minimum_selling_price": null,
"taxes": [
{
"currency": "EUR",
"amount": "6.00",
"type": "VAT",
"detail": "",
"inclusive": true
},
{
"currency": "EUR",
"amount": "5.00",
"type": "City Tax",
"detail": "Example data",
"inclusive": true
}
],
"fees": [
{
"currency": "EUR",
"amount": "6.00",
"type": "Resort Fee",
"detail": "",
"inclusive": true
}
],
"view": false
}
]
}
]
}