Custom Response View

The Custom Response View API allows you to customize the response of a given REST API.

In detail: this suite of utility APIs allows you to create (and modify) a custom response view by defining the response paths to include or exclude for a given REST API (e.g. the Bargain Finder Max (BFM) API). You would then pass your custom response view as a filter in the BFM API request, e.g., view=NOWARNINGS to format the response.

A custom response view is a view defined by a single Pseudo City Code (PCC). This is created by modifying a default Sabre response view or creating a new response view. By default, the API allows you to create up to 100 custom response view definitions per Pseudo City Code (PCC) and include or exclude up to 1000 paths per response. See usage notes: for more information on Sabre and custom response view data.

Response views can be used with the following APIs: Advanced Calendar Search, Alternate Airport Shop, Alternate Date, Bargain Finder Max, InstaFlights Search.

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

API Information

Target Audience
Sabre Travel Network
Current Version
v1
Authentication
Sessionless Token
Methods/Endpoints
GET /v1/lists/utilities/custom/views/ HTTP/1.1
GET /v1/lists/utilities/custom/views/{view} HTTP/1.1
POST /v1/lists/utilities/custom/views/ HTTP/1.1
PUT /v1/lists/utilities/custom/views/{view} HTTP/1.1
DELETE /v1/lists/utilities/custom/views/{view} HTTP/1.1

Sample workflow

Use Sabre response views as a starting point to define your custom views

  1. Invoke the Response View Lookup API as a starting point to view a list of the default Sabre response views.
  2. Invoke the Response View Details Lookup API to view the detailed response path notation of the included and excluded elements for a given Sabre response view.
  3. Identify the response views you would like to mimic or expand upon and create new custom response view definitions using the Create Custom Response View API.
  4. Invoke the applicable REST API for which the include/exclude response paths apply (e.g. Bargain Finder Max) and pass the new custom response view definition as a filter in the request, e.g., view=NOWARNINGS to format the response.

Sample use case

You could use this suite of APIs to create a custom response view for the Bargain Finder Max API that trims the response to include only the response paths that your application requires.

  1. Call the Create Custom View API to create a custom response view (VIEW_1) and include the Bargain Finder Max response paths you would like to include (or exclude).
    POST https://api.sabre.com/v1/lists/utilities/custom/views
    {
      "Name": "VIEW_1",
      "Includes": [
        "OTA_AirLowFareSearchRS.PricedItineraries.PricedItinerary.AlternateAirport",
        "OTA_AirLowFareSearchRS.PricedItineraries.PricedItinerary.SequenceNumber",
        "OTA_AirLowFareSearchRS.PricedItineraries.PricedItinerary.TicketingInfo"
      ]
    }
  2. Call the Bargain Finder Max API using your custom response view definition in the request URI:
    POST https://api.sabre.com/v1.9.5.1/shop/flights?mode=live&view=VIEW_1
            { "OTA_AirLowFareSearchRQ": {
            …See the Bargain Finder Max API for a sample request payload…
            } 
            }
    
  3. The Bargain Finder Max response will contain only the included VIEW_1 elements:
    {
      "OTA_AirLowFareSearchRS": {
        "PricedItineraries": {
          "PricedItinerary": [{
            "SequenceNumber": 1,
            "AlternateAirport": true,
            "TicketingInfo": {
              "TicketType": "eTicket",
              "ValidInterline": "Yes"
            }
          }, {
            "SequenceNumber": 2,
            "TicketingInfo": {
              "TicketType": "eTicket",
              "ValidInterline": "Yes"
            }
          }]
        }
      }
    }

Response View Lookup

To return a list of Sabre response views, invoke the Response View Lookup API. A Sabre "response view" is a predefined API response that has been modified to include or exclude certain elements (or paths) by default. These default views can be used by any Pseudo City Code (PCC).

See the Response View Lookup API page for more information.

Response View Details Lookup

To return the detailed response path notation of the included and excluded elements for a given Sabre response view, invoke the Response View Details Lookup API.

See the Response View Details Lookup API page for more information.

Custom Response View Lookup

The Custom Response View Lookup API returns a list of your custom response views.

HTTP method and endpoint

GET /v1/lists/utilities/custom/views/

Request

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

Response

The response will be an array of custom response view definitions that belong to the authenticating PCC.

Views

array

Repeats associated view information:

  • View, string
  • Links, array
View

string

The custom response view name

Sample value: NOWARNINGS

Links

array

Contains links for each custom response view:

  • view, object
view

object

Returns a URL for each custom response view

Overall response links

Links

array

self

object

Returns the URL of the request that generated the response

linkTemplate

object

Formats a Custom Response View Lookup API request

Example: request and response

This example demonstrates a request for a list of custom response views (that belong to the authenticating PCC).

GET https://api.sabre.com/v1/lists/utilities/custom/views/
{
  "Views": [
    {
      "View": "NOWARNINGS",
      "Links": [
        {
          "rel": "view",
         "href": "https://api.sabre.com/v1/lists/utilities/custom/views/NOWARNINGS"
        }
      ]
    },
    {
      "View": "NOFLIGHTSEGMENT",
      "Links": [
        {
          "rel": "view",
          "href": "https://api.sabre.com/v1/lists/utilities/custom/views/NOFLIGHTSEGMENT"
        }
      ]
    },
    {
      "View": "NOLINKS",
      "Links": [
        {
          "rel": "view",
          "href": "https://api.sabre.com/v1/lists/utilities/custom/views/NOLINKS"
        }
      ]
    },
    {
      "View": "SIMPLE_ITIN_AND_PRICES",
      "Links": [
        {
          "rel": "view",
          "href": "https://api.sabre.com/v1/lists/utilities/custom/views/SIMPLE_ITIN_AND_PRICES"
        }
      ]
    }
  ],
  "Links": [
    {
      "rel": "self",
      "href": "https://api.sabre.com/v1/lists/utilities/custom/views"
    },
    {
      "rel": "linkTemplate",
      "href": "https://api.sabre.com/v1/lists/utilities/custom/views"
    }
  ]
}

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.

401 Unauthorized

Custom views are not allowed for your user

This PCC is not allowed to create or modify custom response view definitions.

Custom Response View Details Lookup

The Custom View Details Lookup API returns the detailed response path notation of the included and excluded elements for a given custom response view.

HTTP method and endpoint

GET /v1/lists/utilities/custom/views/{view}

Request

This request has a URI variable. Any valid custom view can be substituted for {view}. See also: the Custom Response View Lookup API to retrieve a list of your custom response views.

Response

The response will be an array of custom response view definitions.

View

object

The custom response view definition:

  • Name, string
  • Includes, array
  • Excludes, array
Name

string

The custom response view name

Sample value: SIMPLE_ITIN_AND_PRICES

Includes

array

The JSON path notation of the included element

Excludes

array

The JSON path notation of the excluded element

Overall response links

Links

array

self

object

Returns the URL of the request that generated the response

linkTemplate

object

Formats a Custom Response View Details Lookup API request with placeholders for every request parameter

Example: request and response

This example demonstrates a request to return the detailed response path for the SIMPLE_ITIN_AND_PRICES custom response view. This view was created to exclude certain elements in the response of the InstaFlights Search API.

GET https://api.sabre.com/v1/lists/utilities/custom/views/SIMPLE_ITIN_AND_PRICES  
{
  "View": {
    "name": "SIMPLE_ITIN_AND_PRICES",
    "excludes": [
      "PricedItineraries.TPA_Extensions",
      "PricedItineraries.TicketingInfo",
      "PricedItineraries.AirItinerary.OriginDestinationOptions.OriginDestinationOption.ElapsedTime",
      "PricedItineraries.AirItinerary.OriginDestinationOptions.OriginDestinationOption.FlightSegment.MarketingAirline",
      "PricedItineraries.AirItinerary.OriginDestinationOptions.OriginDestinationOption.FlightSegment.ArrivalTimeZone",
      "PricedItineraries.AirItinerary.OriginDestinationOptions.OriginDestinationOption.FlightSegment.TPA_Extensions",
      "PricedItineraries.AirItinerary.OriginDestinationOptions.OriginDestinationOption.FlightSegment.StopQuantity",
      "PricedItineraries.AirItinerary.OriginDestinationOptions.OriginDestinationOption.FlightSegment.ElapsedTime",
      "PricedItineraries.AirItinerary.OriginDestinationOptions.OriginDestinationOption.FlightSegment.MarriageGrp",
      "PricedItineraries.AirItinerary.OriginDestinationOptions.OriginDestinationOption.FlightSegment.Equipment",
      "PricedItineraries.AirItinerary.OriginDestinationOptions.OriginDestinationOption.FlightSegment.OnTimePerformance",
      "PricedItineraries.AirItinerary.OriginDestinationOptions.OriginDestinationOption.FlightSegment.OperatingAirline",
      "PricedItineraries.AirItinerary.OriginDestinationOptions.OriginDestinationOption.FlightSegment.DepartureTimeZone",
      "PricedItineraries.AirItinerary.OriginDestinationOptions.OriginDestinationOption.FlightSegment.ResBookDesigCode",
      "PricedItineraries.AirItinerary.OriginDestinationOptions.OriginDestinationOption.FlightSegment.FlightNumber",
      "PricedItineraries.AirItineraryPricingInfo.LastTicketDate",
      "PricedItineraries.AirItineraryPricingInfo.PTC_FareBreakdowns.PTC_FareBreakdown.FareBasisCodes",
      "PricedItineraries.AirItineraryPricingInfo.PTC_FareBreakdowns.PTC_FareBreakdown.TPA_Extensions",
      "PricedItineraries.AirItineraryPricingInfo.PTC_FareBreakdowns.PTC_FareBreakdown.Endorsements",
      "PricedItineraries.AirItineraryPricingInfo.PTC_FareBreakdowns.PTC_FareBreakdown.PassengerFare.Taxes.Tax",
      "PricedItineraries.AirItineraryPricingInfo.FareInfos",
      "PricedItineraries.AirItineraryPricingInfo.TPA_Extensions",
      "PricedItineraries.AirItineraryPricingInfo.ItinTotalFare"
    ]
  },
  "Links": [
    {
      "rel": "self",
      "href": "https://api.sabre.com/v1/lists/utilities/custom/views/SIMPLE_ITIN_AND_PRICES"
    },
    {
      "rel": "linkTemplate",
      "href": "https://api.sabre.com/v1/lists/utilities/custom/views/<view>"
    }
  ]
}

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:

404 NOT_FOUND

No view named '{view}' is defined

The specified '{view}' does not exist.

Create Custom Response View

The Create Custom Response View API allows you to create a custom response view definition.

HTTP method and endpoint

POST /v1/lists/utilities/custom/views

Request

Name

The custom response view name

Note: no special characters allowed

Sample value: NOWARNINGS

Includes

array

The JSON path notation of the element(s) you would like to include

Note: Excludes and Includes are not allowed in the same view at the same time.

Excludes

array

The JSON path notation of the element(s) you would like to exclude

Sample value: OTA_AirLowFareSearchRS.Warnings

Note: Excludes and Includes are not allowed in the same view at the same time.

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 response view (NOWARNINGS) that excludes all warnings (i.e., response path (OTA_AirLowFareSearchRS.Warnings) in the Bargain Finder Max API response. Note: this view would then need to be specified in a Bargain Finder Max request (view=NOWARNINGS).

POST https://api.sabre.com/v1/lists/utilities/custom/views 
{
  "Name": "NOWARNINGS",
  "Excludes": ["OTA_AirLowFareSearchRS.Warnings"]
}
HTTP/1.1 201 CREATED
Server: Apache-Coyote/1.1
Date: Mon, 29 Jun 2016 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.

404 NOT_FOUND

No results were found

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

400 BAD REQUEST

A view must be specified

view is missing.

view is missing a value.

Custom view '{view}' already exists

This custom view name already exists.

A view cannot be created more than once.

A view name cannot contain white space

This API does not permit white space to separate characters in a custom response view name. For example, a custom response view name of Exclude Marriage Group must be named ExcludeMarriageGroup.

Excluded and included paths are not allowed in the same view

Exclude and include definitions are not allowed in the same view name.

Example:

    {
        "name": "NO_WARNINGS_BUT_LINKS",
        "excludes": ["OTA_AirLowFareSearchRS.Warnings"],
        "includes": ["Links"]
    }
                

Number of excluded paths cannot exceed '1000'

Up to 1000 excluded paths can be associated to a custom response view.

Number of included paths cannot exceed '1000'

Up to 1000 included paths can be associated to a custom response view.

Number of custom view definitions cannot exceed '100'

Up to 100 custom response view definitions are allowed.

401 Unauthorized

Custom views are not allowed for your user

This PCC is not allowed to create or modify custom response view definitions.

Update Custom Response View

The Update Custom Response View API allows you to update the response paths associated with your custom response view definition.

HTTP method and endpoint

PUT /v1/lists/utilities/custom/views/{view}

Your custom response view should be substituted for {view} in the request.

Note: A custom response view definition is overwritten each time an update is performed. Clients must include the entire set of included and excluded response paths.

Request

View

The custom response view to be updated

Note: no special characters allowed

Sample value: NOWARNINGS

Includes

array

The JSON path notation of the include element(s) you would like to update*

Note: Excludes and Includes are not allowed in the same view at the same time.

*A custom response view definition is overwritten each time an update is performed. Clients must include the entire set of included and excluded response paths.

Excludes

array

The JSON path notation of the exclude element(s) you would like to update*

Sample value: OTA_AirLowFareSearchRS.Warnings

Note: Excludes and Includes are not allowed in the same view at the same time.

*A custom response view definition is overwritten each time an update is performed. Clients must include the entire set of included and excluded response paths.

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 the NOWARNINGS custom response view.

PUT https://api.sabre.com/v1/lists/utilities/custom/views/NOWARNINGS HTTP/1.1 
    {
  "Name": "NOWARNINGS",
  "Excludes": ["OTA_AirLowFareSearchRS.Warnings"]
}

HTTP/1.1 204 No Content
Server: Apache-Coyote/1.1
Date: Mon, 29 Jun 2016 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 view must be specified

view is missing.

view is missing a value.

No view named '{view}' is defined

The specified '{view}' does not exist.

A view name cannot contain white space

This API does not permit white space to separate characters in a custom response view name. For example, a custom response view name of Exclude Marriage Group must be named ExcludeMarriageGroup.

Excluded and included paths are not allowed in the same view

Exclude and include definitions are not allowed in the same view name.

{
  "name": "NO_WARNINGS_BUT_LINKS",
  "excludes": ["OTA_AirLowFareSearchRS.Warnings"],
  "includes": ["Links"]
}

Number of excluded paths cannot exceed '1000'

Up to 1000 excluded paths can be associated to a custom response view.

Number of included paths cannot exceed '1000'

Up to 1000 included paths can be associated to a custom response view.

Number of custom view definitions cannot exceed '100'

Up to 100 custom response view definitions are allowed.

401 Unauthorized

Custom views are not allowed for your user

This PCC is not allowed to create or modify custom response view definitions.

Delete Custom Response View

The Delete Custom Response View API allows you to delete your custom response view definition.

HTTP method and endpoint

DELETE /v1/lists/utilities/custom/views/{view}

Request

View

string

The custom response view to be deleted

Note: no special characters allowed

Sample value: NOWARNINGS

Only one value accepted

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 response view.

DELETE https://api.sabre.com/v1/lists/utilities/custom/views/NOWARNINGS
HTTP/1.1 204 No Content
Server: Apache-Coyote/1.1
Date: Mon, 29 Jun 2016 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 view must be specified

view is missing.

view is missing a value.

No view named '{view}' is defined

The specified '{view}' does not exist.

401 Unauthorized

Custom views are not allowed for your user

This PCC is not allowed to create or modify custom response view definitions.

Usage notes

Custom response view data disclaimer

Sabre® creates and maintains a list of default response view definitions and their corresponding include and exclude paths in the Sabre cache. This API allows you to view and customize response view definitions, including default Sabre response views.

A custom response view is a view defined by a single Pseudo City Code (PCC). This is created by modifying a default Sabre response view or creating a new response view. All modifications to any Sabre response view or custom response view, and the corresponding response paths, are mapped to and accessible by a single PCC. A PCC stores private data that is unique to a specific customer of which is determined during authentication to REST APIs. Custom response views cannot be shared or used by other PCCs. Only the PCC that created a custom response view or modified a Sabre response view can use those custom views.

Important: We strongly suggest that customers do not modify a Sabre response view and that customers create unique names for their custom views. Once a Sabre response view definition is modified, any updates to that response view will no longer be inherited. It would, therefore, be entirely up to the customer to manually maintain that view. For example, if you associate a new response view to the Sabre OTA_AirLowFareSearchRS.Warnings response view, then your response view will not inherit any new included or excluded paths that Sabre associates to the response view in the future.

Docs Navigation