In all use cases, the Actor is the developer implementing the interface between the TripServices APIs and your company's application that provides travel results to your company's end users. Actors here are not searching/booking travel for themselves but instead are implementing this data handling for input from your company's travel customers.
This use case shows the code necessary to cancel a reservation.
| Prerequisites | Next steps |
|---|---|
| None. |
| Action | Goals and steps | Code Example |
|---|---|---|
Request | If you don't already have the supplier locator code, send a Reservation Retrieve request to retrieve it.
Hotel bookings return multiple locator codes. For the aggregator code, at booking note the value in the instance of Receipt with Confirmation/Locator/locatorType=PNR Locator. See Locator Codes for more about locator codes. | Endpoint: GET https://api.travelport.com/11/hotel/book/reservations/K8TCLR |
| Request | The response returns all details currently on the booking. Find the supplier locator code in Receipt/Confirmation/Locator/value in the instance of Confirmation with locatorType Confirmation Number and sourceContext Supplier. | "Confirmation": {
"@type": "ConfirmationHold",
"Locator": {
"value": "80073065",
"locatorType": "Confirmation Number",
"source": "XV",
"sourceContext": "Supplier",
"creationDate": "2025-09-16"
}
}
} |
Request | To cancel the reservation, send the following in the Cancel Reservation request endpoint:
| Endpoint: PUT https://api.travelport.com/11/hotel/book/reservations/K8TCLR/canceloffer?supplierLocator=80073065 |
| Response | The response returns all booking details that were already part of the reservation. The supplier Confirmation object returns the following to indicate the canceled status:
| "Confirmation": {
"@type": "ConfirmationHold",
"Locator": {
"value": "59824913",
"locatorType": "Cancellation Number",
"source": "TX",
"sourceContext": "Supplier",
"creationDate": "2025-10-01"
},
"OfferStatus": {
"@type": "OfferStatusHospitality",
"code": "HK",
"Status": "Cancelled"
}
}
} |