Hotel Details Schema
Sample requests and responses for Hotel Details are provided below. A discussion of the required elements follows each example. Considerations for the request are then noted.
Sample Hotel Details Request
evaluateRQ
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v02="http://opentravel.org/common/message/v02" xmlns:v1="http://www.travelport.com/schema/policy/hoteldetail/v1" xmlns:v021="http://opentravel.org/common/v02" xmlns:v11="http://www.travelport.com/schema/policy/common/v1">
<soapenv:Header/>
<soapenv:Body>
<neutralhoteldetail:evaluateRQ policy_Reference="100182" xmlns:neutralhoteldetail="http://www.travelport.com/schema/policy/hoteldetail/v1">
<neutralcommon:HotelStay checkinDate="2015-11-25T09:00:00.000+11:00" checkoutDate="2015-11-30T09:00:00.000+11:00" xmlns:neutralcommon="http://www.travelport.com/schema/policy/common/v1"/>
<neutralcommon:HotelProperty chain="MP" code="17862" location="SYD" xmlns:neutralcommon="http://www.travelport.com/schema/policy/common/v1"/>
<neutralhoteldetail:RateReq>
<neutralhoteldetail:RateEvaluation id="1" totalAmount="1409.00" totalCode="AUD" baseAmount="1409.00" baseCode="AUD">
<neutralhoteldetail:RateByDate effectiveDate="2015-11-25T09:00:00.000+11:00" expireDate="2015-11-26T09:00:00.000+11:00" baseAmount="285.00" baseCode="AUD"/>
<neutralhoteldetail:RateByDate effectiveDate="2015-11-26T09:00:00.000+11:00" expireDate="2015-11-27T09:00:00.000+11:00" baseAmount="274.00" baseCode="AUD"/>
<neutralhoteldetail:RateByDate effectiveDate="2015-11-27T09:00:00.000+11:00" expireDate="2015-11-28T09:00:00.000+11:00" baseAmount="268.00" baseCode="AUD"/>
<neutralhoteldetail:RateByDate effectiveDate="2015-11-28T09:00:00.000+11:00" expireDate="2015-11-29T09:00:00.000+11:00" baseAmount="314.00" baseCode="AUD"/>
<neutralhoteldetail:RateByDate effectiveDate="2015-11-29T09:00:00.000+11:00" expireDate="2015-11-30T09:00:00.000+11:00" baseAmount="268.00" baseCode="AUD"/>
</neutralhoteldetail:RateEvaluation>
<neutralhoteldetail:RateEvaluation id="2" totalAmount="1607.00" totalCode="AUD" baseAmount="1607.00" baseCode="AUD">
<neutralhoteldetail:RateByDate effectiveDate="2015-11-25T09:00:00.000+11:00" expireDate="2015-11-26T09:00:00.000+11:00" baseAmount="325.00" baseCode="AUD"/>
<neutralhoteldetail:RateByDate effectiveDate="2015-11-26T09:00:00.000+11:00" expireDate="2015-11-27T09:00:00.000+11:00" baseAmount="314.00" baseCode="AUD"/>
<neutralhoteldetail:RateByDate effectiveDate="2015-11-27T09:00:00.000+11:00" expireDate="2015-11-28T09:00:00.000+11:00" baseAmount="307.00" baseCode="AUD"/>
<neutralhoteldetail:RateByDate effectiveDate="2015-11-28T09:00:00.000+11:00" expireDate="2015-11-29T09:00:00.000+11:00" baseAmount="354.00" baseCode="AUD"/>
<neutralhoteldetail:RateByDate effectiveDate="2015-11-29T09:00:00.000+11:00" expireDate="2015-11-30T09:00:00.000+11:00" baseAmount="307.00" baseCode="AUD"/>
</neutralhoteldetail:RateEvaluation>
…………………………
Additional RateEvaluation items removed for brevity
…………………………
</neutralhoteldetail:RateReq>
</neutralhoteldetail:evaluateRQ>
</soapenv:Body>
</soapenv:Envelope>
The following elements are supplied in an evaluate request:
evaluateRQ – wrapper for the whole request
attribute: policy_Reference - the identifier that tells Universal Policy which policy to apply
HotelStay – details for the hotel stay for which the search request that was made
attribute: CheckinDate – requested check in date
attribute: CheckoutDate – requested check out date
HotelProperty – details of the hotel property for which rates apply
attribute: chain – vendor chain code for this HotelProperty
attribute: code – property id for this HotelProperty
attribute: location – city code for this HotelProperty
RateReq – wrapper for RateEvaluation items
RateEvaluation – details for each individual rate to be evaluated (may be repeated)
attribute: id – unique identifier for this RateEvaluation
attribute: totalAmount – contains the total amount (including taxes) for this stay
attribute: totalCode – contains the currency code associated with the totalAmount
attribute: baseAmount– contains the base amount (not including taxes) for this stay
attribute: baseCode– contains the currency code associated with the baseAmount
RateByDate – when a stay covers multiple days there may be different rates for each date of the stay
attribute: effectiveDate – contains start date for this particular rate
attribute: expireDate – contains end date for this particular rate
attribute: baseAmount – contains base amount for this particular rate
attribute: baseCode – contains currency code associated with base amount for this particular rate
Note: Policy is not being applied to individual rates by date at this time. If there is no totalAmount supplied in the RateEvaluation it will be calculated from the combined values of the RateByDate items. The RateByDate elements are optional are being included here for illustrative purposes.
Sample Hotel Details Response
evaluateRS
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header>
<ns2:MessageHeader xsi:nil="true" xmlns:ns2="http://opentravel.org/common/message/v02" xmlns:ns5="http://www.travelport.com/schema/policy/hoteldetail/v1" xmlns:ns6="http://www.OpenTravel.org/ns/OTA2/AppInfo_v01_00" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns3="http://opentravel.org/common/v02" xmlns:ns4="http://www.travelport.com/schema/policy/common/v1"/>
</soapenv:Header>
<soapenv:Body>
<ns5:evaluateRS xmlns:ns5="http://www.travelport.com/schema/policy/hoteldetail/v1" xmlns:ns6="http://www.OpenTravel.org/ns/OTA2/AppInfo_v01_00" xmlns:ns2="http://opentravel.org/common/message/v02" xmlns:ns3="http://opentravel.org/common/v02" xmlns:ns4="http://www.travelport.com/schema/policy/common/v1">
<ns4:AdditionalMessage category="Info" code="0" description="Policy Applied." providerCode="PS"/>
<ns4:HotelProperty chain="MP" code="17862" location="SYD" preferredOptionInd="false"/>
<ns5:RateRes>
<ns5:RateEvaluation baseAmount="1409.00" baseCode="AUD" id="1" totalAmount="1409.00" totalCode="AUD">
<ns5:RateByDate baseAmount="285.00" baseCode="AUD" effectiveDate="2015-11-25T09:00:00.000" expireDate="2015-11-26T09:00:00.000" totalAmount="0" totalCode=""/>
<ns5:RateByDate baseAmount="274.00" baseCode="AUD" effectiveDate="2015-11-26T09:00:00.000" expireDate="2015-11-27T09:00:00.000" totalAmount="0" totalCode=""/>
<ns5:RateByDate baseAmount="268.00" baseCode="AUD" effectiveDate="2015-11-27T09:00:00.000" expireDate="2015-11-28T09:00:00.000" totalAmount="0" totalCode=""/>
<ns5:RateByDate baseAmount="314.00" baseCode="AUD" effectiveDate="2015-11-28T09:00:00.000" expireDate="2015-11-29T09:00:00.000" totalAmount="0" totalCode=""/>
<ns5:RateByDate baseAmount="268.00" baseCode="AUD" effectiveDate="2015-11-29T09:00:00.000" expireDate="2015-11-30T09:00:00.000" totalAmount="0" totalCode=""/>
<ns5:DetailEvaluation inPolicyInd="false" policyCode="317"/>
</ns5:RateEvaluation>
<ns5:RateEvaluation baseAmount="1607.00" baseCode="AUD" id="2" totalAmount="1607.00" totalCode="AUD">
<ns5:RateByDate baseAmount="325.00" baseCode="AUD" effectiveDate="2015-11-25T09:00:00.000" expireDate="2015-11-26T09:00:00.000" totalAmount="0" totalCode=""/>
<ns5:RateByDate baseAmount="314.00" baseCode="AUD" effectiveDate="2015-11-26T09:00:00.000" expireDate="2015-11-27T09:00:00.000" totalAmount="0" totalCode=""/>
<ns5:RateByDate baseAmount="307.00" baseCode="AUD" effectiveDate="2015-11-27T09:00:00.000" expireDate="2015-11-28T09:00:00.000" totalAmount="0" totalCode=""/>
<ns5:RateByDate baseAmount="354.00" baseCode="AUD" effectiveDate="2015-11-28T09:00:00.000" expireDate="2015-11-29T09:00:00.000" totalAmount="0" totalCode=""/>
<ns5:RateByDate baseAmount="307.00" baseCode="AUD" effectiveDate="2015-11-29T09:00:00.000" expireDate="2015-11-30T09:00:00.000" totalAmount="0" totalCode=""/>
<ns5:DetailEvaluation inPolicyInd="false" policyCode="317"/>
</ns5:RateEvaluation>
…………………………
Additional RateEvaluation items removed for brevity
…………………………
</ns5:RateRes>
</ns5:evaluateRS>
</soapenv:Body>
</soapenv:Envelope>
As with other entries, Universal Policy returns some informational data in the AdditionalMessage elements at the top of the evaluateRS.
If policy is applied successfully, Universal Policy returns a message with a Code of 0.
<ns4:AdditionalMessage category="Info" code="0" description="Policy Applied." providerCode="PS"/>
If an error occurs in applying policy an error code and error message are returned:
<ns4:AdditionalMessage category="Warning" code="9292" description="Unable to process Policy Evaluation." providerCode="PS"/>
A preferredOptionInd attribute is added to the HotelProperty tag. A DetailEvaluation tag is inserted into the response and contains the policy attributes.
The three policy attributes that can be returned are:
The preferredOptionInd attribute on the HotelProperty element is set to either true or false.
If set to true this HotelProperty element is preferred.
If set to false this HotelProperty element is not preferred.
The inPolicyInd attribute on the DetailEvaluation element is set to either true or false.
If set to true this RateEvaluation element is in-policy.
If set to false this RateEvaluation element is out-of-policy.
The policyCode attribute is returned only if the inPolicyInd attribute was returned as false. It contains a numeric value that represents the reason why this RateEvaluation was marked as out-of-policy. See the Policy Service Return Codes spreadsheet for detail.
Considerations for a Hotel Detail evaluateRQ request
If you make a hotel details request for a property or chain that has been configured as excluded, an error is returned:
<ns4:AdditionalMessage category="Warning" code="362" description="Unable to process Policy Evaluation." providerCode="PS"/>
There are two ways of supplying hotel rate data in the evaluateRQ. The first way is using just the RateEvaluation elements supplying either the totalAmount/totalCode or baseAmount/baseCode attributes, currently both fields are processed the same way – future enhancements may be made to differentiate between base and total rates (see Min suffix examples). The second way makes use of multiple individual rates each of which is passed in a unique RateByDate element (see RateByDate suffix examples).
The order that the RateEvaluation elements are returned in the response data is not guaranteed to be the same order that they were sent up in the request data and if rate maximums have been configured in the hotel policy properties / rates may be removed from the response. The RateEvaluation elements support the use of an id attribute which can be used to correlate request and response data.
If you have configured your hotel policy to use a policy option that marks items out-of-policy “if greater than area rate cap” and you have not configured an area rate cap, all items will be marked in-policy.
All hotel rates are assumed to be for 1 person and 1 room.
Sample Request and Response
See the Downloads page to download a zip file containing the following XML files.
Sample Request:
HotelDetailEvaluateRQ.xml
HotelDetailEvaluateRQMin.xml
HotelDetailEvaluateRQRateByDate.xml
Sample Response:
HotelDetailEvaluateRS.xml
HotelDetailEvaluateRSMin.xml
HotelDetailEvaluateRSRateByDate.xml