The flight prebook call performs any prebooking necessary for the flight and also requests and sets baggage and extra information for the flight ready for booking.
The booking token from the flight search results is needed in the prebook as it has a summary of the flight details that the API needs. The detailed structures of the prebook request and response calls are given below.
The first time the prebook is performed a list of all the available extras is provided in the Extras section of the response with the default baggage indicated.
To select baggage (or extras) simply enter the ExtraBookingToken returned for that extra with the quantity required into the request. You will then see the quantity selected shown in the response. The token will now contain the details of the extra and is ready for use in the BasketBook call.
The baggage must be entered into the prebook request otherwise it will not be selected. If no baggage or extras are required then only one prebook is required.
The structure of this XML will be the following
The structure of the XML will be:
<FlightPreBookRequest>
<LoginDetails>
<Login>Login</Login>
<Password>Password</Password>
</LoginDetails>
<BookingToken>...</BookingToken>
</FlightPreBookRequest>
<FlightPreBookResponse>
<ReturnStatus>
<Success>true</Success>
<Exceptions />
</ReturnStatus>
<BookingToken>...</BookingToken>
<TotalPrice>125.21</TotalPrice>
<DifferenceSeatPrice>0</DifferenceSeatPrice>
<DifferencePrice>0.01</DifferencePrice>
<TotalCommission>0</TotalCommission>
<VATOnCommission>0</VATOnCommission>
<TotalInfantCost>0</TotalInfantCost>
<AdditionalSupplierCosts>0</AdditionalSupplierCosts>
<Extras>
<Extra>
<ExtraBookingToken>ZCZ+A8V3hMQ=</ExtraBookingToken>
<ExtraType>Baggage</ExtraType>
<Description>New bag charge - Web/Call Sales</Description>
<IsDefaultBaggage>true</IsDefaultBaggage>
<CostingBasis>Per Passenger</CostingBasis>
<Price>20.00</Price>
<QuantityAvailable>6</QuantityAvailable>
<QuantitySelected>0</QuantitySelected>
</Extra>
</Extras>
<FlightErrata />
<CreditCardSurcharges>
<CreditCardSurcharge>
<CreditCardTypeID>1</CreditCardTypeID>
<Amount>3.05</Amount>
</CreditCardSurcharge>
<CreditCardSurcharge>
<CreditCardTypeID>4</CreditCardTypeID>
<Amount>0</Amount>
</CreditCardSurcharge>
</CreditCardSurcharges>
<Cancellations>
<Cancellation>
<StartDate>2013-10-22T00:00:00</StartDate>
<EndDate>2099-12-31T00:00:00</EndDate>
<Amount>0.0</Amount>
</Cancellation>
</Cancellations>
<PaymentsDue>
<PaymentDue>
<Amount>0.0</Amount>
<DateDue>2013-10-22T00:00:00</DateDue>
</PaymentDue>
</PaymentsDue>
</FlightPreBookResponse>
<FlightPreBookRequest>
<LoginDetails>
<Login>Login</Login>
<Password>Password</Password>
</LoginDetails>
<BookingToken>...</BookingToken>
<Extras>
<Extra>
<ExtraBookingToken>ZCZ+A8V3hMQ=</ExtraBookingToken>
<Quantity>1</Quantity>
</Extra>
</Extras>
</FlightPreBookRequest>
<FlightPreBookResponse>
<ReturnStatus>
<Success>true</Success>
<Exceptions />
</ReturnStatus>
<BookingToken>...</BookingToken>
<TotalPrice>167.57</TotalPrice>
<DifferenceSeatPrice>0</DifferenceSeatPrice>
<DifferencePrice>20.50</DifferencePrice>
<TotalCommission>0</TotalCommission>
<VATOnCommission>0</VATOnCommission>
<TotalInfantCost>0</TotalInfantCost>
<AdditionalSupplierCosts>23.00</AdditionalSupplierCosts>
<Extras>
<Extra>
<ExtraBookingToken>ZCZ+A8V3hMQ=</ExtraBookingToken>
<ExtraType>Baggage</ExtraType>
<Description>New bag charge - Web/Call Sales</Description>
<IsDefaultBaggage>true</IsDefaultBaggage>
<CostingBasis>Per Passenger</CostingBasis>
<Price>23.00</Price>
<QuantityAvailable>6</QuantityAvailable>
<QuantitySelected>1</QuantitySelected>
</Extra>
</Extras>
<FlightErrata />
<CreditCardSurcharges>
<CreditCardSurcharge>
<CreditCardTypeID>1</CreditCardTypeID>
<Amount>4.08</Amount>
</CreditCardSurcharge>
<CreditCardSurcharge>
<CreditCardTypeID>4</CreditCardTypeID>
<Amount>0</Amount>
</CreditCardSurcharge>
</CreditCardSurcharges>
<Cancellations>
<Cancellation>
<StartDate>2013-10-22T00:00:00</StartDate>
<EndDate>2099-12-31T00:00:00</EndDate>
<Amount>0</Amount>
</Cancellation>
</Cancellations>
<PaymentsDue>
<PaymentDue>
<Amount>0</Amount>
<DateDue>2013-10-22T00:00:00</DateDue>
</PaymentDue>
</PaymentsDue>
<TermsAndConditions>Please read the terms and conditions</TermsAndConditions>
<TermsAndConditionsURL>http://www.terms.co.uk/terms</TermsAndConditions>
</FlightPreBookResponse>
To Book Seats, a first FlightPrebookRequest needs to be sent with SeatMaps set to true in the request. The response will return an array of seats available to be booked on each Flight, each seat will have a unique Booking Token. A second FlightPrebookRequest then needs to be sent with the FlightBookingSeatToken passed in the ExtraBookingToken field for each seat desired to be booked.
<FlightPreBookRequest>
<LoginDetails>
<Login>Login</Login>
<Password>Password</Password>
</LoginDetails>
<BookingToken>...</BookingToken>
<Extras>
<Extra>
<ExtraBookingToken>gAMPtF+ZED6JqpOplBq4xrcBzLPcKturZcag2eVSCtzTDpFDADpX69</ExtraBookingToken>
<Quantity>1</Quantity>
<RequestedExtraType>Seat</RequestedExtraType>
<GuestID>1</GuestID>
</Extra>
<Extra>
<ExtraBookingToken>gAMPtF+ZED6JqpOplBq4xtoAp9baTl3zKoezc5jLkaRLELbIoBn3k</ExtraBookingToken>
<Quantity>1</Quantity>
<RequestedExtraType>Seat</RequestedExtraType>
<GuestID>1</GuestID>
</Extra>
</Extras>
<SeatMaps>true</SeatMaps>
</FlightPreBookRequest>
<FlightPreBookResponse>
<ReturnStatus>
<Success>true</Success>
<Exceptions />
</ReturnStatus>
<BookingToken>...</BookingToken>
<TotalPrice>167.57</TotalPrice>
<DifferenceSeatPrice>0</DifferenceSeatPrice>
<DifferencePrice>20.50</DifferencePrice>
<TotalCommission>0</TotalCommission>
<VATOnCommission>0</VATOnCommission>
<TotalInfantCost>0</TotalInfantCost>
<AdditionalSupplierCosts>23.00</AdditionalSupplierCosts>
<Extras>
<Extra>
<ExtraBookingToken>ZCZ+A8V3hMQ=</ExtraBookingToken>
<ExtraType>Baggage</ExtraType>
<Description>New bag charge - Web/Call Sales</Description>
<IsDefaultBaggage>true</IsDefaultBaggage>
<CostingBasis>Per Passenger</CostingBasis>
<Price>23.00</Price>
<QuantityAvailable>6</QuantityAvailable>
<QuantitySelected>1</QuantitySelected>
</Extra>
</Extras>
<FlightErrata />
<CreditCardSurcharges>
<CreditCardSurcharge>
<CreditCardTypeID>1</CreditCardTypeID>
<Amount>4.08</Amount>
</CreditCardSurcharge>
<CreditCardSurcharge>
<CreditCardTypeID>4</CreditCardTypeID>
<Amount>0</Amount>
</CreditCardSurcharge>
</CreditCardSurcharges>
<Cancellations>
<Cancellation>
<StartDate>2013-10-22T00:00:00</StartDate>
<EndDate>2099-12-31T00:00:00</EndDate>
<Amount>0</Amount>
</Cancellation>
</Cancellations>
<PaymentsDue>
<PaymentDue>
<Amount>0</Amount>
<DateDue>2013-10-22T00:00:00</DateDue>
</PaymentDue>
</PaymentsDue>
<TermsAndConditions>Please read the terms and conditions</TermsAndConditions>
<TermsAndConditionsURL>http://www.terms.co.uk/terms</TermsAndConditions>
<SeatMaps>
<SeatMap>
<Direction>Outbound</Direction>
<Seq>1</Seq>
<Rows>
<Row>
<RowNumber>1</RowNumber>
<Columns>
<Column>
<FlightBookingSeatToken>gAMPtF+ZED6JqpOplBq4xrcB</FlightBookingSeatToken>
<ExtraType>Seat</ExtraType>
<SeatReference>1A</SeatReference>
<Price>30.5</Price>
<QuantityAvailable>1</QuantityAvailable>
<QuantitySelected>1</QuantitySelected>
<InfantAllowed>false</InfantAllowed>
<Attributes>
<Attribute>Extraleg</Attribute>
<Attribute>ExitRow</Attribute>
<Attribute>Restricted</Attribute>
</Attributes>
</Column>
...
</Columns>
</Row>
...
<Rows>
</SeatMap>
</SeatMaps>
</FlightPreBookResponse>