Wiki source code of 2. Hotel Prices

Last modified by Giorgi Mdivnishvili on 2024/02/27 12:01

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