arazzo: 1.0.1 info: title: ExchangeRate-API Enriched Pair Display summary: Build a display-ready conversion with currency name, symbol, and flag. description: >- A presentation-oriented flow for building a rich currency conversion widget. It confirms the currencies against the supported-codes list, then calls the enriched-pair endpoint to return the conversion rate alongside the target currency's locale, name, display symbol, and flag URL, and finally pulls the base currency's latest rate table for additional context. Enriched data requires a Business or Volume plan. Each step inlines its full request, including the API key path parameter. version: 1.0.0 sourceDescriptions: - name: exchangeRateApi url: ../openapi/exchangerate-api-openapi.yml type: openapi workflows: - workflowId: enriched-pair-display summary: Assemble a display-ready pair conversion with enriched target metadata. description: >- Resolves the supported codes, fetches the enriched pair conversion (rate plus target currency locale, name, symbol, and flag), and pulls the latest rate table for the base currency to round out the display context. inputs: type: object required: - apiKey - baseCode - targetCode properties: apiKey: type: string description: Your ExchangeRate-API dashboard API key. baseCode: type: string description: ISO 4217 three-letter base currency code (e.g. USD). targetCode: type: string description: ISO 4217 three-letter target currency code (e.g. EUR). steps: - stepId: listSupportedCodes description: >- Retrieve the supported ISO 4217 currency codes to confirm both currencies are available before building the display. operationId: getSupportedCodes parameters: - name: api_key in: path value: $inputs.apiKey successCriteria: - condition: $statusCode == 200 - condition: $response.body#/result == "success" outputs: supportedCodes: $response.body#/supported_codes - stepId: getEnriched description: >- Fetch the enriched pair conversion, returning the rate together with the target currency's locale, name, display symbol, and flag URL. operationId: getEnrichedPair parameters: - name: api_key in: path value: $inputs.apiKey - name: base_code in: path value: $inputs.baseCode - name: target_code in: path value: $inputs.targetCode successCriteria: - condition: $statusCode == 200 - condition: $response.body#/result == "success" outputs: conversionRate: $response.body#/conversion_rate targetData: $response.body#/target_data flagUrl: $response.body#/target_data/flag_url displaySymbol: $response.body#/target_data/display_symbol - stepId: getLatest description: >- Pull the latest rate table for the base currency to provide additional context alongside the enriched single-pair conversion. operationId: getLatestRates parameters: - name: api_key in: path value: $inputs.apiKey - name: base_code in: path value: $inputs.baseCode successCriteria: - condition: $statusCode == 200 - condition: $response.body#/result == "success" outputs: conversionRates: $response.body#/conversion_rates lastUpdate: $response.body#/time_last_update_utc outputs: conversionRate: $steps.getEnriched.outputs.conversionRate targetData: $steps.getEnriched.outputs.targetData conversionRates: $steps.getLatest.outputs.conversionRates