Flight VerticalSamples

Sample 1Create new flight leg cancelled event

  1. Find the interface "POST/flightlegs/events/cancelled".
  2. 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.
  3. POST the flight leg cancelled event.
  4. 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"
 	}
  ]
}
  1. Run the “GET/flightlegs” REST call with the parameters as listed below.
  2. 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 2Create aircraft allocation event

  1. Find the interface description of "POST/flightlegs/events/aircraftallocation".
  2. 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"
}
  1. Call “GET/flightlegs” and execute again with the same parameter.
  2. In the response body, you should find the same flight leg with additional aircraft information; the state should remain cancelled, however.

Sample 3Create flight scheduled event

  1. Check on "POST/flightlegs/events/scheduled".
  2. 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"
}
  1. Go back to “GET/flightlegs” and execute the same parameter again.
  2. In the response body, you should find the same flight leg with additional aircraft information; the state should remain cancelled, however.