Searching for Flights
POST https://api.duffel.com/air/offer_requests
In the Duffel API you create an offer request in order to search for flights.
For this you'll need the flight itinerary - which should include the origin(s), destination(s) and departure date(s) - and information about the passengers.
Request Body
{"data"=>{"slices"=>[{"origin"=>"NYC", "destination"=>"ATL", "departure_date"=>"2022-06-21"}, {"origin"=>"ATL", "destination"=>"NYC", "departure_date"=>"2022-07-21"}], "passengers"=>[{"type"=>"adult"}, {"type"=>"adult"}, {"age"=>1}], "cabin_class"=>"business"}}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Accept-Encoding | string | ||
Accept | string | ||
Duffel-Version | string | https:/duffel.com/docs/api/overview/making-requests/versioning |