arazzo: 1.0.1 info: title: Amadeus Flight Inspiration to Offers summary: Find inspirational destinations from an origin, get the cheapest dates to one, then search bookable offers. description: >- Powers an inspiration-first shopping journey. The workflow finds the cheapest destinations reachable from an origin, takes the first destination and finds the cheapest travel dates for that city pair, then runs a flight offers search for the cheapest departure date to surface bookable offers. Each request is inlined so the inspiration-to-offers flow can be read and executed without opening the underlying OpenAPI descriptions. version: 1.0.0 sourceDescriptions: - name: flightInspirationSearch url: ../openapi/amadeus-flight-inspiration-search-openapi.yml type: openapi - name: flightCheapestDateSearch url: ../openapi/amadeus-flight-cheapest-date-search-openapi.yml type: openapi - name: flightOffersSearch url: ../openapi/amadeus-flight-offers-search-openapi.yml type: openapi workflows: - workflowId: flight-inspiration-to-offers summary: Discover a destination, find its cheapest date, and search bookable offers. description: >- Finds inspirational destinations from an origin, finds the cheapest date to the first one, then searches flight offers for that date. inputs: type: object required: - origin - adults properties: origin: type: string description: IATA code of the origin city/airport (e.g. MAD). adults: type: integer description: Number of adult travellers (1-9). steps: - stepId: findDestinations description: >- Find the cheapest inspirational destinations reachable from the origin. operationId: getFlightDestinations parameters: - name: origin in: query value: $inputs.origin successCriteria: - condition: $statusCode == 200 outputs: firstDestination: $response.body#/data/0/destination destinationCount: $response.body#/meta/count - stepId: findCheapestDate description: >- Find the cheapest travel dates for the origin to the first inspirational destination. operationId: getFlightDates parameters: - name: origin in: query value: $inputs.origin - name: destination in: query value: $steps.findDestinations.outputs.firstDestination successCriteria: - condition: $statusCode == 200 outputs: cheapestDepartureDate: $response.body#/data/0/departureDate - stepId: searchOffers description: >- Run a flight offers search for the cheapest departure date to surface bookable offers. operationId: getFlightOffers parameters: - name: originLocationCode in: query value: $inputs.origin - name: destinationLocationCode in: query value: $steps.findDestinations.outputs.firstDestination - name: departureDate in: query value: $steps.findCheapestDate.outputs.cheapestDepartureDate - name: adults in: query value: $inputs.adults successCriteria: - condition: $statusCode == 200 outputs: offerCount: $response.body#/meta/count outputs: firstDestination: $steps.findDestinations.outputs.firstDestination cheapestDepartureDate: $steps.findCheapestDate.outputs.cheapestDepartureDate offerCount: $steps.searchOffers.outputs.offerCount