Order Changes
Once you've created an order change request, and you've chosen which slices to add and remove, you'll then want to create an order change.
To create an order change, you just need to provide the order change offer ID.
If change_total_amount
is greater than zero, you will
need to provide payment details when confirming the change.
If change_total_amount
is less than zero, this amount
will be returned to the payment method specified by refund_to
.
Schema
The currency of the change_total_amount
, as an ISO 4217 currency code.
It will match your organisation's billing currency unless you’re using Duffel as an accredited IATA agent, in which case it will be in the currency provided by the airline (which will usually be based on the country where your IATA agency is registered).
"GBP"
The ISO 8601 datetime that indicates when the order change was confirmed
"2020-01-17T11:51:43.114803Z"
The ISO 8601 datetime at which the order change was created
"2020-04-11T15:48:11.642Z"
The ISO 8601 datetime by which this change must be confirmed
"2020-01-17T10:42:14.545052Z"
The currency of the new_total_amount
, as an ISO 4217 currency code.
It will match your organisation's billing currency unless you’re using Duffel as an accredited IATA agent, in which case it will be in the currency provided by the airline (which will usually be based on the country where your IATA agency is registered).
"GBP"
The currency of the penalty_total_amount
, as an ISO 4217 currency code.
It will match your organisation's billing currency unless you’re using Duffel as an accredited IATA agent, in which case it will be in the currency provided by the airline (which will usually be based on the country where your IATA agency is registered).
"GBP"
Where the refund, once confirmed, will be sent. Refunds are indicated by a negative change_total_amount
. If the change does not require a refund, this field will be null
.
original_form_of_payment
refers to the form of payment used to create the order.
"voucher"
or "original_form_of_payment"
Confirm an order change
Once you've created a pending order change, you'll know the
change_total_amount
due for the change.
To actually change the order, you'll need to confirm the change. The
booking with the airline will be updated with the new slice you previously
chose, and the change_total_amount
will be charged to your
specific payment type.
If the amount of change_total_amount
is negative, then this will be
returned to the refund_to
method (e.g. your Duffel balance). You'll then
need to refund your customer (e.g. back to their credit/debit card).
POST https://api.duffel.com/air/order_changes/{id}/actions/confirm
curl -X POST --compressed "https://api.duffel.com/air/order_changes/{id}/actions/confirm" \-H "Accept-Encoding: gzip" \-H "Accept: application/json" \-H "Duffel-Version: v2" \-H "Authorization: Bearer <YOUR_ACCESS_TOKEN>" \-d '{"data": {"payment": {"type": "balance","three_d_secure_session_id": "3ds_0000AWr2XsTRIF1Vp34gh5","currency": "GBP","amount": "30.20"}}}'
{"data": {"slices": {"remove": [{"segments": [{"passengers": [{"seat": {"name": "Exit row seat","disclosures": ["Do not seat children in exit row seats","Do not seat passengers with special needs in exit row seats"],"designator": "14B"},"passenger_id": "passenger_0","cabin_class_marketing_name": "Economy Basic","cabin_class": "economy","baggages": [{"type": "checked","quantity": 1}]}],"origin_terminal": "B","origin": {"time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR","iata_city_code": "LON","city_name": "London","city": {"name": "London","id": "cit_lon_gb","iata_country_code": "GB","iata_code": "LON","airports": [{"time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR"}]}},"operating_carrier_flight_number": "4321","operating_carrier": {"name": "British Airways","logo_symbol_url": "https://assets.duffel.com/img/airlines/for-light-background/full-color-logo/BA.svg","logo_lockup_url": "https://assets.duffel.com/img/airlines/for-light-background/full-color-lockup/BA.svg","id": "arl_00001876aqC8c5umZmrRds","iata_code": "BA","conditions_of_carriage_url": "https://www.britishairways.com/en-gb/information/legal/british-airways/general-conditions-of-carriage"},"marketing_carrier_flight_number": "1234","marketing_carrier": {"name": "British Airways","logo_symbol_url": "https://assets.duffel.com/img/airlines/for-light-background/full-color-logo/BA.svg","logo_lockup_url": "https://assets.duffel.com/img/airlines/for-light-background/full-color-lockup/BA.svg","id": "arl_00001876aqC8c5umZmrRds","iata_code": "BA","conditions_of_carriage_url": "https://www.britishairways.com/en-gb/information/legal/british-airways/general-conditions-of-carriage"},"id": "seg_00009htYpSCXrwaB9Dn456","duration": "PT02H26M","distance": "424.2","destination_terminal": "5","destination": {"time_zone": "America/New_York","name": "John F. Kennedy International Airport","longitude": -73.778519,"latitude": 40.640556,"id": "arp_jfk_us","icao_code": "KJFK","iata_country_code": "US","iata_code": "JFK","iata_city_code": "NYC","city_name": "New York","city": {"name": "New York","id": "cit_nyc_us","iata_country_code": "US","iata_code": "NYC"}},"departing_at": "2020-06-13T16:38:02","arriving_at": "2020-06-13T16:38:02","aircraft": {"name": "Airbus Industries A380","id": "arc_00009UhD4ongolulWd91Ky","iata_code": "380"}}],"origin_type": "airport","origin": {"type": "airport","time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR","iata_city_code": "LON","city_name": "London","city": {"name": "London","id": "cit_lon_gb","iata_country_code": "GB","iata_code": "LON","airports": [{"time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR"}]},"airports": [{"time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR","iata_city_code": "LON","city_name": "London","city": {"name": "London","id": "cit_lon_gb","iata_country_code": "GB","iata_code": "LON","airports": [{"time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR"}]}}]},"id": "sli_00009htYpSCXrwaB9Dn123","fare_brand_name": "Basic","duration": "PT02H26M","destination_type": "airport","destination": {"type": "airport","time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR","iata_city_code": "LON","city_name": "London","city": {"name": "London","id": "cit_lon_gb","iata_country_code": "GB","iata_code": "LON","airports": [{"time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR"}]},"airports": [{"time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR","iata_city_code": "LON","city_name": "London","city": {"name": "London","id": "cit_lon_gb","iata_country_code": "GB","iata_code": "LON","airports": [{"time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR"}]}}]}}],"add": [{"segments": [{"passengers": [{"seat": {"name": "Exit row seat","disclosures": ["Do not seat children in exit row seats","Do not seat passengers with special needs in exit row seats"],"designator": "14B"},"passenger_id": "passenger_0","cabin_class_marketing_name": "Economy Basic","cabin_class": "economy","baggages": [{"type": "checked","quantity": 1}]}],"origin_terminal": "B","origin": {"time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR","iata_city_code": "LON","city_name": "London","city": {"name": "London","id": "cit_lon_gb","iata_country_code": "GB","iata_code": "LON","airports": [{"time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR"}]}},"operating_carrier_flight_number": "4321","operating_carrier": {"name": "British Airways","logo_symbol_url": "https://assets.duffel.com/img/airlines/for-light-background/full-color-logo/BA.svg","logo_lockup_url": "https://assets.duffel.com/img/airlines/for-light-background/full-color-lockup/BA.svg","id": "arl_00001876aqC8c5umZmrRds","iata_code": "BA","conditions_of_carriage_url": "https://www.britishairways.com/en-gb/information/legal/british-airways/general-conditions-of-carriage"},"marketing_carrier_flight_number": "1234","marketing_carrier": {"name": "British Airways","logo_symbol_url": "https://assets.duffel.com/img/airlines/for-light-background/full-color-logo/BA.svg","logo_lockup_url": "https://assets.duffel.com/img/airlines/for-light-background/full-color-lockup/BA.svg","id": "arl_00001876aqC8c5umZmrRds","iata_code": "BA","conditions_of_carriage_url": "https://www.britishairways.com/en-gb/information/legal/british-airways/general-conditions-of-carriage"},"id": "seg_00009htYpSCXrwaB9Dn456","duration": "PT02H26M","distance": "424.2","destination_terminal": "5","destination": {"time_zone": "America/New_York","name": "John F. Kennedy International Airport","longitude": -73.778519,"latitude": 40.640556,"id": "arp_jfk_us","icao_code": "KJFK","iata_country_code": "US","iata_code": "JFK","iata_city_code": "NYC","city_name": "New York","city": {"name": "New York","id": "cit_nyc_us","iata_country_code": "US","iata_code": "NYC"}},"departing_at": "2020-06-13T16:38:02","arriving_at": "2020-06-13T16:38:02","aircraft": {"name": "Airbus Industries A380","id": "arc_00009UhD4ongolulWd91Ky","iata_code": "380"}}],"origin_type": "airport","origin": {"type": "airport","time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR","iata_city_code": "LON","city_name": "London","city": {"name": "London","id": "cit_lon_gb","iata_country_code": "GB","iata_code": "LON","airports": [{"time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR"}]},"airports": [{"time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR","iata_city_code": "LON","city_name": "London","city": {"name": "London","id": "cit_lon_gb","iata_country_code": "GB","iata_code": "LON","airports": [{"time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR"}]}}]},"id": "sli_00009htYpSCXrwaB9Dn123","fare_brand_name": "Basic","duration": "PT02H26M","destination_type": "airport","destination": {"type": "airport","time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR","iata_city_code": "LON","city_name": "London","city": {"name": "London","id": "cit_lon_gb","iata_country_code": "GB","iata_code": "LON","airports": [{"time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR"}]},"airports": [{"time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR","iata_city_code": "LON","city_name": "London","city": {"name": "London","id": "cit_lon_gb","iata_country_code": "GB","iata_code": "LON","airports": [{"time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR"}]}}]}}]},"refund_to": "voucher","penalty_total_currency": "GBP","penalty_total_amount": "15.50","order_id": "ord_0000A3tQcCRZ9R8OY0QlxA","new_total_currency": "GBP","new_total_amount": "121.30","live_mode": false,"id": "ocr_0000A3tQSmKyqOrcySrGbo","expires_at": "2020-01-17T10:42:14.545052Z","created_at": "2020-04-11T15:48:11.642Z","confirmed_at": "2020-01-17T11:51:43.114803Z","change_total_currency": "GBP","change_total_amount": "30.50"}}
GET https://api.duffel.com/air/order_changes/{id}
curl -X GET --compressed "https://api.duffel.com/air/order_changes/{id}" \-H "Accept-Encoding: gzip" \-H "Accept: application/json" \-H "Duffel-Version: v2" \-H "Authorization: Bearer <YOUR_ACCESS_TOKEN>"
{"data": {"slices": {"remove": [{"segments": [{"passengers": [{"seat": {"name": "Exit row seat","disclosures": ["Do not seat children in exit row seats","Do not seat passengers with special needs in exit row seats"],"designator": "14B"},"passenger_id": "passenger_0","cabin_class_marketing_name": "Economy Basic","cabin_class": "economy","baggages": [{"type": "checked","quantity": 1}]}],"origin_terminal": "B","origin": {"time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR","iata_city_code": "LON","city_name": "London","city": {"name": "London","id": "cit_lon_gb","iata_country_code": "GB","iata_code": "LON","airports": [{"time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR"}]}},"operating_carrier_flight_number": "4321","operating_carrier": {"name": "British Airways","logo_symbol_url": "https://assets.duffel.com/img/airlines/for-light-background/full-color-logo/BA.svg","logo_lockup_url": "https://assets.duffel.com/img/airlines/for-light-background/full-color-lockup/BA.svg","id": "arl_00001876aqC8c5umZmrRds","iata_code": "BA","conditions_of_carriage_url": "https://www.britishairways.com/en-gb/information/legal/british-airways/general-conditions-of-carriage"},"marketing_carrier_flight_number": "1234","marketing_carrier": {"name": "British Airways","logo_symbol_url": "https://assets.duffel.com/img/airlines/for-light-background/full-color-logo/BA.svg","logo_lockup_url": "https://assets.duffel.com/img/airlines/for-light-background/full-color-lockup/BA.svg","id": "arl_00001876aqC8c5umZmrRds","iata_code": "BA","conditions_of_carriage_url": "https://www.britishairways.com/en-gb/information/legal/british-airways/general-conditions-of-carriage"},"id": "seg_00009htYpSCXrwaB9Dn456","duration": "PT02H26M","distance": "424.2","destination_terminal": "5","destination": {"time_zone": "America/New_York","name": "John F. Kennedy International Airport","longitude": -73.778519,"latitude": 40.640556,"id": "arp_jfk_us","icao_code": "KJFK","iata_country_code": "US","iata_code": "JFK","iata_city_code": "NYC","city_name": "New York","city": {"name": "New York","id": "cit_nyc_us","iata_country_code": "US","iata_code": "NYC"}},"departing_at": "2020-06-13T16:38:02","arriving_at": "2020-06-13T16:38:02","aircraft": {"name": "Airbus Industries A380","id": "arc_00009UhD4ongolulWd91Ky","iata_code": "380"}}],"origin_type": "airport","origin": {"type": "airport","time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR","iata_city_code": "LON","city_name": "London","city": {"name": "London","id": "cit_lon_gb","iata_country_code": "GB","iata_code": "LON","airports": [{"time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR"}]},"airports": [{"time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR","iata_city_code": "LON","city_name": "London","city": {"name": "London","id": "cit_lon_gb","iata_country_code": "GB","iata_code": "LON","airports": [{"time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR"}]}}]},"id": "sli_00009htYpSCXrwaB9Dn123","fare_brand_name": "Basic","duration": "PT02H26M","destination_type": "airport","destination": {"type": "airport","time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR","iata_city_code": "LON","city_name": "London","city": {"name": "London","id": "cit_lon_gb","iata_country_code": "GB","iata_code": "LON","airports": [{"time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR"}]},"airports": [{"time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR","iata_city_code": "LON","city_name": "London","city": {"name": "London","id": "cit_lon_gb","iata_country_code": "GB","iata_code": "LON","airports": [{"time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR"}]}}]}}],"add": [{"segments": [{"passengers": [{"seat": {"name": "Exit row seat","disclosures": ["Do not seat children in exit row seats","Do not seat passengers with special needs in exit row seats"],"designator": "14B"},"passenger_id": "passenger_0","cabin_class_marketing_name": "Economy Basic","cabin_class": "economy","baggages": [{"type": "checked","quantity": 1}]}],"origin_terminal": "B","origin": {"time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR","iata_city_code": "LON","city_name": "London","city": {"name": "London","id": "cit_lon_gb","iata_country_code": "GB","iata_code": "LON","airports": [{"time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR"}]}},"operating_carrier_flight_number": "4321","operating_carrier": {"name": "British Airways","logo_symbol_url": "https://assets.duffel.com/img/airlines/for-light-background/full-color-logo/BA.svg","logo_lockup_url": "https://assets.duffel.com/img/airlines/for-light-background/full-color-lockup/BA.svg","id": "arl_00001876aqC8c5umZmrRds","iata_code": "BA","conditions_of_carriage_url": "https://www.britishairways.com/en-gb/information/legal/british-airways/general-conditions-of-carriage"},"marketing_carrier_flight_number": "1234","marketing_carrier": {"name": "British Airways","logo_symbol_url": "https://assets.duffel.com/img/airlines/for-light-background/full-color-logo/BA.svg","logo_lockup_url": "https://assets.duffel.com/img/airlines/for-light-background/full-color-lockup/BA.svg","id": "arl_00001876aqC8c5umZmrRds","iata_code": "BA","conditions_of_carriage_url": "https://www.britishairways.com/en-gb/information/legal/british-airways/general-conditions-of-carriage"},"id": "seg_00009htYpSCXrwaB9Dn456","duration": "PT02H26M","distance": "424.2","destination_terminal": "5","destination": {"time_zone": "America/New_York","name": "John F. Kennedy International Airport","longitude": -73.778519,"latitude": 40.640556,"id": "arp_jfk_us","icao_code": "KJFK","iata_country_code": "US","iata_code": "JFK","iata_city_code": "NYC","city_name": "New York","city": {"name": "New York","id": "cit_nyc_us","iata_country_code": "US","iata_code": "NYC"}},"departing_at": "2020-06-13T16:38:02","arriving_at": "2020-06-13T16:38:02","aircraft": {"name": "Airbus Industries A380","id": "arc_00009UhD4ongolulWd91Ky","iata_code": "380"}}],"origin_type": "airport","origin": {"type": "airport","time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR","iata_city_code": "LON","city_name": "London","city": {"name": "London","id": "cit_lon_gb","iata_country_code": "GB","iata_code": "LON","airports": [{"time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR"}]},"airports": [{"time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR","iata_city_code": "LON","city_name": "London","city": {"name": "London","id": "cit_lon_gb","iata_country_code": "GB","iata_code": "LON","airports": [{"time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR"}]}}]},"id": "sli_00009htYpSCXrwaB9Dn123","fare_brand_name": "Basic","duration": "PT02H26M","destination_type": "airport","destination": {"type": "airport","time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR","iata_city_code": "LON","city_name": "London","city": {"name": "London","id": "cit_lon_gb","iata_country_code": "GB","iata_code": "LON","airports": [{"time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR"}]},"airports": [{"time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR","iata_city_code": "LON","city_name": "London","city": {"name": "London","id": "cit_lon_gb","iata_country_code": "GB","iata_code": "LON","airports": [{"time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR"}]}}]}}]},"refund_to": "voucher","penalty_total_currency": "GBP","penalty_total_amount": "15.50","order_id": "ord_0000A3tQcCRZ9R8OY0QlxA","new_total_currency": "GBP","new_total_amount": "121.30","live_mode": false,"id": "ocr_0000A3tQSmKyqOrcySrGbo","expires_at": "2020-01-17T10:42:14.545052Z","created_at": "2020-04-11T15:48:11.642Z","confirmed_at": "2020-01-17T11:51:43.114803Z","change_total_currency": "GBP","change_total_amount": "30.50"}}
Create a pending order change
To begin the process of changing an order you need to create an order change.
The OrderChange will contain the selected_order_change_offer
reference of the change you wish to make to your order.
To proceed, you must confirm the change using the Confirm an order change endpoint.
POST https://api.duffel.com/air/order_changes
curl -X POST --compressed "https://api.duffel.com/air/order_changes" \-H "Accept-Encoding: gzip" \-H "Accept: application/json" \-H "Content-Type: application/json" \-H "Duffel-Version: v2" \-H "Authorization: Bearer <YOUR_ACCESS_TOKEN>" \-d '{"data": {"selected_order_change_offer": "oco_0000A4QasEUIjJ6jHKfhHU"}}'
{"data": {"slices": {"remove": [{"segments": [{"passengers": [{"seat": {"name": "Exit row seat","disclosures": ["Do not seat children in exit row seats","Do not seat passengers with special needs in exit row seats"],"designator": "14B"},"passenger_id": "passenger_0","cabin_class_marketing_name": "Economy Basic","cabin_class": "economy","baggages": [{"type": "checked","quantity": 1}]}],"origin_terminal": "B","origin": {"time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR","iata_city_code": "LON","city_name": "London","city": {"name": "London","id": "cit_lon_gb","iata_country_code": "GB","iata_code": "LON","airports": [{"time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR"}]}},"operating_carrier_flight_number": "4321","operating_carrier": {"name": "British Airways","logo_symbol_url": "https://assets.duffel.com/img/airlines/for-light-background/full-color-logo/BA.svg","logo_lockup_url": "https://assets.duffel.com/img/airlines/for-light-background/full-color-lockup/BA.svg","id": "arl_00001876aqC8c5umZmrRds","iata_code": "BA","conditions_of_carriage_url": "https://www.britishairways.com/en-gb/information/legal/british-airways/general-conditions-of-carriage"},"marketing_carrier_flight_number": "1234","marketing_carrier": {"name": "British Airways","logo_symbol_url": "https://assets.duffel.com/img/airlines/for-light-background/full-color-logo/BA.svg","logo_lockup_url": "https://assets.duffel.com/img/airlines/for-light-background/full-color-lockup/BA.svg","id": "arl_00001876aqC8c5umZmrRds","iata_code": "BA","conditions_of_carriage_url": "https://www.britishairways.com/en-gb/information/legal/british-airways/general-conditions-of-carriage"},"id": "seg_00009htYpSCXrwaB9Dn456","duration": "PT02H26M","distance": "424.2","destination_terminal": "5","destination": {"time_zone": "America/New_York","name": "John F. Kennedy International Airport","longitude": -73.778519,"latitude": 40.640556,"id": "arp_jfk_us","icao_code": "KJFK","iata_country_code": "US","iata_code": "JFK","iata_city_code": "NYC","city_name": "New York","city": {"name": "New York","id": "cit_nyc_us","iata_country_code": "US","iata_code": "NYC"}},"departing_at": "2020-06-13T16:38:02","arriving_at": "2020-06-13T16:38:02","aircraft": {"name": "Airbus Industries A380","id": "arc_00009UhD4ongolulWd91Ky","iata_code": "380"}}],"origin_type": "airport","origin": {"type": "airport","time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR","iata_city_code": "LON","city_name": "London","city": {"name": "London","id": "cit_lon_gb","iata_country_code": "GB","iata_code": "LON","airports": [{"time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR"}]},"airports": [{"time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR","iata_city_code": "LON","city_name": "London","city": {"name": "London","id": "cit_lon_gb","iata_country_code": "GB","iata_code": "LON","airports": [{"time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR"}]}}]},"id": "sli_00009htYpSCXrwaB9Dn123","fare_brand_name": "Basic","duration": "PT02H26M","destination_type": "airport","destination": {"type": "airport","time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR","iata_city_code": "LON","city_name": "London","city": {"name": "London","id": "cit_lon_gb","iata_country_code": "GB","iata_code": "LON","airports": [{"time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR"}]},"airports": [{"time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR","iata_city_code": "LON","city_name": "London","city": {"name": "London","id": "cit_lon_gb","iata_country_code": "GB","iata_code": "LON","airports": [{"time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR"}]}}]}}],"add": [{"segments": [{"passengers": [{"seat": {"name": "Exit row seat","disclosures": ["Do not seat children in exit row seats","Do not seat passengers with special needs in exit row seats"],"designator": "14B"},"passenger_id": "passenger_0","cabin_class_marketing_name": "Economy Basic","cabin_class": "economy","baggages": [{"type": "checked","quantity": 1}]}],"origin_terminal": "B","origin": {"time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR","iata_city_code": "LON","city_name": "London","city": {"name": "London","id": "cit_lon_gb","iata_country_code": "GB","iata_code": "LON","airports": [{"time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR"}]}},"operating_carrier_flight_number": "4321","operating_carrier": {"name": "British Airways","logo_symbol_url": "https://assets.duffel.com/img/airlines/for-light-background/full-color-logo/BA.svg","logo_lockup_url": "https://assets.duffel.com/img/airlines/for-light-background/full-color-lockup/BA.svg","id": "arl_00001876aqC8c5umZmrRds","iata_code": "BA","conditions_of_carriage_url": "https://www.britishairways.com/en-gb/information/legal/british-airways/general-conditions-of-carriage"},"marketing_carrier_flight_number": "1234","marketing_carrier": {"name": "British Airways","logo_symbol_url": "https://assets.duffel.com/img/airlines/for-light-background/full-color-logo/BA.svg","logo_lockup_url": "https://assets.duffel.com/img/airlines/for-light-background/full-color-lockup/BA.svg","id": "arl_00001876aqC8c5umZmrRds","iata_code": "BA","conditions_of_carriage_url": "https://www.britishairways.com/en-gb/information/legal/british-airways/general-conditions-of-carriage"},"id": "seg_00009htYpSCXrwaB9Dn456","duration": "PT02H26M","distance": "424.2","destination_terminal": "5","destination": {"time_zone": "America/New_York","name": "John F. Kennedy International Airport","longitude": -73.778519,"latitude": 40.640556,"id": "arp_jfk_us","icao_code": "KJFK","iata_country_code": "US","iata_code": "JFK","iata_city_code": "NYC","city_name": "New York","city": {"name": "New York","id": "cit_nyc_us","iata_country_code": "US","iata_code": "NYC"}},"departing_at": "2020-06-13T16:38:02","arriving_at": "2020-06-13T16:38:02","aircraft": {"name": "Airbus Industries A380","id": "arc_00009UhD4ongolulWd91Ky","iata_code": "380"}}],"origin_type": "airport","origin": {"type": "airport","time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR","iata_city_code": "LON","city_name": "London","city": {"name": "London","id": "cit_lon_gb","iata_country_code": "GB","iata_code": "LON","airports": [{"time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR"}]},"airports": [{"time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR","iata_city_code": "LON","city_name": "London","city": {"name": "London","id": "cit_lon_gb","iata_country_code": "GB","iata_code": "LON","airports": [{"time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR"}]}}]},"id": "sli_00009htYpSCXrwaB9Dn123","fare_brand_name": "Basic","duration": "PT02H26M","destination_type": "airport","destination": {"type": "airport","time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR","iata_city_code": "LON","city_name": "London","city": {"name": "London","id": "cit_lon_gb","iata_country_code": "GB","iata_code": "LON","airports": [{"time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR"}]},"airports": [{"time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR","iata_city_code": "LON","city_name": "London","city": {"name": "London","id": "cit_lon_gb","iata_country_code": "GB","iata_code": "LON","airports": [{"time_zone": "Europe/London","name": "Heathrow","longitude": -141.951519,"latitude": 64.068865,"id": "arp_lhr_gb","icao_code": "EGLL","iata_country_code": "GB","iata_code": "LHR"}]}}]}}]},"refund_to": "voucher","penalty_total_currency": "GBP","penalty_total_amount": "15.50","order_id": "ord_0000A3tQcCRZ9R8OY0QlxA","new_total_currency": "GBP","new_total_amount": "121.30","live_mode": false,"id": "ocr_0000A3tQSmKyqOrcySrGbo","expires_at": "2020-01-17T10:42:14.545052Z","created_at": "2020-04-11T15:48:11.642Z","confirmed_at": "2020-01-17T11:51:43.114803Z","change_total_currency": "GBP","change_total_amount": "30.50"}}