The Cancel Booking method is designed to facilitate the process of canceling any type of supplier content in a single, seamless API call.
The Cancel Booking method is part of the larger Booking Management API, available in RPC/JSON format and designed to operate in a stateless way. This means that when successful, the API will automatically commit the changes applied to a Sabre reservation.
While this API is designed to operate in a stateless way, it accepts both sessionless (ATK) and session-based (ATH) tokens. When a call is made to this API via a session-based token, the session (AAA) is cleared before and after execution.
The internal logic executed by Cancel Booking is defined by the content on the Sabre PNR to be canceled. Because of this, the first step executed internally is to analyze the products in the Sabre PNR.
This analysis creates a mapping of products, with the corresponding API, to be used for cancellation and creates a “segment sequence position” to “product id” mapping.
The APIs orchestrated by Cancel Booking are:
- Order Management
Cancel Booking request structure
The Cancel Booking method cancels reservations when desired products from a Sabre reservation are specified. This allows you to choose to cancel by product position within the reservation or by the product's unique ID. Additionally, you can simply “cancel all”.
confirmationIdrepresents the booking reference ID shown in the SABRE system. This is the PNR Record Locator (RECLOC) where the cancellation will be executed.
retrieveBookingis an optional element to specify whether the API should return a view of the reservation after processing (default=
receivedFromis an optional element to specify whether the API should sign the booking change with a specific value (default=
LW CANCEL API).
flightTicketOperationis an optional element to specify the policy for handling flight ticket operations within the Cancel Booking service. Available options are:
VOIDindicates if the service should be invoked for related tickets Void Flight Tickets.
REFUNDindicates if the service should be invoked for related tickets Refund Flight Tickets.
errorHandlingPolicyallows you to define the API's behavior in the event of an error. Two options are available:
HALT_ON_ERROR(default): Execution is stopped when an error is encountered. A rollback is executed if some products were successfully executed to ensure the original state of the reservation is preserved.
ALLOW_PARTIAL_CANCEL: Execution continues even when some products failed to cancel.
cancelAllindicates if all segments (products) in the booking should be canceled (default=
flightscontains a list of the flights which should be canceled by referencing the
itemIdof a particular flight.
hotelscontains a list of the hotels which should be canceled by referencing the
itemIdof a particular hotel.
carscontains a list of the cars which should be canceled by referencing the
itemIdof a particular car.
trainscontains a list of the trains which should be canceled by referencing the
itemIdof a particular train.
cruisescontains a list of the cruises which should be canceled by referencing the
itemIdof a particular cruise.
segmentsindicates which segments are to be canceled. All types of segments are allowed here. Segments are identified by the
sequence(position shown on the PNR) or
id(also referred to as “database ID” or “product ID”).
targetPCCis used to specify which city (PCC) should change context using
ContextChange(AAA). If empty, or equals the current city, the context doesn't change.
notificationallows you to define options to notify after transaction succeeded. Two options are available:
queuePlacementthe PNR will be placed on one or more queues after finishing the transaction.
printerProfileNumber- assigns a previously defined printer profile
hardcopy- assigns a hardcopy printer for the transaction
invoiceItinerary- assigns an invoice and itinerary printer for the transaction
ticket- assigns a ticket printer for the transaction
offerItemIdis used to specify the ID for a void or refund offer available based on the Check Flight Tickets response for the tickets belonging to the requested confirmationId. Applicable only for NDC orders. Cannot be used in conjunction with
Note: Refer to the Cancel Booking Examples section for details on where you can obtain the
cancelAll=false, then at least one from the following properties has to be provided: Flights, Hotels, Cars, Segments.
Cancel Booking response structure
The Cancel Booking response contains:
- Errors and warnings (if applicable). If not present (empty or contains warnings only) then execution is successful. Warnings might be returned for unsuccessful cancellation of a particular ticket when requested ErrorHandlingPolicy=ALLOW_PARTIAL_CANCEL.
- Original request
- The final status of the reservation (if requested in the API request) via the structure of the Get Booking method
- List of voided or refunded tickets (if this particular operation was selected in the API request)
Note: Although Get Booking allows for a detailed level of customization when called as a stand-alone method, when executed as part of Cancel Booking, it follows a predefined structure for optimal performance.
- NDC segments can only be canceled as a whole; you can’t cancel individual NDC segments and leave other NDC segments.
- Void and refund operation of fulfilled hybrid bookings (traditional Sabre air content + NDC offer) is not supported.
This section illustrates the current error handling logic for Cancel Booking:
Note: Please access the Cancel Booking - Error List section for additional details on possible errors returned by Cancel Booking.
Dependence between Error Policy and Error Category
The error type
UNABLE_TO_CANCEL can be returned with the category
CANCELLATION_ERROR, as well as with a
WARNING. The category depends on
ErrorHandlingPolicy sent in the request. For
CANCELLATION_ERROR displays, and for
If you've set the API to not accept any failures (policy=
HALT_ON_ERROR), then any failure in a downstream API being called results in an error in the Cancel Booking response.
If you've set the API to accept partial successes (policy=
ALLOW_PARTIAL_CANCEL), then returning downstream API errors suggest that the entire cancel process failed. However, this is not quite true. Therefore, these errors/failures result as warnings in the Cancel Booking response.
Errors/Warnings returned by downstream services
The Cancel Booking response contains errors and warnings returned by downstream APIs (see Internal Orchestration) and these are always returned as a
WARNING. Aside from rewritten items from downstream APIs, one of the following is returned:
NDC_CANCEL_PROBLEM (depending on the downstream system).
Note: If a downstream API returns only warnings (no errors), then they are not rewritten into the Cancel Booking response. If a downstream API returns any error, then all errors, as well as warnings, are rewritten.
Example: The Cancel Booking response may contain an error list when called with a
HALT_ON_ERROR set. This is because there was a failure in the NDC Cancel API.
Simultaneous changes issue returned by downstream services
The Cancel Booking has retry logic in place for the scenarios where simultaneous changes error is returned by downstream services. The application will perform verification of the booking up to three times with progressive delays (1, 2 and 3 seconds), to recover from the occurrence of the simultaneous changes.