This API is used for cancelling a booking.

This document assumes the user is familiar with the Travelfusion Search and Book API.

The ManageBookingAvailabilityPlane command should be executed before the user performs a Cancellations API modification. The element <ChangeOptions> in the response will indicate which change options are supported by Travelfusion, and hence, which post booking API to use.

This API is applicable to change options:

  • CANCEL

The eligible bookings for cancelling must have one of the following statuses: Succeeded, BookingChangeSucceeded, CancelFailed.

Step 1: Requesting the cancellation details

Before starting cancellation GetBookingDetails command (see GetBookingDetails request and response XML) need to be called in order to check if cancellation is possible to perform, to look up tax break down which contains all cancellation fees and to check the terms and conditions of the booking you wish to cancel before initiating cancellation.

The request must contain the CustomSupplierParameter IsBookingForCancellation in order to request cancellation details. Other CustomSupplierParameters are optional however they may affect the cancellation process.

GetBookingDetails request XML example

<CommandList>

<GetBookingDetails>

<XmlLoginId>[Travelfusion Login Id]</XmlLoginId>

<LoginId>[Travelfusion Login Id]</LoginId>

<TFBookingReference>[Travelfusion Booking Reference]</TFBookingReference>

<BookingProfile>

<CustomSupplierParameterList>

<CustomSupplierParameter>

<Name>IsBookingForCancellation</Name>

<Value>true</Value>

</CustomSupplierParameter>

<!-- Optional -->

<CustomSupplierParameter>

<Supplier>indigo</Supplier>

<Name>AgentLogin</Name>

<Value>CSPVALUE</Value>

</CustomSupplierParameter>

<!-- Optional -->

<CustomSupplierParameter>

<Supplier>indigo</Supplier>

<Name>AgentPassword</Name>

<Value>CSPVALUE</Value>

</CustomSupplierParameter>

</CustomSupplierParameterList>

</BookingProfile>

</GetBookingDetails>

</CommandList>

GetBookingDetails response XML example

<CommandList>

<GetBookingDetails>

<LoginId>[Travelfusion Login Id]</LoginId>

<Status>Succeeded</Status>

<SupplierReference>[Supplier PNR]</SupplierReference>

<RouterHistory>

...

<BookingRouter>

...

<GroupList>

<Group>

...

<Price>

<Amount>44000.00</Amount>

<Currency>INR</Currency>

<TaxItemList>

<!-- This will always be provided -->

<TaxItem>

<Name>Paid Amount</Name>

<Amount>44000.00</Amount>

<Currency>INR</Currency>

</TaxItem>

<!-- This will always be provided -->

<TaxItem>

<Name>Refund Amount</Name>

<Amount>24000.00</Amount>

<Currency>INR</Currency>

</TaxItem>

<TaxItem>

<Name>Supplier Charge</Name>

<Amount>18000.00</Amount>

<Currency>INR</Currency>

</TaxItem>

</TaxItemList>

</Price>

</Group>

</GroupList>

...

</BookingRouter>

</RouterHistory>

...

</GetBookingDetails>

</CommandList>

The TaxItemList contains information about refund amount, cancellation charges and the paid amount which have to meet the following formula: 'Paid Amount' has to equal the sum of 'Refund Amount', 'Supplier Charges'.

Step 2: Starting the cancellation

The StartBookingCancelPlane XML request is used to initiate the booking cancellation. Once it is submitted, the cancellation cannot be stopped. The process is the equivalent to StartBooking submission as described in the booking process of the bookings handling guide.

The request requires the TFBookingReference. See the StartBookingCancelPlane request / response specification for more details. Optionally request contains CustomSupplierParameters which may affect the cancellation process.

StartBookingCancelPlane request XML example

<CommandList>

<StartBookingCancelPlane>

<XmlLoginId>[Travelfusion Login Id]</XmlLoginId>

<LoginId>[Travelfusion Login Id]</LoginId>

<TFBookingReference>[Travelfusion Booking Reference]</TFBookingReference>

<!-- Optional -->

<BookingProfile>

<CustomSupplierParameterList>

<!-- Optional -->

<CustomSupplierParameter>

<Supplier>indigo</Supplier>

<Name>AgentLogin</Name>

<Value>CSPVALUE</Value>

</CustomSupplierParameter>

<!-- Optional -->

<CustomSupplierParameter>

<Supplier>indigo</Supplier>

<Name>AgentPassword</Name>

<Value>CSPVALUE</Value>

</CustomSupplierParameter>

</CustomSupplierParameterList>

</BookingProfile>

</StartBookingCancelPlane>

</CommandList>

The StartBookingCancelPlane request is asynchronous, so a response will be returned immediately (whilst the cancellation is still in progress in the 'background'). The response will contain no useful information. The CheckBookingCancelPlane request, described below in step 3, is used to retrieve the final status of the booking cancellation.

Step 3: Retrieving the booking cancellation status

The CheckBookingCancelPlane XML request is used to get the latest status of the cancellation. See CheckBookingCancelPlane request / response specification for more details.

CheckBookingCancelPlane request XML example

<CommandList>

<CheckBookingCancelPlane>

<XmlLoginId>[Travelfusion Login Id]</XmlLoginId>

<LoginId>[Travelfusion Login Id]</LoginId>

<TFBookingReference>[Travelfusion Booking Reference]</TFBookingReference>

</CheckBookingCancelPlane>

</CommandList>

The CheckBookingCancelPlane response returns the latest status of the cancellation. While Travelfusion is waiting for a response from the supplier, the status will be CancelInProgress. In this case, the CheckBookingCancelPlane request should be resubmitted after a few seconds delay.

CheckBookingCancelPlane response XML example while booking is still in progress

<CommandList>

<CheckBookingCancelPlane>

<LoginId>[Travelfusion Login Id]</LoginId>

<TFBookingReference>[Travelfusion Booking Reference]</TFBookingReference>

<Status>CancelInProgress</Status>

</CheckBookingCancelPlane>

</CommandList>

Once the cancellation is completed in the 'background', the CheckBookingCancelPlane response will contain a different status. For a successful cancellation, the status will be CancelSucceeded. A failed cancellation will have status CancelFailed. There are also situations where the cancellation has completed but the status is uncertain. For more detail please see table below and also please see the Guidelines with particular reference to the Booking handling guide for the booking process.

CheckBookingCancelPlane response XML example once booking is complete

<CommandList>

<CheckBookingCancelPlane>

<LoginId>[Travelfusion Login Id]</LoginId>

<TFBookingReference>[Travelfusion Booking Reference]</TFBookingReference>

<Status>CancelSucceeded</Status>

<SupplierConfirmationDataItemList>

<!-- Optional -->

<SupplierConfirmationDataItem>

<Name>Supplier Cancel Reference</Name>

<Value>UOMW7O</Value>

</SupplierConfirmationDataItem>

<!-- This will always be provided -->

<SupplierConfirmationDataItem>

<Name>Paid Amount</Name>

<Value>44000.00 INR</Value>

</SupplierConfirmationDataItem>

<!-- This will always be provided -->

<SupplierConfirmationDataItem>

<Name>Refund Amount</Name>

<Value>20000.00 INR</Value>

</SupplierConfirmationDataItem>

<!-- This will always be provided -->

<SupplierConfirmationDataItem>

<Name>Supplier Charge</Name>

<Value>18000.00 INR</Value>

</SupplierConfirmationDataItem>

<!-- example of supplier not predefined data -->

<SupplierConfirmationDataItem>

<Name>Supplier Cancel Message</Name>

<Value>Refund quote expires: 07/02/2018-13:54</Value>

</SupplierConfirmationDataItem>

</SupplierConfirmationDataItemList>

</CheckBookingCancelPlane>

</CommandList>

The meaning of 'Paid Amount', 'Refund Amount' and 'Supplier Charges' is the same like an explanation of the TaxItemList in Step 1 above.

Split-PNR Cancellation

The API offers the ability to cancel the booking for a subset of travellers for airlines that support such operation. The original Travelfusion booking record is split into two new ones, a) one with status BookingChangeSucceeded with the remaining travellers, and b) another booking with status CancelSucceeded containing those travellers that were selected for cancellation. The procedure is the same as a typical cancellation (as specified in the previous sections) with the changes or additions as highlighted in the examples below.

GetBookingDetails request XML example

A new CSP element (with name IsBookingForSplitChange) is required to denote a request for split-PNR cancellation.

<CommandList>

<GetBookingDetails>

<XmlLoginId>[Travelfusion Login Id]</XmlLoginId>

<LoginId>[Travelfusion Login Id]</LoginId>

<TFBookingReference>[Travelfusion Booking Reference]</TFBookingReference>

<BookingProfile>

<CustomSupplierParameterList>

<CustomSupplierParameter>

<Name>IsBookingForCancellation</Name>

<Value>true</Value>

</CustomSupplierParameter>

<CustomSupplierParameter>

<Name>IsBookingForSplitChange</Name>

<Value>true</Value>

</CustomSupplierParameter>

...

</CustomSupplierParameterList>

</BookingProfile>

</GetBookingDetails>

</CommandList>

GetBookingDetails response XML example

The response contains a new element SplitTravellerID per traveller which will be used later on to select the travellers to cancel the booking for.

<CommandList>

<GetBookingDetails>

<LoginId>[Travelfusion Login Id]</LoginId>

<Status>Succeeded</Status>

<SupplierReference>[Supplier PNR]</SupplierReference>

<RouterHistory>

...

<BookingRouter>

...

</BookingRouter>

</RouterHistory>

<BookingProfile>

<TravellerList>

<Traveller id="1">

<Age>44</Age>

<Name>

<Title>Mrs</Title>

<NamePartList>

<NamePart>Makis</NamePart>

<NamePart>Katsavakis</NamePart>

</NamePartList>

</Name>

<CustomSupplierParameterList>

<CustomSupplierParameter>

<Name>DateOfBirth</Name>

<Value>26/12/1975</Value>

</CustomSupplierParameter>

<CustomSupplierParameter>

<Name>SeatOptions</Name>

<Value>1334-21F</Value>

</CustomSupplierParameter>

</CustomSupplierParameterList>

<SplitTravellerID>1</SplitTravellerID>

</Traveller>

<Traveller id="2">

<Age>29</Age>

<Name>

<Title>Mrs</Title>

<NamePartList>

<NamePart>Dionisis</NamePart>

<NamePart>Mavros</NamePart>

</NamePartList>

</Name>

<CustomSupplierParameterList>

<CustomSupplierParameter>

<Name>DateOfBirth</Name>

<Value>26/12/1990</Value>

</CustomSupplierParameter>

</CustomSupplierParameterList>

<SplitTravellerID>2</SplitTravellerID>

</Traveller>

...

</TravellerList>

...

</BookingProfile>

<AirportNamePair>

<OriginAirport>Frankfurt,Rhein-Main</OriginAirport>

<DestinationAirport>Budapest,Ferihegyi</DestinationAirport>

</AirportNamePair>

</GetBookingDetails>

</CommandList>

StartBookingCancelPlane request XML example

This request asynchronously triggers the cancellation process in the background; it is submitted once only. Similarly, as in Step 2 above, once it is submitted, the cancellation cannot be stopped. The process is the equivalent to StartBooking submission as described in the booking process of the bookings handling guide. Users should use the new element ChangeTravellerIDList which should contain the traveller id(s) of the traveller(s) for cancellation.

<CommandList>

<StartBookingCancelPlane>

<XmlLoginId>[Travelfusion Login Id]</XmlLoginId>

<LoginId>[Travelfusion Login Id]</LoginId>

<TFBookingReference>AAAAAAAA</TFBookingReference>

<ChangeTravellerIDList>

<TravellerID>1</TravellerID>

<TravellerID>3</TravellerID>

</ChangeTravellerIDList>

<BookingProfile>

<CustomSupplierParameterList>

...

</CustomSupplierParameterList>

</BookingProfile>

</StartBookingCancelPlane>

</CommandList>

StartBookingCancelPlane response XML example

<CommandList>

<StartBookingCancelPlane>

<LoginId>[Travelfusion Login Id]</LoginId>

<TFBookingReference>AAAAAAAA</TFBookingReference>

</StartBookingCancelPlane>

</CommandList>

CheckBookingCancelPlane request XML example

Similarly to Step 3 above, users may use this command to poll the status of the cancellation in the background. For detail on how to poll, see "The Booking Process" section of the Booking handling guide (in particular the booking flow diagram); the same principle - as in the booking - applies here in cancellation.

<CommandList>

<CheckBookingCancelPlane>

<XmlLoginId>[Travelfusion Login Id]</XmlLoginId>

<LoginId>[Travelfusion Login Id]</LoginId>

<TFBookingReference>AAAAAAAA</TFBookingReference>

</CheckBookingCancelPlane>

</CommandList>

CheckBookingCancelPlane response XML example

The response contains two new elements. The ChangedTFBookingReference corresponding to a new TF booking record with the traveller(s) who are still flying, and the CancelTFBookingReference of another new TF booking record with the traveller(s) the booking was cancelled for.

<CommandList>

<CheckBookingCancelPlane>

<LoginId>[Travelfusion Login Id]</LoginId>

<TFBookingReference>AAAAAAAA</TFBookingReference>

<ChangedTFBookingReference>BBBBBBB</ChangedTFBookingReference>

<CancelTFBookingReference>CCCCCCC</CancelTFBookingReference>

<Status>CancelSucceeded</Status>

<SupplierConfirmationDataItemList>

<SupplierConfirmationDataItem>

<Name>Supplier Cancel Reference</Name>

<Value>cccc</Value>

</SupplierConfirmationDataItem>

<SupplierConfirmationDataItem>

<Name>Paid Amount</Name>

<Value>52.41 GBP</Value>

</SupplierConfirmationDataItem>

<SupplierConfirmationDataItem>

<Name>Refund Amount</Name>

<Value>52.41 GBP</Value>

</SupplierConfirmationDataItem>

<SupplierConfirmationDataItem>

<Name>Supplier Charge</Name>

<Value>0.00 GBP</Value>

</SupplierConfirmationDataItem>

</SupplierConfirmationDataItemList>

</CheckBookingCancelPlane>

</CommandList>

The table below explains how the statuses of the three bookings (the original plus the two new ones) change as a function of the Status returned in this response.