{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-docs/stays/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"type":"markdown"},"seo":{"title":"Cancel a reservation","description":"Create AI-native travel products with Travelport's powerful, flexible APIs.","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"cancel-a-reservation","__idx":0},"children":["Cancel a reservation"]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In all use cases, the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["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. ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Actors"]}," here are not searching/booking travel for themselves but instead are implementing this data handling for input from your company's travel customers."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"scope","__idx":1},"children":["Scope"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This use case shows the code necessary to cancel a reservation."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"class":"doc-table md","className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Prerequisites"},"children":["Prerequisites"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Next steps"},"children":["Next steps"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/getting-started/authentication"},"children":["Authentication"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["An existing reservation created with the TripServices Stays APIs or another Travelport+ product, and the aggregator locator code/PNR  for that reservation."]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["None."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"use-case","__idx":2},"children":["Use case"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"class":"doc-table md","className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Action"},"children":["Action"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Goals and steps"},"children":["Goals and steps"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Code Example"},"children":["Code Example"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Request"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If you don't already have the supplier locator code, send a Reservation Retrieve request to retrieve it."]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["In the  Reservation Retrieve request endpoint, send the aggregator locator code returned at booking  in Receipt/Confirmation/Locator/value."]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Hotel bookings return multiple locator codes. For the aggregator code, at booking note the value in the instance of Receipt with Confirmation/Locator/locatorType=",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["PNR Locator"]},".  See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/docs/stays/guides/stays-general-guide#confirmations-and-locator-codes"},"children":["Locator Codes"]}," for more about locator codes."]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Endpoint:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["GET"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["https://api.travelport.com/11/hotel/book/reservations/K8TCLR"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Request"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["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 ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["Confirmation Number"]}," and sourceContext ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["Supplier"]},"."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":" \"Confirmation\": {\n   \"@type\": \"ConfirmationHold\",\n      \"Locator\": {\n          \"value\": \"80073065\",\n          \"locatorType\": \"Confirmation Number\",\n          \"source\": \"XV\",\n          \"sourceContext\": \"Supplier\",\n          \"creationDate\": \"2025-09-16\"\n          }\n      }\n  }\n","lang":"json"},"children":[]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Request"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To cancel the reservation, send the following in the Cancel Reservation request endpoint:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Send the aggregator locator code returned at booking  and Reservation Retrieve in Receipt/Confirmation/Locator/value."]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Endpoint:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["PUT"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["https://api.travelport.com/11/hotel/book/reservations/K8TCLR/canceloffer?supplierLocator=80073065"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Response"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["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:",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Locator/value updates to a cancellation number"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Locator/locatorType returns Cancellation Number"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["creationDate updates to the date the booking was canceled"]}]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"  \"Confirmation\": {\n      \"@type\": \"ConfirmationHold\",\n        \"Locator\": {\n             \"value\": \"59824913\",\n             \"locatorType\": \"Cancellation Number\",\n             \"source\": \"TX\",\n             \"sourceContext\": \"Supplier\",\n             \"creationDate\": \"2025-10-01\"\n                      },\n         \"OfferStatus\": {\n                 \"@type\": \"OfferStatusHospitality\",\n                 \"code\": \"HK\",\n                 \"Status\": \"Cancelled\"\n               }\n           }\n       }\n","lang":"json"},"children":[]}]}]}]}]}]}]},"headings":[{"value":"Cancel a reservation","id":"cancel-a-reservation","depth":1},{"value":"Scope","id":"scope","depth":4},{"value":"Use case","id":"use-case","depth":4}],"frontmatter":{"seo":{"title":"Cancel a reservation"}},"lastModified":"2026-05-27T15:34:23.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/docs/stays/use-cases/modifying-reservations/cancel-a-reservation","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}