Hotel Availability Search Schema
Sample requests and responses for Hotel Availability are provided below.
Sample Hotel Availability Search RequestevaluateRQ
<neutralhotelsearch:evaluateRQ policy_Reference="100182" xmlns:neutralhotelsearch="http://www.travelport.com/schema/policy/hotelsearch/v1">
<neutralcommon:HotelStay checkinDate="2015-10-03T18:00:00.000+07:00" checkoutDate="2015-10-05T09:00:00.000+07:00"
xmlns:neutralcommon="http://www.travelport.com/schema/policy/common/v1"/>
<neutralhotelsearch:Location location="SGN" locationCategory="City"/>
<neutralhotelsearch:ResultReq>
<neutralcommon:HotelProperty id=”1” chain="PL" code="41635" location="SGN"
xmlns:neutralcommon="http://www.travelport.com/schema/policy/common/v1"/>
<neutralhotelsearch:RateEvaluation minimumAmount="100.00" minimumAmountCode="USD"
maximumAmount="182.00" maximumAmountCode="USD"/>
</neutralhotelsearch:ResultReq>
</neutralhotelsearch:evaluateRQ>
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
Location - details for the location for which the search request that was made
attribute: locationCategory – type of location used in request (Airport / City)
attribute: location– city or airport code used in request
ResultReq – wrapper for hotel property and rates being evaluated
HotelProperty – details of the hotel property for which rates apply
attribute: id – unique identifier for this HotelProperty
attribute: chain – vendor chain code for this HotelProperty
attribute: code – property id for this HotelProperty
attribute: location – city code for this HotelProperty
RateEvaluation – details for each individual rate to be evaluated (may be repeated)
attribute: id – unique identifier for this RateEvaluation
attribute: minimumAmount – contains the minimum rate amount for this property
attribute: minimumAmountCode – contains the currency code associated with the minimumAmount
attribute: maximumAmount – contains the maximum rate amount for this property
attribute: maximumAmountCode – contains the currency code associated with the maximumAmount
Note: maximumAmount / maximumAmountCode are optional depending on how rates were quoted.
Sample Hotel Availability Search Response
evaluateRS
<ns6:evaluateRS xmlns:ns6="http://www.travelport.com/schema/policy/hotelsearch/v1" xmlns:ns5="http://www.travelport.com/schema/policy/hotelsearch/v1_1" xmlns:ns7="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"/>
<ns6:ResultResID>
<ns4:HotelProperty chain="PL" code="41635" id=”1” location="SGN" preferredOptionInd="false"/>
<ns6:RateEvaluation maximumAmount="182.00" maximumAmountCode="USD" minimumAmount="100.00"
minimumAmountCode="USD">
<ns6:SearchEvalution maxInPolicyInd="false" maxPolicyCode="317" minInPolicyInd="false" minPolicyCode="317"/>
</ns6:RateEvaluation>
</ns6:ResultResID>
</ns6:evaluateRS>
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 there will be a message to that effect with a Code of 0.
<ns4:AdditionalMessage category="Info" code="0" description="Policy Applied." providerCode="PS"/>
If an error occurs while trying to apply policy an error code and error message will be returned.
<ns4:AdditionalMessage category="Warning" code="9292" description="Unable to process Policy Evaluation." providerCode="PS"/>
A preferredOptionInd attribute will be added to the HotelProperty tag and a SearchEvaluation tag will be inserted into the response and will contain the Policy Markup attributes.
The five 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 MinInPolicy attribute on the SearchEvalution element is set to either true or false.
If set to true the MinimumAmount for this RateEvaluation element is in-policy.
If set to false the MinimumAmount for this RateEvaluation element is out-of-policy.
The MinPolicyCode attribute is returned only if the MinInPolicy attribute was returned as false. It contains a numeric value for the reason why the MinimumAmount for this RateEvaluation was marked as out-of-policy. See the Policy Service Return Codes V2 excel spreadsheet for detail.
The MaxInPolicy attribute on the SearchEvalution element is set to either true or false.
If set to true the MaximumAmount for this RateEvaluation element is in-policy.
If set to false the MaximumAmount for this RateEvaluation element is out-of-policy.
The MaxPolicyCode attribute is returned only if the MaxInPolicy attribute was returned as false. It contains a numeric value that represents the reason why the MaximumAmount for this RateEvaluation was marked as out-of-policy. See the Policy Service Return Codes V2 spreadsheet for detail.
Considerations for a Hotel Availability Search evaluateRQ Request
There are two ways of supplying hotel rate data in the evaluateRQ. The first way is based off the Universal API GDS response formats in which for a hotel search response, the minimum and maximum rates for a given hotel property are returned. When supplying rate data in this format simply pass the minimum and maximum rate data in the minimumAmount / minimumAmountCode / maximumAmount / maximumAmountCode fields.
The second way supports the situation in which there are multiple individual rates, each of which is passed in a unique RateEvaluation element with only the minimumAmount and minimumAmountCode attributes filled in (see MultiRate suffix examples).
The order in which the HotelProperty elements are returned in the response data will generally not be the same order that they sent up in the request data, and if exclusions and/or rate maximums have been configured in the hotel policy, properties and/or rates may be removed from the response. The HotelProperty and RateEvaluation elements support the use of an id attribute which can be used to correlate request and response data.
Policy is applied to each evaluateRQ individually.
If you are making multiple hotel search calls from your CBT and then combining them before displaying the results back to the screen, each request will have had policy applied separately. Depending on the policy settings you are using this can lead to some confusing results.
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:
HotelSearchEvaluateRQ.xml
HotelSearchEvaluateRQMultiRate.xml
Sample response:
HotelSearchEvaluateRS.xml
HotelSearchEvaluateRSMultiRate.xml