TravelCaster API - Flights - RePriceBooking operation
Back to Flights home.
Use this operation to re-price an existing confirmed booking against the current fares available from the provider. The operation returns updated booking data (fare, payments) reflecting the new price. If a threshold is provided, the re-price will only succeed when the new total does not exceed the current total by more than the threshold amount.
This operation is available from API version 1.7 on.
Request
JSON
http://endpoint/api/version/FlightService.json/RePriceBooking
url-encoded parameter: rePriceBooking([request])
returns: FlightRetrieveResponse
WebService
http://endpoint/api/version/FlightService.asmx
operation: RePriceBooking
parameters: rePriceBooking ([request])
returns: FlightRetrieveResponse
Structure of the RePriceBooking object
RePriceBooking
|_ Token
|_ TransactionID
|_ BookingNumber (string - booking number to re-price)
|_ ThresholdAmount (decimal - maximum fare increase you are willing to accept; set to 0 (default) to reject any increase - the reprice fails if the new total is higher than the current total)
|_ ThresholdCurrency (string - currency of the threshold amount, e.g. USD, EUR; required only when ThresholdAmount is greater than zero)
|_ UpdatePayment (bool - set to true to try to adjust the booking payment to match the new fare if the price went up)
Structure of the RePriceBookingResponse object
The response is a FlightRetrieveResponse object. See the RetrieveBooking operation for the full response structure.
The fields most relevant after a re-price are:
RePriceBookingResponse (FlightRetrieveResponse)
|_ Token
|_ TransactionID
|_ TransactionCode
|_ TransactionMessage
|
|_ BookingNumber
|_ BookingFare (FlightFare object - updated with the new fare amounts)
|_ Payments (array of BookingPaymentInformation - updated if UpdatePayment was true)
Notes
ThresholdAmount sets the maximum price increase the caller accepts for the whole booking.
- When
ThresholdAmountis zero (the default), no increase is allowed: the operation fails withTransactionCode2704if the new total is higher than the current total. A new total that is equal to or lower than the current total still succeeds. - When
ThresholdAmountis greater than zero, the operation will fail withTransactionCode2704only if the new total exceeds the current total by more than the specified amount.ThresholdCurrencymust be supplied alongside a positiveThresholdAmount. - When
ThresholdAmountis negative, the request is rejected withTransactionCode2702.
The booking must be in Confirmed status to be repriced; otherwise the request is rejected with TransactionCode 2703.
UpdatePayment, when set to true, instructs the system to try to update the booking's single FARE payment to the new repriced amount, but only when the repriced total is higher than the currently registered payment. It has no effect when the new price is equal to or lower than the existing payment.
Transaction status
- TransactionCode:
null= re-price succeeded, any other value = error (see Transaction Codes) - TransactionMessage: Additional error details when TransactionCode is not null
Back to Flights home.