Migrating API Version from v1 to v2
Refresher on API versions
From v1 to v2
Duffel-Version
header in your requests from Duffel-Version: v1
to Duffel-Version: v2
.Flights Order airline-initiated changes (AIC)
Conditions are an object instead of a list
added.conditions
and removed.conditions
on airline-initiated changes were previously list
s and are now object
s, to match Order slice conditions.Pared down webhook event payload
order.airline_initiated_change_detected
event data no longer includes the changes
field.
Use data.object.id
to get more information by listing the AICs for the order and finding the one matching data.object.aic_id
.Flights Order cancellation can have null amount and currency
refund_amount
and refund_currency
can be null in cases where the refund amount is unknown. This only applies in cases where we are unable to get a refund quote from the carrier, and does not apply to any of the carriers where cancellation is supported in v1.Previously deprecated fields have been removed
Flights Offer
accepted_loyalty_programmes
removed in favour ofsupported_loyalty_programmes
allowed_passenger_identity_document_types
removed in favour ofsupported_passenger_identity_document_types
Flights Create Order
passengers.type
removed
Flights Order
slices.changeable
removed in favour of the top-levelavailable_actions
slices.segments.arrival_datetime
removed in favour ofslices.segments.arriving_at
slices.segments.arrival_terminal
removed in favour ofslices.segments.destination_terminal
slices.segments.departure_datetime
removed in favour ofslices.segments.departing_at
slices.segments.departure_terminal
removed in favour ofslices.segments.origin_terminal
Caution
Stays Accommodation
cheapest_rate_currency
removed from the Accommodation and moved to Search Resultcheapest_rate_total_amount
removed from the Accommodation and moved to Search Result
Stays Booking
key_collection
removed from Booking and moved to Accommodation
Stays Quote
adults
removed in favour ofguests
card_component_key
removed in favour of the/identity/component_client_keys
endpoint
Stays Rate
payment_method
removed in favour ofavailable_payment_methods
Stays Search Request
adults
removed in favour ofguests
Stays Search Result
adults
removed in favour ofguests
Cards Request
save
removed in favour ofmulti_use
Cards Response
saved
removed in favour ofmulti_use
Places Suggestion
name
removed in favour ofquery