Extended Options
A special optional parameter, extendedOptions
, adjusts the format and content of the response. Extended options are specified by mnemonic strings.
The following options (described below) are common to most of the Flex APIs:
useHTTPErrors
(available for all Flex APIs)useInlinedReferences
(available on many Flex APIs)includeNewFields
(available on all Flex APIs)languageCode
:xx
(available on many Flex APIs)
To specify these options in a REST-style request, simply include them as an optional parameter. Any of the following are valid:
extendedOptions=useHTTPErrors extendedOptions=usehTTpeRRors // (not case sensitive) extendedOptions=usehttperrors+useInlinedReferences
Unrecognized options are silently ignored.
Error Reporting
extendedOptions=useHTTPErrors
If useHTTPErrors
is specified, the error will be reported as the HTTP status of the response, with details about the error in the body of the error message. A full response object will not be returned.
By default, if a REST request to a valid resource results in an error, the server will produce an HTTP 200 status with the error reported in the error element of the response. This approach is friendlier to most javascript frameworks.
Inline versus Appendix Details
extendedOptions=useInlinedReferences
By default, potentially repetitive data in responses for some APIs is summarized in the appendix
element. For example, in flightStatus
elements, airports are referenced as arrivalAirportFsCode
and departureAirportFsCode
. Details on each airport referenced would appear in an airports
element in the appendix.
If you prefer to have this information embedded in the main response element, pass extendedOptions=useInlinedReferences
.
Accessing Extended Fields
extendedOptions=includeNewFields
By default, API requests return the frozen Long Term Support data for a given version (see Version Policy for details).
If there are new fields available for the requested version they can be included by specifying the option includeNewFields
.
Localization
extendedOptions=languageCode:xx
Some APIs offer localization of strings in the response data. Specify the desired language by providing the option languageCode:xx
, substituting the appropriate two-letter language code for xx
. If you do not provide a language code, you will get responses with localized strings in the default, English.
Languages supported
Code | Language |
---|---|
en |
English (Default) |
ar |
Arabic |
de |
German |
es |
Spanish |
fr |
French |
ja |
Japanese |
ko |
Korean |
pt |
Portuguese |
zh |
Simplified Chinese |
APIs Supporting Localization
API | Localized information |
---|---|
Airlines | airline names |
Airports | airport names, city names, street addresses, countries, districts, regions |
Alerts | airport names, city names, street addresses, countries, districts, regions, airline names, equipment names |
Delay Index | airport names, city names, street addresses, countries, districts, regions |
FlightStatus | airport names, city names, street addresses, countries, districts, regions, airline names, equipment names |
FIDS | airport names, city names, airline names, "prevailing conditions" weather tags, timeliness remarks |
Ratings | airport names, city names, street addresses, countries, districts, regions, airline names |
Weather | airport names, city names, street addresses, countries, districts, regions, "prevailing conditions" tags |
Connections | airport names, city names, street addresses, countries, districts, regions, airline names, equipment names |