Baggage Vertical
Samples
Sample 1
Create a new bag tag by posting a check-in event
- Find the "POST/bagtags/event/checkin" interface and click on it to expand.
- Under parameters, you will see name as "bagCheckInEvent" and example value under description. Select and copy the example value into Notepad/Editor. Remember to update event time, created time, and origin date to current date and time.
- Change all the details in your Notepad/Editor to the example below or as desired.
{
"event-type": "BAG_CHECK_IN_EVENT",
"event-time": "2999-02-26T09:20:51.597Z",
"location": "checkin_counter",
"source": "BSM",
"secondary-identifiers": [
{
"identifier": "ADH_TUTORIAL",
"created": "2999-02-26T09:20:51.597Z",
"source": "BSM"
}
],
"tag": "0074123456",
"bag-type": "bag",
"passenger": {
"pnr": "PNR-1234",
"name": "Name-1234",
"first-name": "Mueller",
"gender": "male",
"title": "MR.",
"phone": "01854388899",
"email": "adhtutorial@web.com"
},
"bag-segments": [
{
"sequence-number": 0,
"identifier": {
"carrier": "KL",
"flight-number": 1997,
"operational-suffix": "01",
"origin-date": "2999-02-26",
"origin-iata-code": "AMS",
"destination-iata-code": "ZRH"
},
"class-of-travel": "BUSINESS",
"is-rush-bag": false,
"passenger-is-crew-member": false
}
]
}
After changing the data structure to your needs, you can insert the data via the POST interface.
- The response code will be 200 (under the server response) when the POST request is successfully executed.
- The bag tag is now created and stored in Aviation Data Hub.
Sample 2
Query the created bag tag with a filter
For more information regarding filtering, please refer to the ADH User Manual.
- Find the "GET/bagtags" interface and expand it.
- Copy the (0074123456) bag tag from the previous example and paste it into the entry box next to "tag", under the "The tag number of the bag tag" description.
- Click "Execute" and check the server response.
- For a successful execution, you will see response code 200 and the details of the bag tag under the response body.
- On the bottom-right of the response body window, you can click on the "Download" button to save the response as a JSON data file.
- Look for the "bag-tag-id", which is a unique bag identity created internally by Aviation Data Hub. Copy and paste the alphanumeric code in Notepad if you did not download the response body.