Attention: Please check the Hotel Release Notes page for the latest updates and enhancements.
Hotel Rules Reference Payload API Reference
POST |
rules/offershospitality/buildfromcatalogofferings 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 reference payload references an offer by sending the unique offer ID from an Availability response, instead of sending all required offer details as in the full payload Rules request.
Request
Also see Authorization and Common Hotel API Headers.
Query Parameters
None.
Request Body
Object |
Description |
Required/Optional |
---|---|---|
OfferQueryBuildFromCatalogOfferingsHospitality |
Top level object for rules request. Includes BuildFromCatalogOfferingsRequest object. |
Required |
BuildFromCatalogOfferingsRequest |
Top level object for offer ID. Includes ProductIdentifier object. |
Required |
ProductIdentifier |
Top level object for offer identifier. |
Required |
|
Send the value from CatalogOffering/id from the Availability response for the offer to request rules for. Offers cached from the Availability response are stored for 15 minutes. If a rule with the offer ID is not requested within 15 minutes, you must send a new Availability request before a reference payload request.
|
Required |
Response
The top level objects in the Rules response are listed below. For details see the individual tables following.
Object |
Description |
---|---|
OfferHospitalityResponse |
Top level object for rules response. Includes Offer, ProductRateCodeInfo, and Identifier objects. |
Offer |
Top level object for offer details. Includes Product, Price, and TermsAndConditionsFull objects. See the individual tables below for details. |
ProductRateCodeInfo |
Top level object for rate code details. Includes RateCodeInfo object. |
Identifier |
Defines which supplier system returned the rules for that rate. Key value pair:
Includes CurrencyRateConversion if requestedCurrency was sent in the request. See table below. |
Offer/Product object
Object | Description |
---|---|
Product |
Array. One instance for each product, type ProductHospitality. Product is a common object in the model. Not all objects in this table may be returned in this specific API. Key value pairs:
Includes PropertyKey, PropertyAddress, RoomType, and DateRange objects. |
PropertyKey |
When ReferenceList is returned, PropertyKey includes the key value pairs:
|
PropertyAddress |
Top level property address object. |
Address |
Property address. Key value pairs:
Includes AddressLine, StateProv, and Country objects. |
AddressLine |
Text string for property street address. |
StateProv |
Property state or province. Key value pair:
|
Country |
Property country. Key value pairs:
|
RoomType |
Room type detail. Includes RoomCharacteristics, Description, and RoomAmenity objects. |
RoomCharacteristics |
Room details. Key value pairs:
Includes BedConfiguration object. |
BedConfiguration |
Configuration of bed(s) in room. Key value pairs:
|
Description |
A room description text string. Key value pairs:
|
RoomAmenity |
Room amenity name and description. Key value pairs:
|
RoomOccupancy |
Room occupancy value. Key value pair:
|
DateRange |
Check-in and -out dates. Key value pairs:
|
Offer/Price object
Object | Description |
---|---|
Price |
Price details for this offer or rate. Price is a common object in the model. Not all objects in this table may be returned in this specific API. Key value pairs:
Includes CurrencyCode and PriceBreakdown objects. |
CurrencyCode |
The currency code the amount is provided in. Key value pairs:
|
PriceBreakdown |
The information returned in PriceBreakdown can vary by provider and location. Key value pairs:
If roomPricingType = Per night,
If roomPricingType = Per stay,
|
NightlyRate |
Rate per night. Key value pairs:
Includes Amount object. If the nightly rate changes during the stay, multiple NightlyRate objects are returned.
|
Amount |
The rate amount. Key value pairs:
Includes CurrencyCode (see above), Taxes, and Fees objects. |
Taxes |
Tax details.
Includes Tax and TaxPercent objects. |
Tax |
Breakdown of the tax. Key value pairs:
|
TaxPercent |
Returned when the tax is expressed as a percentage of the amount. Key value pairs:
|
Fees |
Parent object which can include Fee by rate or by property. Travelport defines fees as any extra payment due at the property. Key value pair:
Includes Fee object. |
Fee |
Fee details. Key value pairs:
Includes FeeAmountOrPercent object. |
FeeAmountOrPercent |
Object defining the amount or percent charged as a fee. Key value pairs:
|
Commission |
Commission details. Key value pairs: When returned with type: CommissionPercent:
When returned with type: CommissionAmount
|
AverageNightlyRate |
The average nightly rate of the request. Key value pairs:
|
AmenitySurcharges |
Amenity surcharges detail. Includes Surcharge object. |
Surcharge |
Additional charges related to requested amenities. Key value pairs:
|
Offer/TermsAndConditionsFull object
Object |
Description |
---|---|
TermsAndConditionsFull |
Top level object for terms and conditions, instances of TermsAndConditionsFullHospitality. RatePaymentInfo: Postpay or Prepay designation. As returned from supplier, may include TextBlock, Guarantee, CancelPenalty, DepositPolicy, AcceptedCreditCard, Description, MealsIncluded, ProductRateCodeInfo, and CheckInOutPolicy objects. TermsAndConditionsFull is a common object in the model. Not all objects in this table may be returned in this specific API. |
TextBlock |
Array. Each instance is one rule or set of information. Key value pair:
Includes the TextFormatted object providing the rule or information itself. |
TextFormatted |
The rule or information itself. Key value pairs:
|
Guarantee |
Array. Indicates if the room rate requires a guarantee to be booked. Key value pair:
|
CancelPenalty |
Array. CancelPenalty breaks down any cancellation penalties for the rate. Key value pair:
Includes the Deadline and HotelPenalty objects. |
Deadline |
Cancellation penalty deadline details. Key value pair:
Includes SpecificDate object. |
SpecificDate |
Details on cancellation penalty. Key value pairs:
|
HotelPenalty |
Cancellation penalty amount. Attributes include: When returned with type: HotelPenaltyNights
When returned with type: HotelPenaltyPercent
When returned with type: HotelPenaltyAmount
|
DepositPolicy |
Deposit details related to this booking. Includes Deposit object. |
Deposit |
Deposit total in relation to TotalPrice. Key value pairs:
|
AcceptedCreditCard |
An array of accepted credit cards. Key value pair:
|
Description |
Free-form text for a room and rate description. This duplicates the room description in RoomType and the rate description in Price and will be removed in a future release. |
MealsIncluded |
The following meal attributes are returned and set to true if applicable:
|
ProductRateCodeInfo |
Top level object for rate code details. Includes RateCodeInfo. |
CheckInOutPolicy |
checkInTime: Local property check in time in 24 hour clock format. checkOutTime: Local property check out time in 24 hour clock format. |
RateCodeInfo |
Rate code information. Key value pairs:
|
CurrencyRateConversion object
Object | Description |
---|---|
CurrencyRateConversion |
CurrencyRateConversion is returned only if requestedCurrency was sent in the request. By default the Hotel APIs return all rates in the currency of the hotel's location. If requestedCurrency was sent in the request, the response returns currency conversion information per below. Includes SourceCurrency, TargetCurrency, and ConversionRate objects. |
SourceCurrency |
The currency code based on the location of the hotel and used for all rates in the response. Key value pairs:
|
TargetCurrency |
Currency code sent in the request in requestedCurrency. Key value pairs:
|
ConversionRate |
Current conversion rate of the user-specified currency (the TargetCurrency value). Key value pair:
|
Example Request
The example below shows the Hotel Rules reference payload request.
{
"OfferQueryBuildFromCatalogOfferingsHospitality": {
"BuildFromCatalogOfferingsRequest": {
"type": "BuildFromCatalogOfferingsRequest",
"ProductIdentifier": [
{
"id": "86c995ca-2316-4576-9001-6314de9282c4:f72e307f-a792-4261-a3bc-4a8396bf81be"
}
]
}
}
}
Example Response
{
"OfferHospitalityResponse": {
"Offer": {
"Product": [
{
"type": "ProductHospitality",
"bookingCode": "N2DPRO",
"guests": 1,
"PropertyKey": {
"chainCode": "DA",
"propertyCode": "00638"
},
"RoomType": {
"type": "RoomTypeDetail",
"RoomCharacteristics": {
"wifiIncluded": "Yes",
"BedConfiguration": [
{
"quantity": 1,
"bedType": "Double",
"size": "Double"
}
]
},
"Description": {
"value": "Deluxe Double Room Double/Aircon/WiFi/Tea/Coffee/Flatscreen TV "
}
},
"DateRange": {
"start": "2022-03-19",
"end": "2022-03-22"
}
}
],
"Price": {
"type": "PriceDetail",
"CurrencyCode": {
"decimalPlace": 2,
"value": "GBP"
},
“Base”: 455.76,
“TotalTaxes”: 34.24,
"TotalPrice": 490.00,
"PriceBreakdown": [
{
"type": "PriceBreakdownHospitality",
"roomPricingType": "Per night",
"NightlyRate": [
{
"startDate": "2022-03-19",
"nights": 3,
"Amount": {
"CurrencyCode": {
"decimalPlace": 2,
"value": "GBP"
},
"Base": 151.92
}
}
],
"AverageNightlyRate": [
{
"code": "GBP",
"approximateInd": true,
"value": 151.92
}
]
},
{
"type": "PriceBreakdownHospitality",
"roomPricingType": "Per stay",
"Amount": {
”type": "Amount",
"CurrencyCode": {
"decimalPlace": 2,
"value": "GBP"
},
"Base": 455.76,
“TotalTaxes”: 34.24,
“Total”: 490.00
}
}
]
},
"TermsAndConditionsFull": [
{
"type": "TermsAndConditionsFullHospitality",
"TextBlock": [
{
"title": "Address",
"TextFormatted": [
{
"language": "en",
"value": "626 Chiswick High Road London Gb With4 5Ry "
}
]
},
{
"type": "TextBlock",
"title": "Location",
"TextFormatted": [
{
"language": "en",
"value": "Location: "
}
]
},
{
"type": "TextBlock",
"title": "Promotional",
"TextFormatted": [
{
"language": "en",
"value": "Thank You For Choosing Dalata Hotels "
}
]
},
{
"type": "TextBlock",
"title": "Guarantee",
"TextFormatted": [
{
"language": "en",
"value": "Credit Cards: AX CA VI "
}
]
},
{
"type": "TextBlock",
"title": "Cancellation",
"TextFormatted": [
{
"language": "en",
"value": "cancel 1 day by 2pm 1 night penalty."
}
]
},
{
"type": "TextBlock",
"title": "Other",
"TextFormatted": [
{
"language": "en",
"value": "Minimum Length Of Stay 2 Nights Check In Time: 1400 Check Out Time: 1100 "
}
]
},
{
"type": "TextBlock",
"title": "Room detail",
"TextFormatted": [
{
"language": "en",
"value": "Deluxe Double Room Double/Aircon/WiFi/Tea/Coffee/Flatscreen TV "
}
]
},
{
"type": "TextBlock",
"title": "Fax",
"TextFormatted": [
{
"language": "en",
"value": "442089965201 "
}
]
},
{
"type": "TextBlock",
"title": "Rate description",
"TextFormatted": [
{
"language": "en",
"value": "N3Dgrs Greatrate - Discounted Stays 2Los Save 12 Pct Breakfast Include "
}
]
},
{
"type": "TextBlock",
"title": "Rate amount",
"TextFormatted": [
{
"language": "en",
"value": "15192 Person Night Starting 19 Mar For 3 Nights "
}
]
},
{
"type": "TextBlock",
"title": "Property",
"TextFormatted": [
{
"language": "en",
"value": "Clayton Hotel Chiswick Property Opened: 01Jan06 Property Renovated: 01Jan06 Property Has 123 Rooms And 0 Suites On 7 Floors "
}
]
},
{
"type": "TextBlock",
"title": "Room rate",
"TextFormatted": [
{
"language": "en",
"value": "Credit Card Guarantee Is Required Upon Booking. "
}
]
},
{
"type": "TextBlock",
"title": "Phone",
"TextFormatted": [
{
"language": "en",
"value": "442089965200 "
}
]
},
{
"type": "TextBlock",
"title": "Total Amount",
"TextFormatted": [
{
"language": "en",
"value": "45576 Sub Total For Stay 45576 Approx Total Include All Known Taxes/Fees "
}
]
}
],
"CancelPenalty": [
{
"Deadline": {
"SpecificDate": {
"specific": "2022-01-18"
},
"Time": "14:00:00"
},
"HotelPenalty": {
”type": "HotelPenaltyNights",
"subjectToTax": "Unknown",
"Nights": 1
},
"Refundable": "Yes"
}
],
"AcceptedCreditCard": [
{
"value": "AX"
},
{
"value": "CA"
},
{
"value": "VI"
}
],
"Description": [
"N3Dgrs",
"Greatrate - Discounted Stays",
"2Los Save 12 Pct Breakfast Include"
],
"MealsIncluded": {
"breakfastInd": true
},
"CheckInOutPolicy": {
"checkInTime": "14:00:00",
"checkOutTime": "11:00:00"
}
}
]
},
"ProductRateCodeInfo": [
{
"RateCodeInfo": {
"rateCategory": "Negotiated",
"rateName": ”Duran Trucking”,
"rateID": ”12343434”,
"value": ”DUR”
}
"Identifier": {
"authority": "TVPT"
},
"CurrencyRateConversion": [
{
"SourceCurrency": {
"decimalPlace": 2,
"value": "GBP"
},
"TargetCurrency": {
"decimalPlace": 2,
"value": "RON"
},
"ConversionRate": {
"value": 5.8868963604
}
}
]
}
}
Error Messages
SourceCode |
StatusCode (HTTP code) |
Message |
---|---|---|
400 |
Not able to reach IDM Authorization atomic or Authorization cannot be identified due to insufficient inputs. |
|
401 |
Unauthorised user. |
|
|
404 |
BOOKING CODE IS NOT STORED ON ROOMMASTER |
|
404 |
VENDOR SYS ERR OCCURRED * |
|
500 |
OfferQueryHospitalityRequestxxx version: 11_2 nor any of its super class is known to this context. |
|
400 |
check in date missing |
|
400 |
Invalid format: "xxx" |
|
400 |
Invalid format: "2022-05-01 15:00" is malformed at " 15:00" |
|
400 |
Invalid format: "2022" is too short |
|
400 |
Check in Date cannot be before Current Date |
|
400 |
Cannot parse "2021-05-55": Value 55 for dayOfMonth must be in the range [1,31] |
|
400 |
Cannot parse "2021-55-01": Value 55 for monthOfYear must be in the range [1,12] |
|
400 |
check out date cannot be before or equal to check in date |
|
400 |
check out date missing |
|
404 |
CHECK OUT DATE BEYOND 332 DAYS INTO FUTURE |
|
404 |
INVALID-EXCEEDS 99 NT MAXIMUM |
|
400 |
Number of Guests is required field. |
|
400 |
Not a number: xxx |
|
400 |
Number of Guests should be between 1 and 9. |
|
400 |
Booking code is required field. |
|
400 |
property key missing |
|
400 |
Chain code is required field. |
|
400 |
Chain code is invalid, must be 2 alphabetic characters. |
|
400 |
Property code is required field. |
|
400 |
Property code is invalid, must be alphanumeric. |
|
404 |
No Properties Found. |
|
400 |
Hotel Aggregator is required for Multi Source Content. |
|
400 |
Booking code is invalid. |
|
404 |
Cannot find hotel offer with ID: xxx. Offer ID may be incorrect or offer has expired. Try performing availability again. |
|
400 |
OfferId is required field. |
|
400 |
Bad Request |
|
500 |
OfferQueryBuildFromCatalogOfferingsHospitalityxxx version: 11_1 nor any of its super class is known to this context. |