Wiki source code of 2. Hotel Prices
Version 11.1 by Giorgi Mdivnishvili on 2024/02/27 11:58
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 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>>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]]** | ||
| 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| | ||
| 34 | ))) | ||
| 35 | |||
| 36 | |||
| 37 | Return value example: | ||
| 38 | |||
| 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 | |||
| 255 | (% class="info" %)|**Value**|((( | ||
| 256 | **Description** | ||
| 257 | ))) | ||
| 258 | |**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 | ||
| 259 | |**hotelid**|GUID of the hotel in the database of Rustar. | ||
| 260 | |**roomcategory**|GUID of the Room category | ||
| 261 | |**roomcategorytype**|GUID of the Room category type. Unique by description of the room | ||
| 262 | |**roomcategoryname**|string. The name of the room category | ||
| 263 | |**startdate**|Date. Start date of the price period | ||
| 264 | |**enddate**|Date. End date of the price period | ||
| 265 | |**mealplan**|CHAR(2). “RO”,"BB",”HB”,”FB”,”AL” | ||
| 266 | |**adults**|Integer. Number of Aduts with beds | ||
| 267 | |**teens**|Integer. Number of children (Teenagers) without extra bed | ||
| 268 | |**children**|Integer. Number of children between infant and teen ages without extra bed | ||
| 269 | |**infants**|Integer. Number of infants | ||
| 270 | |**teenswithextrabeds**|Integer. Number of children (Teenagers) with extra bed | ||
| 271 | |**childrenwithextrabeds**|Integer. Number of children between infant and teen ages with extra bed | ||
| 272 | |**childpolicy**| { | ||
| 273 | |**infantmaxage**|Decimal. Max age of the infant by the policy of the hotel | ||
| 274 | |**childmaxage**|Decimal. Max age of the child by the policy of the hotel | ||
| 275 | |**teenmaxage**|Decimal. Max age of the teenager by the policy of the hotel | ||
| 276 | |**}**| | ||
| 277 | |**placement**|string. Accomodation of all guests in following format e.g. | ||
| 278 | |**SGL+1CHDEB(3-13,99)+1CHD(0-2,99)**| | ||
| 279 | |**price**|Decimal. Price for the accommodation/placement | ||
| 280 | |**currency**|CHAR(3). Currency of the price above | ||
| 281 | |**promotioncode**|string. Optional. Promotion code if any of the specified price | ||
| 282 | |**promotion**| { Promotion terms if any | ||
| 283 | |**staydays**| Integer. Number of days to stay for stay/pay promotion (n nights free) | ||
| 284 | |**paydays**| Integer. Number of days that will be charged in case of “staydays” stay | ||
| 285 | |**discount**| Decimal. Discount % that was applied for this promotion | ||
| 286 | |**cashback**| Decimal. Cashback in specified currency that was applied for this promotion | ||
| 287 | |**}**| | ||
| 288 | |**conditions"**| { Optional conditions for using this price | ||
| 289 | |**bookingstartdate**| Date. When it is allowed to start the reservation for this promotion/accomodation | ||
| 290 | |**bookingenddate**| Date. Date, after when the sale of this promotion should be stopped. | ||
| 291 | |**bookbefore**| Integer. Number of days before checkin to use this promotion (Early Bird) | ||
| 292 | |**minimumstay**| Integer. Minimal stay of nights to use this promotion | ||
| 293 | |**maximumstay**| Integer. Maximal stay of nights to use this promotion | ||
| 294 | |**}**| | ||
| 295 | |**isactive**| Boolean. True if the price is active and can be used. False if the price is deactivated/inactive. | ||
| 296 | |||
| 297 | Please be noted, that the prices are already calculated with all possible discounts. |