Attention: Please check the Hotel Release Notes page for the latest updates and enhancements.
Hotel Rules Full Payload API Reference
POST |
rules/offershospitality/buildfromrequest Base path: Pre-production https://api.pp.travelport.com/11/hotel/ Production https://api.travelport.com/11/hotel/ |
Related Content: Hotel Guide, Hotel Workflow Diagram, Hotel Availability API Reference
Hotel Rules retrieves the rules associated with a specific rate. The full payload request sends all required offer details, while the reference payload Rules request references an offer by sending the unique offer ID from an Availability response.
Request
Also see Authorization and Common Hotel API Headers.
Query Parameters
None.
Request Body
Object |
Description |
Required/Optional |
---|---|---|
OfferQueryHospitalityRequest |
Top level object for rules request. Includes PropertyKey object. |
Required |
|
String. For the offer you want to request rules for, send the value from that offer in CatalogOffering/ProductOptions/Product/bookingCode from the Availability response. |
Required |
|
String. Check-in date in YYYY-MM-DD format. |
Required |
|
String. Check-out date in YYYY-MM-DD format. |
Required |
|
Number. Number of travelers. Must be a numeric value between 1 and 9. |
Required |
|
String. For the offer you want to request rules for, send the value from that offer in CatalogOffering/Price/totalPrice from the Availability response. |
Required |
|
String. Send the value from CatalogOffering/Price/CurrencyCode/value from the Availability response. |
Required |
|
String. Identifies the source of the rate. Send the value from CatalogOffering/Identifier/authority for the offer from the Availability response. Must be one of the following values:
Booking.com and Expedia access require additional provisioning and a direct agreement with the supplier. Please contact your Travelport Account Manager for details.
|
Required |
|
String. Send the currency code to return a conversion rate for. Rates are always returned in the currency of the hotel's location. You can use requestedCurrency to send a currency to request conversion rate information for. The response then returns the CurrencyRateConversion object, which provides the conversion rate of the specified currency that can be used to calculate, independently of the API, the conversion of the rates returned in the response.
|
Optional |
PropertyKey |
Property ID information. Includes the RateCandidate object. |
Required |
|
String. Code for the property within the hotel chain. |
Required |
|
String. Two-character code for the chain to search. |
Required |
RateCandidate |
Rate plan details returned for the offer to request rules for as follows, if returned in the Availability response. |
Required when returned in the Availability response |
|
String. Send the value from ProductRateCodeInfo/RateCodeInfo/value |
Required when returned in the Availability response |
|
String. Send the value from ProductRateCodeInfo/RateCodeInfo/rateID |
Required when returned in the Availability response |
|
String. Send the value from ProductRateCodeInfo/RateCodeInfo/rateCategory |
Optional |
|
String. Two-character chain code for the property. |
Required if RateCandidate requested. |
|
String. Property code for the property. |
Required if RateCandidate requested. |
Response
The response for the Rules Full Payload request is identical to the response for the reference payload request. See the Rules Reference Payload API Reference for the response table and examples.
Example Request
{
"OfferQueryHospitalityRequest": {
"bookingCode": "N2DPRO",
"requestedCurrency": "RON",
"checkinDate": "2022-03-19",
"checkoutDate": "2022-03-22",
"numberOfGuests": 1,
"storedAmount": "660.00",
"storedCurrency": "GBP",
"HotelAggregator": "Travelport",
"PropertyKey": {
"type": "PropertyKey",
"chainCode": "DA",
"propertyCode": "00638"
}
}
"RateCandidate": [
{
"type": "RateCandidateDetail",
"rateCode": "DUR",
"chainCode": "BR",
"propertyCode": "33722",
"rateID": "12343434"
}
]
}
Example Response
The response for the Rules Full Payload request is identical to the response for the reference payload request. See the Rules Reference Payload API Reference.
Error Messages
See the Rules Reference Payload API Reference.