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