Cancel a Reservation

In all use cases, the Actor is the developer implementing the interface between the JSON 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.

Scope

This use case shows the code necessary to cancel a reservation.

Prerequisites

Next steps

  • Authentication

  • An existing reservation created with the JSON Hotel APIs or another Travelport+ product, and the aggregator locator code/PNR for that reservation.

None.

Use case

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.

  1. In the  Reservation Retrieve request endpoint, send the aggregator locator code returned at booking in Receipt/Confirmation/Locator/value.

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:

  1. Send the aggregator locator code returned at booking and Reservation Retrieve in Receipt/Confirmation/Locator/value.

  2. Send the supplier locator code returned at booking and Reservation Retrieve in the instance of Confirmation with locatorType Confirmation Number.

 

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:

  • Locator/value updates to a cancellation number

  • Locator/locatorType returns Cancellation Number

  • creationDate updates to the date the booking was canceled

  • In OfferStatus, code is HK and Status is Cancelled

"Confirmation": {
     "@type": "ConfirmationHold",
          "Locator": {
               "value": "59824913",
               "locatorType": "Cancellation Number",
               "source": "TX",
               "sourceContext": "Supplier",
               "creationDate": "2025-10-01"
                        },
           "OfferStatus": {
                   "@type": "OfferStatusHospitality",
                   "code": "HK",
                   "Status": "Cancelled"
                 }
             }
         },