XML Search and Booking

This guide is designed to give a quick start to your integration with the TRAVELfusion API. In the XML examples below, various XML elements and attributes have been omitted for simplicity. There are also many more details, features and functions available that you can read about in our Detailed Specification. The detailed specification also sets out specific guidelines concerning how the API should be used and gives various other information that should be read before your integration is completed and released to end users.

Step 1: Connection

Please refer to Step 1 of the XML Search with Booking Completion on Supplier Website guide.

Step 2: Submitting the search request

Please refer to Step 2 of the XML Search with Booking Completion on Supplier Website guide.

Step 3: Submitting the results request

Please refer to Step 3 of the XML Search with Booking Completion on Supplier Website guide.

Step 4: Selecting a flight for booking

Once the end user has decided which flight they would like to book, a ProcessDetails XML request should be made to begin the booking process. In the example, notice the HandoffParametersOnly element must be set to 'false' and note that the OutwardId corresponds ot the id of the first British Airways outward result in the example CheckRouting response in step 3. In the case of a return journey, a ReturnId must also be submitted after the OutwardId which will identify the chosen return flight (which must be in the same Group as the outward selection).

       
ProcessDetails request XML example:

The ProcessDetails response can normally be ignored. However it may contain a Router element which will contain any new data related to the flight/ price. This is used to handle special cases where the supplier only supplies certain information after a flight has been submitted. For example, some suppliers may not supply the flight number until a specific flight has been chosen.

       
ProcessDetails response XML example:


Step 5: Submitting the booking details

The ProcessTerms XML request is used to submit the travellers' details and credit card details. See the ProcessTerms request specification in the Detailed Specification for more details of the booking profile.

       
ProcessTerms request XML example:

The response will contain a TFBookingReference element. This is the TRAVELfusion booking reference for this booking (note that the booking is not actually executed until the StartBooking request is submitted). A Router is also returned which will contain any new data related to the flight/ price. For example in the XML below, a 'Credit card surcharge' is returned which was not known until this stage since it depends upon the card type. Note that the XML below is for an easyjet flight and is not related to the previous examples. See the Detailed XML Specification for more details of the terms request/ response and the handling of bookings in general.

       
ProcessTerms response XML example:


Step 6: Starting the booking

The StartBooking XML request is used to execute the booking. The TFBookingReference should have the value returned in the previous ProcessTerms response. The FakeBooking element is used for development purposes to request a simulated booking. If the FakeBooking element is omitted, a real booking will be made. See the Detailed Specification for more details of fake bookings and booking handling in general.

       
StartBooking request XML example:

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

       
StartBooking response XML example:


Step 7: Retrieving the booking status

The CheckBooking XML request is used to get the latest status of the booking. The TFBookingReference should have the value returned in the previous ProcessTerms response.

       
CheckBooking request XML example:

The CheckBooking response returns the latest status of the booking. While TRAVELfusion is waiting for a response from the supplier, the status will be 'BookingInProgress'. In this case the CheckBooking request should be resubmitted after a few seconds delay.

       
CheckBooking response XML example while booking is still in progress:

In some cases, the supplier may require special verification of the credit card. This involves forwarding the customer to a URL operated by the card issuer (visa/ mastercard etc). The user then enters a password on the card issuer's website and is returned to a specified URL. The mechanics of this process are explained in detail in the Card Verification Handling Guide.

Once the booking has been completed, the CheckBooking response will contain a different status. For a successful booking the status will be 'Succeeded' and the supplier's booking reference will be returned. A failed booking will have status 'Failed'. There are also situations where the booking has completed but the status is uncertain. For more details of how to handle these cases and bookings in general, please see the Detailed Specification, with particular reference to the Booking handling guide.

       
CheckBooking response XML example once booking is complete:

About TRAVELfusion | Contact Our API Support Team | Latest API Change - 2nd January