Get Bags for Flight

This API allows the BagJourney Customer to query and get the bags for a specific flight.

GET

Verb URI Description
GET https://bagjourney.sita.aero/baggage/bagsforflight
/v1.0/airport_code/{airport_code}/arr_dep_indicator/{arr_dep_indicator}
/airline_code/{airline_code}/flight_no/
{flight_no}/dep_flight_date/{dep_flight_date}
Returns list of bags for a flight

Request Parameters

Key Value Description Format
airport_code String Specifies the origin Airport Code when arr_dep_indicator is departure and destination Airport Code when arr_dep_indicator is arrival 3 Upper Case Letters [A-Z]
arr_dep_indicator String Specifies the Arrival Departure Indicator Arrival Indicator: 'A' or 'a' Departure Indicator: 'D' or 'd'
airline_code String Specifies the Airline Code 2 characters (Upper Case Letters [A-Z] or Digit) with at least one Letter; or 3 characters (Upper Case Letters [A-Z] or Digits) and ending with an Upper Case Letter
flight_no String Specifies the Flight Number 1 to 4 Digits followed by an optional Upper Case Letter [A-Z]
dep_flight_date String Specifies the Departure Flight Date YYYY-MM-DD

Request Query Parameters

Key Value Mandatory Description
apiKey String True The API key to identify the customer

Request Query JSON Response

The request will return a response in the following standard format:

Get Bags for Flight Schema

{
	"type":"object",
	"description":"Get Bags for Flight Information",
	"required":true,
	"properties":{
		"success" : {			
			"type": "boolean",
			"required": true,
			"description":"Success"
		},
		"bags": {
			"type":"array",
			"description":"Bag Information",
			"required":false,
			"bag":{
				"bagtag": {
					"type":"string",
					"description":"The 10-digit License Plate Number (LPN) of the bag",					
					"required":true
				},
				"rush_bag_indicator": {
					"type":"string",
					"description":"This specifies if the bag is a rush bag",
					"required":true
				},				
				"passenger_first_name": {
					"type":"string",
					"description":"The first name of the passenger",
					"required":false
				},
				"passenger_last_name": {
					"type":"string",
					"description":"The surname of the passenger",
					"required":false
				},
				"loading_status": {
					"type":"string",
					"description":"The Loading Status of the bag for the Airline Code, Flight Number and Departure Flight Date specified in the input criteria",
					"required":false
				},
				"seat_number": {
					"type":"string",
					"description":"The inbound seat number into the configured airport",
					"required":false
				},
				"pnr":{  
					"type":"string",
					"description":"The PNR associated with the event",
					"required":false
				}
			}
		},
		
		"errors" : { 
				"required": false, 
				"type": "array", 
				"description":"List of Errors", 
			"items": 
			{ 
				"type":"object", 
                "description":"Error", 
                "required":false, 
                "properties":{ 
                        "error_code": { 
                                "type":"string", 
                                "description":"Error code of the message", 
                                "required":true 
                        }, 
                        "error_description": { 
                                "type":"string", 
                                "description":"Error description corresponding to the Error code", 
                                "required":true 
                        } 
				}	 
			} 
		}		
	}
}

Example Request – by Departure Flight Date

The api_key must be in the HTTP header. Example: 848c4e02011114c626cae31b20fe10f1

Key Example
https://bagjourney.sita.aero/baggage/bagsforpassenger/
v1.0/pnr/2PN001/dep_flight_date/2014-05-09
Get Bags for United Airlines flight 1234 departing London Heathrow on 23 October 2013

Responses

Sample Response - Success
HTTP Code Text Description
200 OK Success
200 OK When there are no bags matching the input criteria, then BagJourney returns the following error message: No bags found for flight
JSONP

1.


callback(
{
   "success": true,
"bags":[   
  "bag": {
      "bagtag": "1234567890",
      "rush_bag_indicator": "Y",
      "passenger_first_name": "JOHN",
      "passenger_last_name": "SMITH",
      "loading_status":"Delayed"
   }
 ]
}
)


  

2.


callback(
{
   "success": true,
"bags":[   
  "bag": {
      "bagtag": "1234567891",
      "rush_bag_indicator": "N",
      "passenger_first_name": "SCOTT",
      "passenger_last_name": "TAYLOR",
    "loading_status":"Loaded in Container"
   },
"bag": {
      "bagtag": "1234567892",
      "rush_bag_indicator": "Y",
      "loading_status ":"Not Loaded"
   }
 ]
}
)


IMPORTANT NOTE: Make sure you escape backslashes before commas, in order to avoid double escaping.
Sample Response - Failure
HTTP Code Text Description
400 Bad Request The request is invalid. On violation of not providing mandatory fields or any data kind validation on request parameters except for API Key.

JSONP – Sample response for HTTP Code 400

 callback(
{
  "success": false,
  "errors": [
    {
     "error_code": "BJYGBF001",
     "error_description": "No bags found for flight"
    },
    {
     "error_code": "BJYGBF001",
     "error_description": "Customer Service API Key is mandatory"
    },
    {
     "error_code": "BJYGBF003",
     "error_description": "Customer Service API Key does not exist"
    },
    {
     "error_code": "BJYGBF004",
     "error_description": "Customer Application not authorized to get this bag history"
    },
    {
     "error_code": "BJYGBF005",
     "error_description": "Airport Code is mandatory"
    },
    {
     "error_code": "BJYGBF006",
     "error_description": "Airport Code should be a IATA 3-letter airport code"
    },
    {
     "error_code": "BJYGBF007",
     "error_description": "Airport Code does not exist in BagJourney library"
    },
    {
     "error_code": "BJYGBF008",
     "error_description": "Arrival-Departure Indicator is mandatory"
    },
    {
     "error_code": "BJYGBF009",
     "error_description": "Arrival-Departure Indicator should be either 'A' (or 'a') or 'D' 
      (or 'd')" }, { "error_code": "BJYGBF010", "error_description": "Airline Code is mandatory" }, { "error_code": "BJYGBF011", "error_description": "Airline Code should 2 characters comprising of Upper Case Letters and/or
       Digit with at least one Letter; or 3 characters comprising of Upper Case Letters and/or
       Digits and ending with an Upper Case Letter" }, { "error_code": "BJYGBF012", "error_description": "Flight Number is mandatory" }, { "error_code": "BJYGBF013", "error_description": "Flight Number should comprised of 1 to 4 Digits followed by an optional
       Upper Case Letter" }, { "error_code": "BJYGBF014", "error_description": "Flight Date is mandatory" }, { "error_code": "BJYGBF015", "error_description": "Invalid date, please specify valid Flight Date using YYYY-MM-DD format,
       e.g., 2013-08-26" }, { "error_code": "BJYSRV001", "error_description": "System may be currently unavailable, please contact SITA Administrator" } ] } )