Hotel Rules Full Payload API Reference
POST |
rules/offershospitality/buildfromrequest Use this base path if you have not yet received or not migrated to the new credentials from Travelport:
Use this base path after you have migrated to the new credentials from Travelport (using .net instead of .com):
|
Related Content: JSON Hotel APIs Guide, Hotel Workflows
Hotel Rules retrieves the rules associated with a specific rate. The full payload request in this topic sends all required rate details, while the reference payload Rules request references rate details from a previous Availability response by sending the offer ID from that response. The response for both requests is the same.
Request
Query Parameters
None.
Request Body
OfferQueryHospitalityRequest*
Top level object for rules request. Includes PropertyKey object.
bookingCode* : 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.
checkinDate*: String. Check-in date in YYYY-MM-DD format.
checkoutDate*: String. Check-out date in YYYY-MM-DD format.
numberOfGuests*: Number. Total number of travelers. Must be a numeric value between 1 and 9.
Required; send with same value as the total across all counts in RoomStayCandidate/GuestCount/count below.storedAmount*: String. For the offer you want to request rules for, send the value from that offer in CatalogOffering/Price/TotalPrice from the Availability response.
storedCurrency*: String. Send the value from CatalogOffering/Price/CurrencyCode/value from the Availability response.
HotelAggregator*: String. Identifies the source of the rate. Send the supported value below that corresponds with the aggregator abbreviation returned in the Availability response in CatalogOffering/Identifier/authority for the offer.
Supported values:
- Travelport
- Booking
Access to Booking.com rates requires additional provisioning and a direct agreement with the supplier. Contact your Travelport Account Manager for details.requestedCurrency: String. Send a currency code to request conversion of the rate to that currency.
Rates are always returned in the currency of the hotel's location. You can use requestedCurrency to send a currency code to request conversion of the rate. 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.
PropertyKey*
Property ID information. Includes the RateCandidate object.
propertyCode*: String. Code for the property within the hotel chain.
chainCode*: String. Two-character code for the chain to search.
RateCandidate
Rate plan details returned for the offer to request rules for as follows, if returned in the Availability response. *if returned in the Availability response
rateCode: String. Send the value from ProductRateCodeInfo/RateCodeInfo/value. *if returned in the Availability response
rateID: String. Send the value from ProductRateCodeInfo/RateCodeInfo/rateID. *if returned in the Availability response
rateCategory: String. Send the value from ProductRateCodeInfo/RateCodeInfo/rateCategory
chainCode: String. Two-character chain code for the property.
propertyCode: String. Property code for the property.
RoomStayCandidates*
Top level object for traveler information. Includes RoomStayCandidate object.
RoomStayCandidate*
Top level object. Includes GuestCounts object.
GuestCounts*
Top level object. Includes GuestCount object.
GuestCount*
Array of qualifying codes and ages.
count: Integer. Number of travelers.
ageQualifyingCode: String. Required only for children or if traveler age is relevant, such as for a senior discount.
Supported values and meanings:
10: Traveler in this GuestCount is an adult
8: Traveler in this GuestCount is a child
age: Integer. Age of traveler. Required only when request includes a child in room. * only for any children in the request
Example
{
"OfferQueryHospitalityRequest": {
"bookingCode": "A00PKFA",
"requestedCurrency": "USD",
"checkinDate": "2025-10-16",
"checkoutDate": "2025-10-17",
"numberOfGuests": 1,
"storedAmount": "246.62",
"storedCurrency": "USD",
"HotelAggregator": "Travelport",
"PropertyKey": {
"@type": "PropertyKey",
"chainCode": "XV",
"propertyCode": "89550"
},
"RateCandidate": {
"@type": "RateCandidateDetail",
"rateCategory": "Package"
}
}
}
Response
The full and reference payload requests return the same response. See the Rules Reference Payload API Reference for documentation.