Wiki source code of 2. Hotel Prices

Version 7.1 by Giorgi Mdivnishvili on 2024/02/27 11:55

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