Skip to content

Next Leg Search

Request

The Next Leg Search API returns offers for the next leg of an itinerary after a leg-based round-trip Search. The leg-based Search response returns offers for the outbound leg of the itinerary, and Next Leg Search is then required to return offers for the next leg of the trip. For a multi-city itinerary, send an additional Next Leg Search request for each remaining leg. GDS supports searching for up to six O&D pairs (legs of the itinerary) while NDC supports three O&D pairs. Next Leg Search is supported only after a leg-based Search. If sent after a journey-based Search, an error message is returned. Any modifiers or indicators sent in the Search request carry over to the Next Leg Search request and are not re-sent. The Next Leg Search response uses the same structure and returns the same objects as the Search response. The only differences are, the first instance of CatalogProductOffering is the offer and product sent in the Next Leg Search request. This is the selected offer and product for the first leg. Subsequent instances of CatalogProductOffering are offers for the second leg.

Security
bearerAuth
Headers
TraceIdstring, [ 10 .. 89 ] characters

Identifier used to correlate Air API invocations across a multi-call business flows.

Example:TraceID_123456789
XAUTH_TRAVELPORT_ACCESSGROUPstring, = 36 characters([a-zA-Z-0-9-_]*)

Identifies the Travelport access group with which the caller is associated

Example:19Y88702-C27A-4E5D-829A-89D7016688B1
travelportPlusSessionIdentifierstring, [ 0 .. 100 ] characters([a-zA-Z-0-9-_]*)

travelportPlusSessionIdentifier used to maintain an established agency session

Example:49f58f5f-c443-43b4-9f5d-be405fd00a01
TVP-PCC-Corestring^[a-zA-Z\d]{3,4}_\w{2}$

Allows user to pass PCC instead of Access Group ID

Example:DU7_1G
Bodyapplication/jsonrequired
@typestringrequired

Discriminator. No child classes

Example:"CatalogProductOfferingsQueryBuildNext"
ignoreCabinPreferenceIndboolean

If true, cabin preference sent in initial search request will be ignored. Offers/products will be returned for all cabins, starting with Economy, when applicable. Up to 4 upsells can be returned, based on the maxNumberOfUpsellsToReturn sent in the Search req.

BuildFromCatalogProductOfferingsRequestobject(BuildFromCatalogProductOfferingsRequest)required
BrandOptionsstring(BrandOptionsEnum)

Send with the value returnAllBrands to return all brands in a fare family regardless of the brand of the anchoring flight chosen from the initial Search response. GDS only; not supported for NDC. Not supported in the Flight Specific Search full payload request.

Enum ValueDescription
keepToBrand

When selecting this choice, the brand is kept for the anchored flight and all brands that pass combinability are returned for the next leg option.

returnAllBrands

When selecting this choice, all brands that pass combinability are returned for the next leg option or journey.

curl -i -X POST \
  https://developer.travelport.com/_mock/apis/flights/air/catalog/search/catalogproductofferings/buildnext \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'TVP-PCC-Core: DU7_1G' \
  -H 'TraceId: TraceID_123456789' \
  -H 'XAUTH_TRAVELPORT_ACCESSGROUP: 19Y88702-C27A-4E5D-829A-89D7016688B1' \
  -H 'travelportPlusSessionIdentifier: 49f58f5f-c443-43b4-9f5d-be405fd00a01' \
  -d '{
    "@type": "CatalogProductOfferingsQueryBuildNext",
    "BuildFromCatalogProductOfferingsRequest": {
      "@type": "BuildFromCatalogProductOfferingsRequest",
      "CatalogProductOfferingsIdentifier": {
        "Identifier": {
          "value": "29db38d6-0a86-45de-be4d-5310ab0bbffa"
        }
      },
      "CatalogProductOfferingSelection": [
        {
          "CatalogProductOfferingIdentifier": {
            "Identifier": {
              "value": "o1"
            }
          },
          "ProductIdentifier": [
            {
              "Identifier": {
                "value": "p10"
              }
            }
          ]
        }
      ]
    }
  }'

Responses

OK - Successful Response - 200

Bodyapplication/json
CatalogProductOfferingsResponseobject(CatalogProductOfferingsResponse)

Top level object for Search response. Includes CatalogProductOfferings, Result, and ReferenceList.

Response
{ "CatalogProductOfferingsResponse": { "CatalogProductOfferings": { "@type": "CatalogProductOfferings", "id": "cpo_1", "Identifier": {}, "CatalogProductOffering": [], "UpsellOffering": [] }, "@type": "response", "transactionId": "49f58f5f-c443-43b4-9f5d-be405fd00a01", "traceId": "TraceID_123456", "correlationId": "48fb4cd3-2ef6-4479-bea1-7c92721b988c", "reservationStatus": "Success", "Result": { "@type": "Result", "status": "Complete", "Error": [], "Warning": [] }, "Identifier": { "value": "A0656EFF-FAF4-456F-B061-0161008D7C4E", "authority": "TVPT" }, "NextSteps": { "baseURI": "string", "id": "5", "NextStep": [] }, "ReferenceList": [ {} ], "CurrencyRateConversion": [ {} ], "Pagination": { "@type": "Pagination", "page": 1, "pageSize": 20, "totalPages": 5, "totalItems": 100 } } }