Cancel a Reservation
Scope
This use case shows the code necessary to cancel a reservation.
Prerequisites |
Next steps |
|
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.
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. |
|
|
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:
|
|