Custom Theme

The Custom Theme API enables you to modify and customize themes.

In detail: the API allows you to create a custom travel theme and associate that theme with airport and multi-airport city (MAC) codes. You can then pass the theme as a filter in a request with any REST API that supports a theme. In addition, your custom themes can be used in conjunction with Sabre themes. By default, the API inherits the entire list of Sabre themes. The API supports up to 100 custom themes per Pseudo City Code (PCC) and up to 1000 airport or multi-airport city (MAC) code associations per theme. See usage notes: for detailed information about Sabre theme data and how to use this API.

This API can be used with any API that accepts a theme: Destination Finder API, Top Destinations API.

Example

You could use this API to create custom West Coast and East Coast themes and associate the airport and multi-airport city (MAC) codes to those themes. Then make multiple calls to pass the themes as a filter in a request to the Destination Finder API. For example, you could associate "LAX" (Los Angeles International) to your West Coast theme and "BOS" (Logan International) to your East Coast theme. With this data, you could compile a landing page that shows the "top 10" least expensive West Coast to East Coast fares. See usage notes: for more information on the Destination Finder API or any of the supplemental APIs that can be used to retrieve this data.

HTTP method and endpoint

Custom Theme Lookup

GET /v1/lists/supported/shop/custom/themes

Custom Theme Airport Lookup

GET /v1/lists/supported/shop/custom/themes/{theme}

Create Custom Theme

POST /v1/lists/supported/shop/custom/themes

Update Custom Theme

PUT /v1/lists/supported/shop/custom/themes/{theme}

Delete Custom Theme

DELETE /v1/lists/supported/shop/custom/themes/{theme}

Sample workflow

Use Sabre themes as a starting point to define your custom themes

  1. Invoke the Travel Theme Lookup API as a starting point to choose a travel theme from the list of Sabre themes.
  2. Invoke the Theme Airport Lookup API to lookup the airport and multi-airport city (MAC) codes associated with that theme.
  3. Determine whether you would like to associate these codes (or any other valid airports or MACs) to your custom travel theme.
  4. Use the Create Custom Theme API to create your custom travel theme using a unique name and provide the codes (steps 2-3) that you would like to associate to your new theme.
  5. Use your custom travel theme as a filter in a request with any REST API that accepts a theme.

Travel Theme Lookup

Invoke the Travel Theme Lookup API to retrieve a list of Sabre travel themes. See usage notes: for more information on the Travel Theme Lookup API.

Custom Theme Lookup

The Custom Theme Lookup API retrieves a list of your custom travel themes.

HTTP method and endpoint

GET /v1/lists/supported/shop/custom/themes

Request

This request does not have any variations or parameters. The URI requests a list of themes that belong to the authenticating PCC.

Response

Themes

array

Repeats associated theme information:

  • Theme, string
  • Links, string
Theme

string

The travel theme

Links

array

Contains links for each travel theme:

  • destinations, object
destinations

object

Invokes the Custom Theme Airport Lookup API to return a list of the 3-letter IATA airport or multi-airport city (MAC) codes that are associated with your custom theme

Overall response links

Links

array

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 Custom Theme Lookup API request with placeholders for every request parameter

Example: request and response

This example demonstrates a request to retrieve a list of your custom themes.

GET https://api.sabre.com/v1/lists/supported/shop/custom/themes HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: application/json
Host: api.sabre.com
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
{
   "Themes": [   {
      "Theme": "WestCoast",
      "Links": [      {
         "rel": "destinations",
         "href": "https://api.sabre.com/v1/lists/supported/shop/custom/themes/WestCoast"
      }]
   }],
   "Links":    [
            {
         "rel": "self",
         "href": "https://api.sabre.com/v1/lists/supported/shop/custom/themes"
      },
            {
         "rel": "linkTemplate",
         "href": "https://api.sabre.com/v1/lists/supported/shop/custom/themes"
      }
   ]
}

Errors

A general HTTP status code is always returned. For information about the error response format, see the: status codes and errors page.

A client should verify whether a request was successful by writing code to the following:

200 OK

The request was successful.

404 NOT_FOUND

No results were found

The service cannot find data to fulfill the parameters in the request.

400 BAD REQUEST

No theme named '{theme}' is defined

The specified '{theme}' does not exist.

401 Unauthorized

Custom themes are not allowed for your user

This PCC is not allowed to create custom themes.

Theme Airport Lookup

Invoke the Theme Airport Lookup API to retrieve a list of airport and multi-airport city (MAC) codes associated with a Sabre travel theme. You could then determine whether you would like to associate these codes (or any other valid airports or MACs) to your custom theme.

See usage notes: for more information on the Theme Airport Lookup API.

Custom Theme Airport Lookup

The Custom Theme Airport Lookup API retrieves a list of airport and multi-airport city (MAC) codes associated with your custom travel theme.

HTTP method and endpoint

Your custom theme name should be substituted for {theme} in the request:

GET https://api.sabre.com/v1/lists/supported/shop/custom/themes/{theme}

Request

This request does not have any variations or parameters. The URI requests a list of the airport and multi-airport city (MAC) codes that are associated with your custom theme.

Response

Destinations

array

Returns the 3-letter IATA airport or multi-airport city (MAC) codes that are associated with your custom theme

Overall response links

Links

array

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 Custom Theme Airport API request with placeholders for every request parameter

Example: request and response

This example demonstrates a request to retrieve the airport and multi-airport city (MAC) codes that are associated with your custom theme of WestCoast

GET https://api.sabre.com/v1/lists/supported/shop/custom/themes/WestCoast HTTP/1.1
Accept-Encoding: gzip,deflate
Host: api.sabre.com
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
{
   "Destinations":    [
      "LAX",
      "SFO",
      "SEA",
      "PTJ"
   ],
   "Links":    [
            {
         "rel": "self",
         "href": "https://api.sabre.com/v1/lists/supported/shop/custom/themes/WestCoast"
      },
            {
         "rel": "linkTemplate",
         "href": "https://api.sabre.com/v1/lists/supported/shop/custom/themes/<theme>"
      }
   ]
}

Errors

A general HTTP status code is always returned. For information about the error response format, see the: status codes and errors page.

A client should verify whether a request was successful by writing code to the following:

200 OK

The request was successful.

404 NOT_FOUND

No results were found

The service cannot find data to fulfill the parameters in the request.

400 BAD REQUEST

No theme named '{theme}' is defined

The specified '{theme}' does not exist.

401 Unauthorized

Custom themes are not allowed for your user

This PCC is not allowed to create custom themes.

Create Custom Theme

The Create Custom Theme API enables you to create a custom travel theme. You can then pass the theme as a filter in a request with any REST API that accepts a theme.

HTTP method and endpoint

POST /v1/lists/supported/shop/custom/themes

Request

Theme

string, required

The name of the travel theme

Only one value accepted

Sample value: {"Theme": "WestCoast"}

If a custom theme uses the same name as a Sabre theme, then the API will override Sabre theme data with custom theme data.

Destinations

array, required

3-letter IATA airport or multi-airport city (MAC) code to be associated with your theme

Maximum value: up to 1000 airport or multi-airport city (MAC) codes can be specified per theme

Sample value: {"Destinations": ["LAS", "ATL"]}

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.

Response

This request does not contain a response body. A general HTTP status code is always returned.

Example: request and response

This example demonstrates a request to create a custom theme of WestCoast and associate to two airport codes ("LAX" and "SFO").

POST https://api.sabre.com//v1/lists/supported/shop/custom/themes HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: application/json
Content-Length: 64
Host: api.sabre.com
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)

{
  "Theme": "WestCoast",
  "Destinations": [
    "LAX",
    "SFO"
  ]
}
HTTP/1.1 201 Created
Server: Apache-Coyote/1.1
Date: Mon, 29 Jun 2015 18:37:19 GMT

Errors

A general HTTP status code is always returned. For information about the error response format, see the: status codes and errors page.

A client should verify whether a request was successful by writing code to the following:

201 CREATED

The request was successful.

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.

404 NOT_FOUND

No results were found

The service cannot find data to fulfill the parameters in the request.

400 BAD REQUEST

A theme must be specified

theme is missing.

theme is missing a value.

Theme '{theme}' already exists

A custom theme name already exists.

A theme cannot be created more than once.

Number of custom themes cannot exceed '100'

Up to 100 custom themes are allowed.

Number of airports/city codes cannot exceed '1000'

Up to 1000 airport or multi-airport city codes can be associated to a theme.

'{airport code}' is not a valid airport/city code

Code must contain 3 letters.

A theme name cannot contain white space

This API does not permit white space to separate characters in a custom theme name. For example, a custom theme name of West Coast must be named WestCoast.

401 Unauthorized

Custom themes are not allowed for your user

This PCC is not allowed to create custom themes.

Update Custom Theme

The Update Custom Theme API enables you to update the airport or multi-airport city (MAC) codes associated with your custom travel theme.

A custom theme is overwritten each time an update is performed. Clients must include the entire set of airport and multi-airport city (MAC) codes each time a theme is updated.

HTTP method and endpoint

Your custom theme name should be substituted for {theme} in the request:

PUT https://api.sabre.com/v1/lists/supported/shop/custom/themes/{theme}

Request

Theme

string, required

The name of the travel theme

Only one value accepted

Sample value: {"Theme": "WestCoast"}

If a custom theme uses the same name as a Sabre theme, then the API will override Sabre theme data with custom theme data.

Destinations

array, required

3-letter IATA airport or multi-airport city (MAC) code to be associated with your theme

Maximum value: up to 1000 airport or multi-airport city (MAC) codes can be specified per theme

Sample value: {"Destinations": ["LAS", "ATL"]}

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.

Response

This request does not contain a response body. A general HTTP status code is always returned.

Example: request and response

This example demonstrates a request to update your custom theme of WestCoast and associate to two additional airport codes ("SEA" and "PTJ"). (Note: clients must include the entire set of airport and multi-airport city (MAC) codes each time a theme is updated.)

PUT https://api.sabre.com/v1/lists/supported/shop/custom/themes/WestCoast HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: application/json
Content-Length: 66
Host: api.sabre.com
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)

{
  "Theme": "WestCoast",
  "Destinations": [
    "LAX",
    "SFO",
    "SEA",
    "PTJ"
  ]
}
HTTP/1.1 204 No Content
Server: Apache-Coyote/1.1
Date: Mon, 29 Jun 2015 18:37:19 GMT

Errors

A general HTTP status code is always returned. For information about the error response format, see the: status codes and errors page.

A client should verify whether a request was successful by writing code to the following:

204 NO CONTENT

The request was successful.

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

A theme must be specified

theme is missing.

theme is missing a value.

No theme named '{theme}' is defined

The specified '{theme}' does not exist.

Number of airports/city codes cannot exceed '1000'

Up to 1000 airport or multi-airport city codes can be associated to a theme.

'{airport code}' is not a valid airport/city code

Code must contain 3 letters.

401 Unauthorized

Custom themes are not allowed for your user

This PCC is not allowed to create custom themes.

Delete Custom Theme

The Delete Custom Theme API enables you to delete your custom travel theme entirely (and the airport and multi-airport city (MAC) codes that are associated with your theme).

HTTP method and endpoint

Your custom theme name should be substituted for {theme} in the request:

DELETE https://api.sabre.com/v1/lists/supported/shop/custom/themes/{theme}

Request

Theme

string, required

The name of the travel theme to be deleted

Only one value accepted

Sample value: {"Theme": "WestCoast"}

Response

This request does not contain a response body. A general HTTP status code is always returned.

Example: request and response

This example demonstrates a request to delete your custom theme of WestCoast.

DELETE https://api.sabre.com/v1/lists/supported/shop/custom/themes/WestCoast HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: application/json
Content-Length: 26
Host: api.sabre.com
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)

{
  "Theme": "WestCoast"
}
HTTP/1.1 204 No Content
Server: Apache-Coyote/1.1
Date: Mon, 29 Jun 2015 18:37:19 GMT

Errors

A general HTTP status code is always returned. For information about the error response format, see the: status codes and errors page.

A client should verify whether a request was successful by writing code to the following:

204 NO CONTENT

The request was successful.

400 BAD REQUEST

A theme must be specified

theme is missing.

theme is missing a value.

No theme named '{theme}' is defined

The specified '{theme}' does not exist.

401 Unauthorized

Custom themes are not allowed for your user

This PCC is not allowed to create custom themes.

Usage notes

Sabre theme data

Sabre® creates and maintains a list of themes and their corresponding airport associations in the Sabre cache. This API allows customers the ability to modify and customize themes in addition to Sabre themes. All modifications to any Sabre or custom theme, and the corresponding associations to destinations, are mapped to and accessible by a single Pseudo City Code (PCC). A PCC stores private data that is unique to a specific customer of which is determined during authentication to REST APIs. Custom themes cannot be shared or used by other PCCs. Only the PCC that modified either a given Sabre theme or custom theme can use these theme customizations.

Important: We strongly suggest that customers do not modify a Sabre theme. We strongly suggest that customers create unique names for their custom themes. Once a Sabre theme is modified, any updates to that theme will no longer be inherited, and it is entirely up to the customer to manually maintain that theme. For example, if you associate a new airport code to the Sabre BEACH theme, then your (beach) theme will not inherit any new airport or multi-airport city (MAC) codes that Sabre associates to the BEACH theme in the future.

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.

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 request.

There are multiple endpoints for the City Pairs Lookup API. One endpoint is for city pairs that apply to the Low Fare Forecast API. See the City Pairs Lookup API page for the specific HTTP method and endpoint.

Destination Finder API

The Destination Finder API retrieves a then current nonstop lead fare and an overall lead fare available to destinations from a specific origin on round-trip travel dates from the Sabre© cache.

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 city codes can be used with applicable REST APIs.

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.

Travel Theme Lookup API

To get a list of valid themes, use the Travel Theme Lookup API. The response will be a list of themes, such as BEACH, GAMBLING .

Top Destinations API

The Top Destinations API returns the top booked leisure destinations from a given origin. The API looks up the traffic volume booked via the Sabre® GDS to the top destinations for the previous 2, 8 or 12 weeks.

Docs Navigation