Wiki source code of 4. Hotel Search

Version 15.1 by Giorgi Mdivnishvili on 2024/02/29 10:07

Hide last authors
Giorgi Mdivnishvili 9.1 1 {{box cssClass="floatinginfobox" title="**Contents**"}}
Giorgi Mdivnishvili 1.1 2
3
Giorgi Mdivnishvili 9.1 4 {{toc/}}
5 {{/box}}
6
Giorgi Mdivnishvili 8.1 7 = Method Description =
8
9
Giorgi Mdivnishvili 1.1 10 With the parameters provided in GetHotels and GetCities reponse, it’s avaible to search hotels with the desired parameters in Hotels Search.
11
12
Giorgi Mdivnishvili 4.1 13 endpoint : [[https:~~/~~/testapi.rustaronline.com/api/Hotels/Search>>url:https://testapi.rustaronline.com/api/Hotels/Search]]
Giorgi Mdivnishvili 1.1 14
Giorgi Mdivnishvili 4.1 15 Method POST
Giorgi Mdivnishvili 3.1 16
Giorgi Mdivnishvili 7.1 17
18
Giorgi Mdivnishvili 8.1 19 == **Request example:** ==
Giorgi Mdivnishvili 4.1 20
Giorgi Mdivnishvili 3.1 21 {{code language="Json"}}
22 {
Giorgi Mdivnishvili 7.1 23 "MaxResultCount":2,
24 "MaxHotelCount":2,
25 "contragentContactUID": "55a2fcfb-8378-4b73-ab1e-bc8e5c836f4e",
26 "countryMask": "TR",
27 "CheckInDate": "2024-05-06",
28 "CheckOutDate": "2024-05-07",
29 "Adults": 1,
30 "Children": 0,
31 "ChildrenAges": "",
32
Giorgi Mdivnishvili 2.1 33 "arrivalCities": [
Giorgi Mdivnishvili 1.1 34 {
Giorgi Mdivnishvili 7.1 35 "cityUID": "e1344ba0-5273-4fc1-b6c4-72446260f430"
Giorgi Mdivnishvili 2.1 36
Giorgi Mdivnishvili 1.1 37 }
38 ]
Giorgi Mdivnishvili 7.1 39 }
Giorgi Mdivnishvili 1.1 40
Giorgi Mdivnishvili 7.1 41 {{/code}}
42
43
Giorgi Mdivnishvili 11.1 44 (% class="table-bordered" %)
Giorgi Mdivnishvili 13.1 45 (% class="info" %)|**Parameter**|**Value**|**Description**
46 |** "MaxResultCount"**|2,|Maximum number of results to display
47 |** "MaxHotelCount"**|2,|Maximum number of hotels to display results
48 |** "contragentContactUID"**| "55a2fcfb-8378-4b73-ab1e-bc8e5c836f4e",|A unique code assigned to each application user
49 |** "countryMask"**| "TR",|Country code ISO3 standard
50 |** "CheckInDate"**| "2024-05-06",|Check in date "YY-MM-DD"
51 |** "CheckOutDate"**| "2024-05-07",|Check out date "YY-MM-DD"
52 |** "Adults"**| 1,|number of Adults
53 |** "Children"**| 0,|Number of children
54 |** "ChildrenAges"**| "",|children ages, the must be separated with ","
Giorgi Mdivnishvili 15.1 55 |** "cityUID"**| "e1344ba0-5273-4fc1-b6c4-72446260f430"|Code of the city, which is available in method [[Get Cities>>Get Cities]] in parameter [cityid]
Giorgi Mdivnishvili 10.1 56
Giorgi Mdivnishvili 8.1 57 == Response Example ==
Giorgi Mdivnishvili 7.1 58
59
60 {{code language="json"}}
61 {
62 "result": [
63 {
64 "resultID": 1656436810005000001,
65 "hotelID": 871186,
66 "providerID": 5,
67 "roomCategoryCode": "ECO",
68 "roomCategoryName": "Economic Room",
69 "mealPlanName": "BB",
70 "placementType": 1,
71 "placementTypeName": "1 Adult",
72 "priceCode": "BASERATE BB ECO",
73 "priceCurrency": "EUR",
74 "priceCurrencySrc": "EUR",
75 "availability": 3,
76 "availableRoomsCount": 1,
77 "totalSellPriceSrc": 40.70,
78 "totalSellPrice": 40.70,
79 "totalPriceSurcharge": 0.00,
80 "cancellationPolicyDescription": "Cancellation Policy: Non refundable",
81 "cancellationPolicy": {
82 "noShowChargeValue": 100.00,
83 "noShowChargeValueType": "%",
84 "earlyDepartureChargeValue": 100.00,
85 "earlyDepartureChargeValueType": "%",
86 "conditions": [
87 {
88 "timeunits": 365,
89 "timeunitType": "Day",
90 "timeOffsetTypeName": "Before Arrival",
91 "chargeValue": 100.00,
92 "chargeValueType": "%"
93 }
94 ]
95 },
96 "searchId": 1656436810,
97 "hotelCode": "10b7bc34-2a03-495e-94bc-1092b07823f7",
98 "id": 1656436810005000001,
99 "hotel": {
100 "hotelCode": "10b7bc34-2a03-495e-94bc-1092b07823f7",
101 "hotelName": "Istanbul Holiday Hotel",
102 "hotelClass": "***",
103 "cityId": "e1344ba0-5273-4fc1-b6c4-72446260f430",
104 "cityName": "Istanbul",
105 "countryCode": "TR",
106 "districtId": "6ca0ed7e-7412-4e45-85b5-dd0d74cabc62",
107 "districtName": "Fatih",
108 "note": ""
109 },
110 "adults": 1,
111 "children": 0,
112 "childrenAges": "",
113 "childrenExeptInfants": 0,
114 "checkInDate": "2024-05-06T00:00:00",
115 "checkOutDate": "2024-05-07T00:00:00",
116 "includedExtrasAmount": 0,
117 "extraServices": []
118 },
119 {
120 "resultID": 1656436810005000003,
121 "hotelID": 871186,
122 "providerID": 5,
123 "roomCategoryCode": "STANDART-2",
124 "roomCategoryName": "Standart Double or Twin Room",
125 "mealPlanName": "BB",
126 "placementType": 1,
127 "placementTypeName": "1 Adult",
128 "priceCode": "BASERATE BB STANDART",
129 "priceCurrency": "EUR",
130 "priceCurrencySrc": "EUR",
131 "availability": 3,
132 "availableRoomsCount": 1,
133 "totalSellPriceSrc": 53.90,
134 "totalSellPrice": 53.90,
135 "totalPriceSurcharge": 0.00,
136 "cancellationPolicyDescription": "Cancellation Policy: Non refundable",
137 "cancellationPolicy": {
138 "noShowChargeValue": 100.00,
139 "noShowChargeValueType": "%",
140 "earlyDepartureChargeValue": 100.00,
141 "earlyDepartureChargeValueType": "%",
142 "conditions": [
143 {
144 "timeunits": 365,
145 "timeunitType": "Day",
146 "timeOffsetTypeName": "Before Arrival",
147 "chargeValue": 100.00,
148 "chargeValueType": "%"
149 }
150 ]
151 },
152 "searchId": 1656436810,
153 "hotelCode": "10b7bc34-2a03-495e-94bc-1092b07823f7",
154 "id": 1656436810005000003,
155 "hotel": {
156 "hotelCode": "10b7bc34-2a03-495e-94bc-1092b07823f7",
157 "hotelName": "Istanbul Holiday Hotel",
158 "hotelClass": "***",
159 "cityId": "e1344ba0-5273-4fc1-b6c4-72446260f430",
160 "cityName": "Istanbul",
161 "countryCode": "TR",
162 "districtId": "6ca0ed7e-7412-4e45-85b5-dd0d74cabc62",
163 "districtName": "Fatih",
164 "note": ""
165 },
166 "adults": 1,
167 "children": 0,
168 "childrenAges": "",
169 "childrenExeptInfants": 0,
170 "checkInDate": "2024-05-06T00:00:00",
171 "checkOutDate": "2024-05-07T00:00:00",
172 "includedExtrasAmount": 0,
173 "extraServices": []
174 }
175 ],
176 "error": false
Giorgi Mdivnishvili 2.1 177 }
178 {{/code}}
Giorgi Mdivnishvili 1.1 179
Giorgi Mdivnishvili 5.1 180