Skip Navigation

Response structure

The response structure will follow Sabre JSON RPC API Style described in API Style section with the usage of JSON format. See below how to handle errors. 

Error Handling 
 
Application Layer errors, as well as some Transport Layer errors, are returned as part of the response object. The response object schema contains a dedicated optional element for error-related data, and should be provided only when errors occur. 
 
The latter means that every API response will respond with a 200 HTTP status code. For successful responses, content is return as defined in contract. For error responses, only "errors" object will be available. 

Error Format 

The response object contains an optional list of error elements related to both Application and Transport Layers. Each error element contains an error type and error category with an additional description to indicate the cause of the error, and point at the particular field(s) or value(s) in question. 

Error Element 

JSON elements representing a list of errors in a response object will follow Error Format specifications. Here is an example of the response object containing only a list of returned errors: 

{ "errors": [ { "category": "BAD_REQUEST", "type": "REQUIRED_FIELD_MISSING", "description": "must not be null", "fieldName": "toAirportCode", "fieldPath": "ShoppingRequest.oneWay", }, { "category": "BAD_REQUEST", "type": "INVALID_VALUE", "description": "must match \"^[A-Z]{3}$\"", "fieldName": "fromAirportCode", "fieldPath": "ShoppingRequest.oneWay", "fieldValue": "Dallas" } ] } 

Common Error List 

Category 

Type 

Description 

BAD_REQUEST 

INVALID_VALUE 

Incorrect request data provided. 

 

REQUIRED_DATA_MISSING 

Request is missing mandatory data. 

 

UNPARSEABLE_REQUEST 

Invalid syntax. 

INTERNAL_SERVER_ERROR 

DOWNLINE_SERVICE_FAILURE 

General problem while processing a service. 

 

TIMEOUT 

Call to internal service timed out. 

INVALID_DATA 

INVALID_CAR 

Invalid segment type - not a car. 

 

INVALID_FLIGHT 

Invalid segment type - not a flight. 

 

INVALID_HOTEL 

Invalid segment type - not a hotel 

RESOURCE_NOT_FOUND 

BOOKING_NOT_FOUND 

Booking cannot be found. 

 

TICKET_NOT_FOUND 

Ticket details cannot be retrieved. 

UNAUTHORIZED 

UNABLE_TO_CHANGE_CONTEXT 

User is unauthorized to change context for the desired PCC. 

 

UNAUTHORIZED_ACCESS 

Expired or invalid security token.