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