Get RBD for Cabin

The API determines the RBD codes for the given ATPCO cabins.

For finding out RBD codes we should provide next mandatory fields in the request: id, carrier, origin, destination, departure date, flight number and cabin. Cabin parameter means that you can pass one cabin or couple cabins (up to 6) or you can pass parameter "allCabins" and get RBD codes for all 6 cabins. And we have some optional parameters in request: equipment and processing date. If processing date is not provided - the assumption will be current date. If you need additional information for understanding matching in details you can set debugMode parameter to true. You will get in response list of RBD codes with processing date.

API Information

Target Audience
All Sabre APIs Customers
Current Version
v1.0.0
Authentication
Sessionless Token  
Method/Endpoint
POST /v1.0.0/rbd/cabin

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

Example

You can use this service to check Reservation Booking Designator (RBD) codes for specified cabin/origin/destination/departure date/processing date/flight number.

Request

Request structure

object

Request contains next elements:

  • segmentItems, object
  • version, string
  • debugMode, boolean
segmentItems

object, required

Contains information about all segments.

  • segment, object(max of 1024 items)
segment

array

Segment contains required fields: id, carrier, origin, destination, flight number, id, atpcoCabins list and departure date.

Processing date and equipment type are optional parameters.

Segment element has next elements:

  • id, number, required
  • carrier, string, required
  • origin, string, required
  • destination, string, required
  • flightNumber, number, required
  • departureDate, string, required
  • allCabins, string or atpcoCabins, object, one of them is required
  • processingDate, string, optional
  • equipmentType, string, optional
id

integer, required

Segment id to match with the response especially when multiple items are provided.

Sample value: 1

carrier

string, required

IATA carrier code associated with the travel being validated or value 'YY' to indicate IATA Reso 728 default RBD by cabin mapping.

Sample value: CT

origin

string, required

3 character airport code where segment of travel starts.

Sample value: JJA

destination

string, required

3 character airport code where segment of travel ends.

Sample value: JJB

flightNumber

number, required

Flight number.

Min value: 1

Max value: 9999

Sample value: 1032

departureDate

string, required

Departure date of the flight.

Max value: “9999-12-31"

Sample value: 2017-12-31

processingDate

string, optional

Processing date time. When not set - defaulted to today. Can be historical date. Default time zone is DFW.

Max value: "9999-12-31T23:59:59.999"

Sample value: 2017-12-31T23:47:18

equipmentType

string, optional

Specifies the IATA equipment code for the travel on which the service is being processed.

If it's not provided - service will look at flight in ScheduleSegment table for equipment.

Sample value: 047

version

string, required

This is the version of the API that is being called.

Sample value: 1.0.0

allCabins

string, required if "atpcoCabins" element is missed.

Will be found RBD codes for all 6 ATPCO cabins.

Only one acceptable value of this item is empty string.

Sample value: "allCabins": ""

atpcoCabins

object, required if "allCabins" element is missed.

It contains array of ATPCO cabins.

  • cabin, array
cabin

array, required

Specifies the ATPCO cabins. You can set arbitrary amount of cabins.

Valid cabins are: R, F, J, C, W, Y

Sample value: ["R", "J", "C", "W"]

debugMode

boolean, optional

If it is not present in request - default value set to false. If set to true - will be returned additional data for debugging purpose.

Sample value: false

Response

Response structure

object

Response contains next elements:

  • status, string
  • version, string
  • debugMode, boolean
  • rbditems, object or errorItems, object, only one of them will be appeared.
status

string

Returns if the call was successful or not.

Valid options are:

  • SUCCESS
  • FAILURE

Sample value: SUCCESS

version

string, required

This is the version of the API that is being called.

Received from request.

Sample value: 1.0.0

debugMode

boolean, optional

If it is not present in request - default value set to false. If set to true - will be returned additional data for debugging purpose.

Received from request.

Sample value: false

rbditems

object

Contains array with response information corresponding to each segment from request.

  • rbd, array
rbd

array

Contains rbd codes information for each segment from request respectively.

  • item, array
  • refId, number
item

array

Contains rbd codes information for given atpco cabin.

  • bookingCodes, object
  • processingDate, string
  • atpcocabin, string
bookingCodes

array

Contains rbd codes for given atpco cabin.

Element of this array is rbd code:

  • code, string(max of 1024 items)
processingDate

string

Processing date time. Can be historical date. Default time zone is DFW.

Sample value: 2017-12-31T23:47:18

atpcocabin

string

Specifies the applicable ATPCO cabin.

Received from request.

Valid options are:

  • R
  • F
  • J
  • C
  • W
  • Y

Sample value: C

code

string

This is RBD code.

Sample value: 1.0.0

errorItems

object

it contains information about errors:

  • error, object
error

object

This element contains detailed information about occurred error:

  • statusCode, string
  • description, string
statusCode

string

HTTP status code of error.

Sample value: 400

description

string

Description of error.

Sample value: departureDate: may not be null

Sample request

		{
		  "segmentItems":{
			"segment":[
			  {
				"id":1,
				"carrier":"CT",
				"atpcoCabins":{
				  "cabin":[
					"R",
					"F",
					"J",
					"C",
					"W",
					"Y"
				  ]
				},
				"origin":"JJA",
				"destination":"JJB",
				"equipmentType":"034",
				"flightNumber":1032,
				"departureDate":"2018-01-19",
				"processingDate":"2018-01-19T06:00:00"
			  }
			]
		  },
		  "version":"1.0.0",
		  "debugMode":true
		}
		

Sample response

Response with debugMode set to false:

		{
		  "status":"SUCCESS",
		  "version":"1.0.0",
		  "debugMode":false,
		  "rbditems":{
			"rbd":[
			  {
				"item":[
				  {
					"bookingCodes":{
					  "code":[
						"J",
						"C",
						"D",
						"I",
						"Z"
					  ]
					},
					"processingDate":"2018-01-19T06:00:00Z",
					"atpcocabin":"C"
				  },
				  {
					"bookingCodes":{
					  "code":[
						"R",
						"A",
						"A",
						"YN"
					  ]
					},
					"processingDate":"2018-01-19T06:00:00Z",
					"atpcocabin":"F"
				  },
				  {
					"bookingCodes":{
					  "code":[
						"W",
						"E"
					  ]
					},
					"processingDate":"2018-01-19T06:00:00Z",
					"atpcocabin":"W"
				  },
				  {
					"bookingCodes":{
					  "code":[
						"S",
						"Y",
						"B",
						"H",
						"K",
						"L",
						"M",
						"N",
						"Q",
						"T",
						"V",
						"X"
					  ]
					},
					"processingDate":"2018-01-19T06:00:00Z",
					"atpcocabin":"Y"
				  },
				  {
					"bookingCodes":{
					  "code":[]
					},
					"processingDate":"2018-01-19T06:00:00Z",
					"atpcocabin":"R"
				  },
				  {
					"bookingCodes":{
					  "code":[]
					},
					"processingDate":"2018-01-19T06:00:00Z",
					"atpcocabin":"J"
				  }
				],
				"refId":1
			  }
			]
		  }
		}
		

When debugMode in request is set to true - you will receive response with additional information:

		{
		  "status":"SUCCESS",
		  "version":"1.0.0",
		  "debugMode":true,
		  "rbditems":{
			"rbd":[
			  {
				"debug":{
				  "segmentFromRQ":{
					"carrier":"CT",
					"origin":"JJA",
					"destination":"JJB",
					"equipmentType":"034",
					"flightNumber":1032,
					"departureDate":"2018-01-19T06:00:00Z",
					"atpcocabins":{
					  "cabin":[
						"R",
						"F",
						"J",
						"C",
						"W",
						"Y"
					  ]
					}
				  }
				},
				"item":[
				  {
					"bookingCodes":{
					  "code":[
						"J",
						"C",
						"D",
						"I",
						"Z"
					  ]
					},
					"processingDate":"2018-01-19T06:00:00Z",
					"debug":{
					  "carrier":"YY",
					  "seqNo":98000,
					  "createDate":"2016-12-01T18:24:17Z"
					},
					"atpcocabin":"C"
				  },
				  {
					"bookingCodes":{
					  "code":[
						"R",
						"A",
						"A",
						"YN"
					  ]
					},
					"processingDate":"2018-01-19T06:00:00Z",
					"debug":{
					  "carrier":"CT",
					  "seqNo":91062,
					  "createDate":"2017-03-18T00:16:12Z"
					},
					"atpcocabin":"F"
				  },
				  {
					"bookingCodes":{
					  "code":[
						"W",
						"E"
					  ]
					},
					"processingDate":"2018-01-19T06:00:00Z",
					"debug":{
					  "carrier":"YY",
					  "seqNo":98000,
					  "createDate":"2016-12-01T18:24:17Z"
					},
					"atpcocabin":"W"
				  },
				  {
					"bookingCodes":{
					  "code":[
						"S",
						"Y",
						"B",
						"H",
						"K",
						"L",
						"M",
						"N",
						"Q",
						"T",
						"V",
						"X"
					  ]
					},
					"processingDate":"2018-01-19T06:00:00Z",
					"debug":{
					  "carrier":"YY",
					  "seqNo":98000,
					  "createDate":"2016-12-01T18:24:17Z"
					},
					"atpcocabin":"Y"
				  },
				  {
					"bookingCodes":{
					  "code":[]
					},
					"processingDate":"2018-01-19T06:00:00Z",
					"atpcocabin":"R"
				  },
				  {
					"bookingCodes":{
					  "code":[]
					},
					"processingDate":"2018-01-19T06:00:00Z",
					"atpcocabin":"J"
				  }
				],
				"refId":1
			  }
			]
		  }
		}
		

Errors

An HTTP status code is always returned. For information about the error response format, see the: Sabre APIs: errors page.

400 BAD REQUEST

Bad Request

API version is not supported.

Departure date cannot be more than 2 years past.

Processing date cannot be more than 2 years past.

Processing date cannot be future.

Segment items should contain at lease one segment.

Segment items can have maximum 1024 segments.

Are missed some of required properties from the request.

ATPCO cabin can have one of next values: R F J C W Y.

404 NOT FOUND

Not Found

The requested resource could not be found but may be available in the future. Subsequent requests by the client are permissible.

405 METHOD NOT ALLOWED

Method Not Allowed

Sending request with different method than POST (example GET, PUT etc.). Accepted request method is POST.

415 UNSUPPORTED MEDIA TYPE

Incorrect Media Type

Request has wrong Content-Type parameter in header. Accepted is only 'application/json'.

500 INTERNAL SERVER ERROR

Internal Server Error

Given when an unexpected condition was encountered and no more specific message is suitable.

Sample error request

		{
		  "segmentItems":{
			"segment":[
			{
				"id":1,
				"carrier":"BA",
				"atpcoCabins":{
				"cabin":[
					"C",
					"W",
					"Y"
				]
				},
				"origin":"JER",
				"destination":"LON",
				"equipmentType":"034",
				"flightNumber": "1",
				"departureDate":"2018-10-19",
				"processingDate":"2013-11-02T06:00:00"
			}
			]
		},
		"version":"1.0.0"
		}
		

Sample error response

		{
		"status": "FAILURE",
		"errorItems": {
			"error": {
				"statusCode": "400",
				"description": "Processing date cannot be more than 2 years past"
			}
		},
		"version": "1.0.0",
		"debugMode": false
		}
		

Docs Navigation