2.Hotel Prices

Version 2.1 by Giorgi Mdivnishvili on 2024/02/26 15:10

https://restapi.rustaronline.com/v1.01/api/hotelprices

Method: GET

Parameters to pass: agentid, agentpassword, hotelid

Sample URL:

https://restapi.rustaronline.com/v1.01/api/hotelprices?agentid=test.test&agentpassword=TestP@ssw0rd&hotelid=d6f9299f-5d94-4955-85e7-003e0383023c&removedublicates=false

The method returns the object with three list of prices for specified hotel. ContractPrices, Promotions, PromotionsWithConditions

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.

Return value example:

{
 "Code": "00",
 "Message": "",
 "Timestamp": "2016-06-27T20:12:05.3985798+04:00",
 "Version": 1.01,
 "ResponseID": "6554e641-5e96-45a8-b3ef-44e9e5581673",
 "Data": {
   "ContractPrices": [
      {
"priceid":"aa55f001-42d5-4f8c-87fd-a5284d766c49",
       "hotelid": "78468066-fca7-472c-aabd-2143df1dc718",
       "roomcategory": "6f3c7364-46fa-4226-8582-ec3c3d54cd7e",
       "roomcategorytype": "7f3c7364-46fa-4226-8582-ec3c3d54cd7e",
       "roomcategoryname": "Deluxe Room",
       "startdate": "2016-05-12T00:00:00",
       "enddate": "2016-09-30T00:00:00",
       "mealplan": "BB",
       "adults": 1,
       "teens": 0,
       "children": 0,
       "infants": 1,
       "teenswithextrabeds": 0,
       "childrenwithextrabeds": 1,
       "childpolicy": {
         "infantmaxage": 2.99,
         "childmaxage": 13.99,
         "teenmaxage": 15.99
        },
       "placement": "SGL+1CHDEB(3-13,99)+1CHD(0-2,99)",
       "price": 382.00000000000000,
       "currency": "USD",
       "promotioncode": "",
       "promotion": {
         "staydays": null,
         "paydays": null,
         "discount": 0.0,
         "cashback": 0.0
        },
       "conditions": {
         "bookingstartdate": null,
         "bookingenddate": null,
         "bookbefore": null,
         "minimumstay": 0,
         "maximumstay": 0
        },
"isactive":true

      }
    ],
   "Promotions": [
      {
       "priceid":"49fb3c67-71ac-478c-9714-e2aa4249d303",
       "hotelid": "78468066-fca7-472c-aabd-2143df1dc718",
       "roomcategory": "6f3c7364-46fa-4226-8582-ec3c3d54cd7e",
       "roomcategorytype": "7f3c7364-46fa-4226-8582-ec3c3d54cd7e",
       "roomcategoryname": "Deluxe Room",
       "startdate": "2016-06-15T00:00:00",
       "enddate": "2016-07-05T00:00:00",
       "mealplan": "BB",
       "adults": 1,
       "teens": 0,
       "children": 0,
       "infants": 0,
       "teenswithextrabeds": 0,
       "childrenwithextrabeds": 0,
       "childpolicy": {
         "infantmaxage": 2.99,
         "childmaxage": 13.99,
         "teenmaxage": 15.99
        },
       "placement": "SGL",
       "price": 143.00000000000000,
       "currency": "USD",
       "promotioncode": "Rixos Summer Special 2016",
       "promotion": {
         "staydays": null,
         "paydays": null,
         "discount": 0.0,
         "cashback": 0.0
        },
       "conditions": {
         "bookingstartdate": null,
         "bookingenddate": null,
         "bookbefore": null,
         "minimumstay": 0,
         "maximumstay": 0
        },
"isactive":true
      }
    ],
   "PromotionsWithConditions": [
      {
"priceid":"aa55f001-42d5-4f8c-87fd-a5284d766c49",
       "hotelid": "78468066-fca7-472c-aabd-2143df1dc718",
       "roomcategory": "6f3c7364-46fa-4226-8582-ec3c3d54cd7e",
       "roomcategorytype": "7f3c7364-46fa-4226-8582-ec3c3d54cd7e",
       "roomcategoryname": "Deluxe Room",
       "startdate": "2016-07-06T00:00:00",
       "enddate": "2016-07-08T00:00:00",
       "mealplan": "BB",
       "adults": 1,
       "teens": 0,
       "children": 0,
       "infants": 0,
       "teenswithextrabeds": 0,
       "childrenwithextrabeds": 1,
       "childpolicy": {
         "infantmaxage": 2.99,
         "childmaxage": 13.99,
         "teenmaxage": 15.99
        },
       "placement": "SGL+1CHDEB(3-13,99)",
       "price": 234.00000000000000,
       "currency": "USD",
       "promotioncode": "Rixos Summer Special 2016",
       "promotion": {
         "staydays": null,
         "paydays": null,
         "discount": 0.0,
         "cashback": 0.0
        },
       "conditions": {
         "bookingstartdate": null,
         "bookingenddate": null,
         "bookbefore": null,
         "minimumstay": 3,
         "maximumstay": 5
        },
"isactive":true
      },
      {
"priceid":"aa55f001-42d5-4f8c-87fd-a5284d766c49",
       "hotelid": "78468066-fca7-472c-aabd-2143df1dc718",
       "roomcategory": "6f3c7364-46fa-4226-8582-ec3c3d54cd7e",
       "roomcategorytype": "7f3c7364-46fa-4226-8582-ec3c3d54cd7e",
       "roomcategoryname": "Deluxe Room",
       "startdate": "2016-07-06T00:00:00",
       "enddate": "2016-07-08T00:00:00",
       "mealplan": "BB",
       "adults": 1,
       "teens": 0,
       "children": 0,
       "infants": 2,
       "teenswithextrabeds": 0,
       "childrenwithextrabeds": 0,
       "childpolicy": {
         "infantmaxage": 2.99,
         "childmaxage": 13.99,
         "teenmaxage": 15.99
        },
       "placement": "SGL+2CHD(0-2,99)(0-2,99)",
       "price": 234.00000000000000,
       "currency": "USD",
       "promotioncode": "Rixos Summer Special 2016",
       "promotion": {
         "staydays": null,
         "paydays": null,
         "discount": 0.0,
         "cashback": 0.0
        },
       "conditions": {
         "bookingstartdate": null,
         "bookingenddate": null,
         "bookbefore": null,
         "minimumstay": 3,
         "maximumstay": 5
        },
"isactive":true
      },
      {
"priceid":"aa55f001-42d5-4f8c-87fd-a5284d766c49",
       "hotelid": "78468066-fca7-472c-aabd-2143df1dc718",
       "roomcategory": "6f3c7364-46fa-4226-8582-ec3c3d54cd7e",
       "roomcategoryname": "Deluxe Room",
       "startdate": "2016-07-06T00:00:00",
       "enddate": "2016-07-08T00:00:00",
       "mealplan": "BB",
       "adults": 1,
       "teens": 0,
       "children": 1,
       "infants": 1,
       "teenswithextrabeds": 0,
       "childrenwithextrabeds": 0,
       "childpolicy": {
         "infantmaxage": 2.99,
         "childmaxage": 13.99,
         "teenmaxage": 15.99
        },
       "placement": "SGL+2CHD(3-13,99)(0-2,99)",
       "price": 234.00000000000000,
       "currency": "USD",
       "promotioncode": "Rixos Summer Special 2016",
       "promotion": {
         "staydays": null,
         "paydays": null,
         "discount": 0.0,
         "cashback": 0.0
        },
       "conditions": {
         "bookingstartdate": null,
         "bookingenddate": null,
         "bookbefore": null,
         "minimumstay": 3,
         "maximumstay": 5
        },
"isactive":true
      }
    ]
  }
}

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

hotelid:                          GUID of the hotel in the database of Rustar.

roomcategory:               GUID of the Room category

roomcategorytype:         GUID of the Room category type. Unique by description of the room

roomcategoryname:       string. The name of the room category

startdate:                       Date. Start date of the price period

enddate:                        Date. End date of the price period

mealplan:                       CHAR(2). “RO”,"BB",”HB”,”FB”,”AL”

adults:                           Integer. Number of Aduts with beds

teens:                            Integer. Number of children (Teenagers) without extra bed

children:                        Integer. Number of children between infant and teen ages without extra bed

infants:                          Integer. Number of infants

teenswithextrabeds:      Integer. Number of children (Teenagers) with extra bed

childrenwithextrabeds: Integer. Number of children between infant and teen ages with extra bed

childpolicy: {

infantmaxage:                Decimal. Max age of the infant by the policy of the hotel

childmaxage:                 Decimal. Max age of the child by the policy of the hotel

teenmaxage:                  Decimal. Max age of the teenager by the policy of the hotel

}

placement:                     string. Accomodation of all guests in following format e.g.

"SGL+1CHDEB(3-13,99)+1CHD(0-2,99)"

price:                             Decimal. Price for the accommodation/placement

currency:                       CHAR(3). Currency of the price above

promotioncode:              string. Optional. Promotion code if any of the specified price

promotion: {                  Promotion terms if any

staydays:                       Integer. Number of days to stay for stay/pay promotion (n nights free)

paydays:                        Integer. Number of days that will be charged in case of “staydays” stay

discount:                       Decimal. Discount % that was applied for this promotion

cashback:                      Decimal. Cashback in specified currency that was applied for this promotion

}

conditions": {                Optional conditions for using this price

bookingstartdate:          Date. When it is allowed to start the reservation for this promotion/accomodation

bookingenddate:            Date. Date, after when the sale of this promotion should be stopped.

bookbefore:                   Integer. Number of days before checkin to use this promotion (Early Bird)

minimumstay:                Integer. Minimal stay of nights to use this promotion

maximumstay:               Integer. Maximal stay of nights to use this promotion

}

isactive:                         Boolean. True if the price is active and can be used. False if the price is deactivated/inactive.

Please be noted, that the prices are already calculated with all possible discounts.