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