# Chained workflows Some Spotnana APIs rely on a chained workflow where the response from one API call is used as part of the request body in subsequent API calls. For example, the [get air itineraries](/openapi/airapi#operation/airSearch) API provides a unique `searchId` as a result of a successful POST API call. This unique `searchId` is required as part of the request body in the [get flight attributes](/openapi/airapi#operation/airAttributes) API that must be called next. ![Chained Workflows](/assets/chained-workflows.e736ef1547bc91d4a0a158f49cf8d1f162801312a81eab18cf27708f4a0de5b4.9c1bb791.png) *Fig: Visual representation of a chained workflow.* ## Sample Use Case Consider the following scenario that uses our Air APIs to illustrate a typical chained workflow: You need to retrieve a selected itinerary and its corresponding information such as the leg details, number of travelers, ticket fare, ticket type, policy information and so on. You could use the [get selected itinerary](/openapi/airapi#operation/airSelectedItinerary) API to retrieve this information. However, that API requires a `searchId` and `itineraryId` as mandatory parameters as part of the request body. To retrieve the unique `searchId` and `itineraryId`, you’ll first need to run the [get air itineraries](/openapi/airapi#operation/airSearch) API and the [get flight attributes](/openapi/airapi#operation/airAttributes) API in sequential order. These two APIs will return the `searchId` and `itineraryId` along with other relevant information. You can now copy and use these two parameters to run the [get selected itinerary](/openapi/airapi#operation/airSelectedItinerary) API. ![Air Workflow](/assets/air-workflow.7fe194fc72efb8578562239026172ad9bbe8d149310de2db92207ed8140adac5.9c1bb791.png) *Fig: Chained workflow to run the Get Selected Itinerary API.* Some of Spotnana's other APIs also use similar chained workflows. You can find their relevant documentation under the **Workflows** heading.