City Pairs Lookup

The City Pairs Lookup API returns a list of the city pairs supported by REST Air Shopping APIs. City pairs are combinations of origin and destination airport codes.

API Information

Target Audience
Sabre Travel Network
Current Version
v1
Authentication
Sessionless Token
Method/Endpoint
See HTTP method and endpoint

Sabre® creates and maintains the file of city pairs in the Sabre cache. These city pairs are origins and destinations that we support for various REST APIs. For example, City Pairs Lookup retrieves the SJU-MIA city pair (San Juan International, Puerto Rico to Miami International). You can pass this city pair for any applicable air search API request, e.g., Lead Price Calendar.

Note: Destinations differ when you add a theme. See usage notes: for more information on the Theme Airport Lookup API.

Ready to try the APIs?

Ready to get your hands dirty?

 Register Try the APIs

Ready to launch?

Ready to step up to the production level service? We're standing by to fit you for your spacesuit.

Request Production Key

HTTP method and endpoint

Air shopping REST APIs support different origin and destination pairs. For this reason there are three separate endpoints for City Pairs Lookup.

All other air shopping REST APIs city pairs

GET /v1/lists/supported/shop/flights/origins-destinations

Fare Range API supported city pairs

GET /v1/lists/supported/historical/flights/origins-destinations

Low Fare Forecast API supported city pairs

GET /v1/lists/supported/forecast/flights/origins-destinations

Request

Applies only to City Pairs Lookup

pointofsalecountry

string, optional

2-letter ISO 3166 country code

Retrieves data specific to a given point of sale country

Default value: US

Sample value: pointofsalecountry=DE

See usage notes: for more information on point of sale and supported point of sale countries.

Common

origincountry

string, optional

2-letter ISO 3166 country code

Retrieves supported city pairs with origins located in this specified country

Only one value is accepted

Default: all origin countries

Sample value: country=MX

See usage notes: for links to country code sources.

destinationcountry

string, optional

2-letter ISO 3166 country code

Retrieves supported city pairs with destinations located in this specified country

Only one value is accepted

Default: all destination countries

Sample value: country=MX

See usage notes: for links to country code sources.

originregion

string, optional

Retrieves city pairs with origins based in this region

Only one value is accepted

Valid values:

  • Africa
  • Asia Pacific
  • Europe
  • Latin America
  • Middle East
  • North America

Sample value: originregion=Africa

destinationregion

string, optional

Retrieves city pairs with destinations based in this region

Only one value is accepted

Valid values: see originregion

Sample value: destinationregion=Africa

Response

OriginLocationDestinations

array

Returns OriginDestinationLocation city pairs

OriginDestinationLocation

string

Contains OriginLocation and DestinationLocation

OriginLocation

object

Objects that describe the origin:

  • AirportCode, string
  • AirportName, string
  • CityName, string
  • CountryCode, string
  • CountryName, string
  • RegionName, string
DestinationLocation

object

Objects that describe the destination:

  • AirportCode, string
  • AirportName, string
  • CityName, string
  • CountryCode, string
  • CountryName, string
  • RegionName, string
AirportCode

string

3-letter IATA airport code

AirportName

string

The name of the airport that corresponds to the airport code

CityName

string

The city name that corresponds to the 3-letter IATA airport code in AirportCode

Sample value: Atlanta

CountryCode

string

The 2-letter ISO 3166 country code that corresponds to the airport code

CountryName

string

The name of the country that corresponds to CountryCode

RegionName

string

The name of the region that is assigned to the country

Links array for the overall response

array

self

object

Returns the URL of the request that generated the response

linkTemplate

object

Formats a City Pairs Lookup API request

Sample code

Request

This example demonstrates a request for all city pairs with destination airport codes that we support in Argentina.

GET https://api.havail.sabre.com/v1/lists/supported/shop/flights/origins-destinations?destinationcountry=AR

Response

{
  OriginDestinationLocations: [
    {
      OriginDestinationLocations: "JFK-EZE",
      OriginLocation: {
        AirportCode: "JFK",
        AirportName: "John F. Kennedy International Airport",
        CityName: "New York",
        CountryCode: "US",
        CountryName: "United States",
        RegionName: "North America"
      },
      DestinationLocation: {
        AirportCode: "EZE",
        AirportName: "Ministro Pistarini",
        CityName: "Buenos Aires",
        CountryCode: "AR",
        CountryName: "Argentina",
        RegionName: "Latin America"
      }
    },
    {
      OriginDestinationLocations: "MIA-EZE",
      OriginLocation: {
        AirportCode: "MIA",
        AirportName: "Miami International Airport",
        CityName: "Miami",
        CountryCode: "US",
        CountryName: "United States",
        RegionName: "North America"
      },
      DestinationLocation: {
        AirportCode: "EZE",
        AirportName: "Ministro Pistarini",
        CityName: "Buenos Aires",
        CountryCode: "AR",
        CountryName: "Argentina",
        RegionName: "Latin America"
      }
    }
  ],
  Links: [
    {
      rel: "self",
      href: "https://api.havail.sabre.com/v1/lists/supported/shop/flights/origins-destinations?destinationcountry=AR"
    },
    {
      rel: "linkTemplate",
      href: "https://api.havail.sabre.com/v1/lists/supported/shop/flights/origins-destinations?destinationregion=<destinationregion>&originregion=<originregion>&destinationcountry=<destinationcountry>&origincountry=<origincountry>&pointofsalecountry=<pointofsalecountry>"
    }
  ]
}

Usage notes

If you want origins and destinations in specific countries, you can combine country codes (e.g., https://api.havail.sabre.com/v1/lists/supported/shop/flights/origins-destinations?origincountry=PR&destinationcountry=VI).

Identifying our pairs of origin and destination airports

Pass these city pairs with our air shopping REST APIs.

  1. Decide which combinations of origin (departure) and destination (arrival) airports that you want your solution to support. Origins and destinations vary by API, so read about using city pairs data.
  2. Call the City Pairs Lookup API and verify that the response includes your desired airport codes as combinations of origins and destinations.
  3. Provide your combinations of origin and destination airport codes in any of our air shopping APIs that support them.

Country and airport codes

Point of sale

The point of sale is the geographic location in which the fare itinerary is eligible to be ticketed. The default point of sale (US) can be overridden with any supported point of sale country specified in the pointofsalecountry parameter. For example, the following will retrieve data specific to the Germany (DE) point of sale: pointofsalecountry=DE.

Airports at Cities Lookup API

To identify the airports associated with a multi-airport city (MAC) code, use the Airports at Cities Lookup API and pass one of the MACs in the request. The Airports at Cities Lookup API retrieves our list of major airport, rail station and other codes that are associated with a single multi-airport city (MAC) code in the request.

Theme Airport Lookup API

To get a list of destination airport codes that are associated with the optional theme parameter, use the Theme Airport Lookup API. The response will be a list of valid themes that we associate with that destination, e.g., Las Vegas would be associated as a GAMBLING destination.

Sample scenarios

Getting and using origins and destinations

Florida Vacations, an imaginary company based in Chicago, Illinois in the U.S., has a solution to present lowest fares for a range of calendar dates with departure from ORD (Chicago O'Hare) and arrivals to FLL (Ft. Lauderdale), MIA (Miami), and MCO (Orlando). The team reviews Lead Price Calendar in the online Sabre REST API doc. They then link to the City Pairs Lookup API and learn that Lead Price Calendar supports origin airports located in the U.S., Puerto Rico, and the U.S. Virgin Islands. Supported destination airports can be anywhere in the world. These locations fit the requirements for their solution.

The team develops an application to call the City Pairs Lookup API:

/v1/lists/supported/shop/flights/origins-destinations?origincountry=US&destinationcountry=US

The application parses these origin and destination combinations from the response: ORD > FLL, ORD > MIA, and ORD > MCO.

 "OriginLocation": {
   "AirportCode": "ORD",
   "AirportName": "CHICAGO O'HARE",
   "CountryCode": "US",
   "CountryName": "UNITED STATES",
   "RegionName": "NORTH AMERICA"
},
 "DestinationLocation": {
   "AirportCode": "FLL",
   "AirportName": "FT. LAUDERDALE",
   "CountryCode": "US",
   "CountryName": "UNITED STATES",
   "RegionName": "NORTH AMERICA"
}

The app calls Lead Price Calendar with each of these combinations, and retrieves lowest fares with departure dates on the next 192 days, for a 10-day trip.

GET /v1/shop/flights/fares?origin=ORD&destination=FLL&lengthofstay=10&departuredate=2017-04-15

The app presents the lowest fares to these destinations, with options for end-users to choose the destination airport code.

Errors

An HTTP status code is always returned. For more information about HTTP status codes and error response formats, see Sabre APIs: errors.

Status 404 NOT FOUND

No results were found

The service cannot find data to fulfill the request using the filters that you applied.

Status 413 FULL head

The API returns this error when a request URI is too long. For example, the HTTP request’s query string exceeds the server limit.

The response will be empty as a result.

Please consider reducing the number of request parameters in the URI or separating parameters into multiple HTTP requests.

Status 400 BAD REQUEST

Parameter 'origincountry' must be country code

A country code is not a valid country code.

We do not support the country code.

Parameter 'destinationcountry' must be country code

We do not support the country code.

Parameter 'destinationregion' must be one of '{Africa,Asia Pacific,Europe,Latin America,Middle East,North America}'

A region is not valid.

Parameter 'originregion' must be one of '{Africa,Asia Pacific,Europe,Latin America,Middle East,North America}'

A region is not valid.

Parameter 'pointofsalecountry' has an unsupported value

The value provided in pointofsale is not a valid or supported country code. See also: point of sale.

Docs Navigation