Flight Vertical
Samples
Sample 1
Create new flight leg cancelled event
- Find the interface "POST/flightlegs/events/cancelled".
- Copy and edit the example value below into Notepad/Editor as the example following. Remember to update event time, created time, and origin date to current date and time.
- POST the flight leg cancelled event.
- Find the “GET/flightlegs/events” interface and check the result.
{
"event-type": "FLIGHT_CANCELLED_EVENT",
"event-time": "2999-03-05T08:11:41.069Z",
"location": "S3",
"source": "ADH",
"identifier": {
"carrier": "EK",
"flight-number": 99,
"operational-suffix": "01",
"origin-date": "2999-03-05",
"origin-iata-code": "DXB",
"destination-iata-code": "FRA"
},
"secondary-identifiers": [
{
"identifier": "ADH_TUTORIAL",
"created": "2999-03-05T08:12:00.612Z",
"source": "ADH"
}
]
}
- Run the “GET/flightlegs” REST call with the parameters as listed below.
- In the response body, you should see the flight leg with an id as a combination of carrierflightnumber_operational-suffix_origin-date_origin-iata-code_destination-iata-code and “state” as “CANCELLED”.
Parameter | Value |
carrier | EK |
flight-number | 99 |
Sample 2
Create aircraft allocation event
- Find the interface description of "POST/flightlegs/events/aircraftallocation".
- Copy and edit the example below into Notepad/Editor as the example following. Remember to update event time, created time, and origin date to current date and time.
{
"event-type": "AIRCRAFT_ALLOCATION_EVENT",
"event-time": " 2999-03-05T08:12:00.611Z",
"location": "S3",
"source": "ADH",
"identifier": {
"carrier": "EK",
"flight-number": 99,
"operational-suffix": "01",
"origin-date": "2999-03-05",
"origin-iata-code": "DXB",
"destination-iata-code": "FRA"
},
"secondary-identifiers": [
{
"identifier": "ADH_TUTORIAL",
"created": "2999-03-05T08:12:00.612Z",
"source": "ADH"
}
],
"aircraft-type": "A380-800",
"aircraft-registration": "A6-EDA"
}
- Call “GET/flightlegs” and execute again with the same parameter.
- In the response body, you should find the same flight leg with additional aircraft information; the state should remain cancelled, however.
Sample 3
Create flight scheduled event
- Check on "POST/flightlegs/events/scheduled".
- Copy and edit the example value below into Notepad/ Editor as the example following. Remember to update event time, created time, and origin date to current date and time.
{
"event-type": "FLIGHT_SCHEDULED_EVENT",
"event-time": "2999-03-05T08:43:23.285Z",
"location": "S3",
"source": "ADH",
"identifier": {
"carrier": "EK",
"flight-number": 99,
"operational-suffix": "01",
"origin-date": "2999-03-05",
"origin-iata-code": "DXB",
"destination-iata-code": "FRA"
},
"secondary-identifiers": [
{
"identifier": "ADH_TUTORIAL",
"created": "2999-03-05T08:12:00.612Z",
"source": "ADH"
}
],
"codeshares": [
{
"carrier": "EK",
"flight-number": 99,
"operational-suffix": "01",
"origin-date": "2999-03-05",
"origin-iata-code": "DXB",
"destination-iata-code": "FRA"
}
],
"flight-segments": [
{
"identifier": {
"carrier": "EK",
"flight-number": 99,
"operational-suffix": "01",
"origin-date": "2999-03-05",
"origin-iata-code": "DXB",
"destination-iata-code": "FRA"
},
"secondary-identifiers": [
{
"identifier": "ADH_TUTORIAL",
"created": "2999-03-05T08:12:00.612Z",
"source": "ADH"
}
],
"is-international": true
}
],
"sobt": "2999-03-05T08:43:23.285Z",
"sibt": "2999-03-05T08:43:23.285Z",
"aircraft-type": "A380-800",
"is-international": true,
"aircraft-registration": "A6-EDA"
}
- Go back to “GET/flightlegs” and execute the same parameter again.
- In the response body, you should find the same flight leg with additional aircraft information; the state should remain cancelled, however.