Get Bags for Passenger

The Bags for Passenger service has a query operation which can be used to query list of bags of a passenger. A Bags for Passenger service is provided with mandatory Customer Service API Key, PNR and Departure Flight Date, so that BagJourney can return list of bag tag IDs found for that flight and Passenger.

This API allows the BagJourney Customer to query and get the list of bag tag IDs of their associated airlines' bags per departure flight.

The Get Bags for Passenger operation is a HTTP Get request with mandatory parameters. The response of this operation will be in JSONP format.

GET

Verb URI Description
GET https://bagjourney.sita.aero/baggage/bagsforpassenger/,
v1.0/pnr/{pnr}/dep_flight_date/{dep_flight_date}
Returns list of bags for a flight

Request Parameters

Key Value Description Format
pnr String Passenger Name Record – PNR provided in the ticket 5 or 6 Alphanumeric characters (Upper Case Letter [A-Z], Lower Case Letter [a-z] or digit [0-9])
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 Passenger Schema


{
	"type":"object",
	"description":"Get Bags for Passenger Information",
	"required":true,
	"properties":{
		"success" : {			
			"type": "boolean",
			"required": true,
			"description":"Success"
		},
		"bags": {
			"type":"array",
			"description":"Bags Information",
			"required":false,
			"items":{
				"type":"object",
				"description":"Bag information",
				"required":false,
				"bagtag": {
					"type":"string",
					"description":"The 10-digit License Plate Number (LPN) of the 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
				},
				"rush_bag_indicator": {
					"type":"string",
					"description":"This specifies if the bag is a rush bag",
					"required":true
				},
				"rushtag": {
					"type":"string",
					"description":"Rush Tag Id is conditional information returned for the bag. It is the most up to date Re-flighted Tag Id associated with a bag",
					"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":false 
                        }, 
                        "error_description": { 
                                "type":"string", 
                                "description":"Error description corresponding to the Error code", 
                                "required":false 
                        } 
				}	 
			} 
		}
	}
}

Example Request – by PNR & 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 Passenger Name Record 2PN001 departing on 09 May 2014

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 matching bags found
JSONP

1.


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

2.


callback(
{
  "success": true,
"bags":[   
   {
         "bagtag": "1234567891",
          "passenger_first_name": "RICHARD",
          "passenger_last_name": "WILLIAMS",
          "rush_bag_indicator": "N",
   }
   {
         "bagtag": "1234567892",
          "passenger_first_name": "RICHARD",
          "passenger_last_name": "WILLIAMS",
          "rush_bag_indicator": "N",
   }
 ]
}
	)
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": "BJYGBP001",
      "PNR is mandatory"
    },
    {
      "error_code":  "BJYGBP002",
      "Departure Flight Date is mandatory "
    },
    {
      "error_code": "BJYGBP003",
      "Invalid format, please specify Flight Date in YYYY-MM-DD    format, e.g., 2013-08-26"
    },
    {
      "error_code": "BJYGBP004",
      "error_description": "Customer Service API Key is mandatory"
    },
    {
    "error_code": "BJYGBP005",
    "error_description": "Customer Service API Key does not exist"
    },  
    {
      "error_code": "BJYGBP006",
      "error_description": "Customer Application not authorized to get this bag history"
    },
    {
      "error_code": "BJYSRV001",
      "error_description": "System is currently unavailable, please contact SITA Administrator"
    }
   ]
 }
)