Technical documentation
Access your Virtual Airline's operational data and connect websites, dashboards, bots, and external services to AviOps.
Overview
The AviOps API is a read-only REST interface. All current routes use GET, accept and return JSON, and fall under the /v1 prefix.
https://integrations.aviops.io
Authentication
Send the key in the x-api-key header with every request. The key identifies the Virtual Airline, selects its isolated data, and tracks monthly usage.
x-api-key: YOUR_API_KEY
Accept: application/jsonNever expose the key in browser-based JavaScript, repositories, or distributed applications. Make the call from the backend, store the key in an environment variable, and rotate it in the event of a leak.
The quota is monthly and linked to the key/VA. Upon reaching the limit, the API responds with 429. Each successfully authenticated call is counted.
First request
Test the list of pilots first. A 200 response confirms the URL, connectivity, and credentials.
curl "https://integrations.aviops.io/v1/pilots" \
-H "x-api-key: YOUR_API_KEY" \
-H "Accept: application/json"$ch = curl_init('https://integrations.aviops.io/v1/pilots');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'x-api-key: ' . getenv('YOUR_API_KEY'),
'Accept: application/json',
],
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);
if ($status !== 200) {
throw new RuntimeException("HTTP Error: {$status}");
}
$pilots = json_decode($body, true, flags: JSON_THROW_ON_ERROR);const response = await fetch('https://integrations.aviops.io/v1/pilots', {
headers: {
'x-api-key': process.env.YOUR_API_KEY,
'Accept': 'application/json'
}
});
if (!response.ok) throw new Error(`HTTP Error: ${response.status}`);
const pilots = await response.json();Answers and errors
Listings and ID-based lookups return a JSON array. Therefore, a successful lookup by ID contains zero or one item; a non-existent ID results in [], not a 404. Statistics is the exception and returns a JSON object.
| Status | Body | Recommended action |
|---|---|---|
200 |
Array or JSON object | Process the content. |
401 |
{"error":"API Key is required"} |
Send the mandatory header. |
401 |
{"error":"Invalid API Key"} |
Revise or rotate the key. |
429 |
{"error":"API Key limit exceeded"} |
Wait for the monthly renewal or increase the quota. |
The current version does not interpret query strings for filtering, sorting, or pagination. For large datasets, store the data on your backend and filter locally, adhering to your update policy.
API v1 Endpoints
Use /{id} only with the internal numeric identifier returned by the API itself.
Pilots
Returns active pilots and their associated rank.
/v1/pilots/v1/pilots/{id}Response fields
id:inticao:stringname:stringemail:stringrole:stringva_staff:boolstatus:stringrank_id:intrank_name:stringhub:string|nullactual_airport:stringivao_id:string|nullvatsim_id:string|nullsimbrief_id:string|nulllast_flight:string|nullflight_time:inttotal_pireps:intapproved_pireps:intrejected_pireps:inttotal_distance:intfpm_average:int|nulltotal_points:inttotal_coins:intcreated_at:stringupdated_at:stringCandidates
Returns VA candidate applications, including contact details.
/v1/candidates/v1/candidates/{id}Response fields
id:intname:stringemail:stringcountry:stringsimulator:stringestimated_hours:stringprefered_aircraft:string|nullnetwork:stringivao_id:string|nullvatsim_id:string|nullsimbrief_id:string|nullprefered_hub:string|nullfleet:stringmotivation:stringreferral_source:stringstatus:stringcreated_at:stringupdated_at:stringFleets
Returns the registered fleet categories.
/v1/fleets/v1/fleets/{id}Response fields
id:intname:stringaircraft_type:stringaircraft_icao:stringdescription:string|nullactive:boolcreated_at:stringupdated_at:stringAircrafts
Returns all registered aircraft, including inactive ones.
/v1/aircrafts/v1/aircrafts/{id}Response fields
id:intregistration:stringicao:stringname:stringfleet_id:intpax:intflight_time:intactual_airport:stringstatus:stringactive:boolcreated_at:stringupdated_at:stringAirports
Returns active airports used by the operation.
/v1/airports/v1/airports/{id}Response fields
id:inticao:stringiata:stringname:stringcity:stringstate:stringcountry:stringcountry_iso:stringlatitude:floatlongitude:floatelevation:intinfo_pilot:string|nullactive:boolcreated_at:stringupdated_at:stringRoutes
Returns the active routes published by the VA.
/v1/routes/v1/routes/{id}Response fields
id:intflight_number:stringcallsign:stringtype:stringdeparture:stringarrival:stringdistance:intduration:stringflight_level:intcost_index:intdetails:string|nullactive:boolcreated_at:stringupdated_at:stringRanks
Returns the active progression levels of the pilots.
/v1/ranks/v1/ranks/{id}Response fields
id:intorder:intname:stringdetails:string|nullmin_hours:intmin_pireps:intactive:boolcreated_at:stringupdated_at:stringBadges
Returns active badges and their achievement criteria.
/v1/badges/v1/badges/{id}Response fields
id:intname:stringcategory:stringdetails:string|nullcriteria:string|nullcriteria_value_1:int|nullcriteria_value_2:int|nullbonus_points:intdescription:string|nullactive:boolcreated_at:stringupdated_at:stringTours
Returns the registered tours, including those that are closed or inactive.
/v1/tours/v1/tours/{id}Response fields
id:intname:stringdescription:string|nullstart_date:stringend_date:stringactive:boolcreated_at:stringupdated_at:stringStatistics
Returns an object with aggregated VA indicators. This endpoint does not accept an ID.
/v1/statisticsResponse fields
pilots:intaircrafts:intairports:intpireps:introutes:intflight_time:int (minutos)distance:int (NM)fpm:intpassengers:int