Create Hotel Reservation v9 API Reference
POST |
reservation/v9/reservations 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
Hotel Create Reservation requires a POST request to book a room with the booking code for the desired room type from the availability response, the check-in and check-out dates, rate information, and payment information.
Request
Also see Authorization and Common Hotel API Headers.
Query Parameters
None.
Request Body
Object |
Description |
Required/Optional |
---|---|---|
ReservationBackOffice |
Top level object for the request. Includes the Traveler and Order objects. |
Required |
|
A custom user-assigned tracking ID to be returned in the response. |
Optional |
Offer |
Top level object for reservation details. Includes Product and TermsAndConditionsFull objects. |
Required |
|
String. A catalogOffering id taken from the Hotel Availability response. If catalogOffering id is used, then the corresponding offer is retrieved to complete the booking. No other Offer fields are required in the reservation request when Offer.id is used. |
Optional |
Product |
Details about the property, dates, and number of guests. Includes the DateRange and PropertyKey objects. |
Required |
|
String. Booking code from the availability response. |
Required |
|
Number. Total number of guests. Must be a numeric value between 1 and 9. |
Required |
|
Number. Number of rooms requested. If not provided, default quantity is 1. |
Optional |
DateRange |
Reservation date range. |
Required |
|
String. Check-in date in YYYY-MM-DD format. |
Required |
|
String. Check-out date in YYYY-MM-DD format. |
Required |
PropertyKey |
Property ID information. |
Required |
|
String. Two-character chain code to search. |
Required |
|
String. Property code of the property within the hotel chain. |
Required |
TermsAndConditionsFull |
Terms and conditions top-level object. Includes the ProductRateCodeInfo object. |
Required |
ProductRateCodeInfo |
Top-level object for information associated with negotiated rate plan codes, when applicable. Includes RateCodeInfo. |
Required |
RateCodeInfo |
Information on the rate code. |
Required when returned in the Availability response. |
|
String. The negotiated rate plan code returned in the Availability response. |
Required |
|
String. ID of the rate plan associated with the negotiated rate plan code returned in the Availability response. |
Required |
|
String. Name of the rate plan returned in the Availability response. |
Optional |
|
String. OTA rate category code. Values can be:
|
Optional |
Traveler |
Traveler details. Includes the PersonName, Telephone, and Email objects. |
Required |
PersonName |
Traveler details. |
Required |
|
String. Traveler first name, if changed. |
Required |
|
String. Traveler last name, if changed. |
Required |
|
String. Traveler title. |
Optional |
Telephone |
Traveler telephone details. |
Optional |
|
String. Phone country code. |
Optional |
|
String. Phone number. |
Optional |
|
String. Phone local area code. |
Optional |
|
String. Agency city code. |
Optional |
|
Traveler email address. |
Optional |
|
String. Traveler email address. |
Optional |
CustomerLoyalty |
Traveler customer loyalty number. |
Optional |
|
String. The loyalty number. |
Optional |
|
String. Any identification number or code for the loyalty number. |
Optional |
FormOfPayment |
Top-level object. Includes PaymentCard object. |
Required |
PaymentCard |
Form of payment details. Includes the CardNumber object. |
Required |
|
String. Credit card expiration date in MMYY format. |
Required |
|
String. Type of card including Credit, Debit, and Gift. |
Required |
|
String. Code for credit card type. |
Required |
|
String. Name on credit card. |
Required |
CardNumber |
Card number details. |
Required |
|
String. Credit card number. |
Required |
Payment |
Top-level object for deposit payment details. If provided, this is for a deposit in the amount specified in Payment.Amount. If not provided, the payment card info is used as a guarantee form of payment. Includes Amount object. |
Optional |
|
String. Customer-assigned identifier for the payment. |
Optional |
|
String. Customer-assigned name for the form of payment. |
Optional |
Amount |
Amount of payment. Optional, send only if sending Payment. |
Optional |
|
String. Currency code. |
Optional |
|
Number. Amount to pay. |
Optional |
ReservationComment |
Optional top-level object. Includes Comment object. |
Optional |
Comment |
Optional, send if sending ReservationComment. Multiple comment objects may be sent. |
Optional |
|
String. Text sent to supplier for special instructions. Limited to 50 characters. |
Optional |
TravelAgency |
Travel agency information. Includes AgencyPCC and Telephone objects. |
Optional |
AgencyPCC |
Travel agency PCC code. |
Optional |
|
String. Agency PCC code. |
Optional |
Telephone |
Agency telephone contact information. |
Optional |
|
String. Agency telephone number. |
Optional |
|
String. Agency phone local area code. |
Optional |
|
String. OTA code for how phone is used. (e.g. Home, Business, Emergency Contact, Travel Arranger, Day, Evening) |
Optional |
|
String. Agency city code. |
Optional |
GroupName |
String. Name of travel group. |
Optional |
Response
Object |
Description |
---|---|
ReservationResponse |
Top level object for the response. |
Reservation |
Key value pair:
Includes Offer, Traveler, Receipt, and ReservationComment objects. |
Offer |
Reservation offer. Key value pair:
Includes Product, Price, and TermsAndConditionsFull objects. |
Product |
Key value pairs:
Includes PropertyKey and DateRange objects. |
PropertyKey |
Key value pairs:
|
DateRange |
Key value pairs:
|
Price |
Key value pairs:
|
TermsAndConditionsFull |
Terms and conditions of the reservation. Includes Description object. |
Description |
Descriptive text of hotel terms and conditions. |
Traveler |
Traveler details. Includes PersonName object. |
PersonName |
Key value pairs:
|
Receipt |
Top level object. Includes Confirmation object. |
Confirmation |
Confirmation details. Key value pair:
Includes Locator object. |
Locator |
Locator information for the reservation. Key value pairs:
|
ReservationComment |
Top leve for Comment objects if any comments were sent in the request. |
Comment |
Any comments about the reservation sent in the request. Key value pair:
|
Example Request
The example below shows the request payload to book one room for one guest on the specified dates with the booking, chain, and property codes.
Book by booking code
{
"ReservationBackOffice": {
"id": "reservation_1",
"Offer": [
{
"@type": "Offer",
"Product": [
{
"@type": "ProductHospitality",
"Quantity": 1,
"DateRange": {
"start": "2020-04-09",
"end": "2020-04-12"
},
"PropertyKey": {
"chainCode": "HY",
"propertyCode": "81388"
},
"bookingCode": "1KNRACK",
"guests": "1"
}
],
"TermsAndConditionsFull": [
{
"@type": "TermsAndConditionsFullHospitality",
"ProductRateCodeInfo": [
{
"@type": "ProductRateCodeInfo",
"RateCodeInfo": {
"value": "",
"rateName": "",
"rateID": "",
"rateCategory": ""
}
}
]
}
]
}
],
"Traveler": [
{
"@type": "Traveler",
"PersonName": {
"Given": "Sainik",
"Surname": "Das",
"Title": "Mr"
},
"Telephone": [
{
"countryAccessCode": "1",
"phoneNumber": "8913141",
"@type": "Telephone",
"areaCityCode": "425",
"cityCode": "ATL"
}
],
"Email": [
{
"value": "mattxyz@someinvalidmailserver.com"
}
]
}
],
"FormOfPayment": [
{
"@type": "FormOfPaymentPaymentCard",
"PaymentCard": {
"@type": "PaymentCardDetail",
"expireDate": "1129",
"CardType": "Credit",
"CardCode": "VI",
"CardHolderName": "FRANK SINATRA",
"CardNumber": {
"PlainText": "4444333322221111"
}
}
}
],
"Payment": [
{
"@type": "Payment",
"id": "payment_1",
"PaymentRef": "payment_1",
"Amount": {
"code": "USD",
"value": 252.47
}
}
],
"ReservationComment": [
{
"@type": "ReservationComment",
"Comment": [
{
"value": "Please dont charge CC on file",
"id": "comment_8",
"name": "Example String Value",
"language": "EN"
}
]
}
],
"TravelAgency": {
"@type": "TravelAgencyDetail",
"Telephone": [
{
"phoneNumber": "832-8014 - SANDBOX FAMILY - 49736293",
"@type": "TelephoneDetail",
"areaCityCode": "703",
"phoneUseType": "AS",
"cityCode": "IAD"
}
]
},
"GroupName": "RioGrande/Tour"
}
}
Example Response
The request above returns the example response below, returning a ReservationLocator (the reservation) and showing the reservation was confirmed. The ReservationLocator and the SupplierLocator, which is the confirmation number from the property, must be sent with any subsequent request to cancel or modify the reservation if needed.
{
"ReservationResponse": {
"Reservation": {
"@type": "ReservationBackOffice",
"id": "e815a762-ba4e-44fd-a975-021430799ac1:npn",
"Offer": [
{
"@type": "Offer",
"Product": [
{
"@type": "ProductHospitality",
"bookingCode": "1KNRACK",
"guests": 1,
"Quantity": "1",
"PropertyKey": {
"chainCode": "HY",
"propertyCode": "81388"
},
"DateRange": {
"start": "2020-04-09",
"end": "2020-04-12"
}
}
],
"Price": {
"@type": "PriceDetail",
"currencyCode": "USD",
"TotalPrice": "459.74"
},
"TermsAndConditionsFull": [
{
"@type": "TermsAndConditionsFullHospitality",
"Description": [
"CXL:CANCEL BY 3PM MST 48 HOURS PRIOR TO ARRIVAL *"
]
}
]
}
],
"Traveler": [
{
"@type": "Traveler",
"PersonName": {
"@type": "PersonName",
"Given": "Sainik",
"Surname": "Das"
}
}
],
"Receipt": [
{
"@type": "ReceiptConfirmation",
"Confirmation": {
"@type": "ConfirmationHold",
"ConfirmationStatus": "Confirmed",
"Locator": {
"sourceContext": "Travelport",
"value": "5CDV7U"
}
}
},
{
"@type": "ReceiptConfirmation",
"Confirmation": {
"@type": "ConfirmationHold",
"ConfirmationStatus": "Confirmed",
"Locator": {
"source": "HY",
"sourceContext": "Supplier",
"value": "HY0041941603"
}
}
}
],
"ReservationComment": [
{
"@type": "ReservationComment",
"Comment": [
{
"value": "Please dont charge CC on file"
}
]
}
]
}
}
}
Error Messages
SourceCode |
StatusCode (HTTP Code) |
Message |
---|---|---|
Bad Request |
400 |
Access Profile and Authorization Header cannot be empty |
Bad Request |
400 |
Traveler Information cannot be empty |
Bad Request |
400 |
First Name cannot be empty |
Bad Request |
400 |
Last Name cannot be empty |
Bad Request |
400 |
First Name can only contain letters and spaces |
Bad Request |
400 |
Last Name can only contain letters and spaces |
Bad Request |
400 |
Phone Area code cannot be empty |
Bad Request |
400 |
Country Access code cannot be empty |
Bad Request |
400 |
Phone Number cannot be empty |
Bad Request |
400 |
Area City Code must contain only numbers, spaces, dashes, or dots |
Bad Request |
400 |
Phone Number must contain only numbers, spaces, dashes, or dots |
Bad Request |
400 |
First Name and Last Name required for modify |
Bad Request |
400 |
Order of type OrderDetail is expected in request |
Bad Request |
400 |
TravelAgency of type TravelAgencyDetail is expected in request |
Bad Request |
400 |
Agency Phone Area code cannot be empty |
Bad Request |
400 |
Agency Phone Number cannot be empty |
Bad Request |
400 |
Agency Phone - Area City Code must contain only numbers, spaces, dashes, or dots |
Bad Request |
400 |
Agency Phone Number must contain only alpha chars , spaces, dashes, or dots |
Bad Request |
400 |
Order cannot be empty |
Bad Request |
400 |
Offer cannot be empty |
Bad Request |
400 |
Product cannot be empty |
Bad Request |
400 |
startdate and enddate cannot be empty |
Bad Request |
400 |
startdate is not valid |
Bad Request |
400 |
startdate cannot be less than currentdate |
Bad Request |
400 |
enddate is not valid |
Bad Request |
400 |
enddate cannot be less than currentdate |
Bad Request |
400 |
enddate cannot be less than startDate |
Bad Request |
400 |
enddate cannot be equal to startDate |
Bad Request |
400 |
Vendor Received From cannot be empty |
Bad Request |
400 |
Amount cannot be empty |
Bad Request |
400 |
Currency code cannot be empty |
Bad Request |
400 |
Card Expiration date cannot be empty |
Bad Request |
400 |
Card Type cannot be empty |
Bad Request |
400 |
Card Code cannot be empty |
Bad Request |
400 |
Card Code cannot be greater than 2 |
Bad Request |
400 |
Card Holder Name cannot be empty |
Bad Request |
400 |
Card Number cannot be empty |
Bad Request |
400 |
Provider Locator must be provided |
Not Found |
404 |
Invalid Record Locator Number |
Not Found |
404 |
Invalid confirmation number |
Not Found |
404 |
Cannot find hotel offer with ID: {offer id}. Offer ID may be incorrect or offer has expired. Try performing availability again. |
Internal Server Error |
500 |
Unable to invoke cancel reservation. Exception occurred. |
Internal Server Error |
500 |
Unable to invoke reservation. Exception occurred. |