Hotel Rules v8 API Reference
POST |
rules/v8/offershospitality/buildfromrequest Base path: Pre-production https://api.apim-a.adc.pp.travelport.io/hotel/ Production https://api.apim-a.adc.prod.travelport.io/hotel/ |
Related Content: Hotel Guide, Hotel Workflow Diagram
Description.
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. The booking code from the Hotel Availability request. |
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. The Hotel Search response returns rates in the currency of the hotel's location. Use the optional requestedCurrency attribute to send a currency to request conversion rate information for. The response then returns the CurrencyRateConversion object. |
Optional |
PropertyKey |
An array of up to 50 PropertyKey objects. Each PropertyKey object provides a property to search. |
Required |
|
String. Code for the property within the hotel chain. |
Required |
|
String. Two-character code for the chain to search. |
Required |
Response
Object |
Description |
---|---|
OfferHospitalityResponse |
Top level object for response. |
Offer |
Top level object. Includes Product, Price, and TermsAndConditionsFull objects. |
Product |
Product instances of @type ProductHospitality. Key value pairs:
Includes PropertyKey and DateRange objects. |
PropertyKey |
When ReferenceList is returned per above, PropertyKey includes the key value pairs:
|
DateRange |
Check-in and -out dates. Key value pairs:
|
Price |
Total including taxes and fees. Price instances of @type PriceDetail. Key value pairs:
Includes VendorCurrencyTotal and PriceBreakdown objects. |
VendorCurrencyTotal |
Vendor pricing details. Key value pairs:
|
PriceBreakdown |
Array containing the pricing details of the offer. Price instances of @type PriceBreakdownHospitality. Includes Amount and NightlyRate objects. |
Amount |
Total without taxes and fees. Key value pairs:
|
NightlyRate |
Array for the nightly room rate. Key value pairs:
Includes the Amount object. If the nightly rate changes during the stay, multiple NightlyRate objects are returned.
|
Amount |
The rate amount. Key value pairs:
|
TermsAndConditionsFull |
Top level object for rules details. TermsAndConditionsFull instances of @TermsAndConditionsFullHospitality. Includes an array of TextBlock objects. |
TextBlock |
The response returns an array of TextBlock objects, each containing one rule or set of information. Key value pair:
Includes the TextFormatted object providing the rule or information itself. The title attribute can include any of the following Rule Types. Not every property will return all of these types. Note that currently only English is supported for these values.
|
TextFormatted |
The rule or information itself. Key value pair:
|
Guarantee |
Indicates if the room rate requires a guarantee to be booked. The following are Guarantee types that may be returned:
|
CancelPenalty |
CancelPenalty breaks down any cancellation penalties for the rate. Key value pair:
Includes the Deadline object. |
Deadline |
Top level for SpecificDate and Time objects. |
SpecificDate |
Includes the specific key value pair, which provides in YYYY-MM-DD format the date by which a reservation needs to be canceled for the penalty in the CancelPenalty object not to be applied. |
Time |
If applicable, notes the time required for cancellation to avoid penalty. |
CurrencyRateConversion |
When a target currency type is requested, the CurrencyRateConversion object is returned. CurrencyRateConversion is documented in Hotel Search. |
Example Request
The example below shows the message payload for a Hotel Rules request. All attributes are required except requestedCurrency.
{
"OfferQueryHospitalityRequest": {
"bookingCode": "1KNRACK",
"requestedCurrency": "INR",
"checkinDate": "2020-04-09",
"checkoutDate": "2020-04-12",
"numberOfGuests": 1,
"PropertyKey": {
"@type": "PropertyKey",
"chainCode": "HY",
"propertyCode": "81388"
}
}
}
Example Response
{
"OfferHospitalityResponse": {
"Offer": {
"@type": "Offer",
"Product": [
{
"@type": "ProductHospitality",
"bookingCode": "1KNRACK",
"guests": 1,
"PropertyKey": {
"chainCode": "HY",
"propertyCode": "81388"
},
"DateRange": {
"start": "2020-04-09",
"end": "2020-04-12"
}
}
],
"Price": {
"@type": "PriceDetail",
"currencyCode": "USD",
"TotalPrice": "459.74",
"VendorCurrencyTotal": {
"currencyCode": "USD",
"Base": "417.00",
"Total": "459.74"
},
"PriceBreakdown": [
{
"@type": "PriceBreakdownHospitality",
"Amount": {
"currencyCode": "USD",
"Base": "417.00"
},
"NightlyRate": [
{
"startDate": "2020-04-09",
"nights": 3,
"Amount": {
"currencyCode": "USD",
"Base": "139.00"
}
}
]
}
]
},
"TermsAndConditionsFull": [
{
"@type": "TermsAndConditionsFullHospitality",
"TextBlock": [
{
"@type": "TextBlock",
"title": "Address",
"TextFormatted": [
{
"value": "9280 E Costilla Avenue Englewood Colorado Us 801 "
}
]
},
{
"@type": "TextBlock",
"title": "Location",
"TextFormatted": [
{
"value": "Location: Located In The Denver Suburb Of Englewood. Just 15 Miles From Downtown Denver And 35 Miles From Denver International Airport. Convenient To Area Corporate And Entertainment Centers. Shopping And Dining Options Abound In Nearby Outlets At Castle Rock. Other Attractions Include Coors Brewing Company And The Majestic Rocky Mountains To The West. Complimentary Shuttle Service Within A Five-Mile Radius. Directions: From The North. Take I-25 South To The Arapahoe Road Exit Exit 197. Turn Left East On Arapahoe Road. Turn Right South On Clinton Street. Turn Right West On Costilla Avenue. Hotel Will Be Immediately On The Left. "
}
]
},
{
"@type": "TextBlock",
"title": "Promotional",
"TextFormatted": [
{
"value": "Welcome To Hyatt "
}
]
},
{
"@type": "TextBlock",
"title": "Guarantee",
"TextFormatted": [
{
"value": "Credit Card Guarantee Required "
}
]
},
{
"@type": "TextBlock",
"title": "Cancellation",
"TextFormatted": [
{
"value": "cancel: cancel by 3pm must 48 hours prior to arrival."
}
]
},
{
"@type": "TextBlock",
"title": "Other",
"TextFormatted": [
{
"value": "Standard Rate Check In Time 4 Pm Check Out Time 12 Pm "
}
]
},
{
"@type": "TextBlock",
"title": "Room detail",
"TextFormatted": [
{
"value": "1 Bedroom King Nosm "
}
]
},
{
"@type": "TextBlock",
"title": "Fax",
"TextFormatted": [
{
"value": "1-303-706-1770 "
}
]
},
{
"@type": "TextBlock",
"title": "Rate description",
"TextFormatted": [
{
"value": "1Knrack: 1 Bedroom King Nosm Full Breakfast:Full Kitchen:1 Bedroom: H-Bar 1 Bedroom Suite:1 King Hyatt Grand Bed:Nosm Regularly Published Room Rates. "
}
]
},
{
"@type": "TextBlock",
"title": "Rate amount",
"TextFormatted": [
{
"value": "13900 Person Night Starting 09 Apr For 3 Nights "
}
]
},
{
"@type": "TextBlock",
"title": "Property",
"TextFormatted": [
{
"value": "Hyatt Summerfield Denver Tech Time Zone: Abx Gmt Offset: 00:00 Property Has 136 Rooms And 136 Suites On 3 Floors "
}
]
},
{
"@type": "TextBlock",
"title": "Number Nights",
"TextFormatted": [
{
"value": "3 "
}
]
},
{
"@type": "TextBlock",
"title": "Room rate",
"TextFormatted": [
{
"value": "10.000 Percent Commission Tax: 7.250 Percent Occupancy Tax: 3.000 Percent "
}
]
},
{
"@type": "TextBlock",
"title": "Phone",
"TextFormatted": [
{
"value": "1-303-706-1945 "
}
]
},
{
"@type": "TextBlock",
"title": "Total Amount",
"TextFormatted": [
{
"value": "41700 Sub Total For Stay 45974 Approx Total Include All Known Taxes/Fees "
}
]
}
],
"Guarantee": [
{
"type": "GuaranteeRequired"
}
],
"CancelPenalty": [
{
"Deadline": {
"SpecificDate": {
"specific": "2020-04-07"
},
"Time": "15:00:00"
},
"Refundable": "Yes"
}
]
}
]
},
"CurrencyRateConversion": [
{
"SourceCurrency": {
"decimalPlace": 2,
"value": "USD"
},
"TargetCurrency": {
"decimalPlace": 2,
"value": "INR"
},
"ConversionRate": {
"value": 70.876
}
}
]
}
}
Error Messages
SourceCode |
StatusCode (HTTP Code) |
Message |
---|---|---|
|
306 |
Invalid Promotion Code |
|
346 |
Closed to Arrivals |
|
367 |
Invalid Request |
|
378 |
Max Allowed Number of Rooms or Guests Exceeded |
|
381 |
Invalid Check-in Date |
|
397 |
Invalid Number of Adults |
Bad Request |
400 |
Chain code in invalid, must be 2 alphabetic characters |
Bad Request |
400 |
Property code is invalid, must be alphanumeric |
Bad Request |
400 |
Chain code is required field |
Bad Request |
400 |
Property code is required field |
Bad Request |
400 |
Unable to process Rules request: Checkin or Checkout date not in correct format: YYYYMMDD |
|
448 |
System Error |
|
450 |
Unable to Process |
Internal Server Error |
500 |
Unable to process request. Exception occurred. |
|
724 |
Vendor Response Error |