4. Hotel Search
Version 19.1 by Giorgi Mdivnishvili on 2024/02/29 11:02
Method Description
With the parameters provided in GetHotels and GetCities reponse, it’s avaible to search hotels with the desired parameters in Hotels Search.
endpoint : https://testapi.rustaronline.com/api/Hotels/Search
Method POST
Request example:
{
"MaxResultCount":2,
"MaxHotelCount":2,
"contragentContactUID": "55a2fcfb-8378-4b73-ab1e-bc8e5c836f4e",
"countryMask": "TR",
"CheckInDate": "2024-05-06",
"CheckOutDate": "2024-05-07",
"Adults": 1,
"Children": 0,
"ChildrenAges": "",
"arrivalCities": [
{
"cityUID": "e1344ba0-5273-4fc1-b6c4-72446260f430"
}
]
}
"MaxResultCount":2,
"MaxHotelCount":2,
"contragentContactUID": "55a2fcfb-8378-4b73-ab1e-bc8e5c836f4e",
"countryMask": "TR",
"CheckInDate": "2024-05-06",
"CheckOutDate": "2024-05-07",
"Adults": 1,
"Children": 0,
"ChildrenAges": "",
"arrivalCities": [
{
"cityUID": "e1344ba0-5273-4fc1-b6c4-72446260f430"
}
]
}
| Parameter | Value | Description |
| "MaxResultCount" | 2, | Maximum number of results to display |
| "MaxHotelCount" | 2, | Maximum number of hotels to display results |
| "contragentContactUID" | "55a2fcfb-8378-4b73-ab1e-bc8e5c836f4e", | A unique code assigned to each application user |
| "countryMask" | "TR", | Country code, which can be retrieved in Get Cities method, in parameter [countrycode] |
| "CheckInDate" | "2024-05-06", | Check in date "YY-MM-DD" |
| "CheckOutDate" | "2024-05-07", | Check out date "YY-MM-DD" |
| "Adults" | 1, | number of Adults |
| "Children" | 0, | Number of children |
| "ChildrenAges" | "", | children ages, the must be separated with "," |
| "cityUID" | "e1344ba0-5273-4fc1-b6c4-72446260f430" | Code of the city, which is available in method Get Cities in parameter [cityid] |
In case there is need to display hotels in whole country, no mater cities, it's possible to remove "arrivalCities" parameter.
Response Example
{
"result": [
{
"resultID": 1656436810005000001,
"hotelID": 871186,
"providerID": 5,
"roomCategoryCode": "ECO",
"roomCategoryName": "Economic Room",
"mealPlanName": "BB",
"placementType": 1,
"placementTypeName": "1 Adult",
"priceCode": "BASERATE BB ECO",
"priceCurrency": "EUR",
"priceCurrencySrc": "EUR",
"availability": 3,
"availableRoomsCount": 1,
"totalSellPriceSrc": 40.70,
"totalSellPrice": 40.70,
"totalPriceSurcharge": 0.00,
"cancellationPolicyDescription": "Cancellation Policy: Non refundable",
"cancellationPolicy": {
"noShowChargeValue": 100.00,
"noShowChargeValueType": "%",
"earlyDepartureChargeValue": 100.00,
"earlyDepartureChargeValueType": "%",
"conditions": [
{
"timeunits": 365,
"timeunitType": "Day",
"timeOffsetTypeName": "Before Arrival",
"chargeValue": 100.00,
"chargeValueType": "%"
}
]
},
"searchId": 1656436810,
"hotelCode": "10b7bc34-2a03-495e-94bc-1092b07823f7",
"id": 1656436810005000001,
"hotel": {
"hotelCode": "10b7bc34-2a03-495e-94bc-1092b07823f7",
"hotelName": "Istanbul Holiday Hotel",
"hotelClass": "***",
"cityId": "e1344ba0-5273-4fc1-b6c4-72446260f430",
"cityName": "Istanbul",
"countryCode": "TR",
"districtId": "6ca0ed7e-7412-4e45-85b5-dd0d74cabc62",
"districtName": "Fatih",
"note": ""
},
"adults": 1,
"children": 0,
"childrenAges": "",
"childrenExeptInfants": 0,
"checkInDate": "2024-05-06T00:00:00",
"checkOutDate": "2024-05-07T00:00:00",
"includedExtrasAmount": 0,
"extraServices": []
},
{
"resultID": 1656436810005000003,
"hotelID": 871186,
"providerID": 5,
"roomCategoryCode": "STANDART-2",
"roomCategoryName": "Standart Double or Twin Room",
"mealPlanName": "BB",
"placementType": 1,
"placementTypeName": "1 Adult",
"priceCode": "BASERATE BB STANDART",
"priceCurrency": "EUR",
"priceCurrencySrc": "EUR",
"availability": 3,
"availableRoomsCount": 1,
"totalSellPriceSrc": 53.90,
"totalSellPrice": 53.90,
"totalPriceSurcharge": 0.00,
"cancellationPolicyDescription": "Cancellation Policy: Non refundable",
"cancellationPolicy": {
"noShowChargeValue": 100.00,
"noShowChargeValueType": "%",
"earlyDepartureChargeValue": 100.00,
"earlyDepartureChargeValueType": "%",
"conditions": [
{
"timeunits": 365,
"timeunitType": "Day",
"timeOffsetTypeName": "Before Arrival",
"chargeValue": 100.00,
"chargeValueType": "%"
}
]
},
"searchId": 1656436810,
"hotelCode": "10b7bc34-2a03-495e-94bc-1092b07823f7",
"id": 1656436810005000003,
"hotel": {
"hotelCode": "10b7bc34-2a03-495e-94bc-1092b07823f7",
"hotelName": "Istanbul Holiday Hotel",
"hotelClass": "***",
"cityId": "e1344ba0-5273-4fc1-b6c4-72446260f430",
"cityName": "Istanbul",
"countryCode": "TR",
"districtId": "6ca0ed7e-7412-4e45-85b5-dd0d74cabc62",
"districtName": "Fatih",
"note": ""
},
"adults": 1,
"children": 0,
"childrenAges": "",
"childrenExeptInfants": 0,
"checkInDate": "2024-05-06T00:00:00",
"checkOutDate": "2024-05-07T00:00:00",
"includedExtrasAmount": 0,
"extraServices": []
}
],
"error": false
}
"result": [
{
"resultID": 1656436810005000001,
"hotelID": 871186,
"providerID": 5,
"roomCategoryCode": "ECO",
"roomCategoryName": "Economic Room",
"mealPlanName": "BB",
"placementType": 1,
"placementTypeName": "1 Adult",
"priceCode": "BASERATE BB ECO",
"priceCurrency": "EUR",
"priceCurrencySrc": "EUR",
"availability": 3,
"availableRoomsCount": 1,
"totalSellPriceSrc": 40.70,
"totalSellPrice": 40.70,
"totalPriceSurcharge": 0.00,
"cancellationPolicyDescription": "Cancellation Policy: Non refundable",
"cancellationPolicy": {
"noShowChargeValue": 100.00,
"noShowChargeValueType": "%",
"earlyDepartureChargeValue": 100.00,
"earlyDepartureChargeValueType": "%",
"conditions": [
{
"timeunits": 365,
"timeunitType": "Day",
"timeOffsetTypeName": "Before Arrival",
"chargeValue": 100.00,
"chargeValueType": "%"
}
]
},
"searchId": 1656436810,
"hotelCode": "10b7bc34-2a03-495e-94bc-1092b07823f7",
"id": 1656436810005000001,
"hotel": {
"hotelCode": "10b7bc34-2a03-495e-94bc-1092b07823f7",
"hotelName": "Istanbul Holiday Hotel",
"hotelClass": "***",
"cityId": "e1344ba0-5273-4fc1-b6c4-72446260f430",
"cityName": "Istanbul",
"countryCode": "TR",
"districtId": "6ca0ed7e-7412-4e45-85b5-dd0d74cabc62",
"districtName": "Fatih",
"note": ""
},
"adults": 1,
"children": 0,
"childrenAges": "",
"childrenExeptInfants": 0,
"checkInDate": "2024-05-06T00:00:00",
"checkOutDate": "2024-05-07T00:00:00",
"includedExtrasAmount": 0,
"extraServices": []
},
{
"resultID": 1656436810005000003,
"hotelID": 871186,
"providerID": 5,
"roomCategoryCode": "STANDART-2",
"roomCategoryName": "Standart Double or Twin Room",
"mealPlanName": "BB",
"placementType": 1,
"placementTypeName": "1 Adult",
"priceCode": "BASERATE BB STANDART",
"priceCurrency": "EUR",
"priceCurrencySrc": "EUR",
"availability": 3,
"availableRoomsCount": 1,
"totalSellPriceSrc": 53.90,
"totalSellPrice": 53.90,
"totalPriceSurcharge": 0.00,
"cancellationPolicyDescription": "Cancellation Policy: Non refundable",
"cancellationPolicy": {
"noShowChargeValue": 100.00,
"noShowChargeValueType": "%",
"earlyDepartureChargeValue": 100.00,
"earlyDepartureChargeValueType": "%",
"conditions": [
{
"timeunits": 365,
"timeunitType": "Day",
"timeOffsetTypeName": "Before Arrival",
"chargeValue": 100.00,
"chargeValueType": "%"
}
]
},
"searchId": 1656436810,
"hotelCode": "10b7bc34-2a03-495e-94bc-1092b07823f7",
"id": 1656436810005000003,
"hotel": {
"hotelCode": "10b7bc34-2a03-495e-94bc-1092b07823f7",
"hotelName": "Istanbul Holiday Hotel",
"hotelClass": "***",
"cityId": "e1344ba0-5273-4fc1-b6c4-72446260f430",
"cityName": "Istanbul",
"countryCode": "TR",
"districtId": "6ca0ed7e-7412-4e45-85b5-dd0d74cabc62",
"districtName": "Fatih",
"note": ""
},
"adults": 1,
"children": 0,
"childrenAges": "",
"childrenExeptInfants": 0,
"checkInDate": "2024-05-06T00:00:00",
"checkOutDate": "2024-05-07T00:00:00",
"includedExtrasAmount": 0,
"extraServices": []
}
],
"error": false
}
| Parameter | value | Description |
| { | ||
| "resultID" | 1656436810005000001, | Unique ID of the Result |
| "hotelID" | 871186, | Unique ID of the hotel |
| "providerID" | 5, | provider id - (system internal) |
| "roomCategoryCode" | "ECO", | Special code for Room Category type |
| "roomCategoryName" | "Economic Room", | Name of the Room Category Type - definition of the "roomCategoryCode" |
| "mealPlanName" | "BB", | Meal Plan code |
| "placementType" | 1, | Placement type code - in this case 1 means single |
| "placementTypeName" | "1 Adult", | Placement type name - definition of the "placementType" |
| "priceCode" | "BASERATE BB ECO", | price code for the current option |
| "priceCurrency" | "EUR", | |
| "priceCurrencySrc" | "EUR", | |
| "availability" | 3, | Availability |
| "availableRoomsCount" | 1, | Number of available rooms for the current type of options |
| "totalSellPriceSrc" | 40.70, | |
| "totalSellPrice" | 40.70, | |
| "totalPriceSurcharge" | 0.00, | |
| "cancellationPolicyDescription" | "Cancellation Policy Non refundable", | TEXT DESCRIPTION OF THE CANCELLATION POLICY |
| "cancellationPolicy" | { | |
| "noShowChargeValue" | 100.00, | |
| "noShowChargeValueType" | "%", | |
| "earlyDepartureChargeValue" | 100.00, | |
| "earlyDepartureChargeValueType" | "%", | |
| "conditions" | [ | |
| { | ||
| "timeunits" | 365, | |
| "timeunitType" | "Day", | |
| "timeOffsetTypeName" | "Before Arrival", | |
| "chargeValue" | 100.00, | |
| "chargeValueType" | "%" | |
| } | ||
| ] | ||
| }, | ||
| "searchId" | 1656436810, | search id of the hotel |
| "hotelCode" | "10b7bc34-2a03-495e-94bc-1092b07823f7", | Unique ID of the Hotel. Full List of the hotels is available in Get Hotels method |
| "id" | 1656436810005000001, | |
| "hotel" | { | |
| "hotelCode" | "10b7bc34-2a03-495e-94bc-1092b07823f7", | |
| "hotelName" | "Istanbul Holiday Hotel", | |
| "hotelClass" | "***", | |
| "cityId" | "e1344ba0-5273-4fc1-b6c4-72446260f430", | |
| "cityName" | "Istanbul", | |
| "countryCode" | "TR", | |
| "districtId" | "6ca0ed7e-7412-4e45-85b5-dd0d74cabc62", | |
| "districtName" | "Fatih", | |
| "note" | "" | |
| }, | ||
| "adults" | 1, | |
| "children" | 0, | |
| "childrenAges" | "", | |
| "childrenExeptInfants" | 0, | |
| "checkInDate" | "2024-05-06T00000", | |
| "checkOutDate" | "2024-05-07T00000", | |
| "includedExtrasAmount" | 0, | |
| "extraServices" | [] | |
| }, |