- Previous: Flight Status by Flight Number
- Up: Flight Status
- Next: Flight Search
Flight Status by Route
## Content
* [API Description](#api-description)
* [API Parameters](#api-parameters)
* [Input Parameters](#input-parameters)
* [Output Parameters](#output-parameters)
* [Codes References](#codes-references)
* [Canned Reasons](#canned-reasons)
* [Error Codes](#error-codes)
* [Generic error codes for API](#generic-error-codes-for-api)
* [Exception codes](#exception-codes)
* [JSON Sample](#json-sample)
* [Input Samples](#input-sample)
* [Output Sample](#output-sample)
Request for API key
## API Description
|||
|----|----|
|**API Name:**| `getbyroute`|
|**API Type:**| `Query`|
|**API Availability:**| `Public and Partners`|
|**API Description:**| `Flight Status retrieval using the flight route (origin, destination)`
## API Parameters
### HTTP Headers
| Headers | Value | Description |
| ------------------ | --------- | ---------------------------------------------------------------------------- |
|Content-Type|application/json||
|apikey|*|An active SQ API Key for the FlightStatus Package|
### Input Parameters
|Field |Data Type | Optional | Description|
|----|----|----|----|
|clientUUID| String| No| ID for tracking purpose|
|request |JSON Object| No||
|originAirportCode| String| No| 3-letter IATA code – e.g. SIN, LHR. In upper case.|
|destinationAirportCode| String| No| 3-letter IATA code – e.g. SIN, LHR. In upper case.|
|scheduledDepartureDate| String| No| Format: yyyy-MM-dd. Either ‘scheduledDepartureDate’ or ‘scheduledArrivalDate’ to be specified, could be optional if scheduledArrivalDate is input.|
|scheduledArrivalDate| String| No| Format: yyyy-MM-dd. Either ‘scheduledDepartureDate’ or ‘scheduledArrivalDate’ to be specified, could be optional if scheduledDepartureDate is input.|
### Output Parameters
|Field | Data Type | Description|
|----|----|----|
|status| String| “SUCCESS” / “FAILED”|
|code| Number| 200 if status is “SUCCESS”. Refer to Section 5 for possible error codes|
|message| String |error message must be displayed if status is “FAILED”|
|clientUUID| String| ClientUUID input from request|
|response| JSON Object| empty if status is “FAILED”|
|origin| JSON Object||
|airportCode| String| 3-letter IATA code – e.g. SIN, LHR.|
|airportName| String||
|airportTerminal| String||
|cityCode| String| City code of the station|
|cityName| String| City name of the station|
|destination| JSON Object||
|airportCode| String| 3-letter IATA code – e.g. SIN, LHR.|
|airportName| String||
|airportTerminal| String||
|cityCode| String| City code of the station|
|cityName| String| City name of the station|
|numberOfFlights| Number||
|flights| JSON Array ||
|origin| JSON Object||
|airportCode| String| 3-letter IATA code – SIN, LHR. In upper case.|
|airportName| String||
|airportTerminal |String||
|cityCode| String| City code of the station|
|cityName| String| City name of the station|
|destination| JSON Object||
|airportCode| String| 3-letter IATA code – SIN, LHR. In upper case.|
|airportName| String||
|airportTerminal| String||
|cityCode| String| City code of the station|
|cityName| String| City name of the station|
|numberOfStops| Number| 1 numeric|
|legs| JSON Array||
|cannedReasonCode| String| Canned message code from IFWS, exist if there is value returned|
|flightNumber| String||
|operatingAirlineCode| String| 2-letter IATA code – e.g. SQ, MI.|
|operatingAirlineName| String||
|marketingAirlineCode| String| 2-letter IATA code – e.g. LH, VA, VX.|
|marketingAirlineName| String||
|flightStatus| String| ‘On schedule’, ‘Arrived’, ‘Delayed’, ‘Cancelled’|
|isFlightRenumbered| Boolean| True if flight is renumbered|
|IsFlightRerouted| Boolean| True if flight is rerouted|
|origin| JSON Object| empty for single leg flight|
|airportCode| String| 3-letter IATA code – e.g. SIN, LHR.|
|airportName| String||
|airportTerminal| String||
|cityCode| String| City Code of the station|
|cityName| String| City Name of the station|
|destination| JSON Object| empty for single leg flight|
|airportCode| String| 3-letter IATA code – e.g. SIN, LHR.|
|airportName| String||
|airportTerminal| String||
|cityCode| String| City code of the station|
|cityName| String| City name of the station|
|scheduledDepartureTime| String| W3C date time format: yyyy-MM-ddThh:mm|
|scheduledArrivalTime| String| W3C date time format: yyyy-MM-ddThh:mm|
|estimatedDepartureTime| String| W3C date time format: yyyy-MM-ddThh:mm|
|estimatedArrivalTime| String| W3C date time format: yyyy-MM-ddThh:mm|
|actualDepartureTime| String| W3C date time format: yyyy-MM-ddThh:mm|
|actualArrivalTime| String| W3C date time format: yyyy-MM-ddThh:mm|
|aircraftType| String|
|changedLegs| JSON Array| Present if flight status is Rerouted or Renumbered|
|cannedReasonCode| String| Canned message code from IFWS, exist if there is value returned|
|flightNumber| String||
|operatingAirlineCode| String| 2-letter IATA code – e.g. SQ, MI.|
|operatingAirlineName| String||
|marketingAirlineCode| String| 2-letter IATA code – e.g. LH, VA, VX.|
|marketingAirlineName| String||
|flightStatus| String| ‘On schedule’, ‘Arrived’, ‘Delayed’, ‘Cancelled’|
|isFlightRenumbered| Boolean| True if flight is renumbered|
|IsFlightRerouted| Boolean| True if flight is rerouted|
|origin| JSON Object| empty for single leg flight|
|airportCode| String| 3-letter IATA code – e.g. SIN, LHR.|
|airportName| String||
|airportTerminal| String||
|cityCode| String| City code of the station|
|cityName| String| City name of the station|
|destination| JSON Object| empty for single leg flight|
|airportCode| String| 3-letter IATA code – e.g. SIN, LHR.|
|airportName| String||
|airportTerminal| String||
|cityCode| String| City code of the station|
|cityName| String| City name of the station|
|scheduledDepartureTime| String| W3C date time format: yyyy-MM-ddThh:mm|
|scheduledArrivalTime| String| W3C date time format: yyyy-MM-ddThh:mm|
|estimatedDepartureTime| String| W3C date time format: yyyy-MM-ddThh:mm|
|estimatedArrivalTime| String| W3C date time format: yyyy-MM-ddThh:mm|
|actualDepartureTime| String| W3C date time format: yyyy-MM-ddThh:mm|
|actualArrivalTime| String| W3C date time format: yyyy-MM-ddThh:mm|
|aircraftType| String||
|aircraftName| String| The full name of the aircraft, e.g. “Airbus A380-800”|
## Codes References
### Canned Reasons
|Reason Code|Description|
|----|----|
|CN0000001|Weather Conditions|
|CN0000002|Airspace Closure|
|CN0000003|Airport Closure|
|CN0000004|Runway Closure|
|CN0000005|Industrial Action|
|CN0000006|Late arrival of aircraft (only for ex-station flights)|
## Error Codes
### Generic error codes for API
|Code|Type|
|----|----|
|400| Malformed request.|
|401| Not authorised. Client ID not recognized.|
|403| Authorised but not allowed to access that API.|
|404| API not found.|
|410| Version not supported.|
|429| Number of requests exceed threshold.|
|9xx| Application errors. Refer to individual APIs in Section 4 for applicable codes.|
### Exception codes
|Code|Type|
|----|----|
|FLSTCO9000|Exception occurred while retrieving flight status details|
|FLSTCO9101|Database update fail, please contact CSL team.|
|FLSTCO9102|Exception occured while retrieving flight date from IFWS JSON, please contact CSL team.|
|FLSTCO9103|Flight status/route is not available.|
|FLSTCO9104|Exception occured while connecting to Altea service, please contact CSL team.|
|FLSTCO0001|Date Format is unparsable. Please use YYYY-MM-DD format.|
|FLSTCO0002|Flight Number is not valid.|
|FLSTCO0003|Input date is invalid.|
|FLSTCO0004|Airport code is not valid.|
|FLSTCO0005|Request format is invalid.|
|FLSTCO0006|Airline Code is not valid.|
|FLSTCO0007|Client ID is required.|
|FLSTCO0008|Client UUID is required.|
|FLSTCO0009|Origin Airport Code is required.|
|FLSTCO0010|Destination Airport Code is required.|
|FLSTCO0011|Flight date is required.|
|FLSTCO0012|Scheduled Departure Time is required.|
|FLSTCO0013|Subscription type is required.|
|FLSTCO0014|Subscription value is required.|
|FLSTST0001|Input date must be within +/- three date of the current date.|
|FLSTST0002|Origin airport code must input together with scheduled departure date.|
|FLSTST0003|Destination airport code must input together with scheduled arrival date.|
|FLSTSB0001|Mobile Number is not valid.|
|FLSTSB0002|E-mail address is not valid.|
|FLSTSB0003|Device Id is not valid.|
|FLSTSB0004|Subscription type is not valid.|
|FLSTSB0005|Invalid time zone for departure/arrival airport, please contact CSL team.|
|FLSTSB0006|Flight number already subscribe.|
|FLSTSB0007|Cannot subscribe for flights earlier than 3 days.|
|FLSTSB0008|Cannot subscribe for flights later than 3 days.|
|FLSTSB0009|Cannot subscribe landed flight.|
|FLSTSB0010|Error while checking for subscription.|
|FLSTSB0011|User can subscribe up to 5 flights only!|
|FLSTSB0012|Failed to unsubscribe flight.|
## JSON Sample
### Input Sample
```json
{
"request": {
"originAirportCode": "SIN",
"destinationAirportCode": "HKG",
"scheduledArrivalDate": "2018-04-21"
},
"clientUUID": "SAA-CLIENTUUID-123",
"apiVersion": 3,
"clientID": "SAA"
}
```
### Output Sample
```json
{
"status": "SUCCESS",
"code": "200",
"message": "SUCCESS",
"clientUUID": "SAA",
"response": {
"origin": {
"airportCode": "SIN",
"airportName": "Changi Intl",
"cityCode": "SIN",
"cityName": "Singapore"
},
"destination": {
"airportCode": "HKG",
"airportName": "Hong Kong",
"airportTerminal": "1",
"cityCode": "HKG",
"cityName": "Hong Kong"
},
"numberOfFlights": 7,
"flights": [
{
"origin": {
"airportCode": "SIN",
"airportName": "Changi Intl",
"cityCode": "SIN",
"cityName": "Singapore"
},
"destination": {
"airportCode": "HKG",
"airportName": "Hong Kong",
"airportTerminal": "1",
"cityCode": "HKG",
"cityName": "Hong Kong"
},
"numberOfStops": 0,
"legs": [
{
"flightNumber": "0890",
"operatingAirlineCode": "SQ",
"operatingAirlineName": "Singapore Airlines",
"marketingAirlineCode": "SQ",
"marketingAirlineName": "Singapore Airlines",
"isFlightRenumbered": false,
"isFlightRerouted": false,
"flightStatus": "On schedule",
"origin": {
"airportCode": "SIN",
"airportName": "Changi Intl",
"cityCode": "SIN",
"cityName": "Singapore"
},
"destination": {
"airportCode": "HKG",
"airportName": "Hong Kong",
"airportTerminal": "1",
"cityCode": "HKG",
"cityName": "Hong Kong"
},
"scheduledDepartureTime": "2018-04-21T07:30",
"scheduledArrivalTime": "2018-04-21T11:20",
"aircraftType": "772R",
"provisionalEtd": false
}
]
},
{
"origin": {
"airportCode": "SIN",
"airportName": "Changi Intl",
"cityCode": "SIN",
"cityName": "Singapore"
},
"destination": {
"airportCode": "HKG",
"airportName": "Hong Kong",
"airportTerminal": "1",
"cityCode": "HKG",
"cityName": "Hong Kong"
},
"numberOfStops": 0,
"legs": [
{
"flightNumber": "0860",
"operatingAirlineCode": "SQ",
"operatingAirlineName": "Singapore Airlines",
"marketingAirlineCode": "SQ",
"marketingAirlineName": "Singapore Airlines",
"isFlightRenumbered": false,
"isFlightRerouted": false,
"flightStatus": "On schedule",
"origin": {
"airportCode": "SIN",
"airportName": "Changi Intl",
"cityCode": "SIN",
"cityName": "Singapore"
},
"destination": {
"airportCode": "HKG",
"airportName": "Hong Kong",
"airportTerminal": "1",
"cityName": "Hong Kong"
},
"scheduledDepartureTime": "2018-04-21T08:40",
"scheduledArrivalTime": "2018-04-21T12:40",
"aircraftType": "359",
"provisionalEtd": false
}
]
},
{
"origin": {
"airportCode": "SIN",
"airportName": "Changi Intl",
"cityCode": "SIN",
"cityName": "Singapore"
},
"destination": {
"airportCode": "HKG",
"airportName": "Hong Kong",
"airportTerminal": "1",
"cityCode": "HKG",
"cityName": "Hong Kong"
},
"numberOfStops": 0,
"legs": [
{
"flightNumber": "0856",
"operatingAirlineCode": "SQ",
"operatingAirlineName": "Singapore Airlines",
"marketingAirlineCode": "SQ",
"marketingAirlineName": "Singapore Airlines",
"isFlightRenumbered": false,
"isFlightRerouted": false,
"flightStatus": "On schedule",
"origin": {
"airportCode": "SIN",
"airportName": "Changi Intl",
"cityCode": "SIN",
"cityName": "Singapore"
},
"destination": {
"airportCode": "HKG",
"airportName": "Hong Kong",
"airportTerminal": "1",
"cityCode": "HKG",
"cityName": "Hong Kong"
},
"scheduledDepartureTime": "2018-04-21T09:55",
"scheduledArrivalTime": "2018-04-21T13:55",
"aircraftType": "388S",
"provisionalEtd": false
}
]
},
{
"origin": {
"airportCode": "SIN",
"airportName": "Changi Intl",
"cityCode": "SIN",
"cityName": "Singapore"
},
"destination": {
"airportCode": "HKG",
"airportName": "Hong Kong",
"airportTerminal": "1",
"cityCode": "HKG",
"cityName": "Hong Kong"
},
"numberOfStops": 0,
"legs": [
{
"flightNumber": "0866",
"operatingAirlineCode": "SQ",
"operatingAirlineName": "Singapore Airlines",
"marketingAirlineCode": "SQ",
"marketingAirlineName": "Singapore Airlines",
"isFlightRenumbered": false,
"isFlightRerouted": false,
"flightStatus": "On schedule",
"origin": {
"airportCode": "SIN",
"airportName": "Changi Intl",
"cityCode": "SIN",
"cityName": "Singapore"
},
"destination": {
"airportCode": "HKG",
"airportName": "Hong Kong",
"airportTerminal": "1",
"cityCode": "HKG",
"cityName": "Hong Kong"
},
"scheduledDepartureTime": "2018-04-21T13:05",
"scheduledArrivalTime": "2018-04-21T17:05",
"aircraftType": "77WN",
"provisionalEtd": false
}
]
},
{
"origin": {
"airportCode": "SIN",
"airportName": "Changi Intl",
"cityCode": "SIN",
"cityName": "Singapore"
},
"destination": {
"airportCode": "HKG",
"airportName": "Hong Kong",
"airportTerminal": "1",
"cityCode": "HKG",
"cityName": "Hong Kong"
},
"numberOfStops": 0,
"legs": [
{
"flightNumber": "0872",
"operatingAirlineCode": "SQ",
"operatingAirlineName": "Singapore Airlines",
"marketingAirlineCode": "SQ",
"marketingAirlineName": "Singapore Airlines",
"isFlightRenumbered": false,
"isFlightRerouted": false,
"flightStatus": "On schedule",
"origin": {
"airportCode": "SIN",
"airportName": "Changi Intl",
"cityCode": "SIN",
"cityName": "Singapore"
},
"destination": {
"airportCode": "HKG",
"airportName": "Hong Kong",
"airportTerminal": "1",
"cityCode": "HKG",
"cityName": "Hong Kong"
},
"scheduledDepartureTime": "2018-04-21T15:05",
"scheduledArrivalTime": "2018-04-21T18:50",
"aircraftType": "772R",
"provisionalEtd": false
}
]
},
{
"origin": {
"airportCode": "SIN",
"airportName": "Changi Intl",
"cityCode": "SIN",
"cityName": "Singapore"
},
"destination": {
"airportCode": "SFO",
"airportName": "San Francisco Intl",
"airportTerminal": "I",
"cityCode": "SFO",
"cityName": "San Francisco"
},
"numberOfStops": 0,
"legs": [
{
"flightNumber": "0002",
"operatingAirlineCode": "SQ",
"operatingAirlineName": "Singapore Airlines",
"marketingAirlineCode": "SQ",
"marketingAirlineName": "Singapore Airlines",
"isFlightRenumbered": false,
"isFlightRerouted": false,
"flightStatus": "On schedule",
"origin": {
"airportCode": "SIN",
"airportName": "Changi Intl",
"cityCode": "SIN",
"cityName": "Singapore"
},
"destination": {
"airportCode": "HKG",
"airportName": "Hong Kong",
"airportTerminal": "1",
"cityCode": "HKG",
"cityName": "Hong Kong"
},
"scheduledDepartureTime": "2018-04-21T18:30",
"scheduledArrivalTime": "2018-04-21T22:15",
"aircraftType": "77WN",
"provisionalEtd": false
}
]
},
{
"origin": {
"airportCode": "SIN",
"airportName": "Changi Intl",
"cityCode": "SIN",
"cityName": "Singapore"
},
"destination": {
"airportCode": "HKG",
"airportName": "Hong Kong",
"airportTerminal": "1",
"cityCode": "HKG",
"cityName": "Hong Kong"
},
"numberOfStops": 0,
"legs": [
{
"flightNumber": "0868",
"operatingAirlineCode": "SQ",
"operatingAirlineName": "Singapore Airlines",
"marketingAirlineCode": "SQ",
"marketingAirlineName": "Singapore Airlines",
"isFlightRenumbered": false,
"isFlightRerouted": false,
"flightStatus": "On schedule",
"origin": {
"airportCode": "SIN",
"airportName": "Changi Intl",
"cityCode": "SIN",
"cityName": "Singapore"
},
"destination": {
"airportCode": "HKG",
"airportName": "Hong Kong",
"airportTerminal": "1",
"cityCode": "HKG",
"cityName": "Hong Kong"
},
"scheduledDepartureTime": "2018-04-21T19:55",
"scheduledArrivalTime": "2018-04-21T23:50",
"aircraftType": "772R"
"provisionalEtd": false
}
]
}
]
}
}
```
- Previous: Flight Status by Flight Number
- Up: Flight Status
- Next: Flight Search