Wiki source code of 2. Hotel Prices

Version 10.1 by Giorgi Mdivnishvili on 2024/02/27 11:57

Show last authors
1 = Method Description =
2
3 >The method returns the object with three list of prices for specified hotel. ContractPrices, Promotions, PromotionsWithConditionsNote: Parameter removedublicates is optional, used for removing duplicate seasons from the list and split prices by seasons. False is default value of this parameter.
4
5
6 == Endpoint URL - [Method - GET] ==
7
8 (% class="box infomessage" %)
9 (((
10 [[https:~~/~~/restapi.rustaronline.com/v1.01/api/hotelprices>>https://restapi.rustaronline.com/v1.01/api/hotelprices]]
11 )))
12
13 Parameters to pass: agentid, agentpassword, hotelid
14
15 Sample URL:
16
17 == Request Parameters ==
18
19 (% class="box infomessage" %)
20 (((
21 (% class="table-bordered" %)
22 |**Key**|**Value**|**Request URL**
23 |agentid|test.test|**[[https:~~/~~/restapi.rustaronline.com/v1.01/api/hotelprices?agentid=test.test&agentpassword=TestP@ssw0rd&hotelid=d6f9299f-5d94-4955-85e7-003e0383023c&removedublicates=false>>https://restapi.rustaronline.com/v1.01/api/hotelprices?agentid=test.test&agentpassword=TestP@ssw0rd&hotelid=d6f9299f-5d94-4955-85e7-003e0383023c&removedublicates=false]]**
24 |agentpassword|[[TestP@ssw0rd>>mailto:TestP@ssw0rd]]|**[[https:~~/~~/restapi.rustaronline.com/v1.01/api/hotelprices?agentid=test.test&agentpassword=TestP@ssw0rd&hotelid=d6f9299f-5d94-4955-85e7-003e0383023c&removedublicates=false>>https://restapi.rustaronline.com/v1.01/api/hotelprices?agentid=test.test&agentpassword=TestP@ssw0rd&hotelid=d6f9299f-5d94-4955-85e7-003e0383023c&removedublicates=false]]**
25 |hotelid|d6f9299f-5d94-4955-85e7-003e0383023c|**[[https:~~/~~/restapi.rustaronline.com/v1.01/api/hotelprices?agentid=test.test&agentpassword=TestP@ssw0rd&hotelid=d6f9299f-5d94-4955-85e7-003e0383023c&removedublicates=false>>https://restapi.rustaronline.com/v1.01/api/hotelprices?agentid=test.test&agentpassword=TestP@ssw0rd&hotelid=d6f9299f-5d94-4955-85e7-003e0383023c&removedublicates=false]]**
26 |removedublicates|false|
27 )))
28
29
30 Return value example:
31
32
33 {{code language="json"}}
34 {
35 "Code": "00",
36 "Message": "",
37 "Timestamp": "2016-06-27T20:12:05.3985798+04:00",
38 "Version": “1.01”,
39 "ResponseID": "6554e641-5e96-45a8-b3ef-44e9e5581673",
40 "Data": {
41 "ContractPrices": [
42 {
43 "priceid":"aa55f001-42d5-4f8c-87fd-a5284d766c49",
44 "hotelid": "78468066-fca7-472c-aabd-2143df1dc718",
45 "roomcategory": "6f3c7364-46fa-4226-8582-ec3c3d54cd7e",
46 "roomcategorytype": "7f3c7364-46fa-4226-8582-ec3c3d54cd7e",
47 "roomcategoryname": "Deluxe Room",
48 "startdate": "2016-05-12T00:00:00",
49 "enddate": "2016-09-30T00:00:00",
50 "mealplan": "BB",
51 "adults": 1,
52 "teens": 0,
53 "children": 0,
54 "infants": 1,
55 "teenswithextrabeds": 0,
56 "childrenwithextrabeds": 1,
57 "childpolicy": {
58 "infantmaxage": 2.99,
59 "childmaxage": 13.99,
60 "teenmaxage": 15.99
61 },
62 "placement": "SGL+1CHDEB(3-13,99)+1CHD(0-2,99)",
63 "price": 382.00000000000000,
64 "currency": "USD",
65 "promotioncode": "",
66 "promotion": {
67 "staydays": null,
68 "paydays": null,
69 "discount": 0.0,
70 "cashback": 0.0
71 },
72 "conditions": {
73 "bookingstartdate": null,
74 "bookingenddate": null,
75 "bookbefore": null,
76 "minimumstay": 0,
77 "maximumstay": 0
78 },
79 "isactive":true
80
81 }
82 ],
83 "Promotions": [
84 {
85 "priceid":"49fb3c67-71ac-478c-9714-e2aa4249d303",
86 "hotelid": "78468066-fca7-472c-aabd-2143df1dc718",
87 "roomcategory": "6f3c7364-46fa-4226-8582-ec3c3d54cd7e",
88 "roomcategorytype": "7f3c7364-46fa-4226-8582-ec3c3d54cd7e",
89 "roomcategoryname": "Deluxe Room",
90 "startdate": "2016-06-15T00:00:00",
91 "enddate": "2016-07-05T00:00:00",
92 "mealplan": "BB",
93 "adults": 1,
94 "teens": 0,
95 "children": 0,
96 "infants": 0,
97 "teenswithextrabeds": 0,
98 "childrenwithextrabeds": 0,
99 "childpolicy": {
100 "infantmaxage": 2.99,
101 "childmaxage": 13.99,
102 "teenmaxage": 15.99
103 },
104 "placement": "SGL",
105 "price": 143.00000000000000,
106 "currency": "USD",
107 "promotioncode": "Rixos Summer Special 2016",
108 "promotion": {
109 "staydays": null,
110 "paydays": null,
111 "discount": 0.0,
112 "cashback": 0.0
113 },
114 "conditions": {
115 "bookingstartdate": null,
116 "bookingenddate": null,
117 "bookbefore": null,
118 "minimumstay": 0,
119 "maximumstay": 0
120 },
121 "isactive":true
122 }
123 ],
124 "PromotionsWithConditions": [
125 {
126 "priceid":"aa55f001-42d5-4f8c-87fd-a5284d766c49",
127 "hotelid": "78468066-fca7-472c-aabd-2143df1dc718",
128 "roomcategory": "6f3c7364-46fa-4226-8582-ec3c3d54cd7e",
129 "roomcategorytype": "7f3c7364-46fa-4226-8582-ec3c3d54cd7e",
130 "roomcategoryname": "Deluxe Room",
131 "startdate": "2016-07-06T00:00:00",
132 "enddate": "2016-07-08T00:00:00",
133 "mealplan": "BB",
134 "adults": 1,
135 "teens": 0,
136 "children": 0,
137 "infants": 0,
138 "teenswithextrabeds": 0,
139 "childrenwithextrabeds": 1,
140 "childpolicy": {
141 "infantmaxage": 2.99,
142 "childmaxage": 13.99,
143 "teenmaxage": 15.99
144 },
145 "placement": "SGL+1CHDEB(3-13,99)",
146 "price": 234.00000000000000,
147 "currency": "USD",
148 "promotioncode": "Rixos Summer Special 2016",
149 "promotion": {
150 "staydays": null,
151 "paydays": null,
152 "discount": 0.0,
153 "cashback": 0.0
154 },
155 "conditions": {
156 "bookingstartdate": null,
157 "bookingenddate": null,
158 "bookbefore": null,
159 "minimumstay": 3,
160 "maximumstay": 5
161 },
162 "isactive":true
163 },
164 {
165 "priceid":"aa55f001-42d5-4f8c-87fd-a5284d766c49",
166 "hotelid": "78468066-fca7-472c-aabd-2143df1dc718",
167 "roomcategory": "6f3c7364-46fa-4226-8582-ec3c3d54cd7e",
168 "roomcategorytype": "7f3c7364-46fa-4226-8582-ec3c3d54cd7e",
169 "roomcategoryname": "Deluxe Room",
170 "startdate": "2016-07-06T00:00:00",
171 "enddate": "2016-07-08T00:00:00",
172 "mealplan": "BB",
173 "adults": 1,
174 "teens": 0,
175 "children": 0,
176 "infants": 2,
177 "teenswithextrabeds": 0,
178 "childrenwithextrabeds": 0,
179 "childpolicy": {
180 "infantmaxage": 2.99,
181 "childmaxage": 13.99,
182 "teenmaxage": 15.99
183 },
184 "placement": "SGL+2CHD(0-2,99)(0-2,99)",
185 "price": 234.00000000000000,
186 "currency": "USD",
187 "promotioncode": "Rixos Summer Special 2016",
188 "promotion": {
189 "staydays": null,
190 "paydays": null,
191 "discount": 0.0,
192 "cashback": 0.0
193 },
194 "conditions": {
195 "bookingstartdate": null,
196 "bookingenddate": null,
197 "bookbefore": null,
198 "minimumstay": 3,
199 "maximumstay": 5
200 },
201 "isactive":true
202 },
203 {
204 "priceid":"aa55f001-42d5-4f8c-87fd-a5284d766c49",
205 "hotelid": "78468066-fca7-472c-aabd-2143df1dc718",
206 "roomcategory": "6f3c7364-46fa-4226-8582-ec3c3d54cd7e",
207 "roomcategoryname": "Deluxe Room",
208 "startdate": "2016-07-06T00:00:00",
209 "enddate": "2016-07-08T00:00:00",
210 "mealplan": "BB",
211 "adults": 1,
212 "teens": 0,
213 "children": 1,
214 "infants": 1,
215 "teenswithextrabeds": 0,
216 "childrenwithextrabeds": 0,
217 "childpolicy": {
218 "infantmaxage": 2.99,
219 "childmaxage": 13.99,
220 "teenmaxage": 15.99
221 },
222 "placement": "SGL+2CHD(3-13,99)(0-2,99)",
223 "price": 234.00000000000000,
224 "currency": "USD",
225 "promotioncode": "Rixos Summer Special 2016",
226 "promotion": {
227 "staydays": null,
228 "paydays": null,
229 "discount": 0.0,
230 "cashback": 0.0
231 },
232 "conditions": {
233 "bookingstartdate": null,
234 "bookingenddate": null,
235 "bookbefore": null,
236 "minimumstay": 3,
237 "maximumstay": 5
238 },
239 "isactive":true
240 }
241 ]
242 }
243 }
244
245 {{/code}}
246
247
248 (% class="info" %)|**Value**|(((
249 **Description**
250 )))
251 |**priceid**|GUID of the unique price id in the database of Rustar. This field together with placement creates unique combination of price for room/promotion/mealplan
252 |**hotelid**|GUID of the hotel in the database of Rustar.
253 |**roomcategory**|GUID of the Room category
254 |**roomcategorytype**|GUID of the Room category type. Unique by description of the room
255 |**roomcategoryname**|string. The name of the room category
256 |**startdate**|Date. Start date of the price period
257 |**enddate**|Date. End date of the price period
258 |**mealplan**|CHAR(2). “RO”,"BB",”HB”,”FB”,”AL”
259 |**adults**|Integer. Number of Aduts with beds
260 |**teens**|Integer. Number of children (Teenagers) without extra bed
261 |**children**|Integer. Number of children between infant and teen ages without extra bed
262 |**infants**|Integer. Number of infants
263 |**teenswithextrabeds**|Integer. Number of children (Teenagers) with extra bed
264 |**childrenwithextrabeds**|Integer. Number of children between infant and teen ages with extra bed
265 |**childpolicy**| {
266 |**infantmaxage**|Decimal. Max age of the infant by the policy of the hotel
267 |**childmaxage**|Decimal. Max age of the child by the policy of the hotel
268 |**teenmaxage**|Decimal. Max age of the teenager by the policy of the hotel
269 |**}**|
270 |**placement**|string. Accomodation of all guests in following format e.g.
271 |**SGL+1CHDEB(3-13,99)+1CHD(0-2,99)**|
272 |**price**|Decimal. Price for the accommodation/placement
273 |**currency**|CHAR(3). Currency of the price above
274 |**promotioncode**|string. Optional. Promotion code if any of the specified price
275 |**promotion**| {                  Promotion terms if any
276 |**staydays**| Integer. Number of days to stay for stay/pay promotion (n nights free)
277 |**paydays**| Integer. Number of days that will be charged in case of “staydays” stay
278 |**discount**| Decimal. Discount % that was applied for this promotion
279 |**cashback**| Decimal. Cashback in specified currency that was applied for this promotion
280 |**}**|
281 |**conditions"**| {                Optional conditions for using this price
282 |**bookingstartdate**| Date. When it is allowed to start the reservation for this promotion/accomodation
283 |**bookingenddate**| Date. Date, after when the sale of this promotion should be stopped.
284 |**bookbefore**| Integer. Number of days before checkin to use this promotion (Early Bird)
285 |**minimumstay**| Integer. Minimal stay of nights to use this promotion
286 |**maximumstay**| Integer. Maximal stay of nights to use this promotion
287 |**}**|
288 |**isactive**| Boolean. True if the price is active and can be used. False if the price is deactivated/inactive.
289
290 Please be noted, that the prices are already calculated with all possible discounts.