Difference between revisions of "XML-Interface"

From FSAirlinesWiki
Jump to: navigation, search
Line 8: Line 8:
 
The result of the request will be given in xml format with base-tag being ''<fsa_output>''. This tag has the attributes ''version'' and ''success'' which show the version number of the interface and the if the request succeeded or not. In case of a failure the ''success''-attribute shows the error message. The following example shows the return text of the above function:
 
The result of the request will be given in xml format with base-tag being ''<fsa_output>''. This tag has the attributes ''version'' and ''success'' which show the version number of the interface and the if the request succeeded or not. In case of a failure the ''success''-attribute shows the error message. The following example shows the return text of the above function:
 
<pre><fsa_output version="1.0" success="SUCCESS">
 
<pre><fsa_output version="1.0" success="SUCCESS">
   <data id="1" name="Konrad" surname="Pustka" va_user="SNA101" rank_id="1776" location="EDDM" lastactive="1287330550" status="" budget="198144" />
+
   <data id="1" name="Konrad" surname="Pustka" va_user="SNA101" location="EDDM" lastactive="1287330550" budget="198144" />
   <data id="2" name="Claudio" surname="Gusmini" va_user="SNA102" rank_id="1776" location="EDDM" lastactive="1286366261" status="" budget="216405101" />
+
   <data id="2" name="Claudio" surname="Gusmini" va_user="SNA102" location="EDDM" lastactive="1286366261" budget="216405101" />
 
</fsa_output></pre>
 
</fsa_output></pre>
 
Inside the ''fsa_output''-tag there are all the ''data''-tags which contain all the information.
 
Inside the ''fsa_output''-tag there are all the ''data''-tags which contain all the information.
Line 16: Line 16:
 
==Data==
 
==Data==
 
The following section contains a detailed list of all the request-functions with their return values.
 
The following section contains a detailed list of all the request-functions with their return values.
 +
 +
===Parameters===
 +
All the request functions need parameters which need to be appended. The following table shows all the parameters and their meaning.
 +
{| class="wikitable"
 +
! Parameter
 +
! Meaning
 +
|-
 +
| ac_id
 +
| ID of the aircraft. Is part of the data received from other functions (e.g. getAircraftList).
 +
|-
 +
| accept_pp
 +
| Must be set '1' if Privacy Policy is accepted.
 +
|-
 +
| acdb_id
 +
| ID of the aircraft type. Is part of the data received from other functions (e.g. getAircraftList).
 +
|-
 +
| airport
 +
| Starting airport. Where the user should be placed first.
 +
|-
 +
| arr
 +
| ICAO code of the arrival airport.
 +
|-
 +
| count
 +
| Number past flights which should be displayed.
 +
|-
 +
| country
 +
| Name of the country.
 +
|-
 +
| days
 +
| Number of past days from now which should be displayed.
 +
|-
 +
| dep
 +
| ICAO code of the departure airport.
 +
|-
 +
| email
 +
| E-Mail of the user.
 +
|-
 +
| fleet_id
 +
| ID of the fleet. Is part of the data received from other functions.
 +
|-
 +
| from_ts
 +
| UNIX timestamp of the starting date.
 +
|-
 +
| givenname
 +
| Given name of the user.
 +
|-
 +
| icao
 +
| ICAO code of the airport.
 +
|-
 +
| passwd
 +
| Password of the pilot (MD5 encrypted).
 +
|-
 +
| password
 +
| Password of the user.
 +
|-
 +
| pilot_id
 +
| ID of the pilot. Is part of the data received from other functions.
 +
|-
 +
| report_id
 +
| ID of the report. Is part of the data received from other functions.
 +
|-
 +
| surname
 +
| Surname of the user.
 +
|-
 +
| to_ts
 +
| UNIX timestamp of the ending date.
 +
|-
 +
| user
 +
| Username of the pilot.
 +
|-
 +
| username
 +
| Requested username.
 +
|-
 +
| va_id
 +
| ID of the [[Virtual Airline]]. Is displayed on the [[Overview]] page.
 +
|}
 +
  
 
===Aircraft Data===
 
===Aircraft Data===
 
{| class="wikitable"
 
{| class="wikitable"
 
! Function
 
! Function
! Parameters<ref>All parameters are mandatory</ref>
+
! Parameters<ref>Parameters in brackets are optional</ref>
 
! Return Codes
 
! Return Codes
 
! Data
 
! Data
 +
|-
 +
| getAircraftData
 +
| va_id, ac_id
 +
| SUCCESS, NOT FOUND
 +
| id, va_id, acdb_id, location, va_id, user_id, lease_id, fleet_id, status, value, registration, fuel, state, ac_name, stateeng1, stateeng2, stateeng3, stateeng4, stategear, statehull, img_path
 
|-
 
|-
 
| getAircraftDBData
 
| getAircraftDBData
Line 28: Line 110:
 
| SUCCESS, NOT FOUND
 
| SUCCESS, NOT FOUND
 
| id, manufacturer, type, icao, passengers, price, fuel, dow, mtow, speed, engines, cargo, mzfw, market_only, range
 
| id, manufacturer, type, icao, passengers, price, fuel, dow, mtow, speed, engines, cargo, mzfw, market_only, range
 +
|-
 +
| getAircraftDBList
 +
| va_id
 +
| SUCCESS, NOT FOUND
 +
| id, manufacturer, type, icao
 
|-
 
|-
 
| getAircraftList
 
| getAircraftList
Line 38: Line 125:
 
| SUCCESS, NOT FOUND
 
| SUCCESS, NOT FOUND
 
| flights, hours, distance
 
| flights, hours, distance
|-
 
| getAirlineStats
 
| va_id
 
| SUCCESS, NOT FOUND
 
| id, flights, rating, hours, distance, last, fuel_used, pax, cargo_kg
 
|-
 
| getAirportData
 
| va_id, icao
 
| SUCCESS, NOT FOUND
 
| id, name, iata, icao, city, country, la_g, la_p, la_s, la_d, lat, lo_g, lo_p, lo_s, lo_d, lon, altitude, length, fuel, size
 
|-
 
| getAirportList
 
| va_id
 
| SUCCESS, NOT FOUND
 
| icao, name, city, country, fuel, lat, lon
 
|-
 
| getCountryStats
 
| va_id, country
 
| SUCCESS, NOT FOUND
 
| va_name, id, flights, rating hours, profit, distance, last, fuel_used, pax, cargo_kg
 
 
|-
 
|-
 
| getFleetAircraftList
 
| getFleetAircraftList
Line 73: Line 140:
 
| SUCCESS, NOT FOUND
 
| SUCCESS, NOT FOUND
 
| id, flights, hours, distance, last, fuel_used, profit, cargo_kg, pax
 
| id, flights, hours, distance, last, fuel_used, profit, cargo_kg, pax
 +
|-
 +
| getLeasedAircraftList
 +
| va_id
 +
| SUCCESS, NOT FOUND
 +
| id, acdb_id, icao, value, location, registraion, state, ac_name, status, fleet_id, fuel, va_id, name, expire
 
|-  
 
|-  
 
| getPeriodFleetStats
 
| getPeriodFleetStats
Line 78: Line 150:
 
| SUCCESS, NOT FOUND
 
| SUCCESS, NOT FOUND
 
| id, flights, hours, distance, last, fuel_used, profit, cargo_kg, pax
 
| id, flights, hours, distance, last, fuel_used, profit, cargo_kg, pax
 +
|}
 +
 +
===Airports===
 +
{| class="wikitable"
 +
! Function
 +
! Parameters<ref>Parameters in brackets are optional</ref>
 +
! Return Codes
 +
! Data
 
|-
 
|-
| getLeasedAircraftList
+
| getAirportData
| va_id
+
| va_id, icao
 
| SUCCESS, NOT FOUND
 
| SUCCESS, NOT FOUND
| id, acdb_id, icao, value, location, registraion, state, ac_name, status, fleet_id, fuel, va_id, name, expire
+
| id, name, iata, icao, city, country, la_g, la_p, la_s, la_d, lat, lo_g, lo_p, lo_s, lo_d, lon, altitude, length, fuel, size
 
|-
 
|-
| getPilotList
+
| getAirportList
 
| va_id
 
| va_id
 
| SUCCESS, NOT FOUND
 
| SUCCESS, NOT FOUND
| id, name, surname, user, va_user, rank_id, location, last_active, status, budget
+
| icao, name, city, country, fuel, lat, lon
 +
|}
 +
 
 +
===Airline Data===
 +
{| class="wikitable"
 +
! Function
 +
! Parameters<ref>Parameters in brackets are optional</ref>
 +
! Return Codes
 +
! Data
 
|-
 
|-
| getPilotData
+
| getAirlineData
| va_id, pilot_id
+
| va_id, id (=va_id)
 
| SUCCESS, NOT FOUND
 
| SUCCESS, NOT FOUND
| id, name, surname, user, va_user, rank_id, location, budget, lastactive, active, sigac, timezone, weightunit, language, msgmail, flights, rating, hours, distance, pax, cargo_kg
+
| id, name, base, code, budget, homepage, logo_l, logo_s, price, reputation, pilotcharge, multiplier, mission
 
|-
 
|-
| getPilotHours
+
| getAirlineStats
| va_id, pilot_id
+
| va_id
 
| SUCCESS, NOT FOUND
 
| SUCCESS, NOT FOUND
| id, manufacturer, type, icao, hours
+
| id, flights, rating, hours, distance, last, fuel_used, pax, cargo_kg
 
|-
 
|-
| getPilotRatings
+
| getCountryStats
| va_id, pilot_id
+
| va_id, country
 
| SUCCESS, NOT FOUND
 
| SUCCESS, NOT FOUND
| id, training, manufacturer, type
+
| va_name, id, flights, rating hours, profit, distance, last, fuel_used, pax, cargo_kg
 +
|-
 +
| getRankList
 +
| va_id
 +
| SUCCESS, NOT FOUND
 +
| id, name, short, settings, pilots, aircrafts, fleet, flights, partnerships, advertisements, fleet_id
 +
|}
 +
 
 +
===Financial Data===
 +
{| class="wikitable"
 +
! Function
 +
! Parameters<ref>Parameters in brackets are optional</ref>
 +
! Return Codes
 +
! Data
 
|-
 
|-
| getPilotStats
+
| getLast10Transactions
 
| va_id
 
| va_id
 
| SUCCESS, NOT FOUND
 
| SUCCESS, NOT FOUND
| id, flights, rating, hours, distance, last, fuel_used, profit, cargo_kg, pax
+
| ts, value, reason
 
|-
 
|-
| getPeriodPilotStats
+
| getNegTransactionSums
| va_id, from_ts, to_ts
+
| va_id
 
| SUCCESS, NOT FOUND
 
| SUCCESS, NOT FOUND
| id, flights, rating, hours, distance, last, fuel_used, profit, cargo_kg, pax
+
| value, reason
 
|-
 
|-
| getPilotStatus
+
| getPosTransactionSums
| va_id, pilot_id
+
| va_id
 
| SUCCESS, NOT FOUND
 
| SUCCESS, NOT FOUND
| ac_id, route_id, departure, arrival, dep_time, dist, duration, status, lon, lat, flightstate, passengers, income, ticket, timestamp, cargo, multiplier, flighttype
+
| value, reason
|-  
+
|}
| getRankList
+
 
 +
===Flight Data===
 +
{| class="wikitable"
 +
! Function
 +
! Parameters<ref>Parameters in brackets are optional</ref>
 +
! Return Codes
 +
! Data
 +
|-
 +
| getActiveFlights
 
| va_id
 
| va_id
 
| SUCCESS, NOT FOUND
 
| SUCCESS, NOT FOUND
| id, name, short, settings, pilots, aircrafts, fleet, flights, partnerships, advertisements, fleet_id
+
| departure, arrival, passengers, cargo, user_id, ac_id, flightstate, timestamp
 +
|-
 +
| getBookedFlights
 +
| va_id
 +
| SUCCESS, NOT FOUND
 +
| departure, arrival, passengers, cargo, user_id, ac_id
 +
|-
 +
| getFlightReports
 +
| va_id, (acdb_id), (ac_id), (pilot_id), (days), (count)
 +
| SUCCESS, NOT FOUND
 +
| id, dep, arr, pln_arr, ts, pax, ac_type, distance, rating, salary, income, pilot_id, pic, pid, fuel_used, flighttype, hours, ac_id, number, deptime, arrtime, pln_deptime, pln_arrtime, route_id, va_id, va
 
|-  
 
|-  
 
| getReportDetail
 
| getReportDetail
Line 134: Line 253:
 
| id, va_id, cs_vaid, number, dep, arr, deptime, arrtime, simrate, days, price, state, flighttype
 
| id, va_id, cs_vaid, number, dep, arr, deptime, arrtime, simrate, days, price, state, flighttype
 
|-
 
|-
| getActiveFlights
+
| getRouteList
 
| va_id
 
| va_id
 
| SUCCESS, NOT FOUND
 
| SUCCESS, NOT FOUND
| departure, arrival, passengers, cargo, user_id, ac_id, flightstate, timestamp
+
| id, number, dep, dep_country, arr, arr_country, deptime, arrtime, simrate, days, price, state, flighttype, acdb_list, ac_id
 +
|}
 +
===Pilot Data===
 +
{| class="wikitable"
 +
! Function
 +
! Parameters<ref>Parameters in brackets are optional</ref>
 +
! Return Codes
 +
! Data
 
|-
 
|-
| getBookedFlights
+
| getPeriodPilotStats
| va_id
+
| va_id, from_ts, to_ts
 
| SUCCESS, NOT FOUND
 
| SUCCESS, NOT FOUND
| departure, arrival, passengers, cargo, user_id, ac_id
+
| id, flights, rating, hours, distance, last, fuel_used, profit, cargo_kg, pax
 
|-
 
|-
| getPosTransactionSums
+
| getPilotData
| va_id
+
| va_id, pilot_id
 
| SUCCESS, NOT FOUND
 
| SUCCESS, NOT FOUND
| value, reason
+
| id, name, surname, user, va_user, rank_id, location, budget, lastactive, active, sigac, timezone, weightunit, language, msgmail, flights, rating, hours, distance, pax, cargo_kg
 
|-
 
|-
| getNegTransactionSums
+
| getPilotHours
| va_id
+
| va_id, pilot_id
 
| SUCCESS, NOT FOUND
 
| SUCCESS, NOT FOUND
| value, reason
+
| id, manufacturer, type, icao, hours
 
|-
 
|-
| getLast10Transactions
+
| getPilotList
 
| va_id
 
| va_id
 
| SUCCESS, NOT FOUND
 
| SUCCESS, NOT FOUND
| ts, value, reason
+
| id, name, surname, user, va_user, rank_id, location, last_active, status, budget
 
|-
 
|-
| getAircraftData
+
| getPilotRatings
| va_id, ac_id
+
| va_id, pilot_id
 
| SUCCESS, NOT FOUND
 
| SUCCESS, NOT FOUND
| id, va_id, acdb_id, location, va_id, user_id, lease_id, fleet_id, status, value, registration, fuel, state, ac_name, stateeng1, stateeng2, stateeng3, stateeng4, stategear, statehull, img_path
+
| id, training, manufacturer, type
 
|-
 
|-
| getPilotID
+
| getPilotStats
| va_id, user, passwd
+
| SUCCESS, NOT FOUND
+
| id
+
|-
+
| getRouteList
+
 
| va_id
 
| va_id
 
| SUCCESS, NOT FOUND
 
| SUCCESS, NOT FOUND
| id, number, dep, dep_country, arr, arr_country, deptime, arrtime, simrate, days, price, state, flighttype, acdb_list, ac_id
+
| id, flights, rating, hours, distance, last, fuel_used, profit, cargo_kg, pax
 
|-
 
|-
| getAircraftDBList
+
| getPilotStatus
| va_id
+
| va_id, pilot_id
 
| SUCCESS, NOT FOUND
 
| SUCCESS, NOT FOUND
| id, manufacturer, type, icao
+
| ac_id, route_id, departure, arrival, dep_time, dist, duration, status, lon, lat, flightstate, passengers, income, ticket, timestamp, cargo, multiplier, flighttype
 +
|}
 +
===Flight Booking===
 +
{| class="wikitable"
 +
! Function
 +
! Parameters<ref>Parameters in brackets are optional</ref>
 +
! Return Codes
 +
! Data
 
|-
 
|-
| getFlightReports
+
| bookFlight
| va_id, (acdb_id), (ac_id), (pilot_id), (days), (count)
+
| va_id, pilot_id, passwd, route_id, ac_id
 +
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE
 +
| success, message, codeshare, codeshare_msg
 +
|-
 +
| cancelFlight
 +
| va_id, pilot_id, passwd
 
| SUCCESS, NOT FOUND
 
| SUCCESS, NOT FOUND
| id, dep, arr, pln_arr, ts, pax, ac_type, distance, rating, salary, income, pilot_id, pic, pid, fuel_used, flighttype, hours, ac_id, number, deptime, arrtime, pln_deptime, pln_arrtime, route_id, va_id, va
+
| result, loss
 
|-
 
|-
 
| getBookableRoutes
 
| getBookableRoutes
Line 193: Line 326:
 
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE
 
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE
 
| type, registration, state, id, name, fuel
 
| type, registration, state, id, name, fuel
|-
 
| bookFlight
 
| va_id, pilot_id, passwd, route_id, ac_id
 
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE
 
| success, message, codeshare, codeshare_msg
 
 
|-
 
|-
 
| getBookStatus
 
| getBookStatus
Line 203: Line 331:
 
| SUCCESS, NOT FOUND
 
| SUCCESS, NOT FOUND
 
| status
 
| status
 +
|}
 +
===Miscellaneous User Functions===
 +
{| class="wikitable"
 +
! Function
 +
! Parameters<ref>Parameters in brackets are optional</ref>
 +
! Return Codes
 +
! Data
 
|-
 
|-
| cancelFlight
+
| createAccount
| va_id, pilot_id, passwd
+
| va_id, givenname, surname, username, email, password, airport, accept_pp
 
| SUCCESS, NOT FOUND
 
| SUCCESS, NOT FOUND
| result, loss
+
| success, message, code
 
|-
 
|-
| getAirlineData
+
| getPilotID
| va_id, id (=va_id)
+
| va_id, user, passwd
 
| SUCCESS, NOT FOUND
 
| SUCCESS, NOT FOUND
| id, name, base, code, budget, homepage, logo_l, logo_s, price, reputation, pilotcharge, multiplier, mission
+
| id
 +
|-
 +
| getPrivacyPolicy
 +
| va_id
 +
| SUCCESS
 +
| policy
 
|-
 
|-
 
| getTransferCost
 
| getTransferCost
Line 223: Line 363:
 
| SUCCESS, NOT FOUND, INSUFFICIENT FUNDS
 
| SUCCESS, NOT FOUND, INSUFFICIENT FUNDS
 
| cost
 
| cost
|-
 
| createAccount
 
| va_id, givenname, surname, username, email, password, airport, accept_pp
 
| SUCCESS, NOT FOUND
 
| success, message, code
 
|-
 
| getPrivacyPolicy
 
| va_id
 
| SUCCESS
 
| policy
 
 
|}
 
|}
===Reports===
 
===Statistics===
 
===Interactive===
 
===Flights===
 
 
<references />
 
<references />

Revision as of 21:10, 17 October 2010

The XML-Interface is the core of the VA Integration Kit. It has been designed to enable Virtual Airlines to show nearly any kind of data live on their homepage. The data received is in the XML-format so an airline adapt it to their own homepage design.

Basic Usage

The data can be received by using HTTP calls to the interface script and add the desired function to the parameters. Here is an example request:

http://www.fsairlines.net/va_interface.php5?function=getPilotList&va_id=7

As you can see there is the interface script va_interface.php5, the function getPilotList and one function parameter va_id=7. Some functions require additional parameters, these can be appended after the va_id.

The result of the request will be given in xml format with base-tag being <fsa_output>. This tag has the attributes version and success which show the version number of the interface and the if the request succeeded or not. In case of a failure the success-attribute shows the error message. The following example shows the return text of the above function:

<fsa_output version="1.0" success="SUCCESS">
  <data id="1" name="Konrad" surname="Pustka" va_user="SNA101" location="EDDM" lastactive="1287330550" budget="198144" />
  <data id="2" name="Claudio" surname="Gusmini" va_user="SNA102" location="EDDM" lastactive="1286366261" budget="216405101" />
</fsa_output>

Inside the fsa_output-tag there are all the data-tags which contain all the information. To use this data in your own webpage you need some knowledge in dynamic web-programming, for example PHP. We can't give you a complete introduction into PHP, but you can always have a look at the Official FSAirlines Integration Pack and see how we readout the data.

Data

The following section contains a detailed list of all the request-functions with their return values.

Parameters

All the request functions need parameters which need to be appended. The following table shows all the parameters and their meaning.

Parameter Meaning
ac_id ID of the aircraft. Is part of the data received from other functions (e.g. getAircraftList).
accept_pp Must be set '1' if Privacy Policy is accepted.
acdb_id ID of the aircraft type. Is part of the data received from other functions (e.g. getAircraftList).
airport Starting airport. Where the user should be placed first.
arr ICAO code of the arrival airport.
count Number past flights which should be displayed.
country Name of the country.
days Number of past days from now which should be displayed.
dep ICAO code of the departure airport.
email E-Mail of the user.
fleet_id ID of the fleet. Is part of the data received from other functions.
from_ts UNIX timestamp of the starting date.
givenname Given name of the user.
icao ICAO code of the airport.
passwd Password of the pilot (MD5 encrypted).
password Password of the user.
pilot_id ID of the pilot. Is part of the data received from other functions.
report_id ID of the report. Is part of the data received from other functions.
surname Surname of the user.
to_ts UNIX timestamp of the ending date.
user Username of the pilot.
username Requested username.
va_id ID of the Virtual Airline. Is displayed on the Overview page.


Aircraft Data

Function Parameters<ref>Parameters in brackets are optional</ref> Return Codes Data
getAircraftData va_id, ac_id SUCCESS, NOT FOUND id, va_id, acdb_id, location, va_id, user_id, lease_id, fleet_id, status, value, registration, fuel, state, ac_name, stateeng1, stateeng2, stateeng3, stateeng4, stategear, statehull, img_path
getAircraftDBData va_id, acdb_id SUCCESS, NOT FOUND id, manufacturer, type, icao, passengers, price, fuel, dow, mtow, speed, engines, cargo, mzfw, market_only, range
getAircraftDBList va_id SUCCESS, NOT FOUND id, manufacturer, type, icao
getAircraftList va_id SUCCESS, NOT FOUND id, acdb_id, icao, value, location, registration, state, ac_name, status, fleet_id, fuel
getAircraftStats va_id, ac_id SUCCESS, NOT FOUND flights, hours, distance
getFleetAircraftList va_id, fleet_id SUCCESS, NOT FOUND id, acdb_id, icao, value, location, registration, state, ac_name, status, fleet_id, fuel
getFleetList va_id SUCCESS, NOT FOUND id, name
getFleetStats va_id SUCCESS, NOT FOUND id, flights, hours, distance, last, fuel_used, profit, cargo_kg, pax
getLeasedAircraftList va_id SUCCESS, NOT FOUND id, acdb_id, icao, value, location, registraion, state, ac_name, status, fleet_id, fuel, va_id, name, expire
getPeriodFleetStats va_id, from_ts, to_ts SUCCESS, NOT FOUND id, flights, hours, distance, last, fuel_used, profit, cargo_kg, pax

Airports

Function Parameters<ref>Parameters in brackets are optional</ref> Return Codes Data
getAirportData va_id, icao SUCCESS, NOT FOUND id, name, iata, icao, city, country, la_g, la_p, la_s, la_d, lat, lo_g, lo_p, lo_s, lo_d, lon, altitude, length, fuel, size
getAirportList va_id SUCCESS, NOT FOUND icao, name, city, country, fuel, lat, lon

Airline Data

Function Parameters<ref>Parameters in brackets are optional</ref> Return Codes Data
getAirlineData va_id, id (=va_id) SUCCESS, NOT FOUND id, name, base, code, budget, homepage, logo_l, logo_s, price, reputation, pilotcharge, multiplier, mission
getAirlineStats va_id SUCCESS, NOT FOUND id, flights, rating, hours, distance, last, fuel_used, pax, cargo_kg
getCountryStats va_id, country SUCCESS, NOT FOUND va_name, id, flights, rating hours, profit, distance, last, fuel_used, pax, cargo_kg
getRankList va_id SUCCESS, NOT FOUND id, name, short, settings, pilots, aircrafts, fleet, flights, partnerships, advertisements, fleet_id

Financial Data

Function Parameters<ref>Parameters in brackets are optional</ref> Return Codes Data
getLast10Transactions va_id SUCCESS, NOT FOUND ts, value, reason
getNegTransactionSums va_id SUCCESS, NOT FOUND value, reason
getPosTransactionSums va_id SUCCESS, NOT FOUND value, reason

Flight Data

Function Parameters<ref>Parameters in brackets are optional</ref> Return Codes Data
getActiveFlights va_id SUCCESS, NOT FOUND departure, arrival, passengers, cargo, user_id, ac_id, flightstate, timestamp
getBookedFlights va_id SUCCESS, NOT FOUND departure, arrival, passengers, cargo, user_id, ac_id
getFlightReports va_id, (acdb_id), (ac_id), (pilot_id), (days), (count) SUCCESS, NOT FOUND id, dep, arr, pln_arr, ts, pax, ac_type, distance, rating, salary, income, pilot_id, pic, pid, fuel_used, flighttype, hours, ac_id, number, deptime, arrtime, pln_deptime, pln_arrtime, route_id, va_id, va
getReportDetail va_id, report_id SUCCESS, NOT FOUND id, ac_type, ac_id, pic, pilot_id, number, dep, pln_arr, arr, deptime, loc_deptime, arrtime, loc_arrtime, hours, ts, flightstate, rating, ratingreasons, distance, pax, ticket, crew, salary, fuelprice, fuel_bought, fuel_used, profit, version, simrate, multiplier, bonus, cargo, cargo_kg, flighttype, comment, cheat
getRouteData va_id, route_id SUCCESS, NOT FOUND id, va_id, cs_vaid, number, dep, arr, deptime, arrtime, simrate, days, price, state, flighttype
getRouteList va_id SUCCESS, NOT FOUND id, number, dep, dep_country, arr, arr_country, deptime, arrtime, simrate, days, price, state, flighttype, acdb_list, ac_id

Pilot Data

Function Parameters<ref>Parameters in brackets are optional</ref> Return Codes Data
getPeriodPilotStats va_id, from_ts, to_ts SUCCESS, NOT FOUND id, flights, rating, hours, distance, last, fuel_used, profit, cargo_kg, pax
getPilotData va_id, pilot_id SUCCESS, NOT FOUND id, name, surname, user, va_user, rank_id, location, budget, lastactive, active, sigac, timezone, weightunit, language, msgmail, flights, rating, hours, distance, pax, cargo_kg
getPilotHours va_id, pilot_id SUCCESS, NOT FOUND id, manufacturer, type, icao, hours
getPilotList va_id SUCCESS, NOT FOUND id, name, surname, user, va_user, rank_id, location, last_active, status, budget
getPilotRatings va_id, pilot_id SUCCESS, NOT FOUND id, training, manufacturer, type
getPilotStats va_id SUCCESS, NOT FOUND id, flights, rating, hours, distance, last, fuel_used, profit, cargo_kg, pax
getPilotStatus va_id, pilot_id SUCCESS, NOT FOUND ac_id, route_id, departure, arrival, dep_time, dist, duration, status, lon, lat, flightstate, passengers, income, ticket, timestamp, cargo, multiplier, flighttype

Flight Booking

Function Parameters<ref>Parameters in brackets are optional</ref> Return Codes Data
bookFlight va_id, pilot_id, passwd, route_id, ac_id SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE success, message, codeshare, codeshare_msg
cancelFlight va_id, pilot_id, passwd SUCCESS, NOT FOUND result, loss
getBookableRoutes va_id, pilot_id SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE number, dep, arr, deptime, arrtime, id, state, simrate, flighttype, training, price, list, ac_id
getBookableAircraft va_id, pilot_id, route_id SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE type, registration, state, id, name, fuel
getBookStatus va_id, pilot_id SUCCESS, NOT FOUND status

Miscellaneous User Functions

Function Parameters<ref>Parameters in brackets are optional</ref> Return Codes Data
createAccount va_id, givenname, surname, username, email, password, airport, accept_pp SUCCESS, NOT FOUND success, message, code
getPilotID va_id, user, passwd SUCCESS, NOT FOUND id
getPrivacyPolicy va_id SUCCESS policy
getTransferCost va_id, arr, dep SUCCESS, NOT FOUND cost
transferPilot va_id, pilot_id, passwd, icao SUCCESS, NOT FOUND, INSUFFICIENT FUNDS cost

<references />