Custom Connector
Aviationstack Connector
KSA
The Aviationstack Connector provides a robust interface to access services, enabling retrieval of aviation-related data such as flights, routes, airports, airlines, airplanes, aircraft types, taxes, cities, countries, and flight schedules. It supports querying real-time and future flight information, airport details, and more.
Overview
Integration Overview
This document provides a comprehensive guide for each endpoint, its purpose, configuration, and workflow support using the Aviationstack Connector. The connector forwards HTTP GET requests to the Aviationstack API, handling query parameters and headers to ensure reliable data retrieval.
- get_flights. Retrieves real-time flight data, including flight status, departure, and arrival details.
- get_routes. Retrieves flight route information, including departure and arrival airports and airlines.
- get_airports. Retrieves airport information, including name, IATA/ICAO codes, city, and country.
- get_airlines. Retrieves airline information, including name and IATA/ICAO codes.
- get_airplanes. Retrieves airplane information, including model code and text.
- get_aircraft_types. Retrieves aircraft type information.
- get_taxes. Retrieves aviation tax information, including tax name and code.
- get_cities. Retrieves city information, including city name, country, and IATA code.
- get_countries. Retrieves country information, including country name and code.
- get_timetable. Retrieves flight schedule data based on IATA code and type (arrival or departure).
- get_flights_future. Retrieves future flight schedule data based on IATA code, type, and date.
Documentation
Detailed Integration Documentation
Flights Retrieval
| Action | get_flights |
|---|---|
| Purpose | Retrieves real-time flight data, including flight status, departure, and arrival details. |
| Parameters | Required: access_key: API access key (string). Optional: Additional parameters supported by the Aviationstack API (e.g. flight_number, dep_iata). |
| Configuration | Configure the base URL via CONNECTOR_ENV_AVIATIONSTACK_BASE_URL. Set CONNECTOR_ENV_AVIATIONSTACK_API_KEY with a valid API key. Optionally set CONNECTOR_ENV_PORT (default 8081). |
| Output | Successful: JSON object with flight details (date, status, departure, arrival, airline, aircraft). Failure: error codes (400, 401, 404, 500). |
| Workflow example | Configure the connector, execute a GET request to /flights?access_key=…, then process the JSON response to display flight details. |
Routes Retrieval
| Action | get_routes |
|---|---|
| Purpose | Retrieves flight route information, including departure and arrival airports and airlines. |
| Parameters | Required: access_key: API access key (string). Optional: Additional parameters (e.g. dep_iata, arr_iata). |
| Configuration | Configure the base URL and API key via the CONNECTOR_ENV_AVIATIONSTACK_* environment variables. |
| Output | Successful: JSON object with route details (departure/arrival IATA/ICAO codes and airline). Failure: error codes (400, 401, 404, 500). |
| Workflow example | Execute a GET request to /routes?access_key=… and display route information in your application. |
Airports Retrieval
| Action | get_airports |
|---|---|
| Purpose | Retrieves airport information, including name, IATA/ICAO codes, city, and country. |
| Parameters | Required: access_key: API access key (string). Optional: e.g. iata_code. |
| Configuration | Configure the base URL and API key via the CONNECTOR_ENV_AVIATIONSTACK_* environment variables. |
| Output | Successful: JSON object with airport details (name, IATA/ICAO, city, country, timezone). Failure: error codes. |
| Workflow example | Execute a GET request to /airports?access_key=… and display airport details. |
Airlines Retrieval
| Action | get_airlines |
|---|---|
| Purpose | Retrieves airline information, including name and IATA/ICAO codes. |
| Parameters | Required: access_key: API access key (string). Optional: e.g. iata_code. |
| Configuration | Configure the base URL and API key via the CONNECTOR_ENV_AVIATIONSTACK_* environment variables. |
| Output | Successful: JSON object with airline details. Failure: error codes. |
| Workflow example | Execute a GET request to /airlines?access_key=… and display airline details. |
Airplanes Retrieval
| Action | get_airplanes |
|---|---|
| Purpose | Retrieves airplane information, including model code and text. |
| Parameters | Required: access_key: API access key (string). Optional: Additional parameters supported by the API. |
| Configuration | Configure the base URL and API key via the CONNECTOR_ENV_AVIATIONSTACK_* environment variables. |
| Output | Successful: JSON object with airplane details (model code and text). Failure: error codes. |
| Workflow example | Execute a GET request to /airplanes?access_key=… and display airplane details. |
Aircraft Types Retrieval
| Action | get_aircraft_types |
|---|---|
| Purpose | Retrieves aircraft type information. |
| Parameters | Required: access_key: API access key (string). |
| Configuration | Configure the base URL and API key via the CONNECTOR_ENV_AVIATIONSTACK_* environment variables. |
| Output | Successful: JSON object with aircraft type details. Failure: error codes. |
| Workflow example | Execute a GET request to /aircraft_types?access_key=… and display aircraft type details. |
Taxes Retrieval
| Action | get_taxes |
|---|---|
| Purpose | Retrieves aviation tax information, including tax name and code. |
| Parameters | Required: access_key: API access key (string). Optional: Additional parameters supported by the API. |
| Configuration | Configure the base URL and API key via the CONNECTOR_ENV_AVIATIONSTACK_* environment variables. |
| Output | Successful: JSON object with tax details (name and code). Failure: error codes. |
| Workflow example | Execute a GET request to /taxes?access_key=… and display tax details. |
Cities Retrieval
| Action | get_cities |
|---|---|
| Purpose | Retrieves city information, including city name, country, and IATA code. |
| Parameters | Required: access_key: API access key (string). Optional: e.g. city_name. |
| Configuration | Configure the base URL and API key via the CONNECTOR_ENV_AVIATIONSTACK_* environment variables. |
| Output | Successful: JSON object with city details (name, country, IATA code). Failure: error codes. |
| Workflow example | Execute a GET request to /cities?access_key=… and display city details. |
Countries Retrieval
| Action | get_countries |
|---|---|
| Purpose | Retrieves country information, including country name and code. |
| Parameters | Required: access_key: API access key (string). Optional: e.g. country_code. |
| Configuration | Configure the base URL and API key via the CONNECTOR_ENV_AVIATIONSTACK_* environment variables. |
| Output | Successful: JSON object with country details (name and code). Failure: error codes. |
| Workflow example | Execute a GET request to /countries?access_key=… and display country details. |
Timetable Retrieval
| Action | get_timetable |
|---|---|
| Purpose | Retrieves flight schedule data based on IATA code and type (arrival or departure). |
| Parameters | Required: iataCode: Airport IATA code (e.g. “DXB”). type: Flight type (“departure” or “arrival”). access_key: API access key. Optional: Additional parameters supported by the API. |
| Configuration | Configure the base URL and API key via the CONNECTOR_ENV_AVIATIONSTACK_* environment variables. |
| Output | Successful: JSON object with schedule details (weekday, departure, arrival, aircraft, airline, flight). Failure: error codes. |
| Workflow example | Execute a GET request to /timetable?iataCode=DXB&type=departure&access_key=… and display schedule details. |
Future Flights Retrieval
| Action | get_flights_future |
|---|---|
| Purpose | Retrieves future flight schedule data based on IATA code, type, and date. |
| Parameters | Required: iataCode: Airport IATA code (e.g. “JFK”). type: Flight type. date: Flight date (e.g. “2024-11-02”). access_key: API access key. Optional: Additional parameters supported by the API. |
| Configuration | Configure the base URL and API key via the CONNECTOR_ENV_AVIATIONSTACK_* environment variables. |
| Output | Successful: JSON object with future schedule details. Failure: error codes. |
| Workflow example | Execute a GET request to /flightsFuture?iataCode=JFK&type=arrival&date=2024-11-02&access_key=… and display future flight schedule details. |
Support
For technical support, contact custom-connectors-support@isolutions.sa.