Hotel.getRates

Returns rates, contingents, closures, restrictions and payment settings. 

This function returns all data which can be set up in Settings - Prices. We recommend you to check your settings first so you better understand the structure of the data output. 

Billing method for accommodation

If the value of the element prmId is "1", the hotel charges accommodation price based on occupancy. If the value is "2", the price is charged for the room regardless of the number of occupying guests. 

The element objectKind looks like the following if charges are based on occupancy: 

<objectKind>
    <obkId>1478</obkId>
    <rate>
        <occupancy>1</occupancy>
        <price>800</price>
        <currency>
            <curId>1</curId>
            <code>CZK</code>
        </currency>
    </rate>
    <rate>
        <occupancy>2</occupancy>
        <price>1400</price>
        <currency>
            <curId>1</curId>
            <code>CZK</code>
        </currency>
    </rate>
</objectKind>

This example shows that a room with obkId 1478 is available for one person for 800 Kč and for two persons for 1400 Kč.

If accounting a flat rate for the room not based on occupancy, the element "occupancy" is completely missing: 

<objectKind>
    <obkId>1478</obkId>
    <rate>
        <price>1000</price>
        <currency>
            <curId>1</curId>
            <code>CZK</code>
        </currency>
    </rate>
</objectKind>

In this example, this room kind is always priced at 1000 Kč no matter the number of occupying guests. 

All facilities (excluding bedrooms) are always charged at the same price. The element <occupancy> is missing, despite prmId equals 1. 

Parameters

Name Description
login Username
password Password
hotId Hotel ID
term Time period
currencies Currency filter
prlIds Pricing plan filter
obkIds Object kind filter

term

Returns price settings for a specified time period. We strive to make hotels set prices at least one year in advance. 

Insert dates in W3 date format. Example: 2010-04-29

<term> [1]  
 
<from> [1] from (date)
<to> [1] to

currencies

With this parameter you can specify in which currency prices for accommodation and meals will be returned. You can only select currencies permitted by the hotel

If you omit this parameter, the function returns data in the default currency of the hotel. 

<currencies> [0..1]  
 
<currency> [1..*] Specified currency. Use EITHER curId OR code. 
 
<curId> [0..1] Currency ID
<code> [0..1] Currency code

prlIds

With this parameter you can obtain additional price plans. The function always returns the basic price plan. If you omit this parameter and you are a Previo partner and your hotel has a defined special pricing plan, the function returns it along with the basic price plan. 

<prlIds> [0..1]  
 
<prlId> [1..*] Price plan ID

obkIds

With this parameter you can define for which room kinds you would like to get accommodation prices, contingents and closures. If this parameter is omitted, the function returns the following information for all defined room kinds. 

<obkIds> [0..1]  
 
<obkId> [1..*] Object kind ID

Sample request

<request>
    <login>prihlasovaci_jmeno</login>
    <password>heslo</password>
    <hotId>745896</hotId>
    <term>
        <from>2010-01-01</from>
        <to>2010-12-31</to>
    </term>
    <currencies>
        <currency>
            <code>CZK</code>
        </currency>
        <currency>
            <code>EUR</code>
        </currency>
    </currencies>
</request>

Output

Root element - rates

<rates> [1]  
 
<prmId> [1] Billing method for accommodation 
<season> [0..*]

Seasons that intersect with the specified datesInbetween seasons can be a gap. If two seasons follow up on each other, the first date is the same date as the other. 

 
<priId> [1] Season ID
<from> [1] from (date)
<to> [1] to (date) 
<ratePlan> [1..*] Price plan

Price plan - ratePlan

<ratePlan> [1..*] Price plan. The function always returns at least the basic plan. 
 
<prlId> [0..1] Price plan ID. The basic price plan does not have an ID. 
<objectKind> [0..*] Accommodation prices, contigents and closures 
 
<obkId> [1] Room kind ID
<rate> [0..*] Accommodation price
 
<occupancy> [0..1] Occupancy. The element is missing if the hotel charges a flat price for the room. 
<price> [1] Accommodation price (in selected currency) 
<standardPrice> [0..1] Accommodation price before discount
<nrrPrice> [0..1] Non-refundable rate
<currency> [1] Currency 
 
<curId> [1] Currency ID
<code> [1] Currency code
<contingent> [0..1] Contingent
 
<total> [1] Total number of rooms of specified room kind in contingent
<expiration> [1] Unsold capacity coming back after expiration in days from the current day
<objId> [1..*] ID of rooms in contingent. Number of these ID = total value
<closed> [0..1] Closures
 
<total> [1] Total number of closed rooms of specified room kind
<objId> [1..*] ID of closed rooms. Number of these ID = total value
<minStay> [0..1] Minimum length of stay (days) - this element appears, when hotel sets the minimum stay restriction per room type
<maxStay> [0..1] Maximum length of stay (days) - this element appears, when hotel sets the minimum stay restriction per room type
<meal> [0..*] [DEPRICATED - use Hotel.getMeals instead] Offered board types and their prices. Boards are sorted by meaId. For each board type (meaId) the first listed price is always for the default guest category (guaId) if the hotel has a default category for the season. 
 
<meaId> [1] Board ID
<guaId> [1] Guest category ID
<rate> [1..*] Price
 
<price> [1] Price of board type (in selected currency) 
<currency> [1] Currency
 
<curId> [1] Currency ID
<code> [1] Currency code
<minStay> [0..1] Minimum length of stay (days) - this element appears, when hotel sets the minimum stay restriction per season
<maxStay> [0..1] Maximum length of stay (days) - this element appears, when hotel sets the minimum stay restriction per season
<payment> [0..*] Payment settings
 
<payId> [1] Payment ID
<cosIdSuccess> [1] Status ID in which the reservation is accepted if the payment was successful
<cosIdFailure> [0..1]

Status ID in which the reservation is accepted in case the payment was not successful. Success of a payment can only be evaluated by payment with credit card (payId = 3). Other types of payments are always saved in reservation status cosIdSuccess.

<advance> [0..1] Required deposit
 
<type> [1] Deposit type (that reflects the value) 
<value> [1] Value
<expiration> [0..1] Number of days in which the deposit may be paid. Appears only in payment transfers. 
<range> [0..*] Days of arrival / departure
 
<arrival> [1] Day of arrival
<departure> [1] Day of departure

Sample output

<rates>
    <prmId>1</prmId>
    <season>
        <priId>4758</priId>
        <from>2010-05-01</from>
        <to>2010-05-08</to>
        <ratePlan>
            <objectKind>
                <obkId>111136</obkId>
                <rate>
                    <occupancy>1</occupancy>
                    <price>500</price>
                    <currency>
                        <curId>1</curId>
                        <code>CZK</code>
                    </currency>
                </rate>
                <rate>
                    <occupancy>1</occupancy>
                    <price>20</price>
                    <currency>
                        <curId>2</curId>
                        <code>EUR</code>
                    </currency>
                </rate>
                <contingent>
                    <total>1</total>
                    <expiration>3</expiration>
                    <objId>957091</objId>
                </contingent>
                <closed>
                    <total>2</total>
                    <objId>957096</objId>
                    <objId>957101</objId>
                </closed>
            </objectKind>
            <objectKind>
                <obkId>111151</obkId>
                <rate>
                    <occupancy>1</occupancy>
                    <price>300</price>
                    <standardPrice>400</standardPrice>
                    <currency>
                        <curId>1</curId>
                        <code>CZK</code>
                    </currency>
                </rate>
                <rate>
                    <occupancy>2</occupancy>
                    <price>500</price>
                    <standardPrice>600</standardPrice>
                    <currency>
                        <curId>1</curId>
                        <code>CZK</code>
                    </currency>
                </rate>
                <rate>
                    <occupancy>1</occupancy>
                    <price>12</price>
                    <standardPrice>16</standardPrice>
                    <currency>
                        <curId>2</curId>
                        <code>EUR</code>
                    </currency>
                </rate>
                <rate>
                    <occupancy>2</occupancy>
                    <price>20</price>
                    <standardPrice>24</standardPrice>
                    <currency>
                        <curId>2</curId>
                        <code>EUR</code>
                    </currency>
                </rate>
            </objectKind>
            <meal>
                <meaId>2</meaId>
                <guaId>71941</guaId>
                <rate>
                    <price>50</price>
                    <currency>
                        <curId>1</curId>
                        <code>CZK</code>
                    </currency>
                </rate>
                <rate>
                    <price>2</price>
                    <currency>
                        <curId>2</curId>
                        <code>EUR</code>
                    </currency>
                </rate>
            </meal>
            <meal>
                <meaId>2</meaId>
                <guaId>71946</guaId>
                <rate>
                    <price>25</price>
                    <currency>
                        <curId>1</curId>
                        <code>CZK</code>
                    </currency>
                </rate>
                <rate>
                    <price>1</price>
                    <currency>
                        <curId>2</curId>
                        <code>EUR</code>
                    </currency>
                </rate>
            </meal>
            <minStay>2</minStay>
            <maxStay>10</maxStay>
            <payment>
                <payId>1</payId>
                <cosIdSuccess>6</cosIdSuccess>
            </payment>
            <payment>
                <payId>2</payId>
                <cosIdSuccess>1</cosIdSuccess>
                <advance>
                    <type>per</type>
                    <value>50</value>
                    <expiration>3</expiration>
                </advance>
            </payment>
        </ratePlan>
    </season>
    <season>
        <priId>8542</priId>
        <from>2010-05-08</from>
        <to>2010-05-15</to>
        <ratePlan>
            <objectKind>
                <obkId>111136</obkId>
                <rate>
                    <occupancy>1</occupancy>
                    <price>250</price>
                    <currency>
                        <curId>1</curId>
                        <code>CZK</code>
                    </currency>
                </rate>
                <rate>
                    <occupancy>1</occupancy>
                    <price>10</price>
                    <currency>
                        <curId>2</curId>
                        <code>EUR</code>
                    </currency>
                </rate>
            </objectKind>
            <objectKind>
                <obkId>111151</obkId>
                <rate>
                    <occupancy>1</occupancy>
                    <price>400</price>
                    <currency>
                        <curId>1</curId>
                        <code>CZK</code>
                    </currency>
                </rate>
                <rate>
                    <occupancy>2</occupancy>
                    <price>600</price>
                    <currency>
                        <curId>1</curId>
                        <code>CZK</code>
                    </currency>
                </rate>
                <rate>
                    <occupancy>1</occupancy>
                    <price>16</price>
                    <currency>
                        <curId>2</curId>
                        <code>EUR</code>
                    </currency>
                </rate>
                <rate>
                    <occupancy>2</occupancy>
                    <price>24</price>
                    <currency>
                        <curId>2</curId>
                        <code>EUR</code>
                    </currency>
                </rate>
            </objectKind>
            <minStay>1</minStay>
            <maxStay>100</maxStay>
            <range>
                <arrival>thu</arrival>
                <departure>sun</departure>
            </range>
            <range>
                <arrival>fri</arrival>
                <departure>sun</departure>
            </range>
        </ratePlan>
    </season>
</rates>

Sample output corresponds to this screen in the Previo system: 

Nastavení cen