All Search Workflows

The Search APIs offer a number of workflows, determined by whether the initial Search response returns offers for all legs of the itinerary (journey-based search) or only the first leg (leg-based search). A leg-based round-trip or multi-city search must be followed by a Next Leg Search to return offers on the subsequent leg/s of the itinerary. This setting does not apply to one-way searches and is ignored if sent.

Send SearchRepresentation with the value Leg for a leg-based search or Journey for a journey-based search. If CustomResponseModifiersAir is not sent, the default is a journey-based response.

If your workflow subsequently references a journey-based search result, the Search request must send offersPerPage set to any positive number. This setting invokes caching so that search results can be referenced later. A journey-based search returns all legs of the itinerary, while a leg-based search returns one leg at a time and is cached by default. If a journey-based Search request does not send offersPerPage, the reference payload requests for Flight Specific Search, AirPrice, and Add Offer will fail.

Search and Next Leg Search can return up to 4 upsells per any offer, as set in the request payload with the optional maxNumberOfUpsellsToReturn object. Flight Specific Search is an optional request to return up to 99 upsells, or as many as the carrier has filed, for any leg or offer returned in a previous Search or Next Leg Search.

Related Content:Air Shopping Guide, JSON APIs Guide, Search API Reference

Each box in the diagram represents one API call in the workflow.