Wiki source code of 5. Get Price Details

Version 5.1 by Giorgi Mdivnishvili on 2024/02/29 12:17

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