Hotel.getPriceActions | Previo API

Hotel.getPriceActions

Hotels offer specific discounts based on time range from booking to arrival, based on  booked length of stay or other criteria. 

This function returns required data to determine discounts.

Parameters

Name Description
login Username
password Password
hotId Hotel ID

Sample request

<request>
    <login>user_login</login>
    <password>password</password>
    <hotId>hotId</hotId>
</request>

Output

<priceActions> [1]  
 
<actionPrices> [1]  
 
<actionPrice> [0..*]  
 
<id> [1] Discount ID
<discountRateType> [1]

Discount rate type (percent - discount is set in "discountRate", absolute amount in currency - discount is set in "discountRateAbs")

'per' | 'abs'

<discountRate> [1] Discount in % (negative number - surcharge)
<discountRateAbs> [1] Discount as absolute amount
 
<discountRate>  
 
<curId> Currency ID
<rate> Discount amount

<actionFrom>

Valid from
<actionTo> Valid until

<objectKinds>

Valid for these object kinds (if empty, discount is valid for all object kinds)

 
<objectKind> Object kind
 
<obkId> Object kind ID

<ratePlans>

Valid for these rate plans (if empty, discount is valid for all rate plans)

 
<ratePlan> Rate plan
 
<prlId> Rate plan ID
<weekDays> Valid for these week days (if empty, discount is valid for all week days)
 
<weekDay> [0..7]

Week day

'sun' | 'mon' | 'tue' | 'wed' | 'thu' | 'fri' | 'sat'

<combineActionPrice> [1]

Combine action price with other discount / surcharge

true / false

<combineActionPriceOnlyWithSurcharge> [1]

Combine action price only with other surcharge (do not combine action price with discounts)

true / false

 
<firstMinutes> [1]  
 
<firstMinute> [0..*]  
 
<id> [1] Discount ID
<minNumOfDaysBeforeArrival> [1] Minimum number of days booked before arrival to receive the discount
<discountRateType> [1]

Discount rate type (percent - discount is set in "discountRate", absolute amount in currency - discount is set in "discountRateAbs")

'per' | 'abs'

<discountRate> [1] Discount in % (negative number - surcharge)
<discountRateAbs> [1] Discount as absolute amount
 
<discountRate>  
 
<curId> Currency ID
<rate> Discount amount
<actionFrom> Valid from
<actionTo> Valid until
<objectKinds> Valid for these object kinds (if empty, discount is valid for all object kinds)
 
<objectKind> Object kind
 
<obkId> Object kind ID
<ratePlans> Valid for these rate plans (if empty, discount is valid for all rate plans)
 
<ratePlan>                 Rate plan
 
<prlId> Rate plan ID
<weekDays> Valid for these week days (if empty, discount is valid for all week days)
 
<weekDay> [0..7]

Week day

'sun' | 'mon' | 'tue' | 'wed' | 'thu' | 'fri' | 'sat'

 
<lastMinutes> [1]  
 
<lastMinute> [0..*]  
 
<id> [1] Discount ID
<maxNumOfHoursBeforeArrival> [1] Maximum number of hours booked before arrival to receive the discount
<discountRateType> [1]

Discount rate type (percent - discount is set in "discountRate", absolute amount in currency - discount is set in "discountRateAbs")

'per' | 'abs'

<discountRate> [1] Discount in % (negative number - surcharge)
<discountRateAbs> [1] Discount as absolute amount
 
<discountRate>  
 
<curId> Currency ID
<rate> Discount amount
<actionFrom> Valid from
<actionTo> Valid until
<objectKinds> Valid for these object kinds (if empty, discount is valid for all object kinds)
 
<objectKind> Object kind
 
<obkId> Object kind ID
<ratePlans> Valid for these rate plans (if empty, discount is valid for all rate plans)
 
<ratePlan>                 Rate plan
 
<prlId> Rate plan ID
<weekDays> Valid for these week days (if empty, discount is valid for all week days)
 
<weekDay> [0..7]

Week day

'sun' | 'mon' | 'tue' | 'wed' | 'thu' | 'fri' | 'sat'

 
<longTerms> [1]  
 
<longTerm> [0..*]  
 
<id> [1] Discount ID
<minNumOfNights> [1] Minimum number of nights booked to receive the discount
<discountRateType> [1]

Discount rate type (percent - discount is set in "discountRate", absolute amount in currency - discount is set in "discountRateAbs")

'per' | 'abs'

<discountRate> [1] Discount in % (negative number - surcharge)
<discountRateAbs> [1] Discount as absolute amount
 
<discountRate>  
 
<curId> Currency ID
<rate> Discount amount
<actionFrom> Valid from
<actionTo> Valid until
<objectKinds> Valid for these object kinds (if empty, discount is valid for all object kinds)
 
<objectKind> Object kind
 
<obkId> Object kind ID
<ratePlans> Valid for these rate plans (if empty, discount is valid for all rate plans)
 
<ratePlan>                 Rate plan
 
<prlId> Rate plan ID
<weekDays> Valid for these week days (if empty, discount is valid for all week days)
 
<weekDay> [0..7]

Week day

'sun' | 'mon' | 'tue' | 'wed' | 'thu' | 'fri' | 'sat'

Sample output

<priceActions>
    <actionPrices>
        <actionPrice>
            <id>1550</id>
            <discountRateType>per</discountRateType>
            <discountRate>20</discountRate>
            <actionFrom>2017-10-12</actionFrom>
            <actionTo>2017-10-22</actionFrom>
            <objectKinds>
                <objectKind>
                    <obkId>1234567</obkId>
                </objectKind>
            </objectKinds>
            <ratePlans>
                <ratePlan>
                    <prlId>12588</prlId>
                </ratePlan>
            </ratePlans> 
            <weekDays>
                <weekDay>mon</weekDay> 
                <weekDay>tue</weekDay> 
                <weekDay>wed</weekDay> 
            </weekDays> 
            <combineActionPrice>true</combineActionPrice>
            <combineActionPriceOnlyWithSurcharge>false</combineActionPriceOnlyWithSurcharge>
        </actionPrice> 
    </actionPrices> 
    <firstMinutes> 
        <firstMinute> 
            <id>1991</id> 
            <minNumOfDaysBeforeArrival>10</minNumOfDaysBeforeArrival> 
            <discountRateType>per</discountRateType> 
            <discountRate>20</discountRate> 
            <actionFrom>2017-10-12</actionFrom> 
            <actionTo>2017-10-22</actionFrom> 
            <objectKinds> 
                <objectKind> 
                    <obkId>1234567</obkId> 
                </objectKind> 
            </objectKinds>
            <ratePlans>
                <ratePlan>
                    <prlId>8899</prlId> 
                </ratePlan>
            </ratePlans>    
            <weekDays> 
                <weekDay>mon</weekDay>
                <weekDay>tue</weekDay>
                <weekDay>wed</weekDay>
            </weekDays>
        </firstMinute>
    </firstMinutes> 
    <lastMinutes> 
        <lastMinute> 
            <id>5111</id> 
            <maxNumOfHoursBeforeArrival>24</maxNumOfHoursBeforeArrival> 
            <discountRateType>per</discountRateType> 
            <discountRate>15</discountRate> 
            <actionFrom/> 
            <actionTo>2017-10-22</actionFrom> 
            <objectKinds> 
                <objectKind> 
                    <obkId>3434343</obkId> 
                </objectKind> 
                <objectKind> 
                    <obkId>4444444</obkId> 
                </objectKind> 
            </objectKinds> 
            <ratePlans>
                <ratePlan>
                    <prlId>7788</prlId>  
                </ratePlan>
            </ratePlans>     
            <weekDays> 
                <weekDay>wed</weekDay> 
            </weekDays>    
        </lastMinute> 
    </lastMinutes> 
    <longTerms>
        <longTerm>
            <id>13096</id>
            <minNumOfNights>1</minNumOfNights> 
            <discountRateType>abs</discountRateType> 
            <discountRate>0</discountRate> 
            <discountRateAbs> 
                <discountRate> 
                    <curId>1</curId> 
                    <rate>600</rate> 
                </discountRate> 
                <discountRate> 
                    <curId>2</curId> 
                    <rate>25</rate> 
                </discountRate> 
            </discountRateAbs> 
            <actionFrom>2017-10-12</actionFrom> 
            <actionTo/> 
            <ratePlans> 
                <ratePlan>
                    <prlId>1234</prlId> 
                </ratePlan>  
                <ratePlan>
                    <prlId>1235</prlId> 
                </ratePlan>  
            </ratePlans> 
            <objectKinds> 
                <objectKind> 
                    <obkId>8899</obkId>  
                </objectKind> 
            </objectKinds>    
            <weekDays> 
                <weekDay>mon</weekDay>
                <weekDay>sun</weekDay>
            </weekDays>    
        </longTerm> 
    </longTerms> 
</priceActions>