Lead Price Calendar

Heads Up!- This API is powered by the Travel Insight Engine. Check the City Pairs Supplemental API to see the city pairs that are currently supported. Don’t see your country? Take a look at Bargain Finder Max to get access to global content.

The Lead Price Calendar API returns the lowest published fares each of the next 192 calendar days for a given city pair.

In detail: the API uses the Travel Insight engine to retrieve shopped fare data for a given city pair/departure date available in the Sabre® cache. When you include required parameters only, each request returns a nonstop lead fare and an overall lead fare for each of the next 192 consecutive days from the API request.

Example

You could use this API to create a graphical user interface to chart up to 192 days of the lowest published fares for a popular European destination or international city pair, such as "LAX" (Los Angeles International) to "LHR" (London Heathrow). This can then be combined with multiple length of stay functionality. From this chart, leisure travelers with flexible travel dates and longer advance purchase windows can compare flight prices up to 192 days from a specified departure date.

Data used by Lead Price Calendar API

  • The in-scope shopping responses used by Sabre to generate the lead fares for this API are the shopping responses to shopping requests from a PCC (a Pseudo City Code) operated by Sabre.
  • All fares are for single adult, roundtrip travel in the economy class of service.
  • Total fares: All taxes and fees are included; however, ancillary fees charged by airlines, such as baggage and preferred seating, are not included.
  • Flight types: nonstop, connecting, and flights with stops
  • Origin: major airports and multi-airport cities throughout the world that we support
  • Destination: major airports throughout the world that we support
  • Advance fares: A maximum of 192 days

HTTP method and endpoint

GET /v2/shop/flights/fares

Request

origin

string, required

3-letter IATA code of the origin airport or multi-airport city (MAC) code

Only one value is accepted

Sample value: origin=ATL

If a multi-airport city (MAC) code is used, then only the lowest fare associated with any of the airports belonging to the MAC will be returned.

See usage notes: for more information on retrieving a list of our supported city pairs of origin and destination airports using the City Pairs Lookup API, multi-airport city (MAC) codes using the Multi-Airport City Lookup API, or to identify the airports associated with a MAC using the Airports at Cities Lookup API.

destination

string, required

3-letter IATA code of the destination airport or multi-airport city (MAC) code

Only one value is accepted

Sample value: destination=LAS

If a multi-airport city (MAC) code is used, then only the lowest fare associated with any of the airports belonging to the MAC will be returned.

See usage notes: for more information on retrieving a list of our supported city pairs of origin and destination airports using the City Pairs Lookup API, multi-airport city (MAC) codes using the Multi-Airport City Lookup API, or to identify the airports associated with a MAC using the Airports at Cities Lookup API.

lengthofstay

string, required

Duration of the trip (days)

Multiple values are accepted (consecutive or non-consecutive)

Valid values: 0-16 (0 = same day arrival/departure)

Maximum values: up to 10 (if departure date is specified) and up to 5 (if departure date is not specified)

Sample value: lengthofstay=3,5,6,9,12

departuredate

string, optional*

Date of departing flight in the time zone of the origin airport

Multiple values are accepted (consecutive or non-consecutive)

Maximum value: current date + 192 (days)*

Sample value: departuredate=2015-10-30

*If more than 5 lengths of stay are specified, then up to 45 departure date values are accepted.

If departure date is not specified, then the API finds lead fares with departures on the date of the request through the next 192 days.

minfare

number, optional

Retrieves overall lead fares that are equal to or greater than this specified price

Sample value: minfare=250

maxfare

number, optional

Retrieves overall lead fares that are equal to or less than this specified price

Sample value: maxfare=550

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.

Response

OriginLocation

string

3-letter IATA airport code

Returns the specified 3-letter IATA origin airport or multi-airport city (MAC) code

DestinationLocation

string

3-letter IATA airport code

Returns the specified 3-letter IATA destination airport or multi-airport city (MAC) code

FareInfo

array

Repeats associated lead fare and date/time information:

  • CurrencyCode, string
  • LowestFare, string or object
  • LowestNonStopFare, string or object
  • DepartureDateTime, string
  • ReturnDateTime, string
  • Links, array
FareInfo.CurrencyCode

string

3-letter currency code

Sample values: USD

If no shopped fare data is found, then the API returns (N/A).

FareInfo.LowestFare

string or object

Returns associated overall lead fare information:

  • Fare, number
  • AirlineCodes, array

If no shopped fare data is found, then the API returns a string (N/A).

LowestFare.Fare

number

The overall lead fare from the Sabre cache for the specified origin

LowestFare.AirlineCodes

array

2-letter IATA marketing airline company code

If more than one airline offers the lowest overall fare, then multiple airline codes will be returned.

FareInfo.LowestNonstopFare

string or object

Returns associated nonstop lead fare information:

  • Fare, number
  • AirlineCodes, array

If no shopped fare data is found, then the API returns a string (N/A).

LowestNonstopFare.Fare

number

The nonstop lead fare from the Sabre cache for the specified origin

LowestNonstopFare.AirlineCodes

array

2-letter IATA marketing airline company code

If more than one airline offers the lowest overall fare, then multiple airline codes will be returned.

FareInfo.DepartureDateTime

string

Returns the specified departure date in the time zone of the origin airport

Data format: YYYY-MM-DDTHH:MM:SS

FareInfo.ReturnDateTime

string

The return date is calculated as the specified departure date + length of stay

Data format: YYYY-MM-DDTHH:MM:SS

Links

array

Repeats associated lead fare and destination links:

  • shop, object
shop

object

Invokes an InstaFlights Search request

If a multi-airport city (MAC) code is used as origin, then the shop link will contain the MAC.

See usage notes: for more information on the InstaFlights Search API.

Overall response links

Links

array

  • self, object
  • linkTemplate, object

See usage notes: for more information on link nodes.

self

object

Returns the URL of the request that generated the response

linkTemplate

object

Formats a Lead Price Calendar request

Examples: request and response

This example demonstrates a request for lead fares from "ATL" (Hartsfield Jackson Atlanta International) to "LAS" (McCarran International, Las Vegas) with a 3-, 4-, 5-, 6-, and 7-day length of stay. The following optional filters are also specified: a departure date of 2015-12-30 and a max fare of 220.

GET https://api.sabre.com/v2/shop/flights/fares?origin=ATL&destination=LAS&departuredate=2015-12-30&lengthofstay=3,4,5,6,7&maxfare=220 HTTP/1.1
{
    "OriginLocation": "ATL",
    "DestinationLocation": "LAS",
    "FareInfo": [{
        "LowestFare": {
            "AirlineCodes": ["F9"],
            "Fare": 218
        },
        "CurrencyCode": "USD",
        "LowestNonStopFare": {
            "AirlineCodes": ["F9"],
            "Fare": 218
        },
        "DepartureDateTime": "2015-12-30T00:00:00",
        "ReturnDateTime": "2016-01-02T00:00:00",
        "Links": [{
            "rel": "shop",
            "href": "https://api.sabre.com/v1/shop/flights?origin=ATL&destination=LAS&departuredate=2015-12-30&returndate=2016-01-02ATL&destination=US"
        }]
    }, {
        "LowestFare": {
            "AirlineCodes": ["F9"],
            "Fare": 218
        },
        "CurrencyCode": "USD",
        "LowestNonStopFare": {
            "AirlineCodes": ["F9"],
            "Fare": 218
        },
        "DepartureDateTime": "2015-12-30T00:00:00",
        "ReturnDateTime": "2016-01-04T00:00:00",
        "Links": [{
            "rel": "shop",
            "href": "https://api.sabre.com/v1/shop/flights?origin=ATL&destination=LAS&departuredate=2015-12-30&returndate=2016-01-04ATL&destination=US"
        }]
    }],
    "Links": [{
        "rel": "self",
        "href": "https://api.sabre.com/v2/shop/flights/fares?origin=ATL&destination=LAS&departuredate=2015-12-30&lengthofstay=3,4,5,6,7&maxfare=220"
    }, {
        "rel": "linkTemplate",
        "href": "https://api.sabre.com/v2/shop/flights/fares?origin=<origin>&destination=<destination>&lengthofstay=<lengthofstay>&departuredate=<departuredate>&minfare=<minfare>&maxfare=<maxfare>ATL&destination=<pointofsalecountry>"
    }]
}

Usage notes

Country and airport codes

Links nodes

  • Sabre® REST APIs have one or more Links nodes that combine related URI resources in a response. For more information, see the links nodes page.

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 fare data specific to the Germany (DE) point of sale: pointofsalecountry=DE. The response will be fares eligible for sale in Germany.

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.

City Pairs Lookup API

To get a list of our supported city pairs of origin and destination airports, use the City Pairs Lookup API. You can pass any of these origin and destination airport codes in a Lead Price Calendar API request.

InstaFlights Search API

The InstaFlights Search API retrieves roundtrip flight itineraries with published fares and fare breakdowns available from the Sabre® cache for a certain origin, destination, and roundtrip travel dates. The origins and destinations are airport codes.

Multi-Airport City Lookup API

To get a list of city codes that are served by more than one airport, use the Multi-Airport City Lookup API. These multi-airport codes can be used with applicable REST APIs.

Example: Within the Lead Price Calendar API, to search for the lead fares from DFW to any airport associated with New York City, use "DFW" for origin and "NYC" for destination. The response will include the lowest fare and lowest nonstop fare. The lowest fare will be from DFW to any one of the airports that belong to NYC, e.g., DFW to LGA. The lowest nonstop fare will be from DFW to any one of the airports that belong to NYC, but may not be the same airport associated with the lowest fare, e.g., DFW to JFK.

Errors

An HTTP status code is always returned.

Errors that are specific to this API follow. For information about the error response format, see the: Sabre APIs: common errors page.

Note — Optional parameters are checked for errors when a value is supplied.

404 NOT FOUND

No results were found

The service cannot find data to fulfill the parameters in the request. For example, data is not available for the origin or dates.

An origin or destination in the request is not a valid IATA airport code.

The origin or destination are not supported.

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.

400 BAD REQUEST

parameter 'origin' must be specified

origin is missing.

origin is missing a value.

Parameter 'departuredate' must be specified

departuredate is missing.

departuredate is missing a value.

Parameter 'destination' must be specified

destination is missing.

destination is missing a value.

Parameter 'lengthofstay' must be specified

lengthofstay is missing.

lengthofstay is missing a value.

Parameter 'pointofsale' has an unsupported value

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

Parameter 'lengthofstay' must be of type 'number'

The value provided in lengthofstay is not a valid data type.

Parameter 'maxfare' must be of type 'number'

The value provided in maxfare is not a valid data type.

Parameter 'minfare' must be of type 'number'

The value provided in minfare is not a valid data type.

Parameter 'departuredate' must be today or a future date

departuredate uses a past date.

Parameter 'departuredate' exceeds the maximum days allowed

For the maximum parameter values, see departuredate.

Parameter 'lengthofstay' must be between 0 and 16

The value provided in lengthofstay must be between 0 and 16.

Parameter 'lengthofstay' must not have more than 5 elements

This API permits 5 values for lengthofstay if more than 45 departuredate values are specified.

Parameter 'lengthofstay' must not have more than 10 elements

This API permits 10 values for lengthofstay if less than 45 departuredate values are specified.

Parameter 'maxfare' must be greater than or equal to 'minfare'

The amount provided in maxfare is less than the amount in minfare.

Parameter 'minfare' must be greater than or equal to 0.0

The amount provided in minfare is a negative number.

Parameter 'maxfare' must be greater than 0.0

The amount provided in maxfare is a negative number or 0.

Parameter 'departuredate' must have a format of 'yyyy-MM-dd' and be a valid date

The date is not valid, for example, yyyy-02-29 when the year is not leap year.

The month is not valid, for example, 13.

The day is not valid for the month, for example yyyy-04-31.

The date has an incorrect format, for example, a hyphen character is omitted.

Although the data type is string, the service detected non-numeric characters for yyyy, mm, or dd.

A date is formatted as yyyy-dd-mm instead of yyyy-mm-dd.

The value in dd is a single digit.

The value in mm is a single digit.

Docs Navigation