Attention: Please check the Hotel Release Notes page for the latest updates and enhancements.
Cancel Hotel Reservation API Reference
Put |
book/reservations/{LocatorCode}/canceloffer/{supplierLocator=SupplierConfirmation} For {LocatorCode} send the locator code of the reservation to retrieve (returned in the workbench commit in Confirmation/Locator/value). For {SupplierConfirmation}, send the confirmation number returned from the supplier in Receipt/Confirmation/Locator/value in the reservation response. 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, Create Reservation Reference Payload API Reference
The Hotel Cancel API cancels an existing hotel reservation.
Request
Also see Authorization and Common Hotel API Headers.
Query Parameters
None.
Request Body
None.
Response
Object | Description |
---|---|
ReservationResponse |
Top level object for the response. |
Reservation |
Includes Offer, Traveler, and Receipt objects. |
Offer |
Reservation offer. Includes Product object. |
Product |
Includes PropertyKey and DateRange objects. |
PropertyKey |
Chain and property codes. Key value pairs:
|
DateRange |
Offer date range. Key value pairs:
|
Traveler |
Traveler details. See table below. |
TravelerProduct |
Reference numbers to link travelers to a specific offer. See table below. |
Receipt |
Confirmation details. See table below. |
Traveler object
Object |
Description |
---|---|
Traveler |
Traveler details. Key value pair:
Includes PersonName, Telephone, and Email. |
PersonName |
Key value pairs:
|
Telephone |
Traveler telephone details. Key value pairs:
|
|
Traveler email address. Key value pair:
|
TravelerProduct object
Object |
Description |
---|---|
TravelerProduct |
Top level object array that links a particular traveler to a particular hotel segment (offer). Each offer has a linked traveler. Includes TravelerRef and OfferRef objects. |
TravelerRef |
Traveler reference number allowing a linkage to an offer. Key value pair:
|
OfferRef |
Offer reference number allowing a linkage to a traveler. Key value pair:
|
Receipt object
Object |
Description |
---|---|
Receipt |
Top level object. Includes OfferRef and Confirmation objects. |
OfferRef |
Reference number to link this set of receipt information to a specific offer. Always the letter âOâ followed by a number. |
Confirmation |
Confirmation details. Includes Locator and OfferStatus objects. |
Locator |
Locator information for the reservation. Key value pairs:
|
OfferStatus |
Status of offer. Key value pair:
|
Example Request
PUT https://api.pp.travelport.com/11/hotel/book/reservations/2BYHTW/canceloffer?supplierLocator=7381216068032
Example Response
The request above returns the example response below, returning a PNR locator and showing the reservation was canceled. The specific information returned depends on what is received from the supplier.
{
"ReservationResponse": {
"Reservation": {
"@type": "ReservationDetail",
"Offer": [
{
"@type": "Offer",
"Product": [
{
"@type": "ProductHospitality",
"PropertyKey": {
"chainCode": "IA",
"propertyCode": "02129"
},
"DateRange": {
"start": "2022-12-01",
"end": "2022-12-09"
}
}
]
}
],
"Traveler": [
{
"@type": "Traveler",
"id": "T1",
"PersonName": {
"@type": "PersonName",
"Given": "CATALIN",
"Surname": "ISTRATE"
},
"Telephone": [
{
"@type": "Telephone",
"phoneNumber": "909-1231234",
"cityCode": "DEN"
}
],
"Email": [
{
"value": "smith@example.com"
}
]
}
],
"TravelerProduct": [
{
"@type": "TravelerProduct",
"TravelerRef": {
"@type": "TravelerID",
"id": "T1"
},
"OfferRef": {
"@type": "OfferID",
"id": "O1"
}
}
],
"Receipt": [
{
"@type": "ReceiptConfirmation",
"OfferRef": [
{
"@type": "OfferID",
"id": "O1"
}
],
"Confirmation": {
"@type": "ConfirmationHold",
"Locator": {
"value": "7281645605903",
"locatorType": "Cancellation Number",
"sourceContext": "Supplier"
},
"OfferStatus": {
"@type": "OfferStatusHospitality",
"Status": "Cancelled"
}
}
},
{
"@type": "ReceiptConfirmation",
"Confirmation": {
"@type": "ConfirmationHold",
"Locator": {
"value": "2BYHTW",
"locatorType": "PNR Locator",
"sourceContext": "Travelport"
},
"OfferStatus": {
"@type": "OfferStatusHospitality",
"Status": "Confirmed"
}
}
}
]
}
}
}
Error Messages
Error message for Hotel Cancel API.
SourceCode | StatusCode (HTTP code) | Message |
---|---|---|
|
400 |
Not able to reach IDM Authorization atomic or Authorization cannot be identified due to insufficient inputs |
|
400 |
Unable to process Retrieve request: Invalid Record Locator Number. |
|
400 |
Itinerary id is invalid. |
|
400 |
Unable to process Cancel request: Invalid confirmation number. |
|
400 |
UNABLE TO RETRIEVE - CHECK RECORD LOCATOR - XXXXXX |
|
401 |
Unathorised user. |
|
404 |
Not found. |
|
405 |
Method not allowed. |