Wiki source code of 2. Hotel Prices

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

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