Wiki source code of 5. Get Price Details

Last modified by Giorgi Mdivnishvili on 2024/03/01 17:25

Hide last authors
Giorgi Mdivnishvili 3.1 1 {{box cssClass="floatinginfobox" title="**Contents**"}}
2
3
4 {{toc/}}
5 {{/box}}
6
7 = Method Description =
8
9
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 5.1 13 endpoint : [[https:~~/~~/testapi.rustaronline.com~~/~~/api/Hotels/GetPriceDetails>>https://testapi.rustaronline.com//api/Hotels/GetPriceDetails]]
Giorgi Mdivnishvili 3.1 14
15 Method POST
16
17
18 == **Request example:** ==
19
20 {{code language="Json"}}
21 {
22 "contragentContactUID": "55a2fcfb-8378-4b73-ab1e-bc8e5c836f4e",
23 "countryMask": "TR",
24 "checkInDate": "2024-05-06T00:00:00",
25 "checkOutDate": "2024-05-07T00:00:00",
26 "Adults": 1,
27 "Children": 0,
28 "ChildrenAges": "",
29 "priceCode": "CVNP",
30 "roomCategoryCode": "TWTW",
31 "hotels": [
32 {
33 "hotelCode": "da9b081d-b963-4fb7-ad19-8c375ce60da1"
34 }
35 ]
36 }
37 {{/code}}
38
39
40 == Definition of Request Parameters ==
41
42 (% class="table-bordered" %)
43 (% class="info" %)|**Parameter**|**Value**|**Description**
Giorgi Mdivnishvili 6.1 44 |** "contragentContactUID"**| "55a2fcfb-8378-4b73-ab1e-bc8e5c836f4e",|A unique code assigned to each application user
45 |** "countryMask"**|"TR",|Country code, which can be retrieved in [[Get Cities>>Get Cities]] method, in parameter [countrycode]
Giorgi Mdivnishvili 3.1 46 |** "CheckInDate"**| "2024-05-06",|Check in date "YY-MM-DD"
47 |** "CheckOutDate"**| "2024-05-07",|Check out date "YY-MM-DD"
48 |** "Adults"**| 1,|number of Adults
49 |** "Children"**| 0,|Number of children
50 |** "ChildrenAges"**| "",|children ages, the must be separated with ","
Giorgi Mdivnishvili 6.1 51 |(((
52 **~ "priceCode"**
53 )))|(((
54 "CVNP",
Giorgi Mdivnishvili 8.1 55 )))|**priceCode**code taken from [[Hotel Search>>doc:APIs.Calculate API.Hotel Search .WebHome]] method
Giorgi Mdivnishvili 6.1 56 |(((
57 **"roomCategoryCode"**
58 )))|(((
59 "TWTW",
Giorgi Mdivnishvili 8.1 60 )))|**roomCategoryCode **code taken from [[Hotel Search >>doc:APIs.Calculate API.Hotel Search .WebHome]]method
Giorgi Mdivnishvili 6.1 61 |(((
62 **~ "hotelCode"**
63 )))|(((
64 "da9b081d-b963-4fb7-ad19-8c375ce60da1"
Giorgi Mdivnishvili 8.1 65 )))|**hotelCode**code taken from [[Hotel Search >>doc:APIs.Calculate API.Hotel Search .WebHome]]method or [[Get Hotels>>Get Hotels]]
Giorgi Mdivnishvili 3.1 66
67 (% class="wikigeneratedid" %)
68 In case there is need to display hotels in whole country, no mater cities, it's possible to remove "arrivalCities" parameter.
69
70
71 == Response Example ==
72
73 {{code language="json"}}
74 {
75 "result": [
76 {
Giorgi Mdivnishvili 4.1 77 "resultID": 1656448260000000001,
78 "hotelID": 177798,
Giorgi Mdivnishvili 3.1 79 "providerID": 8,
80 "roomCategoryCode": "TWTW",
81 "roomCategoryName": "Deluxe Guest room, 2 Twins",
82 "mealPlanName": "RO",
83 "placementType": 1,
84 "placementTypeName": "SNGL",
85 "priceCode": "CVNP",
86 "note": "Deluxe, 2 Twins, Mini fridge, 23sqm/247sqft-25sqm/269sqft, Wireless internet, complimentary, Wired internet, complimentary, Coffee/tea maker, 43in/109cm LED TV Cancellation Policy: penalty for cancellation 0-24 hours before checkin is EUR 108.37, penalty for cancellation after 12AM is EUR 108.37, penalty for NoShow is EUR 108.37",
87 "priceCurrency": "EUR",
88 "priceCurrencySrc": "EUR",
89 "availability": 3,
90 "availableRoomsCount": 0,
91 "totalSellPriceSrc": 109.44,
92 "totalSellPrice": 109.44,
93 "totalPriceSurcharge": 0.00,
94 "cancellationPolicyDescription": "Cancellation Policy: 1 Day Before Arrival: 108.37 Value, Early Departure: 100.00 %, NoShow: 108.37 Value",
95 "cancellationPolicy": {
96 "noShowChargeValue": 108.37,
97 "noShowChargeValueType": "Value",
98 "earlyDepartureChargeValue": 100,
99 "earlyDepartureChargeValueType": "%",
100 "conditions": [
101 {
102 "timeunits": 1,
103 "timeunitType": "Day",
104 "timeOffsetTypeName": "Before Arrival",
105 "chargeValue": 108.37,
106 "chargeValueType": "Value"
107 }
108 ]
109 },
Giorgi Mdivnishvili 4.1 110 "searchId": 1709194519,
Giorgi Mdivnishvili 3.1 111 "hotelCode": "da9b081d-b963-4fb7-ad19-8c375ce60da1",
Giorgi Mdivnishvili 4.1 112 "id": 1656448260000000001,
Giorgi Mdivnishvili 3.1 113 "hotel": {
114 "hotelCode": "da9b081d-b963-4fb7-ad19-8c375ce60da1",
115 "hotelName": "Delta Hotels Istanbul Halic",
116 "hotelClass": "****",
117 "cityId": "e1344ba0-5273-4fc1-b6c4-72446260f430",
118 "cityName": "Istanbul",
119 "countryCode": "TR",
120 "districtId": "24528bb1-a6d9-4514-8d92-754056a9f48e",
121 "districtName": "Kagytkhane",
122 "note": ""
123 },
124 "adults": 1,
125 "children": 0,
126 "childrenAges": "",
127 "childrenExeptInfants": 0,
128 "checkInDate": "2024-05-06T00:00:00",
129 "checkOutDate": "2024-05-07T00:00:00",
130 "includedExtrasAmount": 0,
131 "extraServices": []
132 }
133 ],
134 "error": false
135 }
136 {{/code}}
137
138
139 == Definition of Response Parameters ==
140
141 (% class="table-bordered" %)
142 (% class="info" %)|**Parameter**|**value**|**Description**
143 |**{**| |
144 |** "resultID"**| 1656436810005000001,|Unique ID of the Result
145 |** "hotelID"**| 871186,|Unique ID of the hotel
146 |** "providerID"**| 5,|provider id - (system internal)
147 |** "roomCategoryCode"**| "ECO",|Special code for Room Category type
148 |** "roomCategoryName"**| "Economic Room",|Name of the Room Category Type - definition of the ** "roomCategoryCode"**
149 |** "mealPlanName"**| "BB",|Meal Plan code
150 |** "placementType"**| 1,|Placement type code - in this case  1 means  single
151 |** "placementTypeName"**| "1 Adult",|Placement type name - definition of the ** "placementType"**
152 |** "priceCode"**| "BASERATE BB ECO",|price code for the current option
153 |** "priceCurrency"**| "EUR",|
154 |** "priceCurrencySrc"**| "EUR",|
155 |** "availability"**| 3,|Availability
156 |** "availableRoomsCount"**| 1,|Number of available rooms for the current type of options
157 |** "totalSellPriceSrc"**| 40.70,|
158 |** "totalSellPrice"**| 40.70,|
159 |** "totalPriceSurcharge"**| 0.00,|
160 |** "cancellationPolicyDescription"**| "Cancellation Policy  Non refundable",|TEXT DESCRIPTION OF THE CANCELLATION POLICY
161 |** "cancellationPolicy"**| {|
162 |** "noShowChargeValue"**| 100.00,|
163 |** "noShowChargeValueType"**| "%",|
164 |** "earlyDepartureChargeValue"**| 100.00,|
165 |** "earlyDepartureChargeValueType"**| "%",|
166 |** "conditions"**| [|
167 |** {**| |
168 |** "timeunits"**| 365,|
169 |** "timeunitType"**| "Day",|
170 |** "timeOffsetTypeName"**| "Before Arrival",|
171 |** "chargeValue"**| 100.00,|
172 |** "chargeValueType"**| "%"|
173 |** }**| |
174 |** ]**| |
175 |** },**| |
176 |** "searchId"**| 1656436810,|search id of the hotel
177 |** "hotelCode"**| "10b7bc34-2a03-495e-94bc-1092b07823f7",|Unique ID of the Hotel. Full List of the hotels is available in [[Get Hotels>>Get Hotels]] method
178 |** "id"**| 1656436810005000001,|
179 |** "hotel"**| {|
180 |** "hotelCode"**| "10b7bc34-2a03-495e-94bc-1092b07823f7",|Unique ID of the Hotel. Full List of the hotels is available in [[Get Hotels>>Get Hotels]] method
181 |** "hotelName"**| "Istanbul Holiday Hotel",|Full name of the Hotel
182 |** "hotelClass"**| "~*~**",|Hotel Class in Stars
183 |** "cityId"**| "e1344ba0-5273-4fc1-b6c4-72446260f430",|Code of the city where  hotel is located, which is available in method [[Get Cities>>Get Cities]] in parameter [cityid]
184 |** "cityName"**| "Istanbul",|Full Name of the City
185 |** "countryCode"**| "TR",|Country code, which can be retrieved in [[Get Cities>>Get Cities]] method, in parameter [countrycode]
186 |** "districtId"**| "6ca0ed7e-7412-4e45-85b5-dd0d74cabc62",|District unique code, where hotel is located.
187 |** "districtName"**| "Fatih",|Full name of the District
188 |** "note"**| ""|Hotel note - this is optional
189 |** },**| |
190 |** "adults"**| 1,|Number of the adults
191 |** "children"**| 0,|Number of the children
192 |** "childrenAges"**| "",|in case of children, here will be their ages
193 |** "childrenExeptInfants"**| 0,|
194 |** "checkInDate"**| "2024-05-06T00000",|date of the check in
195 |** "checkOutDate"**| "2024-05-07T00000",|date of the check out
196 |** "includedExtrasAmount"**| 0,|
197 |** "extraServices"**| []|
198 |** },**| |