arazzo: 1.0.1 info: title: Amadeus Flight Search, Price, and Book summary: Search flight offers, confirm the live price of a chosen offer, then create a booked flight order. description: >- The canonical Amadeus flight retailing funnel. The workflow runs a GET flight offers search for a city pair and date, takes the first returned offer and confirms its real-time price (fares change between shopping and booking), then submits that priced offer together with the traveller and contact details to create a flight order. Each step inlines its request so the funnel can be read and executed without opening the underlying OpenAPI descriptions. version: 1.0.0 sourceDescriptions: - name: flightOffersSearch url: ../openapi/amadeus-flight-offers-search-openapi.yml type: openapi - name: flightOffersPrice url: ../openapi/amadeus-flight-offers-price-openapi.yml type: openapi - name: flightCreateOrders url: ../openapi/amadeus-flight-create-orders-openapi.yml type: openapi workflows: - workflowId: search-price-book-flight summary: Turn a city pair and date into a confirmed, priced, booked flight order. description: >- Searches available flight offers, prices the first offer to lock in the fare, and creates a flight order for the supplied travellers. inputs: type: object required: - originLocationCode - destinationLocationCode - departureDate - adults - travelers - contacts properties: originLocationCode: type: string description: IATA city/airport code the traveller departs from (e.g. NYC). destinationLocationCode: type: string description: IATA city/airport code the traveller is going to (e.g. PAR). departureDate: type: string description: Departure date in ISO 8601 YYYY-MM-DD format. returnDate: type: string description: Optional return date in YYYY-MM-DD; omit for one-way. adults: type: integer description: Number of adult travellers (1-9). travelers: type: array description: Traveler objects as required by the flight order data.travelers array. items: type: object contacts: type: array description: Contact objects for the flight order data.contacts array. items: type: object steps: - stepId: searchOffers description: >- Run a flight offers search for the requested city pair, date(s) and adult count, returning the available priced shopping offers. operationId: getFlightOffers parameters: - name: originLocationCode in: query value: $inputs.originLocationCode - name: destinationLocationCode in: query value: $inputs.destinationLocationCode - name: departureDate in: query value: $inputs.departureDate - name: returnDate in: query value: $inputs.returnDate - name: adults in: query value: $inputs.adults successCriteria: - condition: $statusCode == 200 outputs: firstOffer: $response.body#/data/0 offerCount: $response.body#/meta/count - stepId: priceOffer description: >- Confirm the real-time price and fare conditions of the first offer returned by the search before committing to a booking. operationId: quoteAirOffers requestBody: contentType: application/vnd.amadeus+json payload: data: type: flight-offers-pricing flightOffers: - $steps.searchOffers.outputs.firstOffer successCriteria: - condition: $statusCode == 200 outputs: pricedOffer: $response.body#/data/flightOffers/0 grandTotal: $response.body#/data/flightOffers/0/price/grandTotal - stepId: createOrder description: >- Create a flight order from the priced offer and the supplied travellers and contacts, returning the booked order id and reference. operationId: createFligtOrders requestBody: contentType: application/vnd.amadeus+json payload: data: type: flight-order flightOffers: - $steps.priceOffer.outputs.pricedOffer travelers: $inputs.travelers contacts: $inputs.contacts successCriteria: - condition: $statusCode == 201 outputs: flightOrderId: $response.body#/data/id associatedRecords: $response.body#/data/associatedRecords outputs: offerCount: $steps.searchOffers.outputs.offerCount grandTotal: $steps.priceOffer.outputs.grandTotal flightOrderId: $steps.createOrder.outputs.flightOrderId