Wiki source code of 2. Hotel Prices

Version 12.1 by Giorgi Mdivnishvili on 2024/02/27 11:59

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