NAV Navbar

Introduction

Welcome to the Aeron API! This simple RESTful API will help to integrate your flight data into your business or application. API reference provides information on available endpoints and how to interact with them. You can view code examples in the dark area to the right.

Authentication

Use this code to authenticate:

curl https://api.aeron.com/flights \
     -H "Authorization: Bearer <Your API Key>"

Aeron API uses keys to allow access to the endpoint. You can get a new API key at your Aerotrips account.

Aeron API expects for the API key to be included in all API requests to the server in a header that looks like the following:

Authorization: Bearer <Your API Key>

Rate limit

Rate limit is reached

{
    "error": {
        "code": 429,
        "message": "Too Many Attempts."
    }
}

Aeron API is rate limited to prevent abuse that would degrade our ability to maintain consistent API performance for all users. By default, every user is rate limited at 120 requests per minute. If your requests are being rate limited, HTTP response code 429 will be returned.

Flights

Your flight logs are stored in encrypted and decentralized database in EASA/FAA compliant format. Endpoints and functional description of the fields are provided below.

List flights

List all your flights

curl https://api.aeron.com/flights \
     -H "Authorization: Bearer <Your API Key>"

Example response

{
    "data": [
        {
            "id": "QK8DYmdzoerv4RbonXJ5obrv",
            "date": "15-02-2018",
            "tx_hash": "0x5d7a91c9f068d723ac52480c0ef61b9bf3f7b52dc726046e0b47f1beaa2f44ff"
        },
        {
            // Resource
        },
        ...
    ]
}

This endpoint retrieves all your flights.

HTTP Request

GET https://api.aeron.com/flights

Resource

Field Type Description
id string unique flight code
date date flight date DD-MM-YYYY
tx_hash hash Ethereum blockchain transaction hash

Show flight

Show a specific flight

curl https://api.aeron.com/flights/QK8DYmdzoerv4RbonXJ5obrv \
     -H "Authorization: Bearer <Your API Key>"

Example response

{
    "id": "QK8DYmdzoerv4RbonXJ5obrv",
    "date": "15-02-2018",
    "aircraft_type": "C150",
    "aircraft_reg": "5BCLF",
    "name_pic": "J. SMITH",
    "departure_place": "LCPH",
    "departure_time": "13:31",
    "arrival_place": "LCLK",
    "arrival_time": "15:01",
    "oct_night": "",
    "oct_time_ifr": 0.5,
    "oct_si": "",
    "takeoffs_day": 1,
    "takeoffs_night": "",
    "landings_day": 1,
    "landings_night": "",
    "instrument_approaches": 1,
    "spt_single_engine": 1.5,
    "spt_multi_engine": "",
    "multi_pilot_time": "",
    "flight_time": 1.5,
    "pft_pic": 1.5,
    "pft_copilot": "",
    "pft_dual": "",
    "pft_instructor": "",
    "pft_cross_country": 1.5,
    "st_sessions_type": "",
    "st_sessions_duration": "",
    "revision_date": "23-02-2018 12:37:18",
    "revision_number": 1,
    "hash": "2d9cd763125d2bc3874ab9339a2f5c9e",
    "tx_hash": "0x5d7a91c9f068d723ac52480c0ef61b9bf3f7b52dc726046e0b47f1beaa2f44ff"
}

This endpoint retrieves a specific flight.

HTTP Request

GET https://api.aeron.com/flights/<ID>

Resource

Field Type Description
id string unique flight code
date date flight date DD-MM-YYYY
aircraft_type string ICAO aircraft type designator
aircraft_reg string aircraft registration
name_pic string PIC name
departure_place airport the place of departure (either in full or the internationally recognized three or four letter designator)
departure_time time time hh:mm in utc 24h
arrival_place airport the place of destination (either in full or the internationally recognized three or four letter designator)
arrival_time time time hh:mm in utc 24h
oct_night number flight time undertaken at night if applicable (aircraft may depart during day time and land during night time, this field may not be equal to the total flight time, hours rounded to one decimal)
oct_time_ifr number flight time undertaken under instrument flight rules if applicable (this field may not be equal to the total flight time, hours rounded to one decimal)
oct_si number flight time undertaken in simulated instrument conditions (this field may not be equal to the total flight time, hours rounded to one decimal)
takeoffs_day number number of take-offs during day time
takeoffs_night number number of take-offs during night time
landings_day number number of landings during day time
landings_night number number of landings during night time
instrument_approaches number number of instrumental approaches
spt_single_engine number flight time, single pilot operation at single engine aircraft, hours rounded to one decimal
spt_multi_engine number flight time, single pilot operation at multi engine aircraft, hours rounded to one decimal
multi_pilot_time number flight time, multi pilot operation, hours rounded to one decimal
flight_time number total flight time, hours rounded to one decimal
pft_pic number flight time as PIC, hours rounded to one decimal
pft_copilot number flight time as co-pilot, hours rounded to one decimal
pft_dual number flight time as PIC with instructor, hours rounded to one decimal
pft_instructor number flight time as instructor, hours rounded to one decimal
pft_cross_country number flight time for flights conducted by a pilot in an aircraft that includes a landing at a point other than the point of departure, hours rounded to one decimal
st_sessions_type number type of aircraft and qualification number of the device, or fnpt i or fnpt ii as appropriate
st_sessions_duration number total time of fstd session, hours rounded to one decimal
revision_date timestamp log entry date and time stamp in utc 24h
revision_number integer log entry revision number, incrementing
hash hash md5 hash of preceding raw data string
tx_hash hash Ethereum blockchain transaction hash

Blockchain

transaction = web3.eth.getTransaction('0x5d7a91c9f068d723ac52480c0ef61b9bf3f7b52dc726046e0b47f1beaa2f44ff')
input = web3.toAscii(transaction.input)
console.log(input)

Example of base64 encoded data retrieved from blockchain log entries

MTUtMDItMjAxODtDMTUwOzVCQ0xGO0ouIFNNSVRIO0xDUEg7MTM6MzE6MjA7TENMSzsxNTowMTo0MTs7MC41OzsxOzsxOzsxOzEuNTs7OzEuNTsxLjU7Ozs7MS41Ozs7MjMtMDItMjAxOCAxMjozNzoxODsxOzJkOWNkNzYzMTI1ZDJiYzM4NzRhYjkzMzlhMmY1Yzll

Example of raw data retrieved from blockchain

15-02-2018;C150;5BCLF;J. SMITH;LCPH;13:31:20;LCLK;15:01:41;;0.5;;1;;1;;1;1.5;;;1.5;1.5;;;;1.5;;;23-02-2018 12:37:18;1;2d9cd763125d2bc3874ab9339a2f5c9e

You can also retrieve a specific flight directly from Ethereum blockchain with a transaction hash tx_hash.

Aircraft

List aircraft

List all your aircraft

curl https://api.aeron.com/aircraft \
     -H "Authorization: Bearer <Your API Key>"

Example response

{
    "data": [
        {
            "registration": "5B-CKY",
            "photo": "https://pilot.aeron.aero/uploads/photos/153641787213.jpg",
            "model": {
                "id": 2926,
                "name": "Cessna 172",
                "manufacturer": "Cessna",
                "engine_count": 1,
                "type_designator": "C172",
                "engine_type": "Piston",
                "wtc": "L"
            }
        },
        {
            // Resource
        },
        ...
    ]
}

This endpoint retrieves all your aircraft.

HTTP Request

GET https://api.aeron.com/aircraft

Resource

Field Type Description
registration string Aircraft registration number
photo string Aircraft photo URL
model object Aircraft model resource

Show aircraft

Show a specific aircraft

curl https://api.aeron.com/aircraft/5B-CKY \
     -H "Authorization: Bearer <Your API Key>"

Example response

{
    "registration": "5B-CKY",
    "photo": "https://pilot.aeron.aero/uploads/photos/153641787213.jpg",
    "model": {
        "id": 2926,
        "name": "Cessna 172",
        "manufacturer": "Cessna",
        "engine_count": 1,
        "type_designator": "C172",
        "engine_type": "Piston",
        "wtc": "L"
    }
}

This endpoint retrieves a specific aircraft resource by a registration number.

HTTP Request

GET https://api.aeron.com/aircraft/<REGISTRATION>

Models

List all aircraft models by a specific manufacturer

curl https://api.aeron.com/models?manufacturer=17 \
     -H "Authorization: Bearer <Your API Key>"

Example response

[
    {
        "id": 2920,
        "name": "Cessna 120",
        "manufacturer": "Cessna",
        "engine_count": 1,
        "type_designator": "LandPlane",
        "engine_type": "Piston",
        "wtc": "L"
    },
    {
        "id": 2921,
        "name": "Cessna 140",
        "manufacturer": "Cessna",
        "engine_count": 1,
        "type_designator": "LandPlane",
        "engine_type": "Piston",
        "wtc": "L"
    },
    ...
]

This endpoint retrieves all aircraft models by a specific manufacturer.

HTTP Request

GET https://api.aeron.com/models

Arguments

Field Type Required Description
manufacturer integer required manufacturer resource id

Resource

Field Type Description
id integer Model id
name string Aircraft model name
manufacturer string Aircraft manufacturer
engine_count integer Aircraft engine count
type_designator string Aircraft type designator
engine_type string Engine type
wtc string WTC

Manufacturers

List all manufacturers

curl https://api.aeron.com/manufacturers \
     -H "Authorization: Bearer <Your API Key>"

Example response

[
    {
        "id": 38,
        "name": "3XTRIM"
    },
    {
        "id": 39,
        "name": "A-41"
    },
    {
        "id": 40,
        "name": "AAC"
    },
    ...
]

This endpoint retrieves all aircraft manufacturers.

HTTP Request

GET https://api.aeron.com/manufacturers

Resource

Field Type Description
id integer Manufacturer id
name string Manufacturer name

Add aircraft

Add a new aircraft

curl https://api.aeron.com/aircraft \
     -X POST \
     -H 'Content-Type: application/json' \
     -H "Authorization: Bearer <Your API Key>" \
     -d '{
       "registration": "5B-CKY",
       "photo": "https://pilot.aeron.aero/uploads/photos/153641787213.jpg",
       "model_id": 2926,
     }'

Example response (code 201)

{
    "registration": "5B-CKY",
    "photo": "https://pilot.aeron.aero/uploads/photos/153641787213.jpg",
    "model": {
        "id": 2926,
        "name": "Cessna 172",
        "manufacturer": "Cessna",
        "engine_count": 1,
        "type_designator": "C172",
        "engine_type": "Piston",
        "wtc": "L"
    }
}

HTTP Request

POST https://api.aeron.com/aircraft

Arguments

Field Type Required Description
registration string required Aircraft registration number
photo string optional Aircraft photo URL
model_id integer required model resource id

Update aircraft

Update an aircraft

curl https://api.aeron.com/aircraft/5B-CKY \
     -X PATCH \
     -H 'Content-Type: application/json' \
     -H "Authorization: Bearer <Your API Key>" \
     -d '{
       "registration": "5B-CKY",
       "photo": "https://pilot.aeron.aero/uploads/photos/153641787213.jpg",
       "model_id": 2926,
     }'

Example response (code 200)

{
    "registration": "5B-CKY",
    "photo": "https://pilot.aeron.aero/uploads/photos/153641787213.jpg",
    "model": {
        "id": 2926,
        "name": "Cessna 172",
        "manufacturer": "Cessna",
        "engine_count": 1,
        "type_designator": "C172",
        "engine_type": "Piston",
        "wtc": "L"
    }
}

HTTP Request

PATCH https://api.aeron.com/aircraft/<REGISTRATION>

Delete aircraft

Delete aircraft

curl https://api.aeron.com/aircraft/5B-CKY \
     -X DELETE \
     -H "Authorization: Bearer <Your API Key>"

Example response (code 200)

{
    "status": {
        "code": "200",
        "message": "Aircraft deleted."
    }
}

HTTP Request

DELETE https://api.aeron.com/aircraft/<REGISTRATION>

Airports

List airports

List airports in a specific country

curl https://api.aeron.com/airports?country=CY \
     -H "Authorization: Bearer <Your API Key>"

Example response

{
    "data": [
        {
            "icao": "LCLK",
            "iata": "LCA",
            "name": "Larnaca International Airport",
            "latitude": 34.875099182129,
            "longitude": 33.624900817871,
            "altitude": 8,
            "country": "CY"
        },
        {
            "icao": "LCPH",
            "iata": "PFO",
            "name": "Paphos International Airport",
            "latitude": 34.717998504639,
            "longitude": 32.485698699951,
            "altitude": 41,
            "country": "CY"
        },
        ...
    ]

}

This endpoint retrieves list of airport resources. You can filter airports by country.

HTTP Request

GET https://api.aeron.com/airports

Arguments

Field Type Required Description
country string optional Country ISO 3166 alpha-2 code

Show airport

Find a specific airport by ICAO code

curl https://api.aeron.com/airports/LCPH \
     -H "Authorization: Bearer <Your API Key>"

Example response

{
    "icao": "LCPH",
    "iata": "PFO",
    "name": "Paphos International Airport",
    "latitude": 34.717998504639,
    "longitude": 32.485698699951,
    "altitude": 41,
    "country": "CY"
}

This endpoint retrieves a single airport resource. Find a specific airport by icao or iata code.

HTTP Request

GET https://api.aeron.com/airports/<ICAO>

Resource

Field Type Description
icao string ICAO airport code
iata string IATA airport code
name string Airport name
latitude number Airport location, latitude
longitude number Airport location, longitude
altitude number Airport location, altitude
country string Country ISO 3166 alpha-2 code

Pagination

curl https://api.aeron.com/flights?page=2 \
     -H "Authorization: Bearer <Your API Key>"

Example of pagination object

{
    "data": [
        {
            // Resource
        },
        {
            // Resource
        },
        ...
    ],
    "links": {
        "first": "https://api.aeron.com/flights?page=1",
        "last": "https://api.aeron.com/flights?page=20",
        "prev": "https://api.aeron.com/flights?page=1",
        "next": "https://api.aeron.com/flights?page=3"
    },
    "meta": {
        "current_page": 2,
        "from": 51,
        "last_page": 20,
        "path": "https://api.aeron.com/flights",
        "per_page": 50,
        "to": 100,
        "total": 1000
    }
}

All GET endpoints which return an object list support pagination with information inside a pagination object. The JSON from the pagination object will include meta information such as total, current_page, last_page, and more. The API will construct the next call into links.next. When the links.next response is null you have paginated all the results. Default per page limit value is set to 50. Max per page limit is 100.

Arguments

Field Default Description
page 1 Page number to retrieve
limit 50 Number of results per page
order desc Order of the resources in the response

Errors

Example response

{
    "error": {
        "code": 401,
        "message": "API key is not valid."
    }
}
Code Message DESCRIPTION
400 Bad Request Request arguments are not allowed
401 Unauthorized API key is not valid
403 Forbidden Access is restricted
404 Not Found Endpoint is not found
405 Method Not Allowed Endpoint does not exist
422 Unprocessable Entity Request arguments are not valid
429 Too Many Attempts Rate limit is reached