<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki4.fsairlines.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Joefremont</id>
	<title>FSAirlinesWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki4.fsairlines.net/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Joefremont"/>
	<link rel="alternate" type="text/html" href="https://wiki4.fsairlines.net/index.php/Special:Contributions/Joefremont"/>
	<updated>2026-04-07T10:55:46Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://wiki4.fsairlines.net/index.php?title=Official_FSAirlines_Integration_Pack&amp;diff=3395</id>
		<title>Official FSAirlines Integration Pack</title>
		<link rel="alternate" type="text/html" href="https://wiki4.fsairlines.net/index.php?title=Official_FSAirlines_Integration_Pack&amp;diff=3395"/>
		<updated>2025-06-11T13:17:24Z</updated>

		<summary type="html">&lt;p&gt;Joefremont: /* Interactive */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Website Integration Packs]]&lt;br /&gt;
{{Infobox integration pack&lt;br /&gt;
|Version=1.0&lt;br /&gt;
|Date=September 9th, 2010&lt;br /&gt;
|Developers=[[User:Konny|Konny]]&lt;br /&gt;
Joe&lt;br /&gt;
|Svn path=/trunk&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==How to use==&lt;br /&gt;
The Integration Pack has been designed for easy integration into any website. There are no special requirements to the webserver. The easiest way to get the data into your own website is by using the [http://www.w3schools.com/TAGS/tag_iframe.asp &amp;lt;iframe&amp;gt;] HTML-Tag. Here&#039;s an example HTML-code:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;iframe width=&amp;quot;600&amp;quot; height=&amp;quot;500&amp;quot; src=&amp;quot;http://remote.fsairlines.net/v1/roster.php?rvi=368&amp;amp;title=off&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;p&amp;gt;Your browser does not support iframes.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/iframe&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
The &#039;&#039;src=&amp;quot;...&amp;quot;&#039;&#039; part determines which data is shown. Just copy the required url from the list of [[#Pages|pages]]. There are several [[#Parameters|parameters]] which can be appended to the url. These can be used to change for example the language or the color of the included page. The &#039;&#039;rvi=xxxx&#039;&#039; parameter is mandatory and has to be changed to the [[Virtual Airline Overview|ID]] of your own Virtual Airline. All other parameters have to be added with a leading &#039;&amp;amp;&#039; just like the &#039;&amp;amp;title=off&#039; in the example.&lt;br /&gt;
&lt;br /&gt;
==For developers==&lt;br /&gt;
The FSAirlines Integration Pack is Open-Source, so everybody with a [[VA Integration Kit#Developer Account|developers account]] can enhance and improve the scripts. All the files are located in the trunk folder of the FSAirlines Subversion repository. We will review all the changes and from time to time publish the current revision under a new version number. You&#039;re welcome to implement anything you think is useful, but please stick to the following rules:&lt;br /&gt;
*Please don&#039;t do massive layout changes. If you want a completely different look please create a new branch, maybe you can convince us and we will merge it with the Official Integration Pack.&lt;br /&gt;
*Please don&#039;t remove any functionality. You&#039;re free to extend the scripts, but if you feel like there should be a page with less information, please create a new one.&lt;br /&gt;
*Don&#039;t use function calls to the [[XML-Interface]] in loops. If you need a different data set, please ask the developers to add a function for that to the [[XML-Interface]].&lt;br /&gt;
*Always keep record of your changes on this wiki page.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
Here is a list of all the parameters which are currently supported.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;rvi=XXX&#039;&#039;&#039;	&lt;br /&gt;
| &#039;&#039;&#039;Virtual Airline ID number (mandatory)&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| lng=XX	&lt;br /&gt;
| Language translation (Coming Soon)&lt;br /&gt;
|-&lt;br /&gt;
| title=off	&lt;br /&gt;
| Hide the title of the pages&lt;br /&gt;
|-&lt;br /&gt;
| hub=XXXX	&lt;br /&gt;
| Four letter ICAO code, used by Timetable to show flights to and from the selected airport&lt;br /&gt;
|-&lt;br /&gt;
| cli=XXXXXX	&lt;br /&gt;
| Link Color, Six letter HTML Color code&lt;br /&gt;
|-&lt;br /&gt;
| clv=XXXXXX	&lt;br /&gt;
| Visited Link Color, Six letter HTML Color code&lt;br /&gt;
|-&lt;br /&gt;
| clh=XXXXXX	&lt;br /&gt;
| Hover Link Color, Six letter HTML Color code&lt;br /&gt;
|-&lt;br /&gt;
| textcol=XXXXXX	&lt;br /&gt;
| Text Color, Six letter HTML Color code&lt;br /&gt;
|-&lt;br /&gt;
| tblcol=XXXXXX	&lt;br /&gt;
| Table Heading Background Color, Six letter HTML Color code&lt;br /&gt;
|-&lt;br /&gt;
| tbltextcol=XXXXXX	&lt;br /&gt;
| Table Heading Text Color, Six letter HTML Color code&lt;br /&gt;
|-&lt;br /&gt;
| row1=XXXXXX	&lt;br /&gt;
| Data Row 1 Color, Six letter HTML Color code&lt;br /&gt;
|-&lt;br /&gt;
| row2=XXXXXX	&lt;br /&gt;
| Data Row 2 Color, Six letter HTML Color code&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Pages==&lt;br /&gt;
The following table shows all the pages which you can include in your own VA website.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| Roster	&lt;br /&gt;
| https://remote.fsairlines.net/v1/roster.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Roster ( Alternate )	&lt;br /&gt;
| https://remote.fsairlines.net/v1/roster_2.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Fleet	&lt;br /&gt;
| https://remote.fsairlines.net/v1/fleet.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Fleet ( Alternate )	&lt;br /&gt;
| https://remote.fsairlines.net/v1/fleet_2.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Timetable	&lt;br /&gt;
| https://remote.fsairlines.net/v1/timetable.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Timetable ( Alternate )	&lt;br /&gt;
| https://remote.fsairlines.net/v1/timetable_2.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Flight Reports ( Pireps )	&lt;br /&gt;
| https://remote.fsairlines.net/v1/pireps.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Financial Report	&lt;br /&gt;
| https://remote.fsairlines.net/v1/finance.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Reliability Report	&lt;br /&gt;
| https://remote.fsairlines.net/v1/reliability.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Pilot Stats	&lt;br /&gt;
| https://remote.fsairlines.net/v1/pilotstats.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Monthly Pilot Stats	&lt;br /&gt;
| https://remote.fsairlines.net/v1/mpilotstats.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Fleet Stats	&lt;br /&gt;
| https://remote.fsairlines.net/v1/fleetstats.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Monthly Fleet Stats	&lt;br /&gt;
| https://remote.fsairlines.net/v1/mfleetstats.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Country Stats	&lt;br /&gt;
| https://remote.fsairlines.net/v1/countrystats.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Dispatch Office	&lt;br /&gt;
| https://remote.fsairlines.net/v1/dispatch.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Pilot Registration &amp;amp; Application (*)	&lt;br /&gt;
| https://remote.fsairlines.net/v1/application.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Infobox	&lt;br /&gt;
| https://remote.fsairlines.net/v1/infobox.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Infobox ( Alternate )	&lt;br /&gt;
| https://remote.fsairlines.net/v1/infobox2.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Booked Flights	&lt;br /&gt;
| https://remote.fsairlines.net/v1/flights_booked.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Active Flights	&lt;br /&gt;
| https://remote.fsairlines.net/v1/flights_active.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Active Flights ( Alternate )	&lt;br /&gt;
| https://remote.fsairlines.net/v1/flights_active2.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Last Flights 	&lt;br /&gt;
| https://remote.fsairlines.net/v1/lastflights.php?rvi=368&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Demos==&lt;br /&gt;
Here can have a look at how the pages of the Integration Pack look like.&lt;br /&gt;
===Basic VA data===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Roster&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/roster.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Roster (Alternate)&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/roster_2.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Fleet&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/fleet.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Fleet (Alternate)&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/fleet_2.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Timetable&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/timetable.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Timetable (Alternate)&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/timetable_2.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Reports===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Flight Reports (PIREPs)&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/pireps.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Financial Report&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/finance.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Reliability Report&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/reliability.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Statistics===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Pilot Stats&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/pilotstats.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Monthly Pilot Stats&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/mpilotstats.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Fleet Stats&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/fleetstats.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Monthly Fleet Stats&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/mfleetstats.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Country Stats&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/countrystats.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Infobox&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/infobox.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Infobo (Alternate)&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/infobox2.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Interactive===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;These methods have been deprecated and no longer function&amp;lt;/h4&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Dispatch Office&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/dispatch.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Pilot Registration &amp;amp; Application&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/application.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Flights===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Booked Flights&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/flights_booked.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Active Flights&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/flights_active.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Active Flights (Alternate)&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/flights_active2.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Last Flights&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/lastflights.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Joefremont</name></author>
	</entry>
	<entry>
		<id>https://wiki4.fsairlines.net/index.php?title=Official_FSAirlines_Integration_Pack&amp;diff=3394</id>
		<title>Official FSAirlines Integration Pack</title>
		<link rel="alternate" type="text/html" href="https://wiki4.fsairlines.net/index.php?title=Official_FSAirlines_Integration_Pack&amp;diff=3394"/>
		<updated>2025-06-11T13:17:08Z</updated>

		<summary type="html">&lt;p&gt;Joefremont: /* Interactive */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Website Integration Packs]]&lt;br /&gt;
{{Infobox integration pack&lt;br /&gt;
|Version=1.0&lt;br /&gt;
|Date=September 9th, 2010&lt;br /&gt;
|Developers=[[User:Konny|Konny]]&lt;br /&gt;
Joe&lt;br /&gt;
|Svn path=/trunk&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==How to use==&lt;br /&gt;
The Integration Pack has been designed for easy integration into any website. There are no special requirements to the webserver. The easiest way to get the data into your own website is by using the [http://www.w3schools.com/TAGS/tag_iframe.asp &amp;lt;iframe&amp;gt;] HTML-Tag. Here&#039;s an example HTML-code:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;iframe width=&amp;quot;600&amp;quot; height=&amp;quot;500&amp;quot; src=&amp;quot;http://remote.fsairlines.net/v1/roster.php?rvi=368&amp;amp;title=off&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;p&amp;gt;Your browser does not support iframes.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/iframe&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
The &#039;&#039;src=&amp;quot;...&amp;quot;&#039;&#039; part determines which data is shown. Just copy the required url from the list of [[#Pages|pages]]. There are several [[#Parameters|parameters]] which can be appended to the url. These can be used to change for example the language or the color of the included page. The &#039;&#039;rvi=xxxx&#039;&#039; parameter is mandatory and has to be changed to the [[Virtual Airline Overview|ID]] of your own Virtual Airline. All other parameters have to be added with a leading &#039;&amp;amp;&#039; just like the &#039;&amp;amp;title=off&#039; in the example.&lt;br /&gt;
&lt;br /&gt;
==For developers==&lt;br /&gt;
The FSAirlines Integration Pack is Open-Source, so everybody with a [[VA Integration Kit#Developer Account|developers account]] can enhance and improve the scripts. All the files are located in the trunk folder of the FSAirlines Subversion repository. We will review all the changes and from time to time publish the current revision under a new version number. You&#039;re welcome to implement anything you think is useful, but please stick to the following rules:&lt;br /&gt;
*Please don&#039;t do massive layout changes. If you want a completely different look please create a new branch, maybe you can convince us and we will merge it with the Official Integration Pack.&lt;br /&gt;
*Please don&#039;t remove any functionality. You&#039;re free to extend the scripts, but if you feel like there should be a page with less information, please create a new one.&lt;br /&gt;
*Don&#039;t use function calls to the [[XML-Interface]] in loops. If you need a different data set, please ask the developers to add a function for that to the [[XML-Interface]].&lt;br /&gt;
*Always keep record of your changes on this wiki page.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
Here is a list of all the parameters which are currently supported.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;rvi=XXX&#039;&#039;&#039;	&lt;br /&gt;
| &#039;&#039;&#039;Virtual Airline ID number (mandatory)&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| lng=XX	&lt;br /&gt;
| Language translation (Coming Soon)&lt;br /&gt;
|-&lt;br /&gt;
| title=off	&lt;br /&gt;
| Hide the title of the pages&lt;br /&gt;
|-&lt;br /&gt;
| hub=XXXX	&lt;br /&gt;
| Four letter ICAO code, used by Timetable to show flights to and from the selected airport&lt;br /&gt;
|-&lt;br /&gt;
| cli=XXXXXX	&lt;br /&gt;
| Link Color, Six letter HTML Color code&lt;br /&gt;
|-&lt;br /&gt;
| clv=XXXXXX	&lt;br /&gt;
| Visited Link Color, Six letter HTML Color code&lt;br /&gt;
|-&lt;br /&gt;
| clh=XXXXXX	&lt;br /&gt;
| Hover Link Color, Six letter HTML Color code&lt;br /&gt;
|-&lt;br /&gt;
| textcol=XXXXXX	&lt;br /&gt;
| Text Color, Six letter HTML Color code&lt;br /&gt;
|-&lt;br /&gt;
| tblcol=XXXXXX	&lt;br /&gt;
| Table Heading Background Color, Six letter HTML Color code&lt;br /&gt;
|-&lt;br /&gt;
| tbltextcol=XXXXXX	&lt;br /&gt;
| Table Heading Text Color, Six letter HTML Color code&lt;br /&gt;
|-&lt;br /&gt;
| row1=XXXXXX	&lt;br /&gt;
| Data Row 1 Color, Six letter HTML Color code&lt;br /&gt;
|-&lt;br /&gt;
| row2=XXXXXX	&lt;br /&gt;
| Data Row 2 Color, Six letter HTML Color code&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Pages==&lt;br /&gt;
The following table shows all the pages which you can include in your own VA website.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| Roster	&lt;br /&gt;
| https://remote.fsairlines.net/v1/roster.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Roster ( Alternate )	&lt;br /&gt;
| https://remote.fsairlines.net/v1/roster_2.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Fleet	&lt;br /&gt;
| https://remote.fsairlines.net/v1/fleet.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Fleet ( Alternate )	&lt;br /&gt;
| https://remote.fsairlines.net/v1/fleet_2.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Timetable	&lt;br /&gt;
| https://remote.fsairlines.net/v1/timetable.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Timetable ( Alternate )	&lt;br /&gt;
| https://remote.fsairlines.net/v1/timetable_2.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Flight Reports ( Pireps )	&lt;br /&gt;
| https://remote.fsairlines.net/v1/pireps.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Financial Report	&lt;br /&gt;
| https://remote.fsairlines.net/v1/finance.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Reliability Report	&lt;br /&gt;
| https://remote.fsairlines.net/v1/reliability.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Pilot Stats	&lt;br /&gt;
| https://remote.fsairlines.net/v1/pilotstats.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Monthly Pilot Stats	&lt;br /&gt;
| https://remote.fsairlines.net/v1/mpilotstats.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Fleet Stats	&lt;br /&gt;
| https://remote.fsairlines.net/v1/fleetstats.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Monthly Fleet Stats	&lt;br /&gt;
| https://remote.fsairlines.net/v1/mfleetstats.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Country Stats	&lt;br /&gt;
| https://remote.fsairlines.net/v1/countrystats.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Dispatch Office	&lt;br /&gt;
| https://remote.fsairlines.net/v1/dispatch.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Pilot Registration &amp;amp; Application (*)	&lt;br /&gt;
| https://remote.fsairlines.net/v1/application.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Infobox	&lt;br /&gt;
| https://remote.fsairlines.net/v1/infobox.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Infobox ( Alternate )	&lt;br /&gt;
| https://remote.fsairlines.net/v1/infobox2.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Booked Flights	&lt;br /&gt;
| https://remote.fsairlines.net/v1/flights_booked.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Active Flights	&lt;br /&gt;
| https://remote.fsairlines.net/v1/flights_active.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Active Flights ( Alternate )	&lt;br /&gt;
| https://remote.fsairlines.net/v1/flights_active2.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Last Flights 	&lt;br /&gt;
| https://remote.fsairlines.net/v1/lastflights.php?rvi=368&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Demos==&lt;br /&gt;
Here can have a look at how the pages of the Integration Pack look like.&lt;br /&gt;
===Basic VA data===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Roster&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/roster.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Roster (Alternate)&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/roster_2.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Fleet&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/fleet.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Fleet (Alternate)&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/fleet_2.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Timetable&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/timetable.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Timetable (Alternate)&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/timetable_2.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Reports===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Flight Reports (PIREPs)&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/pireps.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Financial Report&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/finance.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Reliability Report&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/reliability.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Statistics===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Pilot Stats&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/pilotstats.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Monthly Pilot Stats&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/mpilotstats.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Fleet Stats&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/fleetstats.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Monthly Fleet Stats&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/mfleetstats.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Country Stats&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/countrystats.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Infobox&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/infobox.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Infobo (Alternate)&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/infobox2.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Interactive===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h4&amp;gt;These methods have been deprecated and no longer function&amp;lt;/h4&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Dispatch Office&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/dispatch.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Pilot Registration &amp;amp; Application&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/application.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Flights===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Booked Flights&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/flights_booked.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Active Flights&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/flights_active.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Active Flights (Alternate)&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/flights_active2.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Last Flights&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/lastflights.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Joefremont</name></author>
	</entry>
	<entry>
		<id>https://wiki4.fsairlines.net/index.php?title=Official_FSAirlines_Integration_Pack&amp;diff=3393</id>
		<title>Official FSAirlines Integration Pack</title>
		<link rel="alternate" type="text/html" href="https://wiki4.fsairlines.net/index.php?title=Official_FSAirlines_Integration_Pack&amp;diff=3393"/>
		<updated>2025-06-11T13:16:51Z</updated>

		<summary type="html">&lt;p&gt;Joefremont: /* Interactive */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Website Integration Packs]]&lt;br /&gt;
{{Infobox integration pack&lt;br /&gt;
|Version=1.0&lt;br /&gt;
|Date=September 9th, 2010&lt;br /&gt;
|Developers=[[User:Konny|Konny]]&lt;br /&gt;
Joe&lt;br /&gt;
|Svn path=/trunk&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==How to use==&lt;br /&gt;
The Integration Pack has been designed for easy integration into any website. There are no special requirements to the webserver. The easiest way to get the data into your own website is by using the [http://www.w3schools.com/TAGS/tag_iframe.asp &amp;lt;iframe&amp;gt;] HTML-Tag. Here&#039;s an example HTML-code:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;iframe width=&amp;quot;600&amp;quot; height=&amp;quot;500&amp;quot; src=&amp;quot;http://remote.fsairlines.net/v1/roster.php?rvi=368&amp;amp;title=off&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;p&amp;gt;Your browser does not support iframes.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/iframe&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
The &#039;&#039;src=&amp;quot;...&amp;quot;&#039;&#039; part determines which data is shown. Just copy the required url from the list of [[#Pages|pages]]. There are several [[#Parameters|parameters]] which can be appended to the url. These can be used to change for example the language or the color of the included page. The &#039;&#039;rvi=xxxx&#039;&#039; parameter is mandatory and has to be changed to the [[Virtual Airline Overview|ID]] of your own Virtual Airline. All other parameters have to be added with a leading &#039;&amp;amp;&#039; just like the &#039;&amp;amp;title=off&#039; in the example.&lt;br /&gt;
&lt;br /&gt;
==For developers==&lt;br /&gt;
The FSAirlines Integration Pack is Open-Source, so everybody with a [[VA Integration Kit#Developer Account|developers account]] can enhance and improve the scripts. All the files are located in the trunk folder of the FSAirlines Subversion repository. We will review all the changes and from time to time publish the current revision under a new version number. You&#039;re welcome to implement anything you think is useful, but please stick to the following rules:&lt;br /&gt;
*Please don&#039;t do massive layout changes. If you want a completely different look please create a new branch, maybe you can convince us and we will merge it with the Official Integration Pack.&lt;br /&gt;
*Please don&#039;t remove any functionality. You&#039;re free to extend the scripts, but if you feel like there should be a page with less information, please create a new one.&lt;br /&gt;
*Don&#039;t use function calls to the [[XML-Interface]] in loops. If you need a different data set, please ask the developers to add a function for that to the [[XML-Interface]].&lt;br /&gt;
*Always keep record of your changes on this wiki page.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
Here is a list of all the parameters which are currently supported.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;rvi=XXX&#039;&#039;&#039;	&lt;br /&gt;
| &#039;&#039;&#039;Virtual Airline ID number (mandatory)&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| lng=XX	&lt;br /&gt;
| Language translation (Coming Soon)&lt;br /&gt;
|-&lt;br /&gt;
| title=off	&lt;br /&gt;
| Hide the title of the pages&lt;br /&gt;
|-&lt;br /&gt;
| hub=XXXX	&lt;br /&gt;
| Four letter ICAO code, used by Timetable to show flights to and from the selected airport&lt;br /&gt;
|-&lt;br /&gt;
| cli=XXXXXX	&lt;br /&gt;
| Link Color, Six letter HTML Color code&lt;br /&gt;
|-&lt;br /&gt;
| clv=XXXXXX	&lt;br /&gt;
| Visited Link Color, Six letter HTML Color code&lt;br /&gt;
|-&lt;br /&gt;
| clh=XXXXXX	&lt;br /&gt;
| Hover Link Color, Six letter HTML Color code&lt;br /&gt;
|-&lt;br /&gt;
| textcol=XXXXXX	&lt;br /&gt;
| Text Color, Six letter HTML Color code&lt;br /&gt;
|-&lt;br /&gt;
| tblcol=XXXXXX	&lt;br /&gt;
| Table Heading Background Color, Six letter HTML Color code&lt;br /&gt;
|-&lt;br /&gt;
| tbltextcol=XXXXXX	&lt;br /&gt;
| Table Heading Text Color, Six letter HTML Color code&lt;br /&gt;
|-&lt;br /&gt;
| row1=XXXXXX	&lt;br /&gt;
| Data Row 1 Color, Six letter HTML Color code&lt;br /&gt;
|-&lt;br /&gt;
| row2=XXXXXX	&lt;br /&gt;
| Data Row 2 Color, Six letter HTML Color code&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Pages==&lt;br /&gt;
The following table shows all the pages which you can include in your own VA website.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| Roster	&lt;br /&gt;
| https://remote.fsairlines.net/v1/roster.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Roster ( Alternate )	&lt;br /&gt;
| https://remote.fsairlines.net/v1/roster_2.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Fleet	&lt;br /&gt;
| https://remote.fsairlines.net/v1/fleet.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Fleet ( Alternate )	&lt;br /&gt;
| https://remote.fsairlines.net/v1/fleet_2.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Timetable	&lt;br /&gt;
| https://remote.fsairlines.net/v1/timetable.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Timetable ( Alternate )	&lt;br /&gt;
| https://remote.fsairlines.net/v1/timetable_2.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Flight Reports ( Pireps )	&lt;br /&gt;
| https://remote.fsairlines.net/v1/pireps.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Financial Report	&lt;br /&gt;
| https://remote.fsairlines.net/v1/finance.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Reliability Report	&lt;br /&gt;
| https://remote.fsairlines.net/v1/reliability.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Pilot Stats	&lt;br /&gt;
| https://remote.fsairlines.net/v1/pilotstats.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Monthly Pilot Stats	&lt;br /&gt;
| https://remote.fsairlines.net/v1/mpilotstats.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Fleet Stats	&lt;br /&gt;
| https://remote.fsairlines.net/v1/fleetstats.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Monthly Fleet Stats	&lt;br /&gt;
| https://remote.fsairlines.net/v1/mfleetstats.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Country Stats	&lt;br /&gt;
| https://remote.fsairlines.net/v1/countrystats.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Dispatch Office	&lt;br /&gt;
| https://remote.fsairlines.net/v1/dispatch.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Pilot Registration &amp;amp; Application (*)	&lt;br /&gt;
| https://remote.fsairlines.net/v1/application.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Infobox	&lt;br /&gt;
| https://remote.fsairlines.net/v1/infobox.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Infobox ( Alternate )	&lt;br /&gt;
| https://remote.fsairlines.net/v1/infobox2.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Booked Flights	&lt;br /&gt;
| https://remote.fsairlines.net/v1/flights_booked.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Active Flights	&lt;br /&gt;
| https://remote.fsairlines.net/v1/flights_active.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Active Flights ( Alternate )	&lt;br /&gt;
| https://remote.fsairlines.net/v1/flights_active2.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Last Flights 	&lt;br /&gt;
| https://remote.fsairlines.net/v1/lastflights.php?rvi=368&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Demos==&lt;br /&gt;
Here can have a look at how the pages of the Integration Pack look like.&lt;br /&gt;
===Basic VA data===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Roster&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/roster.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Roster (Alternate)&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/roster_2.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Fleet&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/fleet.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Fleet (Alternate)&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/fleet_2.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Timetable&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/timetable.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Timetable (Alternate)&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/timetable_2.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Reports===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Flight Reports (PIREPs)&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/pireps.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Financial Report&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/finance.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Reliability Report&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/reliability.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Statistics===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Pilot Stats&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/pilotstats.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Monthly Pilot Stats&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/mpilotstats.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Fleet Stats&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/fleetstats.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Monthly Fleet Stats&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/mfleetstats.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Country Stats&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/countrystats.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Infobox&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/infobox.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Infobo (Alternate)&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/infobox2.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Interactive===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;These methods have been deprecated and no longer function&amp;lt;/h3&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Dispatch Office&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/dispatch.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Pilot Registration &amp;amp; Application&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/application.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Flights===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Booked Flights&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/flights_booked.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Active Flights&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/flights_active.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Active Flights (Alternate)&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/flights_active2.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Last Flights&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/lastflights.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Joefremont</name></author>
	</entry>
	<entry>
		<id>https://wiki4.fsairlines.net/index.php?title=XML-Interface-v2&amp;diff=3392</id>
		<title>XML-Interface-v2</title>
		<link rel="alternate" type="text/html" href="https://wiki4.fsairlines.net/index.php?title=XML-Interface-v2&amp;diff=3392"/>
		<updated>2025-05-10T19:23:18Z</updated>

		<summary type="html">&lt;p&gt;Joefremont: /* Flight Data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The XML-Interface is the core of the [[VA Integration Kit]]. It has been designed to give VA Administrators with the knowledge of dynamic web techniques the possibility to create their own layout and perfectly integrate the information into their own website using data from FSAirlines. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;This version of the XML interface is now released as official.&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Changes from the previous version==&lt;br /&gt;
Compared to the previous version of the XML-Interface the following change were made.&lt;br /&gt;
* Change from domain registration to API keys.&lt;br /&gt;
* Rate limits added.&lt;br /&gt;
* Json output format added.&lt;br /&gt;
* Output properly supports UTF-8 character set.&lt;br /&gt;
* Additional functions for packages added.&lt;br /&gt;
* All array keys are now in lower case.&lt;br /&gt;
&lt;br /&gt;
==Rate limits==&lt;br /&gt;
The access to the interface is limited by the number of calls an VA can make each hour and each day.  An airline with a gold account can make 500 calls each hour and 6000 call each day. An airline with a platinum account can make 2500 calls each hour and 30000 call each day. If an airline has multiple members then those limits are added together for each premium account.  Example if an airline has one platinum member and two gold member there limits are 3500 an hour and 42000 per day.  Functions related to pilots booking flights do not count against the rate limits.&lt;br /&gt;
&lt;br /&gt;
==Access Restriction==&lt;br /&gt;
In order to be able to access data from the Data-Interface you need to create an API key, this can be done using the &#039;Api Key Management&#039; page.  To find this page on the website go to your VA Overview page and then in the options select &#039;Edit VA Settings&#039; and then &#039;Api Key Management&#039;.  &lt;br /&gt;
&lt;br /&gt;
There are two types of API keys that can be created.&lt;br /&gt;
&lt;br /&gt;
Site key:  This key is to be used by your main website/service and may be use the full rate limit allowed by your VA.  After one hundred calls using a site api key, the key will be locked to the IP address used.  If in the future you need to change the IP address all you need to do is delete the old key and create a new one.&lt;br /&gt;
&lt;br /&gt;
Developer key:  This key is used to help you create and test your website on a different machine than your main site.  It will not be limited to a single IP address but will be limited to the number of calls each day your VA is normally allowed each hour.   Usage of the developer key does apply against your VA&#039;s total rate limit.&lt;br /&gt;
&lt;br /&gt;
==Basic Usage==&lt;br /&gt;
The data can be received using HTTP calls to the interface script and add the desired function to the parameters. Here is an example request:&lt;br /&gt;
&amp;lt;pre&amp;gt;http://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;apikey=xxxxx&amp;lt;/pre&amp;gt;&lt;br /&gt;
As you can see there is the interface script &#039;&#039;va_interface2.php&#039;&#039;, the function &#039;&#039;getPilotList&#039;&#039; and the parameters &#039;&#039;va_id=7&#039;&#039; and &#039;&#039;apikey=xxxxx&#039;&#039;. Some functions require additional parameters, these can be appended after the other parameters.&lt;br /&gt;
&lt;br /&gt;
The result of the request will be given in xml format with the base-tag being &#039;&#039;&amp;lt;fsa_output&amp;gt;&#039;&#039;. This tag has the attributes &#039;&#039;version&#039;&#039; and &#039;&#039;success&#039;&#039; which show the version number of the interface and if the request succeeded or not. In case of a failure the &#039;&#039;success&#039;&#039;-attribute shows the error message. The following example shows the return text of the above function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;fsa_output version=&amp;quot;1.0&amp;quot; success=&amp;quot;SUCCESS&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;data id=&amp;quot;1&amp;quot; name=&amp;quot;Konrad&amp;quot; surname=&amp;quot;Pustka&amp;quot; va_user=&amp;quot;SNA101&amp;quot; location=&amp;quot;EDDM&amp;quot; lastactive=&amp;quot;1287330550&amp;quot; budget=&amp;quot;198144&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;data id=&amp;quot;2&amp;quot; name=&amp;quot;Claudio&amp;quot; surname=&amp;quot;Gusmini&amp;quot; va_user=&amp;quot;SNA102&amp;quot; location=&amp;quot;EDDM&amp;quot; lastactive=&amp;quot;1286366261&amp;quot; budget=&amp;quot;216405101&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/fsa_output&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Inside the &#039;&#039;fsa_output&#039;&#039;-tag there are the &#039;&#039;data&#039;&#039;-tags which contain all the information.  &lt;br /&gt;
&lt;br /&gt;
When calling using this method the default output format is XML, you can get the out in JSON format by adding a format=json parameter to the request. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxx&amp;lt;/pre&amp;gt;&lt;br /&gt;
The output will be:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;status&amp;quot;: &amp;quot;SUCCESS&amp;quot;,&lt;br /&gt;
    &amp;quot;data&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;id&amp;quot;: 1,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Konrad&amp;quot;,&lt;br /&gt;
            &amp;quot;surname&amp;quot;: &amp;quot;Pustka&amp;quot;,&lt;br /&gt;
            &amp;quot;va_user&amp;quot;: &amp;quot;SNA101&amp;quot;,&lt;br /&gt;
            &amp;quot;location&amp;quot;: &amp;quot;ETSE&amp;quot;,&lt;br /&gt;
            &amp;quot;lastactive&amp;quot;: 1600285079,&lt;br /&gt;
            &amp;quot;budget&amp;quot;: 2400628&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;id&amp;quot;: 2,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Claudio&amp;quot;,&lt;br /&gt;
            &amp;quot;surname&amp;quot;: &amp;quot;Gusmini&amp;quot;,&lt;br /&gt;
            &amp;quot;va_user&amp;quot;: &amp;quot;SNA102&amp;quot;,&lt;br /&gt;
            &amp;quot;location&amp;quot;: &amp;quot;LIMG&amp;quot;,&lt;br /&gt;
            &amp;quot;lastactive&amp;quot;: 1605458811,&lt;br /&gt;
            &amp;quot;budget&amp;quot;: 216631042&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you need something to get started here&#039;s a small example PHP-script showing a list of your pilots&#039; names. Just replace the va_id by your own.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
  $ch = curl_init(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;);&lt;br /&gt;
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
  $http_status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);&lt;br /&gt;
  $http_text = curl_exec($ch);&lt;br /&gt;
&lt;br /&gt;
  $objDOM = new DOMDocument();&lt;br /&gt;
  $objDOM-&amp;gt;loadXML($http_text);&lt;br /&gt;
&lt;br /&gt;
  $dataNodes = $objDOM-&amp;gt;getElementsByTagName(&amp;quot;data&amp;quot;);&lt;br /&gt;
  foreach( $dataNodes as $node )&lt;br /&gt;
  {&lt;br /&gt;
    $name = $node-&amp;gt;getAttribute(&amp;quot;name&amp;quot;);&lt;br /&gt;
    $surname = $node-&amp;gt;getAttribute(&amp;quot;surname&amp;quot;);&lt;br /&gt;
    echo &amp;quot;{$name} {$surname} &amp;lt;br/&amp;gt;&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here is a sample of a PHP script reading the same data in JSON format.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
    $ch = curl_init(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;);&lt;br /&gt;
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
    $http_status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);&lt;br /&gt;
    $http_text = curl_exec($ch);&lt;br /&gt;
    $json_data = json_decode($http_text, true);&lt;br /&gt;
    if ($json_data[&#039;status&#039;] == &#039;SUCCESS&#039;) {&lt;br /&gt;
        foreach($json_data[&#039;data&#039;] as $node) {&lt;br /&gt;
            echo &amp;quot;{$node[&#039;name&#039;]} {$node[&#039;surname&#039;]}&amp;lt;br/&amp;gt;\n&amp;quot;;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a sample of a Python script reading the same data in json format.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    #!/usr/bin/python&lt;br /&gt;
    import requests&lt;br /&gt;
&lt;br /&gt;
    r = requests.get(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;)&lt;br /&gt;
    json_data = r.json()&lt;br /&gt;
    if json_data[&#039;status&#039;] == &#039;SUCCESS&#039;:&lt;br /&gt;
        for node in json_data[&#039;data&#039;]:&lt;br /&gt;
            print(&#039;{} {}&#039;.format(node[&#039;name&#039;], node[&#039;surname&#039;])&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Pilot Login==&lt;br /&gt;
Several of the functions require that the pilot calling be logged in.  Previous versions of the interface required the call passed the pilots username and a hashed password as parameters.  That method has now been discontinued, in this version you will need to call the &#039;&#039;pilotLogin&#039;&#039; to create a token that can be used to call functions for that pilot.  Unlike other calls in the interface, the &#039;&#039;pilotLogin&#039;&#039; function is also a HTTP POST call rather than a GET call.  Here is an example of calling the &#039;&#039;pilotLogin&#039;&#039; function.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
$post = [&lt;br /&gt;
    &#039;user&#039; =&amp;gt; &#039;username&#039;,&lt;br /&gt;
    &#039;password&#039; =&amp;gt; &#039;xxxxxxxx&#039;&lt;br /&gt;
];&lt;br /&gt;
&lt;br /&gt;
$ch = curl_init(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=pilotLogin&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;);&lt;br /&gt;
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);&lt;br /&gt;
&lt;br /&gt;
$http_text = curl_exec($ch);&lt;br /&gt;
$data = json_decode($http_text, true);&lt;br /&gt;
&lt;br /&gt;
if ($data[&#039;status&#039;] == &#039;SUCCESS&#039;) {&lt;br /&gt;
    $fsa_token = $data[&#039;data&#039;][&#039;token&#039;];&lt;br /&gt;
} else {&lt;br /&gt;
    die(&amp;quot;Login failed&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The data returned in this request includes:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| token&lt;br /&gt;
| The pilots login token.&lt;br /&gt;
|-&lt;br /&gt;
| alt_code&lt;br /&gt;
| The alternate ICAO code of the airport they are currently located based on there default simulator.&lt;br /&gt;
|-&lt;br /&gt;
| budget&lt;br /&gt;
| The pilots current budget&lt;br /&gt;
|-&lt;br /&gt;
| default_sim&lt;br /&gt;
| The pilots default simulator.&lt;br /&gt;
|-&lt;br /&gt;
| location&lt;br /&gt;
| The FSA offical ICAO code of the airport the pilot is located.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| The pilots first name&lt;br /&gt;
|-&lt;br /&gt;
| pilot_id&lt;br /&gt;
| The id number of the pilot.&lt;br /&gt;
|-&lt;br /&gt;
| premium&lt;br /&gt;
| 1 of the pilot is a premium member, 0 if not.&lt;br /&gt;
|-&lt;br /&gt;
| rank&lt;br /&gt;
| The code for the pilots rank within their VA&lt;br /&gt;
|-&lt;br /&gt;
| rank_id&lt;br /&gt;
| The id of the pilots rank within their VA&lt;br /&gt;
|-&lt;br /&gt;
| surname&lt;br /&gt;
| The pilots last or given name &lt;br /&gt;
|-&lt;br /&gt;
| va_id&lt;br /&gt;
| The ID of the pilots VA&lt;br /&gt;
|-&lt;br /&gt;
| va_status&lt;br /&gt;
| The pilots within there airline&lt;br /&gt;
|-&lt;br /&gt;
| va_user&lt;br /&gt;
| The pilots ID within their VA.&lt;br /&gt;
|-&lt;br /&gt;
| weightunit&lt;br /&gt;
| The pilots default unit of measure (kg or lb).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Data==&lt;br /&gt;
The following section contains a detailed list of all the request-functions with their return values. Lately added options are marked &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;green&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Parameters===&lt;br /&gt;
All the request functions use parameters which need to be appended. The following table shows all the parameters and their meaning.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter&lt;br /&gt;
! Meaning&lt;br /&gt;
|- &lt;br /&gt;
| ac_id&lt;br /&gt;
| ID of the aircraft. Is part of the data received from other functions (e.g. getAircraftList).&lt;br /&gt;
|-&lt;br /&gt;
| accept_pp&lt;br /&gt;
| Must be set &#039;1&#039; if Privacy Policy is accepted.&lt;br /&gt;
|-&lt;br /&gt;
| acdb_id&lt;br /&gt;
| ID of the aircraft type. Is part of the data received from other functions (e.g. getAircraftList).&lt;br /&gt;
|-&lt;br /&gt;
| airport&lt;br /&gt;
| Starting airport. Where the user should be placed first.&lt;br /&gt;
|-&lt;br /&gt;
| arr&lt;br /&gt;
| ICAO code of the arrival airport.&lt;br /&gt;
|-&lt;br /&gt;
| count&lt;br /&gt;
| Number past flights which should be displayed.&lt;br /&gt;
|-&lt;br /&gt;
| country&lt;br /&gt;
| Name of the country. &lt;br /&gt;
|-&lt;br /&gt;
| days&lt;br /&gt;
| Number of past days from now which should be displayed.&lt;br /&gt;
|-&lt;br /&gt;
| dep&lt;br /&gt;
| ICAO code of the departure airport.&lt;br /&gt;
|-&lt;br /&gt;
| email&lt;br /&gt;
| E-Mail of the user.&lt;br /&gt;
|-&lt;br /&gt;
| fleet_id&lt;br /&gt;
| ID of the fleet. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| from_ts&lt;br /&gt;
| UNIX timestamp of the date where the listing should start.&lt;br /&gt;
|-&lt;br /&gt;
| givenname&lt;br /&gt;
| Given name of the user.&lt;br /&gt;
|-&lt;br /&gt;
| icao&lt;br /&gt;
| ICAO code of the airport.&lt;br /&gt;
|-&lt;br /&gt;
| pilot_id&lt;br /&gt;
| ID of the pilot. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| report_id&lt;br /&gt;
| ID of the report. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| surname&lt;br /&gt;
| Surname of the user.&lt;br /&gt;
|-&lt;br /&gt;
| to_ts&lt;br /&gt;
| UNIX timestamp of the date where the listing should end.&lt;br /&gt;
|-&lt;br /&gt;
| user&lt;br /&gt;
| Username of the pilot.&lt;br /&gt;
|-&lt;br /&gt;
| token&lt;br /&gt;
| Login token created by the pilotLogin function.&lt;br /&gt;
|-&lt;br /&gt;
| va_id&lt;br /&gt;
| ID of the [[Virtual Airline]]. Is displayed on the [[Overview]] page.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Aircraft Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftData&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, pax_economy, pax_business, pax_first, config_name&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftDBData&lt;br /&gt;
| va_id, acdb_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao, passengers, price, fuel, dow, mtow, speed, engines, cargo, mzfw, market_only, range&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftDBList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registration, state, ac_name, status, fleet_id, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftStats&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| flights, hours, distance&lt;br /&gt;
|-&lt;br /&gt;
| getFleetAircraftList&lt;br /&gt;
| va_id, fleet_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registration, state, ac_name, status, fleet_id, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getFleetList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name&lt;br /&gt;
|-&lt;br /&gt;
| getFleetStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getLeasedAircraftList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registraion, state, ac_name, status, fleet_id, fuel, va_id, name, expire&lt;br /&gt;
|- &lt;br /&gt;
| getPeriodFleetStats&lt;br /&gt;
| va_id, from_ts, to_ts&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Airport Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirportData&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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&lt;br /&gt;
|-&lt;br /&gt;
| getAirportList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| icao, name, city, country, fuel, lat, lon&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Airline Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirlineData&lt;br /&gt;
| va_id, id (=va_id)&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, base, code, budget, homepage, logo_l, logo_s, price (deprecated, will be removed in next release), reputation, pilotcharge, multiplier, mission&lt;br /&gt;
|-&lt;br /&gt;
| getAirlineStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, pax, cargo_kg&lt;br /&gt;
|-&lt;br /&gt;
| getCountryStats&lt;br /&gt;
| va_id, country&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| va_name, id, flights, rating hours, profit, distance, last, fuel_used, pax, cargo_kg&lt;br /&gt;
|- &lt;br /&gt;
| getRankList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, short, settings, pilots, aircrafts, fleet, flights, partnerships, advertisements, fleet_id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Financial Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getLast10Transactions&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| ts, value, reason&lt;br /&gt;
|-&lt;br /&gt;
| getNegTransactionSums&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| value, reason&lt;br /&gt;
|-&lt;br /&gt;
| getPosTransactionSums&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| value, reason&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;getDailyTransactions&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id ts value reason partner_id fleet_id object_id&amp;lt;/span&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Flight Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters in brackets are optional&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getActiveFlights&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| departure, arrival, passengers, cargo, user_id, ac_id, flightstate, timestamp, number, lon, lat, pax_economy, pax_business, pax_first&lt;br /&gt;
|-&lt;br /&gt;
| getBookedFlights&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| departure, arrival, passengers, cargo, user_id, ac_id, number, pax_economy, pax_business, pax_first&lt;br /&gt;
|-&lt;br /&gt;
| getFlightReports&lt;br /&gt;
| va_id, (acdb_id), (ac_id), (fleet_id), (pilot_id), (days), (count)&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;pax_economy, pax_business, pax_first&amp;lt;/span&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
| getReportDetail&lt;br /&gt;
| va_id, report_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;vs, pax_economy, pax_business, pax_first, ticket_business, ticket_first, fuel_start, fuel_dep, fuel_takeoff, fuel_land, fuel_finish, ticket_factor, interface, simversion, os, landing_fee&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| getRouteData&lt;br /&gt;
| va_id, route_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, va_id, cs_vaid, number, dep, arr, deptime, arrtime, simrate, days, price, state, flighttype, acdb_list, ac_id, remarks, route, limit_pax, limit_cargo&lt;br /&gt;
|-&lt;br /&gt;
| getRouteList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, number, dep, dep_country, arr, arr_country, deptime, arrtime, simrate, days, price, state, flighttype, acdb_list, ac_id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Pilot Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getPeriodPilotStats&lt;br /&gt;
| va_id, from_ts, to_ts&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getPilotData&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, surname, user, va_user, rank_id, location, budget, lastactive, active, sigac, timezone, weightunit, language, msgmail, rank, flights, rating, hours, distance, pax, cargo_kg, picture&lt;br /&gt;
|-&lt;br /&gt;
| getPilotHours&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao, hours&lt;br /&gt;
|-&lt;br /&gt;
| getPilotList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, surname, user, va_user, rank_id, location, last_active, status, budget&lt;br /&gt;
|-&lt;br /&gt;
| getPilotRatings&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, training, manufacturer, type&lt;br /&gt;
|-&lt;br /&gt;
| getPilotStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getPilotStatus&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| ac_id, route_id, departure, arrival, dep_time, dist, duration, status, lon, lat, flightstate, passengers, income, ticket, timestamp, cargo, multiplier, flighttype&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Flight Booking===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| bookFlight&lt;br /&gt;
| va_id, pilot_id, token, route_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| success, message, codeshare, codeshare_msg&lt;br /&gt;
|-&lt;br /&gt;
| cancelFlight&lt;br /&gt;
| va_id, pilot_id, token&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| result, loss&lt;br /&gt;
|-&lt;br /&gt;
| getBookableRoutes&lt;br /&gt;
| va_id, pilot_id, token&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| number, dep, arr, deptime, arrtime, id, state, simrate, flighttype, training, price, list, ac_id&lt;br /&gt;
|-&lt;br /&gt;
| getBookableAircraft&lt;br /&gt;
| va_id, pilot_id, route_id, token&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| type, registration, state, id, name, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getBookStatus&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| status&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Miscellaneous User Functions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| createAccount&lt;br /&gt;
| va_id, givenname, surname, username, email, password, airport, accept_pp&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| success, message, code&lt;br /&gt;
|-&lt;br /&gt;
| getPilotID&lt;br /&gt;
| va_id, user, token&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id&lt;br /&gt;
|-&lt;br /&gt;
| getPrivacyPolicy&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS&lt;br /&gt;
| policy&lt;br /&gt;
|-&lt;br /&gt;
| getTransferCost&lt;br /&gt;
| va_id, arr, dep&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| cost&lt;br /&gt;
|-&lt;br /&gt;
| transferPilot&lt;br /&gt;
| va_id, pilot_id, token, icao&lt;br /&gt;
| SUCCESS, NOT FOUND, INSUFFICIENT FUNDS&lt;br /&gt;
| cost&lt;br /&gt;
|- &lt;br /&gt;
| getDistance&lt;br /&gt;
| va_id, icao_from, icao_to&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| distance&lt;br /&gt;
|- &lt;br /&gt;
| getMetar&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| metar&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Package Functions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirportPackageSummary&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| getVaPackageSummary&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| getAircraftPackages&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| getCenterPackages&lt;br /&gt;
| va_id, center_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Sample Responses&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getAirportPackageSummary&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;status&amp;quot;: &amp;quot;SUCCESS&amp;quot;,&lt;br /&gt;
    &amp;quot;data&amp;quot;: {&lt;br /&gt;
        &amp;quot;arr&amp;quot;: {&lt;br /&gt;
            &amp;quot;EDDK&amp;quot;: {&lt;br /&gt;
                &amp;quot;100000&amp;quot;: 1,&lt;br /&gt;
                &amp;quot;200&amp;quot;: 12,&lt;br /&gt;
                &amp;quot;2000&amp;quot;: 2,&lt;br /&gt;
                &amp;quot;bearing&amp;quot;: 29.528874983699,&lt;br /&gt;
                &amp;quot;city&amp;quot;: &amp;quot;Cologne-Bonn&amp;quot;,&lt;br /&gt;
                &amp;quot;distance&amp;quot;: 4872.3920956341,&lt;br /&gt;
                &amp;quot;total_kg&amp;quot;: 106400&lt;br /&gt;
            },&lt;br /&gt;
            &amp;quot;KBFL&amp;quot;: {&lt;br /&gt;
                &amp;quot;200&amp;quot;: 16,&lt;br /&gt;
                &amp;quot;40&amp;quot;: 310,&lt;br /&gt;
                &amp;quot;bearing&amp;quot;: 128.34209940912,&lt;br /&gt;
                &amp;quot;city&amp;quot;: &amp;quot;Bakersfield&amp;quot;,&lt;br /&gt;
                &amp;quot;distance&amp;quot;: 207.19199031933,&lt;br /&gt;
                &amp;quot;total_kg&amp;quot;: 15600&lt;br /&gt;
            },&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getVaPackageSummary&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;status&amp;quot;: &amp;quot;SUCCESS&amp;quot;,&lt;br /&gt;
    &amp;quot;data&amp;quot;: {&lt;br /&gt;
        &amp;quot;aircraft&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;ac_id&amp;quot;: 129691,&lt;br /&gt;
                &amp;quot;earliest_ts&amp;quot;: 1622293737,&lt;br /&gt;
                &amp;quot;location&amp;quot;: &amp;quot;EDDF&amp;quot;,&lt;br /&gt;
                &amp;quot;packages&amp;quot;: 13,&lt;br /&gt;
                &amp;quot;registration&amp;quot;: &amp;quot;D-AOGT&amp;quot;,&lt;br /&gt;
                &amp;quot;size_kg&amp;quot;: 26000&lt;br /&gt;
            }&lt;br /&gt;
        ],&lt;br /&gt;
        &amp;quot;centers&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;center_id&amp;quot;: 4347,&lt;br /&gt;
                &amp;quot;description&amp;quot;: &amp;quot;Himalayan Transport&amp;quot;,&lt;br /&gt;
                &amp;quot;earliest_ts&amp;quot;: 1621459008,&lt;br /&gt;
                &amp;quot;location&amp;quot;: &amp;quot;VNKT&amp;quot;,&lt;br /&gt;
                &amp;quot;packages&amp;quot;: 82,&lt;br /&gt;
                &amp;quot;size_kg&amp;quot;: 4080&lt;br /&gt;
            }&lt;br /&gt;
        ]&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Response Values&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;earliest_ts: The timestamp the of the oldest package in that aircraft/center&lt;br /&gt;
&amp;lt;li&amp;gt;packages: The count of packages stored&lt;br /&gt;
&amp;lt;li&amp;gt;size_kg: The total weight in kg of the packages stored.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getAircraftPackages&#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;getCenterPackages&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;status&amp;quot;: &amp;quot;SUCCESS&amp;quot;,&lt;br /&gt;
    &amp;quot;data&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;ac_id&amp;quot;: 129691,&lt;br /&gt;
            &amp;quot;arr&amp;quot;: &amp;quot;SBGL&amp;quot;,&lt;br /&gt;
            &amp;quot;arr_city&amp;quot;: &amp;quot;Rio De Janeiro&amp;quot;,&lt;br /&gt;
            &amp;quot;center_id&amp;quot;: null,&lt;br /&gt;
            &amp;quot;created_ts&amp;quot;: 1620830486,&lt;br /&gt;
            &amp;quot;delivered&amp;quot;: false,&lt;br /&gt;
            &amp;quot;dep&amp;quot;: &amp;quot;EDDF&amp;quot;,&lt;br /&gt;
            &amp;quot;fleet_id&amp;quot;: 72303,&lt;br /&gt;
            &amp;quot;id&amp;quot;: 302216085,&lt;br /&gt;
            &amp;quot;location&amp;quot;: &amp;quot;EDDF&amp;quot;,&lt;br /&gt;
            &amp;quot;mult&amp;quot;: 10,&lt;br /&gt;
            &amp;quot;package_type&amp;quot;: 0,&lt;br /&gt;
            &amp;quot;payment&amp;quot;: 59281,&lt;br /&gt;
            &amp;quot;payment_fact&amp;quot;: null,&lt;br /&gt;
            &amp;quot;pilot_id&amp;quot;: 98096,&lt;br /&gt;
            &amp;quot;size_kg&amp;quot;: 2000,&lt;br /&gt;
            &amp;quot;start_ts&amp;quot;: 1622293737,&lt;br /&gt;
            &amp;quot;updated_ts&amp;quot;: 1620830486&lt;br /&gt;
        },&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Response Values&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ac_id: The id of the aircraft holding the package&lt;br /&gt;
&amp;lt;li&amp;gt;arr: The ICAO of the destination airport&lt;br /&gt;
&amp;lt;li&amp;gt;arr_city: The city name of the destination airport&lt;br /&gt;
&amp;lt;li&amp;gt;center_id: The id center holding the aircraft&lt;br /&gt;
&amp;lt;li&amp;gt;created_ts: The unix timestamp of the the package was created.&lt;br /&gt;
&amp;lt;li&amp;gt;dep: The ICAO of the origin airport&lt;br /&gt;
&amp;lt;li&amp;gt;fleet_id: The fleet that picked up the package&lt;br /&gt;
&amp;lt;li&amp;gt;location: The airport the package is currently located&lt;br /&gt;
&amp;lt;li&amp;gt;mult: The VA financial multiplier when the package was picked up&lt;br /&gt;
&amp;lt;li&amp;gt;package_type: 0 for normal, 1 for priority&lt;br /&gt;
&amp;lt;li&amp;gt;payment: The base payment for when the package was created.&lt;br /&gt;
&amp;lt;li&amp;gt;pilot_id: The ID of the pilot who picked up the package.&lt;br /&gt;
&amp;lt;li&amp;gt;size_kg: The size in kg of the package&lt;br /&gt;
&amp;lt;li&amp;gt;start_ts: The unix timestamp of when the package was picked up.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Requested additional functions===&lt;br /&gt;
The following list contains all the functions which were requested by users but aren&#039;t implemented yet.&lt;br /&gt;
*Create, edit and delete routes&lt;/div&gt;</summary>
		<author><name>Joefremont</name></author>
	</entry>
	<entry>
		<id>https://wiki4.fsairlines.net/index.php?title=XML-Interface-v2&amp;diff=3391</id>
		<title>XML-Interface-v2</title>
		<link rel="alternate" type="text/html" href="https://wiki4.fsairlines.net/index.php?title=XML-Interface-v2&amp;diff=3391"/>
		<updated>2024-09-11T14:37:35Z</updated>

		<summary type="html">&lt;p&gt;Joefremont: /* Flight Data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The XML-Interface is the core of the [[VA Integration Kit]]. It has been designed to give VA Administrators with the knowledge of dynamic web techniques the possibility to create their own layout and perfectly integrate the information into their own website using data from FSAirlines. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;This version of the XML interface is now released as official.&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Changes from the previous version==&lt;br /&gt;
Compared to the previous version of the XML-Interface the following change were made.&lt;br /&gt;
* Change from domain registration to API keys.&lt;br /&gt;
* Rate limits added.&lt;br /&gt;
* Json output format added.&lt;br /&gt;
* Output properly supports UTF-8 character set.&lt;br /&gt;
* Additional functions for packages added.&lt;br /&gt;
* All array keys are now in lower case.&lt;br /&gt;
&lt;br /&gt;
==Rate limits==&lt;br /&gt;
The access to the interface is limited by the number of calls an VA can make each hour and each day.  An airline with a gold account can make 500 calls each hour and 6000 call each day. An airline with a platinum account can make 2500 calls each hour and 30000 call each day. If an airline has multiple members then those limits are added together for each premium account.  Example if an airline has one platinum member and two gold member there limits are 3500 an hour and 42000 per day.  Functions related to pilots booking flights do not count against the rate limits.&lt;br /&gt;
&lt;br /&gt;
==Access Restriction==&lt;br /&gt;
In order to be able to access data from the Data-Interface you need to create an API key, this can be done using the &#039;Api Key Management&#039; page.  To find this page on the website go to your VA Overview page and then in the options select &#039;Edit VA Settings&#039; and then &#039;Api Key Management&#039;.  &lt;br /&gt;
&lt;br /&gt;
There are two types of API keys that can be created.&lt;br /&gt;
&lt;br /&gt;
Site key:  This key is to be used by your main website/service and may be use the full rate limit allowed by your VA.  After one hundred calls using a site api key, the key will be locked to the IP address used.  If in the future you need to change the IP address all you need to do is delete the old key and create a new one.&lt;br /&gt;
&lt;br /&gt;
Developer key:  This key is used to help you create and test your website on a different machine than your main site.  It will not be limited to a single IP address but will be limited to the number of calls each day your VA is normally allowed each hour.   Usage of the developer key does apply against your VA&#039;s total rate limit.&lt;br /&gt;
&lt;br /&gt;
==Basic Usage==&lt;br /&gt;
The data can be received using HTTP calls to the interface script and add the desired function to the parameters. Here is an example request:&lt;br /&gt;
&amp;lt;pre&amp;gt;http://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;apikey=xxxxx&amp;lt;/pre&amp;gt;&lt;br /&gt;
As you can see there is the interface script &#039;&#039;va_interface2.php&#039;&#039;, the function &#039;&#039;getPilotList&#039;&#039; and the parameters &#039;&#039;va_id=7&#039;&#039; and &#039;&#039;apikey=xxxxx&#039;&#039;. Some functions require additional parameters, these can be appended after the other parameters.&lt;br /&gt;
&lt;br /&gt;
The result of the request will be given in xml format with the base-tag being &#039;&#039;&amp;lt;fsa_output&amp;gt;&#039;&#039;. This tag has the attributes &#039;&#039;version&#039;&#039; and &#039;&#039;success&#039;&#039; which show the version number of the interface and if the request succeeded or not. In case of a failure the &#039;&#039;success&#039;&#039;-attribute shows the error message. The following example shows the return text of the above function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;fsa_output version=&amp;quot;1.0&amp;quot; success=&amp;quot;SUCCESS&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;data id=&amp;quot;1&amp;quot; name=&amp;quot;Konrad&amp;quot; surname=&amp;quot;Pustka&amp;quot; va_user=&amp;quot;SNA101&amp;quot; location=&amp;quot;EDDM&amp;quot; lastactive=&amp;quot;1287330550&amp;quot; budget=&amp;quot;198144&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;data id=&amp;quot;2&amp;quot; name=&amp;quot;Claudio&amp;quot; surname=&amp;quot;Gusmini&amp;quot; va_user=&amp;quot;SNA102&amp;quot; location=&amp;quot;EDDM&amp;quot; lastactive=&amp;quot;1286366261&amp;quot; budget=&amp;quot;216405101&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/fsa_output&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Inside the &#039;&#039;fsa_output&#039;&#039;-tag there are the &#039;&#039;data&#039;&#039;-tags which contain all the information.  &lt;br /&gt;
&lt;br /&gt;
When calling using this method the default output format is XML, you can get the out in JSON format by adding a format=json parameter to the request. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxx&amp;lt;/pre&amp;gt;&lt;br /&gt;
The output will be:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;status&amp;quot;: &amp;quot;SUCCESS&amp;quot;,&lt;br /&gt;
    &amp;quot;data&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;id&amp;quot;: 1,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Konrad&amp;quot;,&lt;br /&gt;
            &amp;quot;surname&amp;quot;: &amp;quot;Pustka&amp;quot;,&lt;br /&gt;
            &amp;quot;va_user&amp;quot;: &amp;quot;SNA101&amp;quot;,&lt;br /&gt;
            &amp;quot;location&amp;quot;: &amp;quot;ETSE&amp;quot;,&lt;br /&gt;
            &amp;quot;lastactive&amp;quot;: 1600285079,&lt;br /&gt;
            &amp;quot;budget&amp;quot;: 2400628&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;id&amp;quot;: 2,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Claudio&amp;quot;,&lt;br /&gt;
            &amp;quot;surname&amp;quot;: &amp;quot;Gusmini&amp;quot;,&lt;br /&gt;
            &amp;quot;va_user&amp;quot;: &amp;quot;SNA102&amp;quot;,&lt;br /&gt;
            &amp;quot;location&amp;quot;: &amp;quot;LIMG&amp;quot;,&lt;br /&gt;
            &amp;quot;lastactive&amp;quot;: 1605458811,&lt;br /&gt;
            &amp;quot;budget&amp;quot;: 216631042&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you need something to get started here&#039;s a small example PHP-script showing a list of your pilots&#039; names. Just replace the va_id by your own.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
  $ch = curl_init(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;);&lt;br /&gt;
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
  $http_status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);&lt;br /&gt;
  $http_text = curl_exec($ch);&lt;br /&gt;
&lt;br /&gt;
  $objDOM = new DOMDocument();&lt;br /&gt;
  $objDOM-&amp;gt;loadXML($http_text);&lt;br /&gt;
&lt;br /&gt;
  $dataNodes = $objDOM-&amp;gt;getElementsByTagName(&amp;quot;data&amp;quot;);&lt;br /&gt;
  foreach( $dataNodes as $node )&lt;br /&gt;
  {&lt;br /&gt;
    $name = $node-&amp;gt;getAttribute(&amp;quot;name&amp;quot;);&lt;br /&gt;
    $surname = $node-&amp;gt;getAttribute(&amp;quot;surname&amp;quot;);&lt;br /&gt;
    echo &amp;quot;{$name} {$surname} &amp;lt;br/&amp;gt;&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here is a sample of a PHP script reading the same data in JSON format.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
    $ch = curl_init(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;);&lt;br /&gt;
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
    $http_status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);&lt;br /&gt;
    $http_text = curl_exec($ch);&lt;br /&gt;
    $json_data = json_decode($http_text, true);&lt;br /&gt;
    if ($json_data[&#039;status&#039;] == &#039;SUCCESS&#039;) {&lt;br /&gt;
        foreach($json_data[&#039;data&#039;] as $node) {&lt;br /&gt;
            echo &amp;quot;{$node[&#039;name&#039;]} {$node[&#039;surname&#039;]}&amp;lt;br/&amp;gt;\n&amp;quot;;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a sample of a Python script reading the same data in json format.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    #!/usr/bin/python&lt;br /&gt;
    import requests&lt;br /&gt;
&lt;br /&gt;
    r = requests.get(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;)&lt;br /&gt;
    json_data = r.json()&lt;br /&gt;
    if json_data[&#039;status&#039;] == &#039;SUCCESS&#039;:&lt;br /&gt;
        for node in json_data[&#039;data&#039;]:&lt;br /&gt;
            print(&#039;{} {}&#039;.format(node[&#039;name&#039;], node[&#039;surname&#039;])&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Pilot Login==&lt;br /&gt;
Several of the functions require that the pilot calling be logged in.  Previous versions of the interface required the call passed the pilots username and a hashed password as parameters.  That method has now been discontinued, in this version you will need to call the &#039;&#039;pilotLogin&#039;&#039; to create a token that can be used to call functions for that pilot.  Unlike other calls in the interface, the &#039;&#039;pilotLogin&#039;&#039; function is also a HTTP POST call rather than a GET call.  Here is an example of calling the &#039;&#039;pilotLogin&#039;&#039; function.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
$post = [&lt;br /&gt;
    &#039;user&#039; =&amp;gt; &#039;username&#039;,&lt;br /&gt;
    &#039;password&#039; =&amp;gt; &#039;xxxxxxxx&#039;&lt;br /&gt;
];&lt;br /&gt;
&lt;br /&gt;
$ch = curl_init(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=pilotLogin&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;);&lt;br /&gt;
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);&lt;br /&gt;
&lt;br /&gt;
$http_text = curl_exec($ch);&lt;br /&gt;
$data = json_decode($http_text, true);&lt;br /&gt;
&lt;br /&gt;
if ($data[&#039;status&#039;] == &#039;SUCCESS&#039;) {&lt;br /&gt;
    $fsa_token = $data[&#039;data&#039;][&#039;token&#039;];&lt;br /&gt;
} else {&lt;br /&gt;
    die(&amp;quot;Login failed&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The data returned in this request includes:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| token&lt;br /&gt;
| The pilots login token.&lt;br /&gt;
|-&lt;br /&gt;
| alt_code&lt;br /&gt;
| The alternate ICAO code of the airport they are currently located based on there default simulator.&lt;br /&gt;
|-&lt;br /&gt;
| budget&lt;br /&gt;
| The pilots current budget&lt;br /&gt;
|-&lt;br /&gt;
| default_sim&lt;br /&gt;
| The pilots default simulator.&lt;br /&gt;
|-&lt;br /&gt;
| location&lt;br /&gt;
| The FSA offical ICAO code of the airport the pilot is located.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| The pilots first name&lt;br /&gt;
|-&lt;br /&gt;
| pilot_id&lt;br /&gt;
| The id number of the pilot.&lt;br /&gt;
|-&lt;br /&gt;
| premium&lt;br /&gt;
| 1 of the pilot is a premium member, 0 if not.&lt;br /&gt;
|-&lt;br /&gt;
| rank&lt;br /&gt;
| The code for the pilots rank within their VA&lt;br /&gt;
|-&lt;br /&gt;
| rank_id&lt;br /&gt;
| The id of the pilots rank within their VA&lt;br /&gt;
|-&lt;br /&gt;
| surname&lt;br /&gt;
| The pilots last or given name &lt;br /&gt;
|-&lt;br /&gt;
| va_id&lt;br /&gt;
| The ID of the pilots VA&lt;br /&gt;
|-&lt;br /&gt;
| va_status&lt;br /&gt;
| The pilots within there airline&lt;br /&gt;
|-&lt;br /&gt;
| va_user&lt;br /&gt;
| The pilots ID within their VA.&lt;br /&gt;
|-&lt;br /&gt;
| weightunit&lt;br /&gt;
| The pilots default unit of measure (kg or lb).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Data==&lt;br /&gt;
The following section contains a detailed list of all the request-functions with their return values. Lately added options are marked &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;green&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Parameters===&lt;br /&gt;
All the request functions use parameters which need to be appended. The following table shows all the parameters and their meaning.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter&lt;br /&gt;
! Meaning&lt;br /&gt;
|- &lt;br /&gt;
| ac_id&lt;br /&gt;
| ID of the aircraft. Is part of the data received from other functions (e.g. getAircraftList).&lt;br /&gt;
|-&lt;br /&gt;
| accept_pp&lt;br /&gt;
| Must be set &#039;1&#039; if Privacy Policy is accepted.&lt;br /&gt;
|-&lt;br /&gt;
| acdb_id&lt;br /&gt;
| ID of the aircraft type. Is part of the data received from other functions (e.g. getAircraftList).&lt;br /&gt;
|-&lt;br /&gt;
| airport&lt;br /&gt;
| Starting airport. Where the user should be placed first.&lt;br /&gt;
|-&lt;br /&gt;
| arr&lt;br /&gt;
| ICAO code of the arrival airport.&lt;br /&gt;
|-&lt;br /&gt;
| count&lt;br /&gt;
| Number past flights which should be displayed.&lt;br /&gt;
|-&lt;br /&gt;
| country&lt;br /&gt;
| Name of the country. &lt;br /&gt;
|-&lt;br /&gt;
| days&lt;br /&gt;
| Number of past days from now which should be displayed.&lt;br /&gt;
|-&lt;br /&gt;
| dep&lt;br /&gt;
| ICAO code of the departure airport.&lt;br /&gt;
|-&lt;br /&gt;
| email&lt;br /&gt;
| E-Mail of the user.&lt;br /&gt;
|-&lt;br /&gt;
| fleet_id&lt;br /&gt;
| ID of the fleet. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| from_ts&lt;br /&gt;
| UNIX timestamp of the date where the listing should start.&lt;br /&gt;
|-&lt;br /&gt;
| givenname&lt;br /&gt;
| Given name of the user.&lt;br /&gt;
|-&lt;br /&gt;
| icao&lt;br /&gt;
| ICAO code of the airport.&lt;br /&gt;
|-&lt;br /&gt;
| pilot_id&lt;br /&gt;
| ID of the pilot. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| report_id&lt;br /&gt;
| ID of the report. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| surname&lt;br /&gt;
| Surname of the user.&lt;br /&gt;
|-&lt;br /&gt;
| to_ts&lt;br /&gt;
| UNIX timestamp of the date where the listing should end.&lt;br /&gt;
|-&lt;br /&gt;
| user&lt;br /&gt;
| Username of the pilot.&lt;br /&gt;
|-&lt;br /&gt;
| token&lt;br /&gt;
| Login token created by the pilotLogin function.&lt;br /&gt;
|-&lt;br /&gt;
| va_id&lt;br /&gt;
| ID of the [[Virtual Airline]]. Is displayed on the [[Overview]] page.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Aircraft Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftData&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, pax_economy, pax_business, pax_first, config_name&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftDBData&lt;br /&gt;
| va_id, acdb_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao, passengers, price, fuel, dow, mtow, speed, engines, cargo, mzfw, market_only, range&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftDBList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registration, state, ac_name, status, fleet_id, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftStats&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| flights, hours, distance&lt;br /&gt;
|-&lt;br /&gt;
| getFleetAircraftList&lt;br /&gt;
| va_id, fleet_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registration, state, ac_name, status, fleet_id, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getFleetList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name&lt;br /&gt;
|-&lt;br /&gt;
| getFleetStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getLeasedAircraftList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registraion, state, ac_name, status, fleet_id, fuel, va_id, name, expire&lt;br /&gt;
|- &lt;br /&gt;
| getPeriodFleetStats&lt;br /&gt;
| va_id, from_ts, to_ts&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Airport Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirportData&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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&lt;br /&gt;
|-&lt;br /&gt;
| getAirportList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| icao, name, city, country, fuel, lat, lon&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Airline Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirlineData&lt;br /&gt;
| va_id, id (=va_id)&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, base, code, budget, homepage, logo_l, logo_s, price (deprecated, will be removed in next release), reputation, pilotcharge, multiplier, mission&lt;br /&gt;
|-&lt;br /&gt;
| getAirlineStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, pax, cargo_kg&lt;br /&gt;
|-&lt;br /&gt;
| getCountryStats&lt;br /&gt;
| va_id, country&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| va_name, id, flights, rating hours, profit, distance, last, fuel_used, pax, cargo_kg&lt;br /&gt;
|- &lt;br /&gt;
| getRankList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, short, settings, pilots, aircrafts, fleet, flights, partnerships, advertisements, fleet_id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Financial Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getLast10Transactions&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| ts, value, reason&lt;br /&gt;
|-&lt;br /&gt;
| getNegTransactionSums&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| value, reason&lt;br /&gt;
|-&lt;br /&gt;
| getPosTransactionSums&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| value, reason&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;getDailyTransactions&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id ts value reason partner_id fleet_id object_id&amp;lt;/span&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Flight Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters in brackets are optional&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getActiveFlights&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| departure, arrival, passengers, cargo, user_id, ac_id, flightstate, timestamp, number, lon, lat, pax_economy, pax_business, pax_first&lt;br /&gt;
|-&lt;br /&gt;
| getBookedFlights&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| departure, arrival, passengers, cargo, user_id, ac_id, number, pax_economy, pax_business, pax_first&lt;br /&gt;
|-&lt;br /&gt;
| getFlightReports&lt;br /&gt;
| va_id, (acdb_id), (ac_id), (pilot_id), (days), (count)&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;pax_economy, pax_business, pax_first&amp;lt;/span&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
| getReportDetail&lt;br /&gt;
| va_id, report_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;vs, pax_economy, pax_business, pax_first, ticket_business, ticket_first, fuel_start, fuel_dep, fuel_takeoff, fuel_land, fuel_finish, ticket_factor, interface, simversion, os, landing_fee&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| getRouteData&lt;br /&gt;
| va_id, route_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, va_id, cs_vaid, number, dep, arr, deptime, arrtime, simrate, days, price, state, flighttype, acdb_list, ac_id, remarks, route, limit_pax, limit_cargo&lt;br /&gt;
|-&lt;br /&gt;
| getRouteList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, number, dep, dep_country, arr, arr_country, deptime, arrtime, simrate, days, price, state, flighttype, acdb_list, ac_id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Pilot Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getPeriodPilotStats&lt;br /&gt;
| va_id, from_ts, to_ts&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getPilotData&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, surname, user, va_user, rank_id, location, budget, lastactive, active, sigac, timezone, weightunit, language, msgmail, rank, flights, rating, hours, distance, pax, cargo_kg, picture&lt;br /&gt;
|-&lt;br /&gt;
| getPilotHours&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao, hours&lt;br /&gt;
|-&lt;br /&gt;
| getPilotList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, surname, user, va_user, rank_id, location, last_active, status, budget&lt;br /&gt;
|-&lt;br /&gt;
| getPilotRatings&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, training, manufacturer, type&lt;br /&gt;
|-&lt;br /&gt;
| getPilotStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getPilotStatus&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| ac_id, route_id, departure, arrival, dep_time, dist, duration, status, lon, lat, flightstate, passengers, income, ticket, timestamp, cargo, multiplier, flighttype&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Flight Booking===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| bookFlight&lt;br /&gt;
| va_id, pilot_id, token, route_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| success, message, codeshare, codeshare_msg&lt;br /&gt;
|-&lt;br /&gt;
| cancelFlight&lt;br /&gt;
| va_id, pilot_id, token&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| result, loss&lt;br /&gt;
|-&lt;br /&gt;
| getBookableRoutes&lt;br /&gt;
| va_id, pilot_id, token&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| number, dep, arr, deptime, arrtime, id, state, simrate, flighttype, training, price, list, ac_id&lt;br /&gt;
|-&lt;br /&gt;
| getBookableAircraft&lt;br /&gt;
| va_id, pilot_id, route_id, token&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| type, registration, state, id, name, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getBookStatus&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| status&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Miscellaneous User Functions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| createAccount&lt;br /&gt;
| va_id, givenname, surname, username, email, password, airport, accept_pp&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| success, message, code&lt;br /&gt;
|-&lt;br /&gt;
| getPilotID&lt;br /&gt;
| va_id, user, token&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id&lt;br /&gt;
|-&lt;br /&gt;
| getPrivacyPolicy&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS&lt;br /&gt;
| policy&lt;br /&gt;
|-&lt;br /&gt;
| getTransferCost&lt;br /&gt;
| va_id, arr, dep&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| cost&lt;br /&gt;
|-&lt;br /&gt;
| transferPilot&lt;br /&gt;
| va_id, pilot_id, token, icao&lt;br /&gt;
| SUCCESS, NOT FOUND, INSUFFICIENT FUNDS&lt;br /&gt;
| cost&lt;br /&gt;
|- &lt;br /&gt;
| getDistance&lt;br /&gt;
| va_id, icao_from, icao_to&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| distance&lt;br /&gt;
|- &lt;br /&gt;
| getMetar&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| metar&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Package Functions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirportPackageSummary&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| getVaPackageSummary&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| getAircraftPackages&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| getCenterPackages&lt;br /&gt;
| va_id, center_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Sample Responses&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getAirportPackageSummary&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;status&amp;quot;: &amp;quot;SUCCESS&amp;quot;,&lt;br /&gt;
    &amp;quot;data&amp;quot;: {&lt;br /&gt;
        &amp;quot;arr&amp;quot;: {&lt;br /&gt;
            &amp;quot;EDDK&amp;quot;: {&lt;br /&gt;
                &amp;quot;100000&amp;quot;: 1,&lt;br /&gt;
                &amp;quot;200&amp;quot;: 12,&lt;br /&gt;
                &amp;quot;2000&amp;quot;: 2,&lt;br /&gt;
                &amp;quot;bearing&amp;quot;: 29.528874983699,&lt;br /&gt;
                &amp;quot;city&amp;quot;: &amp;quot;Cologne-Bonn&amp;quot;,&lt;br /&gt;
                &amp;quot;distance&amp;quot;: 4872.3920956341,&lt;br /&gt;
                &amp;quot;total_kg&amp;quot;: 106400&lt;br /&gt;
            },&lt;br /&gt;
            &amp;quot;KBFL&amp;quot;: {&lt;br /&gt;
                &amp;quot;200&amp;quot;: 16,&lt;br /&gt;
                &amp;quot;40&amp;quot;: 310,&lt;br /&gt;
                &amp;quot;bearing&amp;quot;: 128.34209940912,&lt;br /&gt;
                &amp;quot;city&amp;quot;: &amp;quot;Bakersfield&amp;quot;,&lt;br /&gt;
                &amp;quot;distance&amp;quot;: 207.19199031933,&lt;br /&gt;
                &amp;quot;total_kg&amp;quot;: 15600&lt;br /&gt;
            },&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getVaPackageSummary&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;status&amp;quot;: &amp;quot;SUCCESS&amp;quot;,&lt;br /&gt;
    &amp;quot;data&amp;quot;: {&lt;br /&gt;
        &amp;quot;aircraft&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;ac_id&amp;quot;: 129691,&lt;br /&gt;
                &amp;quot;earliest_ts&amp;quot;: 1622293737,&lt;br /&gt;
                &amp;quot;location&amp;quot;: &amp;quot;EDDF&amp;quot;,&lt;br /&gt;
                &amp;quot;packages&amp;quot;: 13,&lt;br /&gt;
                &amp;quot;registration&amp;quot;: &amp;quot;D-AOGT&amp;quot;,&lt;br /&gt;
                &amp;quot;size_kg&amp;quot;: 26000&lt;br /&gt;
            }&lt;br /&gt;
        ],&lt;br /&gt;
        &amp;quot;centers&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;center_id&amp;quot;: 4347,&lt;br /&gt;
                &amp;quot;description&amp;quot;: &amp;quot;Himalayan Transport&amp;quot;,&lt;br /&gt;
                &amp;quot;earliest_ts&amp;quot;: 1621459008,&lt;br /&gt;
                &amp;quot;location&amp;quot;: &amp;quot;VNKT&amp;quot;,&lt;br /&gt;
                &amp;quot;packages&amp;quot;: 82,&lt;br /&gt;
                &amp;quot;size_kg&amp;quot;: 4080&lt;br /&gt;
            }&lt;br /&gt;
        ]&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Response Values&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;earliest_ts: The timestamp the of the oldest package in that aircraft/center&lt;br /&gt;
&amp;lt;li&amp;gt;packages: The count of packages stored&lt;br /&gt;
&amp;lt;li&amp;gt;size_kg: The total weight in kg of the packages stored.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getAircraftPackages&#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;getCenterPackages&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;status&amp;quot;: &amp;quot;SUCCESS&amp;quot;,&lt;br /&gt;
    &amp;quot;data&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;ac_id&amp;quot;: 129691,&lt;br /&gt;
            &amp;quot;arr&amp;quot;: &amp;quot;SBGL&amp;quot;,&lt;br /&gt;
            &amp;quot;arr_city&amp;quot;: &amp;quot;Rio De Janeiro&amp;quot;,&lt;br /&gt;
            &amp;quot;center_id&amp;quot;: null,&lt;br /&gt;
            &amp;quot;created_ts&amp;quot;: 1620830486,&lt;br /&gt;
            &amp;quot;delivered&amp;quot;: false,&lt;br /&gt;
            &amp;quot;dep&amp;quot;: &amp;quot;EDDF&amp;quot;,&lt;br /&gt;
            &amp;quot;fleet_id&amp;quot;: 72303,&lt;br /&gt;
            &amp;quot;id&amp;quot;: 302216085,&lt;br /&gt;
            &amp;quot;location&amp;quot;: &amp;quot;EDDF&amp;quot;,&lt;br /&gt;
            &amp;quot;mult&amp;quot;: 10,&lt;br /&gt;
            &amp;quot;package_type&amp;quot;: 0,&lt;br /&gt;
            &amp;quot;payment&amp;quot;: 59281,&lt;br /&gt;
            &amp;quot;payment_fact&amp;quot;: null,&lt;br /&gt;
            &amp;quot;pilot_id&amp;quot;: 98096,&lt;br /&gt;
            &amp;quot;size_kg&amp;quot;: 2000,&lt;br /&gt;
            &amp;quot;start_ts&amp;quot;: 1622293737,&lt;br /&gt;
            &amp;quot;updated_ts&amp;quot;: 1620830486&lt;br /&gt;
        },&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Response Values&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ac_id: The id of the aircraft holding the package&lt;br /&gt;
&amp;lt;li&amp;gt;arr: The ICAO of the destination airport&lt;br /&gt;
&amp;lt;li&amp;gt;arr_city: The city name of the destination airport&lt;br /&gt;
&amp;lt;li&amp;gt;center_id: The id center holding the aircraft&lt;br /&gt;
&amp;lt;li&amp;gt;created_ts: The unix timestamp of the the package was created.&lt;br /&gt;
&amp;lt;li&amp;gt;dep: The ICAO of the origin airport&lt;br /&gt;
&amp;lt;li&amp;gt;fleet_id: The fleet that picked up the package&lt;br /&gt;
&amp;lt;li&amp;gt;location: The airport the package is currently located&lt;br /&gt;
&amp;lt;li&amp;gt;mult: The VA financial multiplier when the package was picked up&lt;br /&gt;
&amp;lt;li&amp;gt;package_type: 0 for normal, 1 for priority&lt;br /&gt;
&amp;lt;li&amp;gt;payment: The base payment for when the package was created.&lt;br /&gt;
&amp;lt;li&amp;gt;pilot_id: The ID of the pilot who picked up the package.&lt;br /&gt;
&amp;lt;li&amp;gt;size_kg: The size in kg of the package&lt;br /&gt;
&amp;lt;li&amp;gt;start_ts: The unix timestamp of when the package was picked up.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Requested additional functions===&lt;br /&gt;
The following list contains all the functions which were requested by users but aren&#039;t implemented yet.&lt;br /&gt;
*Create, edit and delete routes&lt;/div&gt;</summary>
		<author><name>Joefremont</name></author>
	</entry>
	<entry>
		<id>https://wiki4.fsairlines.net/index.php?title=XML-Interface-v2&amp;diff=3390</id>
		<title>XML-Interface-v2</title>
		<link rel="alternate" type="text/html" href="https://wiki4.fsairlines.net/index.php?title=XML-Interface-v2&amp;diff=3390"/>
		<updated>2024-09-11T14:36:40Z</updated>

		<summary type="html">&lt;p&gt;Joefremont: /* Flight Data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The XML-Interface is the core of the [[VA Integration Kit]]. It has been designed to give VA Administrators with the knowledge of dynamic web techniques the possibility to create their own layout and perfectly integrate the information into their own website using data from FSAirlines. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;This version of the XML interface is now released as official.&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Changes from the previous version==&lt;br /&gt;
Compared to the previous version of the XML-Interface the following change were made.&lt;br /&gt;
* Change from domain registration to API keys.&lt;br /&gt;
* Rate limits added.&lt;br /&gt;
* Json output format added.&lt;br /&gt;
* Output properly supports UTF-8 character set.&lt;br /&gt;
* Additional functions for packages added.&lt;br /&gt;
* All array keys are now in lower case.&lt;br /&gt;
&lt;br /&gt;
==Rate limits==&lt;br /&gt;
The access to the interface is limited by the number of calls an VA can make each hour and each day.  An airline with a gold account can make 500 calls each hour and 6000 call each day. An airline with a platinum account can make 2500 calls each hour and 30000 call each day. If an airline has multiple members then those limits are added together for each premium account.  Example if an airline has one platinum member and two gold member there limits are 3500 an hour and 42000 per day.  Functions related to pilots booking flights do not count against the rate limits.&lt;br /&gt;
&lt;br /&gt;
==Access Restriction==&lt;br /&gt;
In order to be able to access data from the Data-Interface you need to create an API key, this can be done using the &#039;Api Key Management&#039; page.  To find this page on the website go to your VA Overview page and then in the options select &#039;Edit VA Settings&#039; and then &#039;Api Key Management&#039;.  &lt;br /&gt;
&lt;br /&gt;
There are two types of API keys that can be created.&lt;br /&gt;
&lt;br /&gt;
Site key:  This key is to be used by your main website/service and may be use the full rate limit allowed by your VA.  After one hundred calls using a site api key, the key will be locked to the IP address used.  If in the future you need to change the IP address all you need to do is delete the old key and create a new one.&lt;br /&gt;
&lt;br /&gt;
Developer key:  This key is used to help you create and test your website on a different machine than your main site.  It will not be limited to a single IP address but will be limited to the number of calls each day your VA is normally allowed each hour.   Usage of the developer key does apply against your VA&#039;s total rate limit.&lt;br /&gt;
&lt;br /&gt;
==Basic Usage==&lt;br /&gt;
The data can be received using HTTP calls to the interface script and add the desired function to the parameters. Here is an example request:&lt;br /&gt;
&amp;lt;pre&amp;gt;http://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;apikey=xxxxx&amp;lt;/pre&amp;gt;&lt;br /&gt;
As you can see there is the interface script &#039;&#039;va_interface2.php&#039;&#039;, the function &#039;&#039;getPilotList&#039;&#039; and the parameters &#039;&#039;va_id=7&#039;&#039; and &#039;&#039;apikey=xxxxx&#039;&#039;. Some functions require additional parameters, these can be appended after the other parameters.&lt;br /&gt;
&lt;br /&gt;
The result of the request will be given in xml format with the base-tag being &#039;&#039;&amp;lt;fsa_output&amp;gt;&#039;&#039;. This tag has the attributes &#039;&#039;version&#039;&#039; and &#039;&#039;success&#039;&#039; which show the version number of the interface and if the request succeeded or not. In case of a failure the &#039;&#039;success&#039;&#039;-attribute shows the error message. The following example shows the return text of the above function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;fsa_output version=&amp;quot;1.0&amp;quot; success=&amp;quot;SUCCESS&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;data id=&amp;quot;1&amp;quot; name=&amp;quot;Konrad&amp;quot; surname=&amp;quot;Pustka&amp;quot; va_user=&amp;quot;SNA101&amp;quot; location=&amp;quot;EDDM&amp;quot; lastactive=&amp;quot;1287330550&amp;quot; budget=&amp;quot;198144&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;data id=&amp;quot;2&amp;quot; name=&amp;quot;Claudio&amp;quot; surname=&amp;quot;Gusmini&amp;quot; va_user=&amp;quot;SNA102&amp;quot; location=&amp;quot;EDDM&amp;quot; lastactive=&amp;quot;1286366261&amp;quot; budget=&amp;quot;216405101&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/fsa_output&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Inside the &#039;&#039;fsa_output&#039;&#039;-tag there are the &#039;&#039;data&#039;&#039;-tags which contain all the information.  &lt;br /&gt;
&lt;br /&gt;
When calling using this method the default output format is XML, you can get the out in JSON format by adding a format=json parameter to the request. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxx&amp;lt;/pre&amp;gt;&lt;br /&gt;
The output will be:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;status&amp;quot;: &amp;quot;SUCCESS&amp;quot;,&lt;br /&gt;
    &amp;quot;data&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;id&amp;quot;: 1,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Konrad&amp;quot;,&lt;br /&gt;
            &amp;quot;surname&amp;quot;: &amp;quot;Pustka&amp;quot;,&lt;br /&gt;
            &amp;quot;va_user&amp;quot;: &amp;quot;SNA101&amp;quot;,&lt;br /&gt;
            &amp;quot;location&amp;quot;: &amp;quot;ETSE&amp;quot;,&lt;br /&gt;
            &amp;quot;lastactive&amp;quot;: 1600285079,&lt;br /&gt;
            &amp;quot;budget&amp;quot;: 2400628&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;id&amp;quot;: 2,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Claudio&amp;quot;,&lt;br /&gt;
            &amp;quot;surname&amp;quot;: &amp;quot;Gusmini&amp;quot;,&lt;br /&gt;
            &amp;quot;va_user&amp;quot;: &amp;quot;SNA102&amp;quot;,&lt;br /&gt;
            &amp;quot;location&amp;quot;: &amp;quot;LIMG&amp;quot;,&lt;br /&gt;
            &amp;quot;lastactive&amp;quot;: 1605458811,&lt;br /&gt;
            &amp;quot;budget&amp;quot;: 216631042&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you need something to get started here&#039;s a small example PHP-script showing a list of your pilots&#039; names. Just replace the va_id by your own.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
  $ch = curl_init(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;);&lt;br /&gt;
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
  $http_status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);&lt;br /&gt;
  $http_text = curl_exec($ch);&lt;br /&gt;
&lt;br /&gt;
  $objDOM = new DOMDocument();&lt;br /&gt;
  $objDOM-&amp;gt;loadXML($http_text);&lt;br /&gt;
&lt;br /&gt;
  $dataNodes = $objDOM-&amp;gt;getElementsByTagName(&amp;quot;data&amp;quot;);&lt;br /&gt;
  foreach( $dataNodes as $node )&lt;br /&gt;
  {&lt;br /&gt;
    $name = $node-&amp;gt;getAttribute(&amp;quot;name&amp;quot;);&lt;br /&gt;
    $surname = $node-&amp;gt;getAttribute(&amp;quot;surname&amp;quot;);&lt;br /&gt;
    echo &amp;quot;{$name} {$surname} &amp;lt;br/&amp;gt;&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here is a sample of a PHP script reading the same data in JSON format.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
    $ch = curl_init(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;);&lt;br /&gt;
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
    $http_status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);&lt;br /&gt;
    $http_text = curl_exec($ch);&lt;br /&gt;
    $json_data = json_decode($http_text, true);&lt;br /&gt;
    if ($json_data[&#039;status&#039;] == &#039;SUCCESS&#039;) {&lt;br /&gt;
        foreach($json_data[&#039;data&#039;] as $node) {&lt;br /&gt;
            echo &amp;quot;{$node[&#039;name&#039;]} {$node[&#039;surname&#039;]}&amp;lt;br/&amp;gt;\n&amp;quot;;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a sample of a Python script reading the same data in json format.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    #!/usr/bin/python&lt;br /&gt;
    import requests&lt;br /&gt;
&lt;br /&gt;
    r = requests.get(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;)&lt;br /&gt;
    json_data = r.json()&lt;br /&gt;
    if json_data[&#039;status&#039;] == &#039;SUCCESS&#039;:&lt;br /&gt;
        for node in json_data[&#039;data&#039;]:&lt;br /&gt;
            print(&#039;{} {}&#039;.format(node[&#039;name&#039;], node[&#039;surname&#039;])&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Pilot Login==&lt;br /&gt;
Several of the functions require that the pilot calling be logged in.  Previous versions of the interface required the call passed the pilots username and a hashed password as parameters.  That method has now been discontinued, in this version you will need to call the &#039;&#039;pilotLogin&#039;&#039; to create a token that can be used to call functions for that pilot.  Unlike other calls in the interface, the &#039;&#039;pilotLogin&#039;&#039; function is also a HTTP POST call rather than a GET call.  Here is an example of calling the &#039;&#039;pilotLogin&#039;&#039; function.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
$post = [&lt;br /&gt;
    &#039;user&#039; =&amp;gt; &#039;username&#039;,&lt;br /&gt;
    &#039;password&#039; =&amp;gt; &#039;xxxxxxxx&#039;&lt;br /&gt;
];&lt;br /&gt;
&lt;br /&gt;
$ch = curl_init(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=pilotLogin&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;);&lt;br /&gt;
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);&lt;br /&gt;
&lt;br /&gt;
$http_text = curl_exec($ch);&lt;br /&gt;
$data = json_decode($http_text, true);&lt;br /&gt;
&lt;br /&gt;
if ($data[&#039;status&#039;] == &#039;SUCCESS&#039;) {&lt;br /&gt;
    $fsa_token = $data[&#039;data&#039;][&#039;token&#039;];&lt;br /&gt;
} else {&lt;br /&gt;
    die(&amp;quot;Login failed&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The data returned in this request includes:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| token&lt;br /&gt;
| The pilots login token.&lt;br /&gt;
|-&lt;br /&gt;
| alt_code&lt;br /&gt;
| The alternate ICAO code of the airport they are currently located based on there default simulator.&lt;br /&gt;
|-&lt;br /&gt;
| budget&lt;br /&gt;
| The pilots current budget&lt;br /&gt;
|-&lt;br /&gt;
| default_sim&lt;br /&gt;
| The pilots default simulator.&lt;br /&gt;
|-&lt;br /&gt;
| location&lt;br /&gt;
| The FSA offical ICAO code of the airport the pilot is located.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| The pilots first name&lt;br /&gt;
|-&lt;br /&gt;
| pilot_id&lt;br /&gt;
| The id number of the pilot.&lt;br /&gt;
|-&lt;br /&gt;
| premium&lt;br /&gt;
| 1 of the pilot is a premium member, 0 if not.&lt;br /&gt;
|-&lt;br /&gt;
| rank&lt;br /&gt;
| The code for the pilots rank within their VA&lt;br /&gt;
|-&lt;br /&gt;
| rank_id&lt;br /&gt;
| The id of the pilots rank within their VA&lt;br /&gt;
|-&lt;br /&gt;
| surname&lt;br /&gt;
| The pilots last or given name &lt;br /&gt;
|-&lt;br /&gt;
| va_id&lt;br /&gt;
| The ID of the pilots VA&lt;br /&gt;
|-&lt;br /&gt;
| va_status&lt;br /&gt;
| The pilots within there airline&lt;br /&gt;
|-&lt;br /&gt;
| va_user&lt;br /&gt;
| The pilots ID within their VA.&lt;br /&gt;
|-&lt;br /&gt;
| weightunit&lt;br /&gt;
| The pilots default unit of measure (kg or lb).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Data==&lt;br /&gt;
The following section contains a detailed list of all the request-functions with their return values. Lately added options are marked &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;green&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Parameters===&lt;br /&gt;
All the request functions use parameters which need to be appended. The following table shows all the parameters and their meaning.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter&lt;br /&gt;
! Meaning&lt;br /&gt;
|- &lt;br /&gt;
| ac_id&lt;br /&gt;
| ID of the aircraft. Is part of the data received from other functions (e.g. getAircraftList).&lt;br /&gt;
|-&lt;br /&gt;
| accept_pp&lt;br /&gt;
| Must be set &#039;1&#039; if Privacy Policy is accepted.&lt;br /&gt;
|-&lt;br /&gt;
| acdb_id&lt;br /&gt;
| ID of the aircraft type. Is part of the data received from other functions (e.g. getAircraftList).&lt;br /&gt;
|-&lt;br /&gt;
| airport&lt;br /&gt;
| Starting airport. Where the user should be placed first.&lt;br /&gt;
|-&lt;br /&gt;
| arr&lt;br /&gt;
| ICAO code of the arrival airport.&lt;br /&gt;
|-&lt;br /&gt;
| count&lt;br /&gt;
| Number past flights which should be displayed.&lt;br /&gt;
|-&lt;br /&gt;
| country&lt;br /&gt;
| Name of the country. &lt;br /&gt;
|-&lt;br /&gt;
| days&lt;br /&gt;
| Number of past days from now which should be displayed.&lt;br /&gt;
|-&lt;br /&gt;
| dep&lt;br /&gt;
| ICAO code of the departure airport.&lt;br /&gt;
|-&lt;br /&gt;
| email&lt;br /&gt;
| E-Mail of the user.&lt;br /&gt;
|-&lt;br /&gt;
| fleet_id&lt;br /&gt;
| ID of the fleet. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| from_ts&lt;br /&gt;
| UNIX timestamp of the date where the listing should start.&lt;br /&gt;
|-&lt;br /&gt;
| givenname&lt;br /&gt;
| Given name of the user.&lt;br /&gt;
|-&lt;br /&gt;
| icao&lt;br /&gt;
| ICAO code of the airport.&lt;br /&gt;
|-&lt;br /&gt;
| pilot_id&lt;br /&gt;
| ID of the pilot. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| report_id&lt;br /&gt;
| ID of the report. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| surname&lt;br /&gt;
| Surname of the user.&lt;br /&gt;
|-&lt;br /&gt;
| to_ts&lt;br /&gt;
| UNIX timestamp of the date where the listing should end.&lt;br /&gt;
|-&lt;br /&gt;
| user&lt;br /&gt;
| Username of the pilot.&lt;br /&gt;
|-&lt;br /&gt;
| token&lt;br /&gt;
| Login token created by the pilotLogin function.&lt;br /&gt;
|-&lt;br /&gt;
| va_id&lt;br /&gt;
| ID of the [[Virtual Airline]]. Is displayed on the [[Overview]] page.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Aircraft Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftData&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, pax_economy, pax_business, pax_first, config_name&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftDBData&lt;br /&gt;
| va_id, acdb_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao, passengers, price, fuel, dow, mtow, speed, engines, cargo, mzfw, market_only, range&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftDBList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registration, state, ac_name, status, fleet_id, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftStats&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| flights, hours, distance&lt;br /&gt;
|-&lt;br /&gt;
| getFleetAircraftList&lt;br /&gt;
| va_id, fleet_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registration, state, ac_name, status, fleet_id, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getFleetList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name&lt;br /&gt;
|-&lt;br /&gt;
| getFleetStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getLeasedAircraftList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registraion, state, ac_name, status, fleet_id, fuel, va_id, name, expire&lt;br /&gt;
|- &lt;br /&gt;
| getPeriodFleetStats&lt;br /&gt;
| va_id, from_ts, to_ts&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Airport Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirportData&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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&lt;br /&gt;
|-&lt;br /&gt;
| getAirportList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| icao, name, city, country, fuel, lat, lon&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Airline Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirlineData&lt;br /&gt;
| va_id, id (=va_id)&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, base, code, budget, homepage, logo_l, logo_s, price (deprecated, will be removed in next release), reputation, pilotcharge, multiplier, mission&lt;br /&gt;
|-&lt;br /&gt;
| getAirlineStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, pax, cargo_kg&lt;br /&gt;
|-&lt;br /&gt;
| getCountryStats&lt;br /&gt;
| va_id, country&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| va_name, id, flights, rating hours, profit, distance, last, fuel_used, pax, cargo_kg&lt;br /&gt;
|- &lt;br /&gt;
| getRankList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, short, settings, pilots, aircrafts, fleet, flights, partnerships, advertisements, fleet_id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Financial Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getLast10Transactions&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| ts, value, reason&lt;br /&gt;
|-&lt;br /&gt;
| getNegTransactionSums&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| value, reason&lt;br /&gt;
|-&lt;br /&gt;
| getPosTransactionSums&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| value, reason&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;getDailyTransactions&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id ts value reason partner_id fleet_id object_id&amp;lt;/span&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Flight Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters in brackets are optional&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getActiveFlights&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| departure, arrival, passengers, cargo, user_id, ac_id, flightstate, timestamp, number, lon, lat, pax_economy, pax_business, pax_first&lt;br /&gt;
|-&lt;br /&gt;
| getBookedFlights&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| departure, arrival, passengers, cargo, user_id, ac_id, number, pax_economy, pax_business, pax_first&lt;br /&gt;
|-&lt;br /&gt;
| getFlightReports&lt;br /&gt;
| va_id, (acdb_id), (ac_id), (pilot_id), (days), (count)&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;pax_economy, pax_business, pax_first, landing_fee&amp;lt;/span&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
| getReportDetail&lt;br /&gt;
| va_id, report_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;vs, pax_economy, pax_business, pax_first, ticket_business, ticket_first, fuel_start, fuel_dep, fuel_takeoff, fuel_land, fuel_finish, ticket_factor, interface, simversion, os&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| getRouteData&lt;br /&gt;
| va_id, route_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, va_id, cs_vaid, number, dep, arr, deptime, arrtime, simrate, days, price, state, flighttype, acdb_list, ac_id, remarks, route, limit_pax, limit_cargo&lt;br /&gt;
|-&lt;br /&gt;
| getRouteList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, number, dep, dep_country, arr, arr_country, deptime, arrtime, simrate, days, price, state, flighttype, acdb_list, ac_id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Pilot Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getPeriodPilotStats&lt;br /&gt;
| va_id, from_ts, to_ts&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getPilotData&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, surname, user, va_user, rank_id, location, budget, lastactive, active, sigac, timezone, weightunit, language, msgmail, rank, flights, rating, hours, distance, pax, cargo_kg, picture&lt;br /&gt;
|-&lt;br /&gt;
| getPilotHours&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao, hours&lt;br /&gt;
|-&lt;br /&gt;
| getPilotList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, surname, user, va_user, rank_id, location, last_active, status, budget&lt;br /&gt;
|-&lt;br /&gt;
| getPilotRatings&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, training, manufacturer, type&lt;br /&gt;
|-&lt;br /&gt;
| getPilotStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getPilotStatus&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| ac_id, route_id, departure, arrival, dep_time, dist, duration, status, lon, lat, flightstate, passengers, income, ticket, timestamp, cargo, multiplier, flighttype&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Flight Booking===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| bookFlight&lt;br /&gt;
| va_id, pilot_id, token, route_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| success, message, codeshare, codeshare_msg&lt;br /&gt;
|-&lt;br /&gt;
| cancelFlight&lt;br /&gt;
| va_id, pilot_id, token&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| result, loss&lt;br /&gt;
|-&lt;br /&gt;
| getBookableRoutes&lt;br /&gt;
| va_id, pilot_id, token&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| number, dep, arr, deptime, arrtime, id, state, simrate, flighttype, training, price, list, ac_id&lt;br /&gt;
|-&lt;br /&gt;
| getBookableAircraft&lt;br /&gt;
| va_id, pilot_id, route_id, token&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| type, registration, state, id, name, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getBookStatus&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| status&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Miscellaneous User Functions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| createAccount&lt;br /&gt;
| va_id, givenname, surname, username, email, password, airport, accept_pp&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| success, message, code&lt;br /&gt;
|-&lt;br /&gt;
| getPilotID&lt;br /&gt;
| va_id, user, token&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id&lt;br /&gt;
|-&lt;br /&gt;
| getPrivacyPolicy&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS&lt;br /&gt;
| policy&lt;br /&gt;
|-&lt;br /&gt;
| getTransferCost&lt;br /&gt;
| va_id, arr, dep&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| cost&lt;br /&gt;
|-&lt;br /&gt;
| transferPilot&lt;br /&gt;
| va_id, pilot_id, token, icao&lt;br /&gt;
| SUCCESS, NOT FOUND, INSUFFICIENT FUNDS&lt;br /&gt;
| cost&lt;br /&gt;
|- &lt;br /&gt;
| getDistance&lt;br /&gt;
| va_id, icao_from, icao_to&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| distance&lt;br /&gt;
|- &lt;br /&gt;
| getMetar&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| metar&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Package Functions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirportPackageSummary&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| getVaPackageSummary&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| getAircraftPackages&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| getCenterPackages&lt;br /&gt;
| va_id, center_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Sample Responses&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getAirportPackageSummary&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;status&amp;quot;: &amp;quot;SUCCESS&amp;quot;,&lt;br /&gt;
    &amp;quot;data&amp;quot;: {&lt;br /&gt;
        &amp;quot;arr&amp;quot;: {&lt;br /&gt;
            &amp;quot;EDDK&amp;quot;: {&lt;br /&gt;
                &amp;quot;100000&amp;quot;: 1,&lt;br /&gt;
                &amp;quot;200&amp;quot;: 12,&lt;br /&gt;
                &amp;quot;2000&amp;quot;: 2,&lt;br /&gt;
                &amp;quot;bearing&amp;quot;: 29.528874983699,&lt;br /&gt;
                &amp;quot;city&amp;quot;: &amp;quot;Cologne-Bonn&amp;quot;,&lt;br /&gt;
                &amp;quot;distance&amp;quot;: 4872.3920956341,&lt;br /&gt;
                &amp;quot;total_kg&amp;quot;: 106400&lt;br /&gt;
            },&lt;br /&gt;
            &amp;quot;KBFL&amp;quot;: {&lt;br /&gt;
                &amp;quot;200&amp;quot;: 16,&lt;br /&gt;
                &amp;quot;40&amp;quot;: 310,&lt;br /&gt;
                &amp;quot;bearing&amp;quot;: 128.34209940912,&lt;br /&gt;
                &amp;quot;city&amp;quot;: &amp;quot;Bakersfield&amp;quot;,&lt;br /&gt;
                &amp;quot;distance&amp;quot;: 207.19199031933,&lt;br /&gt;
                &amp;quot;total_kg&amp;quot;: 15600&lt;br /&gt;
            },&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getVaPackageSummary&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;status&amp;quot;: &amp;quot;SUCCESS&amp;quot;,&lt;br /&gt;
    &amp;quot;data&amp;quot;: {&lt;br /&gt;
        &amp;quot;aircraft&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;ac_id&amp;quot;: 129691,&lt;br /&gt;
                &amp;quot;earliest_ts&amp;quot;: 1622293737,&lt;br /&gt;
                &amp;quot;location&amp;quot;: &amp;quot;EDDF&amp;quot;,&lt;br /&gt;
                &amp;quot;packages&amp;quot;: 13,&lt;br /&gt;
                &amp;quot;registration&amp;quot;: &amp;quot;D-AOGT&amp;quot;,&lt;br /&gt;
                &amp;quot;size_kg&amp;quot;: 26000&lt;br /&gt;
            }&lt;br /&gt;
        ],&lt;br /&gt;
        &amp;quot;centers&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;center_id&amp;quot;: 4347,&lt;br /&gt;
                &amp;quot;description&amp;quot;: &amp;quot;Himalayan Transport&amp;quot;,&lt;br /&gt;
                &amp;quot;earliest_ts&amp;quot;: 1621459008,&lt;br /&gt;
                &amp;quot;location&amp;quot;: &amp;quot;VNKT&amp;quot;,&lt;br /&gt;
                &amp;quot;packages&amp;quot;: 82,&lt;br /&gt;
                &amp;quot;size_kg&amp;quot;: 4080&lt;br /&gt;
            }&lt;br /&gt;
        ]&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Response Values&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;earliest_ts: The timestamp the of the oldest package in that aircraft/center&lt;br /&gt;
&amp;lt;li&amp;gt;packages: The count of packages stored&lt;br /&gt;
&amp;lt;li&amp;gt;size_kg: The total weight in kg of the packages stored.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getAircraftPackages&#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;getCenterPackages&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;status&amp;quot;: &amp;quot;SUCCESS&amp;quot;,&lt;br /&gt;
    &amp;quot;data&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;ac_id&amp;quot;: 129691,&lt;br /&gt;
            &amp;quot;arr&amp;quot;: &amp;quot;SBGL&amp;quot;,&lt;br /&gt;
            &amp;quot;arr_city&amp;quot;: &amp;quot;Rio De Janeiro&amp;quot;,&lt;br /&gt;
            &amp;quot;center_id&amp;quot;: null,&lt;br /&gt;
            &amp;quot;created_ts&amp;quot;: 1620830486,&lt;br /&gt;
            &amp;quot;delivered&amp;quot;: false,&lt;br /&gt;
            &amp;quot;dep&amp;quot;: &amp;quot;EDDF&amp;quot;,&lt;br /&gt;
            &amp;quot;fleet_id&amp;quot;: 72303,&lt;br /&gt;
            &amp;quot;id&amp;quot;: 302216085,&lt;br /&gt;
            &amp;quot;location&amp;quot;: &amp;quot;EDDF&amp;quot;,&lt;br /&gt;
            &amp;quot;mult&amp;quot;: 10,&lt;br /&gt;
            &amp;quot;package_type&amp;quot;: 0,&lt;br /&gt;
            &amp;quot;payment&amp;quot;: 59281,&lt;br /&gt;
            &amp;quot;payment_fact&amp;quot;: null,&lt;br /&gt;
            &amp;quot;pilot_id&amp;quot;: 98096,&lt;br /&gt;
            &amp;quot;size_kg&amp;quot;: 2000,&lt;br /&gt;
            &amp;quot;start_ts&amp;quot;: 1622293737,&lt;br /&gt;
            &amp;quot;updated_ts&amp;quot;: 1620830486&lt;br /&gt;
        },&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Response Values&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ac_id: The id of the aircraft holding the package&lt;br /&gt;
&amp;lt;li&amp;gt;arr: The ICAO of the destination airport&lt;br /&gt;
&amp;lt;li&amp;gt;arr_city: The city name of the destination airport&lt;br /&gt;
&amp;lt;li&amp;gt;center_id: The id center holding the aircraft&lt;br /&gt;
&amp;lt;li&amp;gt;created_ts: The unix timestamp of the the package was created.&lt;br /&gt;
&amp;lt;li&amp;gt;dep: The ICAO of the origin airport&lt;br /&gt;
&amp;lt;li&amp;gt;fleet_id: The fleet that picked up the package&lt;br /&gt;
&amp;lt;li&amp;gt;location: The airport the package is currently located&lt;br /&gt;
&amp;lt;li&amp;gt;mult: The VA financial multiplier when the package was picked up&lt;br /&gt;
&amp;lt;li&amp;gt;package_type: 0 for normal, 1 for priority&lt;br /&gt;
&amp;lt;li&amp;gt;payment: The base payment for when the package was created.&lt;br /&gt;
&amp;lt;li&amp;gt;pilot_id: The ID of the pilot who picked up the package.&lt;br /&gt;
&amp;lt;li&amp;gt;size_kg: The size in kg of the package&lt;br /&gt;
&amp;lt;li&amp;gt;start_ts: The unix timestamp of when the package was picked up.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Requested additional functions===&lt;br /&gt;
The following list contains all the functions which were requested by users but aren&#039;t implemented yet.&lt;br /&gt;
*Create, edit and delete routes&lt;/div&gt;</summary>
		<author><name>Joefremont</name></author>
	</entry>
	<entry>
		<id>https://wiki4.fsairlines.net/index.php?title=XML-Interface-v2&amp;diff=3310</id>
		<title>XML-Interface-v2</title>
		<link rel="alternate" type="text/html" href="https://wiki4.fsairlines.net/index.php?title=XML-Interface-v2&amp;diff=3310"/>
		<updated>2024-08-15T21:21:30Z</updated>

		<summary type="html">&lt;p&gt;Joefremont: /* Changes from the previous version */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The XML-Interface is the core of the [[VA Integration Kit]]. It has been designed to give VA Administrators with the knowledge of dynamic web techniques the possibility to create their own layout and perfectly integrate the information into their own website using data from FSAirlines. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;This version of the XML interface is now released as official.&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Changes from the previous version==&lt;br /&gt;
Compared to the previous version of the XML-Interface the following change were made.&lt;br /&gt;
* Change from domain registration to API keys.&lt;br /&gt;
* Rate limits added.&lt;br /&gt;
* Json output format added.&lt;br /&gt;
* Output properly supports UTF-8 character set.&lt;br /&gt;
* Additional functions for packages added.&lt;br /&gt;
* All array keys are now in lower case.&lt;br /&gt;
&lt;br /&gt;
==Rate limits==&lt;br /&gt;
The access to the interface is limited by the number of calls an VA can make each hour and each day.  An airline with a gold account can make 500 calls each hour and 6000 call each day. An airline with a platinum account can make 2500 calls each hour and 30000 call each day. If an airline has multiple members then those limits are added together for each premium account.  Example if an airline has one platinum member and two gold member there limits are 3500 an hour and 42000 per day.  Functions related to pilots booking flights do not count against the rate limits.&lt;br /&gt;
&lt;br /&gt;
==Access Restriction==&lt;br /&gt;
In order to be able to access data from the Data-Interface you need to create an API key, this can be done using the &#039;Api Key Management&#039; page.  To find this page on the website go to your VA Overview page and then in the options select &#039;Edit VA Settings&#039; and then &#039;Api Key Management&#039;.  &lt;br /&gt;
&lt;br /&gt;
There are two types of API keys that can be created.&lt;br /&gt;
&lt;br /&gt;
Site key:  This key is to be used by your main website/service and may be use the full rate limit allowed by your VA.  After one hundred calls using a site api key, the key will be locked to the IP address used.  If in the future you need to change the IP address all you need to do is delete the old key and create a new one.&lt;br /&gt;
&lt;br /&gt;
Developer key:  This key is used to help you create and test your website on a different machine than your main site.  It will not be limited to a single IP address but will be limited to the number of calls each day your VA is normally allowed each hour.   Usage of the developer key does apply against your VA&#039;s total rate limit.&lt;br /&gt;
&lt;br /&gt;
==Basic Usage==&lt;br /&gt;
The data can be received using HTTP calls to the interface script and add the desired function to the parameters. Here is an example request:&lt;br /&gt;
&amp;lt;pre&amp;gt;http://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;apikey=xxxxx&amp;lt;/pre&amp;gt;&lt;br /&gt;
As you can see there is the interface script &#039;&#039;va_interface2.php&#039;&#039;, the function &#039;&#039;getPilotList&#039;&#039; and the parameters &#039;&#039;va_id=7&#039;&#039; and &#039;&#039;apikey=xxxxx&#039;&#039;. Some functions require additional parameters, these can be appended after the other parameters.&lt;br /&gt;
&lt;br /&gt;
The result of the request will be given in xml format with the base-tag being &#039;&#039;&amp;lt;fsa_output&amp;gt;&#039;&#039;. This tag has the attributes &#039;&#039;version&#039;&#039; and &#039;&#039;success&#039;&#039; which show the version number of the interface and if the request succeeded or not. In case of a failure the &#039;&#039;success&#039;&#039;-attribute shows the error message. The following example shows the return text of the above function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;fsa_output version=&amp;quot;1.0&amp;quot; success=&amp;quot;SUCCESS&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;data id=&amp;quot;1&amp;quot; name=&amp;quot;Konrad&amp;quot; surname=&amp;quot;Pustka&amp;quot; va_user=&amp;quot;SNA101&amp;quot; location=&amp;quot;EDDM&amp;quot; lastactive=&amp;quot;1287330550&amp;quot; budget=&amp;quot;198144&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;data id=&amp;quot;2&amp;quot; name=&amp;quot;Claudio&amp;quot; surname=&amp;quot;Gusmini&amp;quot; va_user=&amp;quot;SNA102&amp;quot; location=&amp;quot;EDDM&amp;quot; lastactive=&amp;quot;1286366261&amp;quot; budget=&amp;quot;216405101&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/fsa_output&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Inside the &#039;&#039;fsa_output&#039;&#039;-tag there are the &#039;&#039;data&#039;&#039;-tags which contain all the information.  &lt;br /&gt;
&lt;br /&gt;
When calling using this method the default output format is XML, you can get the out in JSON format by adding a format=json parameter to the request. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxx&amp;lt;/pre&amp;gt;&lt;br /&gt;
The output will be:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;status&amp;quot;: &amp;quot;SUCCESS&amp;quot;,&lt;br /&gt;
    &amp;quot;data&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;id&amp;quot;: 1,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Konrad&amp;quot;,&lt;br /&gt;
            &amp;quot;surname&amp;quot;: &amp;quot;Pustka&amp;quot;,&lt;br /&gt;
            &amp;quot;va_user&amp;quot;: &amp;quot;SNA101&amp;quot;,&lt;br /&gt;
            &amp;quot;location&amp;quot;: &amp;quot;ETSE&amp;quot;,&lt;br /&gt;
            &amp;quot;lastactive&amp;quot;: 1600285079,&lt;br /&gt;
            &amp;quot;budget&amp;quot;: 2400628&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;id&amp;quot;: 2,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Claudio&amp;quot;,&lt;br /&gt;
            &amp;quot;surname&amp;quot;: &amp;quot;Gusmini&amp;quot;,&lt;br /&gt;
            &amp;quot;va_user&amp;quot;: &amp;quot;SNA102&amp;quot;,&lt;br /&gt;
            &amp;quot;location&amp;quot;: &amp;quot;LIMG&amp;quot;,&lt;br /&gt;
            &amp;quot;lastactive&amp;quot;: 1605458811,&lt;br /&gt;
            &amp;quot;budget&amp;quot;: 216631042&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you need something to get started here&#039;s a small example PHP-script showing a list of your pilots&#039; names. Just replace the va_id by your own.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
  $ch = curl_init(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;);&lt;br /&gt;
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
  $http_status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);&lt;br /&gt;
  $http_text = curl_exec($ch);&lt;br /&gt;
&lt;br /&gt;
  $objDOM = new DOMDocument();&lt;br /&gt;
  $objDOM-&amp;gt;loadXML($http_text);&lt;br /&gt;
&lt;br /&gt;
  $dataNodes = $objDOM-&amp;gt;getElementsByTagName(&amp;quot;data&amp;quot;);&lt;br /&gt;
  foreach( $dataNodes as $node )&lt;br /&gt;
  {&lt;br /&gt;
    $name = $node-&amp;gt;getAttribute(&amp;quot;name&amp;quot;);&lt;br /&gt;
    $surname = $node-&amp;gt;getAttribute(&amp;quot;surname&amp;quot;);&lt;br /&gt;
    echo &amp;quot;{$name} {$surname} &amp;lt;br/&amp;gt;&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here is a sample of a PHP script reading the same data in JSON format.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
    $ch = curl_init(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;);&lt;br /&gt;
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
    $http_status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);&lt;br /&gt;
    $http_text = curl_exec($ch);&lt;br /&gt;
    $json_data = json_decode($http_text, true);&lt;br /&gt;
    if ($json_data[&#039;status&#039;] == &#039;SUCCESS&#039;) {&lt;br /&gt;
        foreach($json_data[&#039;data&#039;] as $node) {&lt;br /&gt;
            echo &amp;quot;{$node[&#039;name&#039;]} {$node[&#039;surname&#039;]}&amp;lt;br/&amp;gt;\n&amp;quot;;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a sample of a Python script reading the same data in json format.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    #!/usr/bin/python&lt;br /&gt;
    import requests&lt;br /&gt;
&lt;br /&gt;
    r = requests.get(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;)&lt;br /&gt;
    json_data = r.json()&lt;br /&gt;
    if json_data[&#039;status&#039;] == &#039;SUCCESS&#039;:&lt;br /&gt;
        for node in json_data[&#039;data&#039;]:&lt;br /&gt;
            print(&#039;{} {}&#039;.format(node[&#039;name&#039;], node[&#039;surname&#039;])&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Pilot Login==&lt;br /&gt;
Several of the functions require that the pilot calling be logged in.  Previous versions of the interface required the call passed the pilots username and a hashed password as parameters.  That method has now been discontinued, in this version you will need to call the &#039;&#039;pilotLogin&#039;&#039; to create a token that can be used to call functions for that pilot.  Unlike other calls in the interface, the &#039;&#039;pilotLogin&#039;&#039; function is also a HTTP POST call rather than a GET call.  Here is an example of calling the &#039;&#039;pilotLogin&#039;&#039; function.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
$post = [&lt;br /&gt;
    &#039;user&#039; =&amp;gt; &#039;username&#039;,&lt;br /&gt;
    &#039;password&#039; =&amp;gt; &#039;xxxxxxxx&#039;&lt;br /&gt;
];&lt;br /&gt;
&lt;br /&gt;
$ch = curl_init(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=pilotLogin&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;);&lt;br /&gt;
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);&lt;br /&gt;
&lt;br /&gt;
$http_text = curl_exec($ch);&lt;br /&gt;
$data = json_decode($http_text, true);&lt;br /&gt;
&lt;br /&gt;
if ($data[&#039;status&#039;] == &#039;SUCCESS&#039;) {&lt;br /&gt;
    $fsa_token = $data[&#039;data&#039;][&#039;token&#039;];&lt;br /&gt;
} else {&lt;br /&gt;
    die(&amp;quot;Login failed&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The data returned in this request includes:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| token&lt;br /&gt;
| The pilots login token.&lt;br /&gt;
|-&lt;br /&gt;
| alt_code&lt;br /&gt;
| The alternate ICAO code of the airport they are currently located based on there default simulator.&lt;br /&gt;
|-&lt;br /&gt;
| budget&lt;br /&gt;
| The pilots current budget&lt;br /&gt;
|-&lt;br /&gt;
| default_sim&lt;br /&gt;
| The pilots default simulator.&lt;br /&gt;
|-&lt;br /&gt;
| location&lt;br /&gt;
| The FSA offical ICAO code of the airport the pilot is located.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| The pilots first name&lt;br /&gt;
|-&lt;br /&gt;
| pilot_id&lt;br /&gt;
| The id number of the pilot.&lt;br /&gt;
|-&lt;br /&gt;
| premium&lt;br /&gt;
| 1 of the pilot is a premium member, 0 if not.&lt;br /&gt;
|-&lt;br /&gt;
| rank&lt;br /&gt;
| The code for the pilots rank within their VA&lt;br /&gt;
|-&lt;br /&gt;
| rank_id&lt;br /&gt;
| The id of the pilots rank within their VA&lt;br /&gt;
|-&lt;br /&gt;
| surname&lt;br /&gt;
| The pilots last or given name &lt;br /&gt;
|-&lt;br /&gt;
| va_id&lt;br /&gt;
| The ID of the pilots VA&lt;br /&gt;
|-&lt;br /&gt;
| va_status&lt;br /&gt;
| The pilots within there airline&lt;br /&gt;
|-&lt;br /&gt;
| va_user&lt;br /&gt;
| The pilots ID within their VA.&lt;br /&gt;
|-&lt;br /&gt;
| weightunit&lt;br /&gt;
| The pilots default unit of measure (kg or lb).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Data==&lt;br /&gt;
The following section contains a detailed list of all the request-functions with their return values. Lately added options are marked &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;green&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Parameters===&lt;br /&gt;
All the request functions use parameters which need to be appended. The following table shows all the parameters and their meaning.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter&lt;br /&gt;
! Meaning&lt;br /&gt;
|- &lt;br /&gt;
| ac_id&lt;br /&gt;
| ID of the aircraft. Is part of the data received from other functions (e.g. getAircraftList).&lt;br /&gt;
|-&lt;br /&gt;
| accept_pp&lt;br /&gt;
| Must be set &#039;1&#039; if Privacy Policy is accepted.&lt;br /&gt;
|-&lt;br /&gt;
| acdb_id&lt;br /&gt;
| ID of the aircraft type. Is part of the data received from other functions (e.g. getAircraftList).&lt;br /&gt;
|-&lt;br /&gt;
| airport&lt;br /&gt;
| Starting airport. Where the user should be placed first.&lt;br /&gt;
|-&lt;br /&gt;
| arr&lt;br /&gt;
| ICAO code of the arrival airport.&lt;br /&gt;
|-&lt;br /&gt;
| count&lt;br /&gt;
| Number past flights which should be displayed.&lt;br /&gt;
|-&lt;br /&gt;
| country&lt;br /&gt;
| Name of the country. &lt;br /&gt;
|-&lt;br /&gt;
| days&lt;br /&gt;
| Number of past days from now which should be displayed.&lt;br /&gt;
|-&lt;br /&gt;
| dep&lt;br /&gt;
| ICAO code of the departure airport.&lt;br /&gt;
|-&lt;br /&gt;
| email&lt;br /&gt;
| E-Mail of the user.&lt;br /&gt;
|-&lt;br /&gt;
| fleet_id&lt;br /&gt;
| ID of the fleet. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| from_ts&lt;br /&gt;
| UNIX timestamp of the date where the listing should start.&lt;br /&gt;
|-&lt;br /&gt;
| givenname&lt;br /&gt;
| Given name of the user.&lt;br /&gt;
|-&lt;br /&gt;
| icao&lt;br /&gt;
| ICAO code of the airport.&lt;br /&gt;
|-&lt;br /&gt;
| pilot_id&lt;br /&gt;
| ID of the pilot. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| report_id&lt;br /&gt;
| ID of the report. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| surname&lt;br /&gt;
| Surname of the user.&lt;br /&gt;
|-&lt;br /&gt;
| to_ts&lt;br /&gt;
| UNIX timestamp of the date where the listing should end.&lt;br /&gt;
|-&lt;br /&gt;
| user&lt;br /&gt;
| Username of the pilot.&lt;br /&gt;
|-&lt;br /&gt;
| token&lt;br /&gt;
| Login token created by the pilotLogin function.&lt;br /&gt;
|-&lt;br /&gt;
| va_id&lt;br /&gt;
| ID of the [[Virtual Airline]]. Is displayed on the [[Overview]] page.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Aircraft Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftData&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, pax_economy, pax_business, pax_first, config_name&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftDBData&lt;br /&gt;
| va_id, acdb_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao, passengers, price, fuel, dow, mtow, speed, engines, cargo, mzfw, market_only, range&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftDBList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registration, state, ac_name, status, fleet_id, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftStats&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| flights, hours, distance&lt;br /&gt;
|-&lt;br /&gt;
| getFleetAircraftList&lt;br /&gt;
| va_id, fleet_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registration, state, ac_name, status, fleet_id, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getFleetList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name&lt;br /&gt;
|-&lt;br /&gt;
| getFleetStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getLeasedAircraftList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registraion, state, ac_name, status, fleet_id, fuel, va_id, name, expire&lt;br /&gt;
|- &lt;br /&gt;
| getPeriodFleetStats&lt;br /&gt;
| va_id, from_ts, to_ts&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Airport Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirportData&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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&lt;br /&gt;
|-&lt;br /&gt;
| getAirportList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| icao, name, city, country, fuel, lat, lon&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Airline Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirlineData&lt;br /&gt;
| va_id, id (=va_id)&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, base, code, budget, homepage, logo_l, logo_s, price (deprecated, will be removed in next release), reputation, pilotcharge, multiplier, mission&lt;br /&gt;
|-&lt;br /&gt;
| getAirlineStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, pax, cargo_kg&lt;br /&gt;
|-&lt;br /&gt;
| getCountryStats&lt;br /&gt;
| va_id, country&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| va_name, id, flights, rating hours, profit, distance, last, fuel_used, pax, cargo_kg&lt;br /&gt;
|- &lt;br /&gt;
| getRankList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, short, settings, pilots, aircrafts, fleet, flights, partnerships, advertisements, fleet_id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Financial Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getLast10Transactions&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| ts, value, reason&lt;br /&gt;
|-&lt;br /&gt;
| getNegTransactionSums&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| value, reason&lt;br /&gt;
|-&lt;br /&gt;
| getPosTransactionSums&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| value, reason&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;getDailyTransactions&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id ts value reason partner_id fleet_id object_id&amp;lt;/span&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Flight Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters in brackets are optional&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getActiveFlights&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| departure, arrival, passengers, cargo, user_id, ac_id, flightstate, timestamp, number, lon, lat, pax_economy, pax_business, pax_first&lt;br /&gt;
|-&lt;br /&gt;
| getBookedFlights&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| departure, arrival, passengers, cargo, user_id, ac_id, number, pax_economy, pax_business, pax_first&lt;br /&gt;
|-&lt;br /&gt;
| getFlightReports&lt;br /&gt;
| va_id, (acdb_id), (ac_id), (pilot_id), (days), (count)&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;pax_economy, pax_business, pax_first&amp;lt;/span&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
| getReportDetail&lt;br /&gt;
| va_id, report_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;vs, pax_economy, pax_business, pax_first, ticket_business, ticket_first, fuel_start, fuel_dep, fuel_takeoff, fuel_land, fuel_finish, ticket_factor, interface, simversion, os&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| getRouteData&lt;br /&gt;
| va_id, route_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, va_id, cs_vaid, number, dep, arr, deptime, arrtime, simrate, days, price, state, flighttype, acdb_list, ac_id, remarks, route, limit_pax, limit_cargo&lt;br /&gt;
|-&lt;br /&gt;
| getRouteList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, number, dep, dep_country, arr, arr_country, deptime, arrtime, simrate, days, price, state, flighttype, acdb_list, ac_id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Pilot Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getPeriodPilotStats&lt;br /&gt;
| va_id, from_ts, to_ts&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getPilotData&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, surname, user, va_user, rank_id, location, budget, lastactive, active, sigac, timezone, weightunit, language, msgmail, rank, flights, rating, hours, distance, pax, cargo_kg, picture&lt;br /&gt;
|-&lt;br /&gt;
| getPilotHours&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao, hours&lt;br /&gt;
|-&lt;br /&gt;
| getPilotList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, surname, user, va_user, rank_id, location, last_active, status, budget&lt;br /&gt;
|-&lt;br /&gt;
| getPilotRatings&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, training, manufacturer, type&lt;br /&gt;
|-&lt;br /&gt;
| getPilotStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getPilotStatus&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| ac_id, route_id, departure, arrival, dep_time, dist, duration, status, lon, lat, flightstate, passengers, income, ticket, timestamp, cargo, multiplier, flighttype&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Flight Booking===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| bookFlight&lt;br /&gt;
| va_id, pilot_id, token, route_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| success, message, codeshare, codeshare_msg&lt;br /&gt;
|-&lt;br /&gt;
| cancelFlight&lt;br /&gt;
| va_id, pilot_id, token&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| result, loss&lt;br /&gt;
|-&lt;br /&gt;
| getBookableRoutes&lt;br /&gt;
| va_id, pilot_id, token&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| number, dep, arr, deptime, arrtime, id, state, simrate, flighttype, training, price, list, ac_id&lt;br /&gt;
|-&lt;br /&gt;
| getBookableAircraft&lt;br /&gt;
| va_id, pilot_id, route_id, token&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| type, registration, state, id, name, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getBookStatus&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| status&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Miscellaneous User Functions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| createAccount&lt;br /&gt;
| va_id, givenname, surname, username, email, password, airport, accept_pp&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| success, message, code&lt;br /&gt;
|-&lt;br /&gt;
| getPilotID&lt;br /&gt;
| va_id, user, token&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id&lt;br /&gt;
|-&lt;br /&gt;
| getPrivacyPolicy&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS&lt;br /&gt;
| policy&lt;br /&gt;
|-&lt;br /&gt;
| getTransferCost&lt;br /&gt;
| va_id, arr, dep&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| cost&lt;br /&gt;
|-&lt;br /&gt;
| transferPilot&lt;br /&gt;
| va_id, pilot_id, token, icao&lt;br /&gt;
| SUCCESS, NOT FOUND, INSUFFICIENT FUNDS&lt;br /&gt;
| cost&lt;br /&gt;
|- &lt;br /&gt;
| getDistance&lt;br /&gt;
| va_id, icao_from, icao_to&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| distance&lt;br /&gt;
|- &lt;br /&gt;
| getMetar&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| metar&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Package Functions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirportPackageSummary&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| getVaPackageSummary&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| getAircraftPackages&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| getCenterPackages&lt;br /&gt;
| va_id, center_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Sample Responses&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getAirportPackageSummary&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;status&amp;quot;: &amp;quot;SUCCESS&amp;quot;,&lt;br /&gt;
    &amp;quot;data&amp;quot;: {&lt;br /&gt;
        &amp;quot;arr&amp;quot;: {&lt;br /&gt;
            &amp;quot;EDDK&amp;quot;: {&lt;br /&gt;
                &amp;quot;100000&amp;quot;: 1,&lt;br /&gt;
                &amp;quot;200&amp;quot;: 12,&lt;br /&gt;
                &amp;quot;2000&amp;quot;: 2,&lt;br /&gt;
                &amp;quot;bearing&amp;quot;: 29.528874983699,&lt;br /&gt;
                &amp;quot;city&amp;quot;: &amp;quot;Cologne-Bonn&amp;quot;,&lt;br /&gt;
                &amp;quot;distance&amp;quot;: 4872.3920956341,&lt;br /&gt;
                &amp;quot;total_kg&amp;quot;: 106400&lt;br /&gt;
            },&lt;br /&gt;
            &amp;quot;KBFL&amp;quot;: {&lt;br /&gt;
                &amp;quot;200&amp;quot;: 16,&lt;br /&gt;
                &amp;quot;40&amp;quot;: 310,&lt;br /&gt;
                &amp;quot;bearing&amp;quot;: 128.34209940912,&lt;br /&gt;
                &amp;quot;city&amp;quot;: &amp;quot;Bakersfield&amp;quot;,&lt;br /&gt;
                &amp;quot;distance&amp;quot;: 207.19199031933,&lt;br /&gt;
                &amp;quot;total_kg&amp;quot;: 15600&lt;br /&gt;
            },&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getVaPackageSummary&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;status&amp;quot;: &amp;quot;SUCCESS&amp;quot;,&lt;br /&gt;
    &amp;quot;data&amp;quot;: {&lt;br /&gt;
        &amp;quot;aircraft&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;ac_id&amp;quot;: 129691,&lt;br /&gt;
                &amp;quot;earliest_ts&amp;quot;: 1622293737,&lt;br /&gt;
                &amp;quot;location&amp;quot;: &amp;quot;EDDF&amp;quot;,&lt;br /&gt;
                &amp;quot;packages&amp;quot;: 13,&lt;br /&gt;
                &amp;quot;registration&amp;quot;: &amp;quot;D-AOGT&amp;quot;,&lt;br /&gt;
                &amp;quot;size_kg&amp;quot;: 26000&lt;br /&gt;
            }&lt;br /&gt;
        ],&lt;br /&gt;
        &amp;quot;centers&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;center_id&amp;quot;: 4347,&lt;br /&gt;
                &amp;quot;description&amp;quot;: &amp;quot;Himalayan Transport&amp;quot;,&lt;br /&gt;
                &amp;quot;earliest_ts&amp;quot;: 1621459008,&lt;br /&gt;
                &amp;quot;location&amp;quot;: &amp;quot;VNKT&amp;quot;,&lt;br /&gt;
                &amp;quot;packages&amp;quot;: 82,&lt;br /&gt;
                &amp;quot;size_kg&amp;quot;: 4080&lt;br /&gt;
            }&lt;br /&gt;
        ]&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Response Values&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;earliest_ts: The timestamp the of the oldest package in that aircraft/center&lt;br /&gt;
&amp;lt;li&amp;gt;packages: The count of packages stored&lt;br /&gt;
&amp;lt;li&amp;gt;size_kg: The total weight in kg of the packages stored.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getAircraftPackages&#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;getCenterPackages&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;status&amp;quot;: &amp;quot;SUCCESS&amp;quot;,&lt;br /&gt;
    &amp;quot;data&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;ac_id&amp;quot;: 129691,&lt;br /&gt;
            &amp;quot;arr&amp;quot;: &amp;quot;SBGL&amp;quot;,&lt;br /&gt;
            &amp;quot;arr_city&amp;quot;: &amp;quot;Rio De Janeiro&amp;quot;,&lt;br /&gt;
            &amp;quot;center_id&amp;quot;: null,&lt;br /&gt;
            &amp;quot;created_ts&amp;quot;: 1620830486,&lt;br /&gt;
            &amp;quot;delivered&amp;quot;: false,&lt;br /&gt;
            &amp;quot;dep&amp;quot;: &amp;quot;EDDF&amp;quot;,&lt;br /&gt;
            &amp;quot;fleet_id&amp;quot;: 72303,&lt;br /&gt;
            &amp;quot;id&amp;quot;: 302216085,&lt;br /&gt;
            &amp;quot;location&amp;quot;: &amp;quot;EDDF&amp;quot;,&lt;br /&gt;
            &amp;quot;mult&amp;quot;: 10,&lt;br /&gt;
            &amp;quot;package_type&amp;quot;: 0,&lt;br /&gt;
            &amp;quot;payment&amp;quot;: 59281,&lt;br /&gt;
            &amp;quot;payment_fact&amp;quot;: null,&lt;br /&gt;
            &amp;quot;pilot_id&amp;quot;: 98096,&lt;br /&gt;
            &amp;quot;size_kg&amp;quot;: 2000,&lt;br /&gt;
            &amp;quot;start_ts&amp;quot;: 1622293737,&lt;br /&gt;
            &amp;quot;updated_ts&amp;quot;: 1620830486&lt;br /&gt;
        },&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Response Values&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ac_id: The id of the aircraft holding the package&lt;br /&gt;
&amp;lt;li&amp;gt;arr: The ICAO of the destination airport&lt;br /&gt;
&amp;lt;li&amp;gt;arr_city: The city name of the destination airport&lt;br /&gt;
&amp;lt;li&amp;gt;center_id: The id center holding the aircraft&lt;br /&gt;
&amp;lt;li&amp;gt;created_ts: The unix timestamp of the the package was created.&lt;br /&gt;
&amp;lt;li&amp;gt;dep: The ICAO of the origin airport&lt;br /&gt;
&amp;lt;li&amp;gt;fleet_id: The fleet that picked up the package&lt;br /&gt;
&amp;lt;li&amp;gt;location: The airport the package is currently located&lt;br /&gt;
&amp;lt;li&amp;gt;mult: The VA financial multiplier when the package was picked up&lt;br /&gt;
&amp;lt;li&amp;gt;package_type: 0 for normal, 1 for priority&lt;br /&gt;
&amp;lt;li&amp;gt;payment: The base payment for when the package was created.&lt;br /&gt;
&amp;lt;li&amp;gt;pilot_id: The ID of the pilot who picked up the package.&lt;br /&gt;
&amp;lt;li&amp;gt;size_kg: The size in kg of the package&lt;br /&gt;
&amp;lt;li&amp;gt;start_ts: The unix timestamp of when the package was picked up.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Requested additional functions===&lt;br /&gt;
The following list contains all the functions which were requested by users but aren&#039;t implemented yet.&lt;br /&gt;
*Create, edit and delete routes&lt;/div&gt;</summary>
		<author><name>Joefremont</name></author>
	</entry>
	<entry>
		<id>https://wiki4.fsairlines.net/index.php?title=XML-Interface-v2&amp;diff=3309</id>
		<title>XML-Interface-v2</title>
		<link rel="alternate" type="text/html" href="https://wiki4.fsairlines.net/index.php?title=XML-Interface-v2&amp;diff=3309"/>
		<updated>2024-08-01T18:55:59Z</updated>

		<summary type="html">&lt;p&gt;Joefremont: /* Basic Usage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The XML-Interface is the core of the [[VA Integration Kit]]. It has been designed to give VA Administrators with the knowledge of dynamic web techniques the possibility to create their own layout and perfectly integrate the information into their own website using data from FSAirlines. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;This version of the XML interface is now released as official.&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Changes from the previous version==&lt;br /&gt;
Compared to the previous version of the XML-Interface the following change were made.&lt;br /&gt;
* Change from domain registration to API keys.&lt;br /&gt;
* Rate limits added.&lt;br /&gt;
* Json output format added.&lt;br /&gt;
* Output properly supports UTF-8 character set.&lt;br /&gt;
* Additional functions for packages added.&lt;br /&gt;
&lt;br /&gt;
==Rate limits==&lt;br /&gt;
The access to the interface is limited by the number of calls an VA can make each hour and each day.  An airline with a gold account can make 500 calls each hour and 6000 call each day. An airline with a platinum account can make 2500 calls each hour and 30000 call each day. If an airline has multiple members then those limits are added together for each premium account.  Example if an airline has one platinum member and two gold member there limits are 3500 an hour and 42000 per day.  Functions related to pilots booking flights do not count against the rate limits.&lt;br /&gt;
&lt;br /&gt;
==Access Restriction==&lt;br /&gt;
In order to be able to access data from the Data-Interface you need to create an API key, this can be done using the &#039;Api Key Management&#039; page.  To find this page on the website go to your VA Overview page and then in the options select &#039;Edit VA Settings&#039; and then &#039;Api Key Management&#039;.  &lt;br /&gt;
&lt;br /&gt;
There are two types of API keys that can be created.&lt;br /&gt;
&lt;br /&gt;
Site key:  This key is to be used by your main website/service and may be use the full rate limit allowed by your VA.  After one hundred calls using a site api key, the key will be locked to the IP address used.  If in the future you need to change the IP address all you need to do is delete the old key and create a new one.&lt;br /&gt;
&lt;br /&gt;
Developer key:  This key is used to help you create and test your website on a different machine than your main site.  It will not be limited to a single IP address but will be limited to the number of calls each day your VA is normally allowed each hour.   Usage of the developer key does apply against your VA&#039;s total rate limit.&lt;br /&gt;
&lt;br /&gt;
==Basic Usage==&lt;br /&gt;
The data can be received using HTTP calls to the interface script and add the desired function to the parameters. Here is an example request:&lt;br /&gt;
&amp;lt;pre&amp;gt;http://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;apikey=xxxxx&amp;lt;/pre&amp;gt;&lt;br /&gt;
As you can see there is the interface script &#039;&#039;va_interface2.php&#039;&#039;, the function &#039;&#039;getPilotList&#039;&#039; and the parameters &#039;&#039;va_id=7&#039;&#039; and &#039;&#039;apikey=xxxxx&#039;&#039;. Some functions require additional parameters, these can be appended after the other parameters.&lt;br /&gt;
&lt;br /&gt;
The result of the request will be given in xml format with the base-tag being &#039;&#039;&amp;lt;fsa_output&amp;gt;&#039;&#039;. This tag has the attributes &#039;&#039;version&#039;&#039; and &#039;&#039;success&#039;&#039; which show the version number of the interface and if the request succeeded or not. In case of a failure the &#039;&#039;success&#039;&#039;-attribute shows the error message. The following example shows the return text of the above function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;fsa_output version=&amp;quot;1.0&amp;quot; success=&amp;quot;SUCCESS&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;data id=&amp;quot;1&amp;quot; name=&amp;quot;Konrad&amp;quot; surname=&amp;quot;Pustka&amp;quot; va_user=&amp;quot;SNA101&amp;quot; location=&amp;quot;EDDM&amp;quot; lastactive=&amp;quot;1287330550&amp;quot; budget=&amp;quot;198144&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;data id=&amp;quot;2&amp;quot; name=&amp;quot;Claudio&amp;quot; surname=&amp;quot;Gusmini&amp;quot; va_user=&amp;quot;SNA102&amp;quot; location=&amp;quot;EDDM&amp;quot; lastactive=&amp;quot;1286366261&amp;quot; budget=&amp;quot;216405101&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/fsa_output&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Inside the &#039;&#039;fsa_output&#039;&#039;-tag there are the &#039;&#039;data&#039;&#039;-tags which contain all the information.  &lt;br /&gt;
&lt;br /&gt;
When calling using this method the default output format is XML, you can get the out in JSON format by adding a format=json parameter to the request. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxx&amp;lt;/pre&amp;gt;&lt;br /&gt;
The output will be:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;status&amp;quot;: &amp;quot;SUCCESS&amp;quot;,&lt;br /&gt;
    &amp;quot;data&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;id&amp;quot;: 1,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Konrad&amp;quot;,&lt;br /&gt;
            &amp;quot;surname&amp;quot;: &amp;quot;Pustka&amp;quot;,&lt;br /&gt;
            &amp;quot;va_user&amp;quot;: &amp;quot;SNA101&amp;quot;,&lt;br /&gt;
            &amp;quot;location&amp;quot;: &amp;quot;ETSE&amp;quot;,&lt;br /&gt;
            &amp;quot;lastactive&amp;quot;: 1600285079,&lt;br /&gt;
            &amp;quot;budget&amp;quot;: 2400628&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;id&amp;quot;: 2,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Claudio&amp;quot;,&lt;br /&gt;
            &amp;quot;surname&amp;quot;: &amp;quot;Gusmini&amp;quot;,&lt;br /&gt;
            &amp;quot;va_user&amp;quot;: &amp;quot;SNA102&amp;quot;,&lt;br /&gt;
            &amp;quot;location&amp;quot;: &amp;quot;LIMG&amp;quot;,&lt;br /&gt;
            &amp;quot;lastactive&amp;quot;: 1605458811,&lt;br /&gt;
            &amp;quot;budget&amp;quot;: 216631042&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you need something to get started here&#039;s a small example PHP-script showing a list of your pilots&#039; names. Just replace the va_id by your own.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
  $ch = curl_init(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;);&lt;br /&gt;
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
  $http_status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);&lt;br /&gt;
  $http_text = curl_exec($ch);&lt;br /&gt;
&lt;br /&gt;
  $objDOM = new DOMDocument();&lt;br /&gt;
  $objDOM-&amp;gt;loadXML($http_text);&lt;br /&gt;
&lt;br /&gt;
  $dataNodes = $objDOM-&amp;gt;getElementsByTagName(&amp;quot;data&amp;quot;);&lt;br /&gt;
  foreach( $dataNodes as $node )&lt;br /&gt;
  {&lt;br /&gt;
    $name = $node-&amp;gt;getAttribute(&amp;quot;name&amp;quot;);&lt;br /&gt;
    $surname = $node-&amp;gt;getAttribute(&amp;quot;surname&amp;quot;);&lt;br /&gt;
    echo &amp;quot;{$name} {$surname} &amp;lt;br/&amp;gt;&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here is a sample of a PHP script reading the same data in JSON format.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
    $ch = curl_init(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;);&lt;br /&gt;
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
    $http_status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);&lt;br /&gt;
    $http_text = curl_exec($ch);&lt;br /&gt;
    $json_data = json_decode($http_text, true);&lt;br /&gt;
    if ($json_data[&#039;status&#039;] == &#039;SUCCESS&#039;) {&lt;br /&gt;
        foreach($json_data[&#039;data&#039;] as $node) {&lt;br /&gt;
            echo &amp;quot;{$node[&#039;name&#039;]} {$node[&#039;surname&#039;]}&amp;lt;br/&amp;gt;\n&amp;quot;;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a sample of a Python script reading the same data in json format.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    #!/usr/bin/python&lt;br /&gt;
    import requests&lt;br /&gt;
&lt;br /&gt;
    r = requests.get(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;)&lt;br /&gt;
    json_data = r.json()&lt;br /&gt;
    if json_data[&#039;status&#039;] == &#039;SUCCESS&#039;:&lt;br /&gt;
        for node in json_data[&#039;data&#039;]:&lt;br /&gt;
            print(&#039;{} {}&#039;.format(node[&#039;name&#039;], node[&#039;surname&#039;])&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Pilot Login==&lt;br /&gt;
Several of the functions require that the pilot calling be logged in.  Previous versions of the interface required the call passed the pilots username and a hashed password as parameters.  That method has now been discontinued, in this version you will need to call the &#039;&#039;pilotLogin&#039;&#039; to create a token that can be used to call functions for that pilot.  Unlike other calls in the interface, the &#039;&#039;pilotLogin&#039;&#039; function is also a HTTP POST call rather than a GET call.  Here is an example of calling the &#039;&#039;pilotLogin&#039;&#039; function.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
$post = [&lt;br /&gt;
    &#039;user&#039; =&amp;gt; &#039;username&#039;,&lt;br /&gt;
    &#039;password&#039; =&amp;gt; &#039;xxxxxxxx&#039;&lt;br /&gt;
];&lt;br /&gt;
&lt;br /&gt;
$ch = curl_init(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=pilotLogin&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;);&lt;br /&gt;
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);&lt;br /&gt;
&lt;br /&gt;
$http_text = curl_exec($ch);&lt;br /&gt;
$data = json_decode($http_text, true);&lt;br /&gt;
&lt;br /&gt;
if ($data[&#039;status&#039;] == &#039;SUCCESS&#039;) {&lt;br /&gt;
    $fsa_token = $data[&#039;data&#039;][&#039;token&#039;];&lt;br /&gt;
} else {&lt;br /&gt;
    die(&amp;quot;Login failed&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The data returned in this request includes:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| token&lt;br /&gt;
| The pilots login token.&lt;br /&gt;
|-&lt;br /&gt;
| alt_code&lt;br /&gt;
| The alternate ICAO code of the airport they are currently located based on there default simulator.&lt;br /&gt;
|-&lt;br /&gt;
| budget&lt;br /&gt;
| The pilots current budget&lt;br /&gt;
|-&lt;br /&gt;
| default_sim&lt;br /&gt;
| The pilots default simulator.&lt;br /&gt;
|-&lt;br /&gt;
| location&lt;br /&gt;
| The FSA offical ICAO code of the airport the pilot is located.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| The pilots first name&lt;br /&gt;
|-&lt;br /&gt;
| pilot_id&lt;br /&gt;
| The id number of the pilot.&lt;br /&gt;
|-&lt;br /&gt;
| premium&lt;br /&gt;
| 1 of the pilot is a premium member, 0 if not.&lt;br /&gt;
|-&lt;br /&gt;
| rank&lt;br /&gt;
| The code for the pilots rank within their VA&lt;br /&gt;
|-&lt;br /&gt;
| rank_id&lt;br /&gt;
| The id of the pilots rank within their VA&lt;br /&gt;
|-&lt;br /&gt;
| surname&lt;br /&gt;
| The pilots last or given name &lt;br /&gt;
|-&lt;br /&gt;
| va_id&lt;br /&gt;
| The ID of the pilots VA&lt;br /&gt;
|-&lt;br /&gt;
| va_status&lt;br /&gt;
| The pilots within there airline&lt;br /&gt;
|-&lt;br /&gt;
| va_user&lt;br /&gt;
| The pilots ID within their VA.&lt;br /&gt;
|-&lt;br /&gt;
| weightunit&lt;br /&gt;
| The pilots default unit of measure (kg or lb).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Data==&lt;br /&gt;
The following section contains a detailed list of all the request-functions with their return values. Lately added options are marked &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;green&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Parameters===&lt;br /&gt;
All the request functions use parameters which need to be appended. The following table shows all the parameters and their meaning.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter&lt;br /&gt;
! Meaning&lt;br /&gt;
|- &lt;br /&gt;
| ac_id&lt;br /&gt;
| ID of the aircraft. Is part of the data received from other functions (e.g. getAircraftList).&lt;br /&gt;
|-&lt;br /&gt;
| accept_pp&lt;br /&gt;
| Must be set &#039;1&#039; if Privacy Policy is accepted.&lt;br /&gt;
|-&lt;br /&gt;
| acdb_id&lt;br /&gt;
| ID of the aircraft type. Is part of the data received from other functions (e.g. getAircraftList).&lt;br /&gt;
|-&lt;br /&gt;
| airport&lt;br /&gt;
| Starting airport. Where the user should be placed first.&lt;br /&gt;
|-&lt;br /&gt;
| arr&lt;br /&gt;
| ICAO code of the arrival airport.&lt;br /&gt;
|-&lt;br /&gt;
| count&lt;br /&gt;
| Number past flights which should be displayed.&lt;br /&gt;
|-&lt;br /&gt;
| country&lt;br /&gt;
| Name of the country. &lt;br /&gt;
|-&lt;br /&gt;
| days&lt;br /&gt;
| Number of past days from now which should be displayed.&lt;br /&gt;
|-&lt;br /&gt;
| dep&lt;br /&gt;
| ICAO code of the departure airport.&lt;br /&gt;
|-&lt;br /&gt;
| email&lt;br /&gt;
| E-Mail of the user.&lt;br /&gt;
|-&lt;br /&gt;
| fleet_id&lt;br /&gt;
| ID of the fleet. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| from_ts&lt;br /&gt;
| UNIX timestamp of the date where the listing should start.&lt;br /&gt;
|-&lt;br /&gt;
| givenname&lt;br /&gt;
| Given name of the user.&lt;br /&gt;
|-&lt;br /&gt;
| icao&lt;br /&gt;
| ICAO code of the airport.&lt;br /&gt;
|-&lt;br /&gt;
| pilot_id&lt;br /&gt;
| ID of the pilot. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| report_id&lt;br /&gt;
| ID of the report. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| surname&lt;br /&gt;
| Surname of the user.&lt;br /&gt;
|-&lt;br /&gt;
| to_ts&lt;br /&gt;
| UNIX timestamp of the date where the listing should end.&lt;br /&gt;
|-&lt;br /&gt;
| user&lt;br /&gt;
| Username of the pilot.&lt;br /&gt;
|-&lt;br /&gt;
| token&lt;br /&gt;
| Login token created by the pilotLogin function.&lt;br /&gt;
|-&lt;br /&gt;
| va_id&lt;br /&gt;
| ID of the [[Virtual Airline]]. Is displayed on the [[Overview]] page.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Aircraft Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftData&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, pax_economy, pax_business, pax_first, config_name&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftDBData&lt;br /&gt;
| va_id, acdb_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao, passengers, price, fuel, dow, mtow, speed, engines, cargo, mzfw, market_only, range&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftDBList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registration, state, ac_name, status, fleet_id, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftStats&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| flights, hours, distance&lt;br /&gt;
|-&lt;br /&gt;
| getFleetAircraftList&lt;br /&gt;
| va_id, fleet_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registration, state, ac_name, status, fleet_id, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getFleetList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name&lt;br /&gt;
|-&lt;br /&gt;
| getFleetStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getLeasedAircraftList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registraion, state, ac_name, status, fleet_id, fuel, va_id, name, expire&lt;br /&gt;
|- &lt;br /&gt;
| getPeriodFleetStats&lt;br /&gt;
| va_id, from_ts, to_ts&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Airport Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirportData&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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&lt;br /&gt;
|-&lt;br /&gt;
| getAirportList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| icao, name, city, country, fuel, lat, lon&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Airline Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirlineData&lt;br /&gt;
| va_id, id (=va_id)&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, base, code, budget, homepage, logo_l, logo_s, price (deprecated, will be removed in next release), reputation, pilotcharge, multiplier, mission&lt;br /&gt;
|-&lt;br /&gt;
| getAirlineStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, pax, cargo_kg&lt;br /&gt;
|-&lt;br /&gt;
| getCountryStats&lt;br /&gt;
| va_id, country&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| va_name, id, flights, rating hours, profit, distance, last, fuel_used, pax, cargo_kg&lt;br /&gt;
|- &lt;br /&gt;
| getRankList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, short, settings, pilots, aircrafts, fleet, flights, partnerships, advertisements, fleet_id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Financial Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getLast10Transactions&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| ts, value, reason&lt;br /&gt;
|-&lt;br /&gt;
| getNegTransactionSums&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| value, reason&lt;br /&gt;
|-&lt;br /&gt;
| getPosTransactionSums&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| value, reason&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;getDailyTransactions&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id ts value reason partner_id fleet_id object_id&amp;lt;/span&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Flight Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters in brackets are optional&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getActiveFlights&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| departure, arrival, passengers, cargo, user_id, ac_id, flightstate, timestamp, number, lon, lat, pax_economy, pax_business, pax_first&lt;br /&gt;
|-&lt;br /&gt;
| getBookedFlights&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| departure, arrival, passengers, cargo, user_id, ac_id, number, pax_economy, pax_business, pax_first&lt;br /&gt;
|-&lt;br /&gt;
| getFlightReports&lt;br /&gt;
| va_id, (acdb_id), (ac_id), (pilot_id), (days), (count)&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;pax_economy, pax_business, pax_first&amp;lt;/span&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
| getReportDetail&lt;br /&gt;
| va_id, report_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;vs, pax_economy, pax_business, pax_first, ticket_business, ticket_first, fuel_start, fuel_dep, fuel_takeoff, fuel_land, fuel_finish, ticket_factor, interface, simversion, os&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| getRouteData&lt;br /&gt;
| va_id, route_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, va_id, cs_vaid, number, dep, arr, deptime, arrtime, simrate, days, price, state, flighttype, acdb_list, ac_id, remarks, route, limit_pax, limit_cargo&lt;br /&gt;
|-&lt;br /&gt;
| getRouteList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, number, dep, dep_country, arr, arr_country, deptime, arrtime, simrate, days, price, state, flighttype, acdb_list, ac_id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Pilot Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getPeriodPilotStats&lt;br /&gt;
| va_id, from_ts, to_ts&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getPilotData&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, surname, user, va_user, rank_id, location, budget, lastactive, active, sigac, timezone, weightunit, language, msgmail, rank, flights, rating, hours, distance, pax, cargo_kg, picture&lt;br /&gt;
|-&lt;br /&gt;
| getPilotHours&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao, hours&lt;br /&gt;
|-&lt;br /&gt;
| getPilotList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, surname, user, va_user, rank_id, location, last_active, status, budget&lt;br /&gt;
|-&lt;br /&gt;
| getPilotRatings&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, training, manufacturer, type&lt;br /&gt;
|-&lt;br /&gt;
| getPilotStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getPilotStatus&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| ac_id, route_id, departure, arrival, dep_time, dist, duration, status, lon, lat, flightstate, passengers, income, ticket, timestamp, cargo, multiplier, flighttype&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Flight Booking===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| bookFlight&lt;br /&gt;
| va_id, pilot_id, token, route_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| success, message, codeshare, codeshare_msg&lt;br /&gt;
|-&lt;br /&gt;
| cancelFlight&lt;br /&gt;
| va_id, pilot_id, token&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| result, loss&lt;br /&gt;
|-&lt;br /&gt;
| getBookableRoutes&lt;br /&gt;
| va_id, pilot_id, token&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| number, dep, arr, deptime, arrtime, id, state, simrate, flighttype, training, price, list, ac_id&lt;br /&gt;
|-&lt;br /&gt;
| getBookableAircraft&lt;br /&gt;
| va_id, pilot_id, route_id, token&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| type, registration, state, id, name, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getBookStatus&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| status&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Miscellaneous User Functions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| createAccount&lt;br /&gt;
| va_id, givenname, surname, username, email, password, airport, accept_pp&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| success, message, code&lt;br /&gt;
|-&lt;br /&gt;
| getPilotID&lt;br /&gt;
| va_id, user, token&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id&lt;br /&gt;
|-&lt;br /&gt;
| getPrivacyPolicy&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS&lt;br /&gt;
| policy&lt;br /&gt;
|-&lt;br /&gt;
| getTransferCost&lt;br /&gt;
| va_id, arr, dep&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| cost&lt;br /&gt;
|-&lt;br /&gt;
| transferPilot&lt;br /&gt;
| va_id, pilot_id, token, icao&lt;br /&gt;
| SUCCESS, NOT FOUND, INSUFFICIENT FUNDS&lt;br /&gt;
| cost&lt;br /&gt;
|- &lt;br /&gt;
| getDistance&lt;br /&gt;
| va_id, icao_from, icao_to&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| distance&lt;br /&gt;
|- &lt;br /&gt;
| getMetar&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| metar&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Package Functions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirportPackageSummary&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| getVaPackageSummary&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| getAircraftPackages&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| getCenterPackages&lt;br /&gt;
| va_id, center_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Sample Responses&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getAirportPackageSummary&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;status&amp;quot;: &amp;quot;SUCCESS&amp;quot;,&lt;br /&gt;
    &amp;quot;data&amp;quot;: {&lt;br /&gt;
        &amp;quot;arr&amp;quot;: {&lt;br /&gt;
            &amp;quot;EDDK&amp;quot;: {&lt;br /&gt;
                &amp;quot;100000&amp;quot;: 1,&lt;br /&gt;
                &amp;quot;200&amp;quot;: 12,&lt;br /&gt;
                &amp;quot;2000&amp;quot;: 2,&lt;br /&gt;
                &amp;quot;bearing&amp;quot;: 29.528874983699,&lt;br /&gt;
                &amp;quot;city&amp;quot;: &amp;quot;Cologne-Bonn&amp;quot;,&lt;br /&gt;
                &amp;quot;distance&amp;quot;: 4872.3920956341,&lt;br /&gt;
                &amp;quot;total_kg&amp;quot;: 106400&lt;br /&gt;
            },&lt;br /&gt;
            &amp;quot;KBFL&amp;quot;: {&lt;br /&gt;
                &amp;quot;200&amp;quot;: 16,&lt;br /&gt;
                &amp;quot;40&amp;quot;: 310,&lt;br /&gt;
                &amp;quot;bearing&amp;quot;: 128.34209940912,&lt;br /&gt;
                &amp;quot;city&amp;quot;: &amp;quot;Bakersfield&amp;quot;,&lt;br /&gt;
                &amp;quot;distance&amp;quot;: 207.19199031933,&lt;br /&gt;
                &amp;quot;total_kg&amp;quot;: 15600&lt;br /&gt;
            },&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getVaPackageSummary&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;status&amp;quot;: &amp;quot;SUCCESS&amp;quot;,&lt;br /&gt;
    &amp;quot;data&amp;quot;: {&lt;br /&gt;
        &amp;quot;aircraft&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;ac_id&amp;quot;: 129691,&lt;br /&gt;
                &amp;quot;earliest_ts&amp;quot;: 1622293737,&lt;br /&gt;
                &amp;quot;location&amp;quot;: &amp;quot;EDDF&amp;quot;,&lt;br /&gt;
                &amp;quot;packages&amp;quot;: 13,&lt;br /&gt;
                &amp;quot;registration&amp;quot;: &amp;quot;D-AOGT&amp;quot;,&lt;br /&gt;
                &amp;quot;size_kg&amp;quot;: 26000&lt;br /&gt;
            }&lt;br /&gt;
        ],&lt;br /&gt;
        &amp;quot;centers&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;center_id&amp;quot;: 4347,&lt;br /&gt;
                &amp;quot;description&amp;quot;: &amp;quot;Himalayan Transport&amp;quot;,&lt;br /&gt;
                &amp;quot;earliest_ts&amp;quot;: 1621459008,&lt;br /&gt;
                &amp;quot;location&amp;quot;: &amp;quot;VNKT&amp;quot;,&lt;br /&gt;
                &amp;quot;packages&amp;quot;: 82,&lt;br /&gt;
                &amp;quot;size_kg&amp;quot;: 4080&lt;br /&gt;
            }&lt;br /&gt;
        ]&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Response Values&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;earliest_ts: The timestamp the of the oldest package in that aircraft/center&lt;br /&gt;
&amp;lt;li&amp;gt;packages: The count of packages stored&lt;br /&gt;
&amp;lt;li&amp;gt;size_kg: The total weight in kg of the packages stored.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getAircraftPackages&#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;getCenterPackages&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;status&amp;quot;: &amp;quot;SUCCESS&amp;quot;,&lt;br /&gt;
    &amp;quot;data&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;ac_id&amp;quot;: 129691,&lt;br /&gt;
            &amp;quot;arr&amp;quot;: &amp;quot;SBGL&amp;quot;,&lt;br /&gt;
            &amp;quot;arr_city&amp;quot;: &amp;quot;Rio De Janeiro&amp;quot;,&lt;br /&gt;
            &amp;quot;center_id&amp;quot;: null,&lt;br /&gt;
            &amp;quot;created_ts&amp;quot;: 1620830486,&lt;br /&gt;
            &amp;quot;delivered&amp;quot;: false,&lt;br /&gt;
            &amp;quot;dep&amp;quot;: &amp;quot;EDDF&amp;quot;,&lt;br /&gt;
            &amp;quot;fleet_id&amp;quot;: 72303,&lt;br /&gt;
            &amp;quot;id&amp;quot;: 302216085,&lt;br /&gt;
            &amp;quot;location&amp;quot;: &amp;quot;EDDF&amp;quot;,&lt;br /&gt;
            &amp;quot;mult&amp;quot;: 10,&lt;br /&gt;
            &amp;quot;package_type&amp;quot;: 0,&lt;br /&gt;
            &amp;quot;payment&amp;quot;: 59281,&lt;br /&gt;
            &amp;quot;payment_fact&amp;quot;: null,&lt;br /&gt;
            &amp;quot;pilot_id&amp;quot;: 98096,&lt;br /&gt;
            &amp;quot;size_kg&amp;quot;: 2000,&lt;br /&gt;
            &amp;quot;start_ts&amp;quot;: 1622293737,&lt;br /&gt;
            &amp;quot;updated_ts&amp;quot;: 1620830486&lt;br /&gt;
        },&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Response Values&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ac_id: The id of the aircraft holding the package&lt;br /&gt;
&amp;lt;li&amp;gt;arr: The ICAO of the destination airport&lt;br /&gt;
&amp;lt;li&amp;gt;arr_city: The city name of the destination airport&lt;br /&gt;
&amp;lt;li&amp;gt;center_id: The id center holding the aircraft&lt;br /&gt;
&amp;lt;li&amp;gt;created_ts: The unix timestamp of the the package was created.&lt;br /&gt;
&amp;lt;li&amp;gt;dep: The ICAO of the origin airport&lt;br /&gt;
&amp;lt;li&amp;gt;fleet_id: The fleet that picked up the package&lt;br /&gt;
&amp;lt;li&amp;gt;location: The airport the package is currently located&lt;br /&gt;
&amp;lt;li&amp;gt;mult: The VA financial multiplier when the package was picked up&lt;br /&gt;
&amp;lt;li&amp;gt;package_type: 0 for normal, 1 for priority&lt;br /&gt;
&amp;lt;li&amp;gt;payment: The base payment for when the package was created.&lt;br /&gt;
&amp;lt;li&amp;gt;pilot_id: The ID of the pilot who picked up the package.&lt;br /&gt;
&amp;lt;li&amp;gt;size_kg: The size in kg of the package&lt;br /&gt;
&amp;lt;li&amp;gt;start_ts: The unix timestamp of when the package was picked up.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Requested additional functions===&lt;br /&gt;
The following list contains all the functions which were requested by users but aren&#039;t implemented yet.&lt;br /&gt;
*Create, edit and delete routes&lt;/div&gt;</summary>
		<author><name>Joefremont</name></author>
	</entry>
	<entry>
		<id>https://wiki4.fsairlines.net/index.php?title=XML-Interface-v2&amp;diff=3308</id>
		<title>XML-Interface-v2</title>
		<link rel="alternate" type="text/html" href="https://wiki4.fsairlines.net/index.php?title=XML-Interface-v2&amp;diff=3308"/>
		<updated>2024-07-10T22:07:46Z</updated>

		<summary type="html">&lt;p&gt;Joefremont: /* Financial Data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The XML-Interface is the core of the [[VA Integration Kit]]. It has been designed to give VA Administrators with the knowledge of dynamic web techniques the possibility to create their own layout and perfectly integrate the information into their own website using data from FSAirlines. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;This version of the XML interface is now released as official.&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Changes from the previous version==&lt;br /&gt;
Compared to the previous version of the XML-Interface the following change were made.&lt;br /&gt;
* Change from domain registration to API keys.&lt;br /&gt;
* Rate limits added.&lt;br /&gt;
* Json output format added.&lt;br /&gt;
* Output properly supports UTF-8 character set.&lt;br /&gt;
* Additional functions for packages added.&lt;br /&gt;
&lt;br /&gt;
==Rate limits==&lt;br /&gt;
The access to the interface is limited by the number of calls an VA can make each hour and each day.  An airline with a gold account can make 500 calls each hour and 6000 call each day. An airline with a platinum account can make 2500 calls each hour and 30000 call each day. If an airline has multiple members then those limits are added together for each premium account.  Example if an airline has one platinum member and two gold member there limits are 3500 an hour and 42000 per day.  Functions related to pilots booking flights do not count against the rate limits.&lt;br /&gt;
&lt;br /&gt;
==Access Restriction==&lt;br /&gt;
In order to be able to access data from the Data-Interface you need to create an API key, this can be done using the &#039;Api Key Management&#039; page.  To find this page on the website go to your VA Overview page and then in the options select &#039;Edit VA Settings&#039; and then &#039;Api Key Management&#039;.  &lt;br /&gt;
&lt;br /&gt;
There are two types of API keys that can be created.&lt;br /&gt;
&lt;br /&gt;
Site key:  This key is to be used by your main website/service and may be use the full rate limit allowed by your VA.  After one hundred calls using a site api key, the key will be locked to the IP address used.  If in the future you need to change the IP address all you need to do is delete the old key and create a new one.&lt;br /&gt;
&lt;br /&gt;
Developer key:  This key is used to help you create and test your website on a different machine than your main site.  It will not be limited to a single IP address but will be limited to the number of calls each day your VA is normally allowed each hour.   Usage of the developer key does apply against your VA&#039;s total rate limit.&lt;br /&gt;
&lt;br /&gt;
==Basic Usage==&lt;br /&gt;
The data can be received using HTTP calls to the interface script and add the desired function to the parameters. Here is an example request:&lt;br /&gt;
&amp;lt;pre&amp;gt;http://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;apikey=xxxxx&amp;lt;/pre&amp;gt;&lt;br /&gt;
As you can see there is the interface script &#039;&#039;va_interface.php&#039;&#039;, the function &#039;&#039;getPilotList&#039;&#039; and the parameters &#039;&#039;va_id=7&#039;&#039; and &#039;&#039;apikey=xxxxx&#039;&#039;. Some functions require additional parameters, these can be appended after the other parameters.&lt;br /&gt;
&lt;br /&gt;
The result of the request will be given in xml format with the base-tag being &#039;&#039;&amp;lt;fsa_output&amp;gt;&#039;&#039;. This tag has the attributes &#039;&#039;version&#039;&#039; and &#039;&#039;success&#039;&#039; which show the version number of the interface and if the request succeeded or not. In case of a failure the &#039;&#039;success&#039;&#039;-attribute shows the error message. The following example shows the return text of the above function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;fsa_output version=&amp;quot;1.0&amp;quot; success=&amp;quot;SUCCESS&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;data id=&amp;quot;1&amp;quot; name=&amp;quot;Konrad&amp;quot; surname=&amp;quot;Pustka&amp;quot; va_user=&amp;quot;SNA101&amp;quot; location=&amp;quot;EDDM&amp;quot; lastactive=&amp;quot;1287330550&amp;quot; budget=&amp;quot;198144&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;data id=&amp;quot;2&amp;quot; name=&amp;quot;Claudio&amp;quot; surname=&amp;quot;Gusmini&amp;quot; va_user=&amp;quot;SNA102&amp;quot; location=&amp;quot;EDDM&amp;quot; lastactive=&amp;quot;1286366261&amp;quot; budget=&amp;quot;216405101&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/fsa_output&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Inside the &#039;&#039;fsa_output&#039;&#039;-tag there are the &#039;&#039;data&#039;&#039;-tags which contain all the information.  &lt;br /&gt;
&lt;br /&gt;
When calling using this method the default output format is XML, you can get the out in JSON format by adding a format=json parameter to the request. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxx&amp;lt;/pre&amp;gt;&lt;br /&gt;
The output will be:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;status&amp;quot;: &amp;quot;SUCCESS&amp;quot;,&lt;br /&gt;
    &amp;quot;data&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;id&amp;quot;: 1,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Konrad&amp;quot;,&lt;br /&gt;
            &amp;quot;surname&amp;quot;: &amp;quot;Pustka&amp;quot;,&lt;br /&gt;
            &amp;quot;va_user&amp;quot;: &amp;quot;SNA101&amp;quot;,&lt;br /&gt;
            &amp;quot;location&amp;quot;: &amp;quot;ETSE&amp;quot;,&lt;br /&gt;
            &amp;quot;lastactive&amp;quot;: 1600285079,&lt;br /&gt;
            &amp;quot;budget&amp;quot;: 2400628&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;id&amp;quot;: 2,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Claudio&amp;quot;,&lt;br /&gt;
            &amp;quot;surname&amp;quot;: &amp;quot;Gusmini&amp;quot;,&lt;br /&gt;
            &amp;quot;va_user&amp;quot;: &amp;quot;SNA102&amp;quot;,&lt;br /&gt;
            &amp;quot;location&amp;quot;: &amp;quot;LIMG&amp;quot;,&lt;br /&gt;
            &amp;quot;lastactive&amp;quot;: 1605458811,&lt;br /&gt;
            &amp;quot;budget&amp;quot;: 216631042&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you need something to get started here&#039;s a small example PHP-script showing a list of your pilots&#039; names. Just replace the va_id by your own.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
  $ch = curl_init(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;);&lt;br /&gt;
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
  $http_status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);&lt;br /&gt;
  $http_text = curl_exec($ch);&lt;br /&gt;
&lt;br /&gt;
  $objDOM = new DOMDocument();&lt;br /&gt;
  $objDOM-&amp;gt;loadXML($http_text);&lt;br /&gt;
&lt;br /&gt;
  $dataNodes = $objDOM-&amp;gt;getElementsByTagName(&amp;quot;data&amp;quot;);&lt;br /&gt;
  foreach( $dataNodes as $node )&lt;br /&gt;
  {&lt;br /&gt;
    $name = $node-&amp;gt;getAttribute(&amp;quot;name&amp;quot;);&lt;br /&gt;
    $surname = $node-&amp;gt;getAttribute(&amp;quot;surname&amp;quot;);&lt;br /&gt;
    echo &amp;quot;{$name} {$surname} &amp;lt;br/&amp;gt;&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here is a sample of a PHP script reading the same data in JSON format.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
    $ch = curl_init(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;);&lt;br /&gt;
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
    $http_status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);&lt;br /&gt;
    $http_text = curl_exec($ch);&lt;br /&gt;
    $json_data = json_decode($http_text, true);&lt;br /&gt;
    if ($json_data[&#039;status&#039;] == &#039;SUCCESS&#039;) {&lt;br /&gt;
        foreach($json_data[&#039;data&#039;] as $node) {&lt;br /&gt;
            echo &amp;quot;{$node[&#039;name&#039;]} {$node[&#039;surname&#039;]}&amp;lt;br/&amp;gt;\n&amp;quot;;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a sample of a Python script reading the same data in json format.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    #!/usr/bin/python&lt;br /&gt;
    import requests&lt;br /&gt;
&lt;br /&gt;
    r = requests.get(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;)&lt;br /&gt;
    json_data = r.json()&lt;br /&gt;
    if json_data[&#039;status&#039;] == &#039;SUCCESS&#039;:&lt;br /&gt;
        for node in json_data[&#039;data&#039;]:&lt;br /&gt;
            print(&#039;{} {}&#039;.format(node[&#039;name&#039;], node[&#039;surname&#039;])&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==Pilot Login==&lt;br /&gt;
Several of the functions require that the pilot calling be logged in.  Previous versions of the interface required the call passed the pilots username and a hashed password as parameters.  That method has now been discontinued, in this version you will need to call the &#039;&#039;pilotLogin&#039;&#039; to create a token that can be used to call functions for that pilot.  Unlike other calls in the interface, the &#039;&#039;pilotLogin&#039;&#039; function is also a HTTP POST call rather than a GET call.  Here is an example of calling the &#039;&#039;pilotLogin&#039;&#039; function.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
$post = [&lt;br /&gt;
    &#039;user&#039; =&amp;gt; &#039;username&#039;,&lt;br /&gt;
    &#039;password&#039; =&amp;gt; &#039;xxxxxxxx&#039;&lt;br /&gt;
];&lt;br /&gt;
&lt;br /&gt;
$ch = curl_init(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=pilotLogin&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;);&lt;br /&gt;
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);&lt;br /&gt;
&lt;br /&gt;
$http_text = curl_exec($ch);&lt;br /&gt;
$data = json_decode($http_text, true);&lt;br /&gt;
&lt;br /&gt;
if ($data[&#039;status&#039;] == &#039;SUCCESS&#039;) {&lt;br /&gt;
    $fsa_token = $data[&#039;data&#039;][&#039;token&#039;];&lt;br /&gt;
} else {&lt;br /&gt;
    die(&amp;quot;Login failed&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The data returned in this request includes:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| token&lt;br /&gt;
| The pilots login token.&lt;br /&gt;
|-&lt;br /&gt;
| alt_code&lt;br /&gt;
| The alternate ICAO code of the airport they are currently located based on there default simulator.&lt;br /&gt;
|-&lt;br /&gt;
| budget&lt;br /&gt;
| The pilots current budget&lt;br /&gt;
|-&lt;br /&gt;
| default_sim&lt;br /&gt;
| The pilots default simulator.&lt;br /&gt;
|-&lt;br /&gt;
| location&lt;br /&gt;
| The FSA offical ICAO code of the airport the pilot is located.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| The pilots first name&lt;br /&gt;
|-&lt;br /&gt;
| pilot_id&lt;br /&gt;
| The id number of the pilot.&lt;br /&gt;
|-&lt;br /&gt;
| premium&lt;br /&gt;
| 1 of the pilot is a premium member, 0 if not.&lt;br /&gt;
|-&lt;br /&gt;
| rank&lt;br /&gt;
| The code for the pilots rank within their VA&lt;br /&gt;
|-&lt;br /&gt;
| rank_id&lt;br /&gt;
| The id of the pilots rank within their VA&lt;br /&gt;
|-&lt;br /&gt;
| surname&lt;br /&gt;
| The pilots last or given name &lt;br /&gt;
|-&lt;br /&gt;
| va_id&lt;br /&gt;
| The ID of the pilots VA&lt;br /&gt;
|-&lt;br /&gt;
| va_status&lt;br /&gt;
| The pilots within there airline&lt;br /&gt;
|-&lt;br /&gt;
| va_user&lt;br /&gt;
| The pilots ID within their VA.&lt;br /&gt;
|-&lt;br /&gt;
| weightunit&lt;br /&gt;
| The pilots default unit of measure (kg or lb).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Data==&lt;br /&gt;
The following section contains a detailed list of all the request-functions with their return values. Lately added options are marked &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;green&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Parameters===&lt;br /&gt;
All the request functions use parameters which need to be appended. The following table shows all the parameters and their meaning.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter&lt;br /&gt;
! Meaning&lt;br /&gt;
|- &lt;br /&gt;
| ac_id&lt;br /&gt;
| ID of the aircraft. Is part of the data received from other functions (e.g. getAircraftList).&lt;br /&gt;
|-&lt;br /&gt;
| accept_pp&lt;br /&gt;
| Must be set &#039;1&#039; if Privacy Policy is accepted.&lt;br /&gt;
|-&lt;br /&gt;
| acdb_id&lt;br /&gt;
| ID of the aircraft type. Is part of the data received from other functions (e.g. getAircraftList).&lt;br /&gt;
|-&lt;br /&gt;
| airport&lt;br /&gt;
| Starting airport. Where the user should be placed first.&lt;br /&gt;
|-&lt;br /&gt;
| arr&lt;br /&gt;
| ICAO code of the arrival airport.&lt;br /&gt;
|-&lt;br /&gt;
| count&lt;br /&gt;
| Number past flights which should be displayed.&lt;br /&gt;
|-&lt;br /&gt;
| country&lt;br /&gt;
| Name of the country. &lt;br /&gt;
|-&lt;br /&gt;
| days&lt;br /&gt;
| Number of past days from now which should be displayed.&lt;br /&gt;
|-&lt;br /&gt;
| dep&lt;br /&gt;
| ICAO code of the departure airport.&lt;br /&gt;
|-&lt;br /&gt;
| email&lt;br /&gt;
| E-Mail of the user.&lt;br /&gt;
|-&lt;br /&gt;
| fleet_id&lt;br /&gt;
| ID of the fleet. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| from_ts&lt;br /&gt;
| UNIX timestamp of the date where the listing should start.&lt;br /&gt;
|-&lt;br /&gt;
| givenname&lt;br /&gt;
| Given name of the user.&lt;br /&gt;
|-&lt;br /&gt;
| icao&lt;br /&gt;
| ICAO code of the airport.&lt;br /&gt;
|-&lt;br /&gt;
| pilot_id&lt;br /&gt;
| ID of the pilot. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| report_id&lt;br /&gt;
| ID of the report. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| surname&lt;br /&gt;
| Surname of the user.&lt;br /&gt;
|-&lt;br /&gt;
| to_ts&lt;br /&gt;
| UNIX timestamp of the date where the listing should end.&lt;br /&gt;
|-&lt;br /&gt;
| user&lt;br /&gt;
| Username of the pilot.&lt;br /&gt;
|-&lt;br /&gt;
| token&lt;br /&gt;
| Login token created by the pilotLogin function.&lt;br /&gt;
|-&lt;br /&gt;
| va_id&lt;br /&gt;
| ID of the [[Virtual Airline]]. Is displayed on the [[Overview]] page.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Aircraft Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftData&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, pax_economy, pax_business, pax_first, config_name&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftDBData&lt;br /&gt;
| va_id, acdb_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao, passengers, price, fuel, dow, mtow, speed, engines, cargo, mzfw, market_only, range&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftDBList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registration, state, ac_name, status, fleet_id, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftStats&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| flights, hours, distance&lt;br /&gt;
|-&lt;br /&gt;
| getFleetAircraftList&lt;br /&gt;
| va_id, fleet_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registration, state, ac_name, status, fleet_id, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getFleetList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name&lt;br /&gt;
|-&lt;br /&gt;
| getFleetStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getLeasedAircraftList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registraion, state, ac_name, status, fleet_id, fuel, va_id, name, expire&lt;br /&gt;
|- &lt;br /&gt;
| getPeriodFleetStats&lt;br /&gt;
| va_id, from_ts, to_ts&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Airport Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirportData&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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&lt;br /&gt;
|-&lt;br /&gt;
| getAirportList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| icao, name, city, country, fuel, lat, lon&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Airline Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirlineData&lt;br /&gt;
| va_id, id (=va_id)&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, base, code, budget, homepage, logo_l, logo_s, price (deprecated, will be removed in next release), reputation, pilotcharge, multiplier, mission&lt;br /&gt;
|-&lt;br /&gt;
| getAirlineStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, pax, cargo_kg&lt;br /&gt;
|-&lt;br /&gt;
| getCountryStats&lt;br /&gt;
| va_id, country&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| va_name, id, flights, rating hours, profit, distance, last, fuel_used, pax, cargo_kg&lt;br /&gt;
|- &lt;br /&gt;
| getRankList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, short, settings, pilots, aircrafts, fleet, flights, partnerships, advertisements, fleet_id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Financial Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getLast10Transactions&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| ts, value, reason&lt;br /&gt;
|-&lt;br /&gt;
| getNegTransactionSums&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| value, reason&lt;br /&gt;
|-&lt;br /&gt;
| getPosTransactionSums&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| value, reason&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;getDailyTransactions&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id ts value reason partner_id fleet_id object_id&amp;lt;/span&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Flight Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters in brackets are optional&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getActiveFlights&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| departure, arrival, passengers, cargo, user_id, ac_id, flightstate, timestamp, number, lon, lat, pax_economy, pax_business, pax_first&lt;br /&gt;
|-&lt;br /&gt;
| getBookedFlights&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| departure, arrival, passengers, cargo, user_id, ac_id, number, pax_economy, pax_business, pax_first&lt;br /&gt;
|-&lt;br /&gt;
| getFlightReports&lt;br /&gt;
| va_id, (acdb_id), (ac_id), (pilot_id), (days), (count)&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;pax_economy, pax_business, pax_first&amp;lt;/span&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
| getReportDetail&lt;br /&gt;
| va_id, report_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;vs, pax_economy, pax_business, pax_first, ticket_business, ticket_first, fuel_start, fuel_dep, fuel_takeoff, fuel_land, fuel_finish, ticket_factor, interface, simversion, os&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| getRouteData&lt;br /&gt;
| va_id, route_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, va_id, cs_vaid, number, dep, arr, deptime, arrtime, simrate, days, price, state, flighttype, acdb_list, ac_id, remarks, route, limit_pax, limit_cargo&lt;br /&gt;
|-&lt;br /&gt;
| getRouteList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, number, dep, dep_country, arr, arr_country, deptime, arrtime, simrate, days, price, state, flighttype, acdb_list, ac_id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Pilot Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getPeriodPilotStats&lt;br /&gt;
| va_id, from_ts, to_ts&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getPilotData&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, surname, user, va_user, rank_id, location, budget, lastactive, active, sigac, timezone, weightunit, language, msgmail, rank, flights, rating, hours, distance, pax, cargo_kg, picture&lt;br /&gt;
|-&lt;br /&gt;
| getPilotHours&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao, hours&lt;br /&gt;
|-&lt;br /&gt;
| getPilotList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, surname, user, va_user, rank_id, location, last_active, status, budget&lt;br /&gt;
|-&lt;br /&gt;
| getPilotRatings&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, training, manufacturer, type&lt;br /&gt;
|-&lt;br /&gt;
| getPilotStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getPilotStatus&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| ac_id, route_id, departure, arrival, dep_time, dist, duration, status, lon, lat, flightstate, passengers, income, ticket, timestamp, cargo, multiplier, flighttype&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Flight Booking===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| bookFlight&lt;br /&gt;
| va_id, pilot_id, token, route_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| success, message, codeshare, codeshare_msg&lt;br /&gt;
|-&lt;br /&gt;
| cancelFlight&lt;br /&gt;
| va_id, pilot_id, token&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| result, loss&lt;br /&gt;
|-&lt;br /&gt;
| getBookableRoutes&lt;br /&gt;
| va_id, pilot_id, token&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| number, dep, arr, deptime, arrtime, id, state, simrate, flighttype, training, price, list, ac_id&lt;br /&gt;
|-&lt;br /&gt;
| getBookableAircraft&lt;br /&gt;
| va_id, pilot_id, route_id, token&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| type, registration, state, id, name, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getBookStatus&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| status&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Miscellaneous User Functions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| createAccount&lt;br /&gt;
| va_id, givenname, surname, username, email, password, airport, accept_pp&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| success, message, code&lt;br /&gt;
|-&lt;br /&gt;
| getPilotID&lt;br /&gt;
| va_id, user, token&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id&lt;br /&gt;
|-&lt;br /&gt;
| getPrivacyPolicy&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS&lt;br /&gt;
| policy&lt;br /&gt;
|-&lt;br /&gt;
| getTransferCost&lt;br /&gt;
| va_id, arr, dep&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| cost&lt;br /&gt;
|-&lt;br /&gt;
| transferPilot&lt;br /&gt;
| va_id, pilot_id, token, icao&lt;br /&gt;
| SUCCESS, NOT FOUND, INSUFFICIENT FUNDS&lt;br /&gt;
| cost&lt;br /&gt;
|- &lt;br /&gt;
| getDistance&lt;br /&gt;
| va_id, icao_from, icao_to&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| distance&lt;br /&gt;
|- &lt;br /&gt;
| getMetar&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| metar&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Package Functions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirportPackageSummary&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| getVaPackageSummary&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| getAircraftPackages&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| getCenterPackages&lt;br /&gt;
| va_id, center_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Sample Responses&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getAirportPackageSummary&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;status&amp;quot;: &amp;quot;SUCCESS&amp;quot;,&lt;br /&gt;
    &amp;quot;data&amp;quot;: {&lt;br /&gt;
        &amp;quot;arr&amp;quot;: {&lt;br /&gt;
            &amp;quot;EDDK&amp;quot;: {&lt;br /&gt;
                &amp;quot;100000&amp;quot;: 1,&lt;br /&gt;
                &amp;quot;200&amp;quot;: 12,&lt;br /&gt;
                &amp;quot;2000&amp;quot;: 2,&lt;br /&gt;
                &amp;quot;bearing&amp;quot;: 29.528874983699,&lt;br /&gt;
                &amp;quot;city&amp;quot;: &amp;quot;Cologne-Bonn&amp;quot;,&lt;br /&gt;
                &amp;quot;distance&amp;quot;: 4872.3920956341,&lt;br /&gt;
                &amp;quot;total_kg&amp;quot;: 106400&lt;br /&gt;
            },&lt;br /&gt;
            &amp;quot;KBFL&amp;quot;: {&lt;br /&gt;
                &amp;quot;200&amp;quot;: 16,&lt;br /&gt;
                &amp;quot;40&amp;quot;: 310,&lt;br /&gt;
                &amp;quot;bearing&amp;quot;: 128.34209940912,&lt;br /&gt;
                &amp;quot;city&amp;quot;: &amp;quot;Bakersfield&amp;quot;,&lt;br /&gt;
                &amp;quot;distance&amp;quot;: 207.19199031933,&lt;br /&gt;
                &amp;quot;total_kg&amp;quot;: 15600&lt;br /&gt;
            },&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getVaPackageSummary&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;status&amp;quot;: &amp;quot;SUCCESS&amp;quot;,&lt;br /&gt;
    &amp;quot;data&amp;quot;: {&lt;br /&gt;
        &amp;quot;aircraft&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;ac_id&amp;quot;: 129691,&lt;br /&gt;
                &amp;quot;earliest_ts&amp;quot;: 1622293737,&lt;br /&gt;
                &amp;quot;location&amp;quot;: &amp;quot;EDDF&amp;quot;,&lt;br /&gt;
                &amp;quot;packages&amp;quot;: 13,&lt;br /&gt;
                &amp;quot;registration&amp;quot;: &amp;quot;D-AOGT&amp;quot;,&lt;br /&gt;
                &amp;quot;size_kg&amp;quot;: 26000&lt;br /&gt;
            }&lt;br /&gt;
        ],&lt;br /&gt;
        &amp;quot;centers&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;center_id&amp;quot;: 4347,&lt;br /&gt;
                &amp;quot;description&amp;quot;: &amp;quot;Himalayan Transport&amp;quot;,&lt;br /&gt;
                &amp;quot;earliest_ts&amp;quot;: 1621459008,&lt;br /&gt;
                &amp;quot;location&amp;quot;: &amp;quot;VNKT&amp;quot;,&lt;br /&gt;
                &amp;quot;packages&amp;quot;: 82,&lt;br /&gt;
                &amp;quot;size_kg&amp;quot;: 4080&lt;br /&gt;
            }&lt;br /&gt;
        ]&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Response Values&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;earliest_ts: The timestamp the of the oldest package in that aircraft/center&lt;br /&gt;
&amp;lt;li&amp;gt;packages: The count of packages stored&lt;br /&gt;
&amp;lt;li&amp;gt;size_kg: The total weight in kg of the packages stored.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getAircraftPackages&#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;getCenterPackages&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;status&amp;quot;: &amp;quot;SUCCESS&amp;quot;,&lt;br /&gt;
    &amp;quot;data&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;ac_id&amp;quot;: 129691,&lt;br /&gt;
            &amp;quot;arr&amp;quot;: &amp;quot;SBGL&amp;quot;,&lt;br /&gt;
            &amp;quot;arr_city&amp;quot;: &amp;quot;Rio De Janeiro&amp;quot;,&lt;br /&gt;
            &amp;quot;center_id&amp;quot;: null,&lt;br /&gt;
            &amp;quot;created_ts&amp;quot;: 1620830486,&lt;br /&gt;
            &amp;quot;delivered&amp;quot;: false,&lt;br /&gt;
            &amp;quot;dep&amp;quot;: &amp;quot;EDDF&amp;quot;,&lt;br /&gt;
            &amp;quot;fleet_id&amp;quot;: 72303,&lt;br /&gt;
            &amp;quot;id&amp;quot;: 302216085,&lt;br /&gt;
            &amp;quot;location&amp;quot;: &amp;quot;EDDF&amp;quot;,&lt;br /&gt;
            &amp;quot;mult&amp;quot;: 10,&lt;br /&gt;
            &amp;quot;package_type&amp;quot;: 0,&lt;br /&gt;
            &amp;quot;payment&amp;quot;: 59281,&lt;br /&gt;
            &amp;quot;payment_fact&amp;quot;: null,&lt;br /&gt;
            &amp;quot;pilot_id&amp;quot;: 98096,&lt;br /&gt;
            &amp;quot;size_kg&amp;quot;: 2000,&lt;br /&gt;
            &amp;quot;start_ts&amp;quot;: 1622293737,&lt;br /&gt;
            &amp;quot;updated_ts&amp;quot;: 1620830486&lt;br /&gt;
        },&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Response Values&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ac_id: The id of the aircraft holding the package&lt;br /&gt;
&amp;lt;li&amp;gt;arr: The ICAO of the destination airport&lt;br /&gt;
&amp;lt;li&amp;gt;arr_city: The city name of the destination airport&lt;br /&gt;
&amp;lt;li&amp;gt;center_id: The id center holding the aircraft&lt;br /&gt;
&amp;lt;li&amp;gt;created_ts: The unix timestamp of the the package was created.&lt;br /&gt;
&amp;lt;li&amp;gt;dep: The ICAO of the origin airport&lt;br /&gt;
&amp;lt;li&amp;gt;fleet_id: The fleet that picked up the package&lt;br /&gt;
&amp;lt;li&amp;gt;location: The airport the package is currently located&lt;br /&gt;
&amp;lt;li&amp;gt;mult: The VA financial multiplier when the package was picked up&lt;br /&gt;
&amp;lt;li&amp;gt;package_type: 0 for normal, 1 for priority&lt;br /&gt;
&amp;lt;li&amp;gt;payment: The base payment for when the package was created.&lt;br /&gt;
&amp;lt;li&amp;gt;pilot_id: The ID of the pilot who picked up the package.&lt;br /&gt;
&amp;lt;li&amp;gt;size_kg: The size in kg of the package&lt;br /&gt;
&amp;lt;li&amp;gt;start_ts: The unix timestamp of when the package was picked up.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Requested additional functions===&lt;br /&gt;
The following list contains all the functions which were requested by users but aren&#039;t implemented yet.&lt;br /&gt;
*Create, edit and delete routes&lt;/div&gt;</summary>
		<author><name>Joefremont</name></author>
	</entry>
	<entry>
		<id>https://wiki4.fsairlines.net/index.php?title=XML-Interface-v2&amp;diff=3307</id>
		<title>XML-Interface-v2</title>
		<link rel="alternate" type="text/html" href="https://wiki4.fsairlines.net/index.php?title=XML-Interface-v2&amp;diff=3307"/>
		<updated>2024-07-10T22:06:16Z</updated>

		<summary type="html">&lt;p&gt;Joefremont: /* Financial Data */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The XML-Interface is the core of the [[VA Integration Kit]]. It has been designed to give VA Administrators with the knowledge of dynamic web techniques the possibility to create their own layout and perfectly integrate the information into their own website using data from FSAirlines. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;This version of the XML interface is now released as official.&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Changes from the previous version==&lt;br /&gt;
Compared to the previous version of the XML-Interface the following change were made.&lt;br /&gt;
* Change from domain registration to API keys.&lt;br /&gt;
* Rate limits added.&lt;br /&gt;
* Json output format added.&lt;br /&gt;
* Output properly supports UTF-8 character set.&lt;br /&gt;
* Additional functions for packages added.&lt;br /&gt;
&lt;br /&gt;
==Rate limits==&lt;br /&gt;
The access to the interface is limited by the number of calls an VA can make each hour and each day.  An airline with a gold account can make 500 calls each hour and 6000 call each day. An airline with a platinum account can make 2500 calls each hour and 30000 call each day. If an airline has multiple members then those limits are added together for each premium account.  Example if an airline has one platinum member and two gold member there limits are 3500 an hour and 42000 per day.  Functions related to pilots booking flights do not count against the rate limits.&lt;br /&gt;
&lt;br /&gt;
==Access Restriction==&lt;br /&gt;
In order to be able to access data from the Data-Interface you need to create an API key, this can be done using the &#039;Api Key Management&#039; page.  To find this page on the website go to your VA Overview page and then in the options select &#039;Edit VA Settings&#039; and then &#039;Api Key Management&#039;.  &lt;br /&gt;
&lt;br /&gt;
There are two types of API keys that can be created.&lt;br /&gt;
&lt;br /&gt;
Site key:  This key is to be used by your main website/service and may be use the full rate limit allowed by your VA.  After one hundred calls using a site api key, the key will be locked to the IP address used.  If in the future you need to change the IP address all you need to do is delete the old key and create a new one.&lt;br /&gt;
&lt;br /&gt;
Developer key:  This key is used to help you create and test your website on a different machine than your main site.  It will not be limited to a single IP address but will be limited to the number of calls each day your VA is normally allowed each hour.   Usage of the developer key does apply against your VA&#039;s total rate limit.&lt;br /&gt;
&lt;br /&gt;
==Basic Usage==&lt;br /&gt;
The data can be received using HTTP calls to the interface script and add the desired function to the parameters. Here is an example request:&lt;br /&gt;
&amp;lt;pre&amp;gt;http://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;apikey=xxxxx&amp;lt;/pre&amp;gt;&lt;br /&gt;
As you can see there is the interface script &#039;&#039;va_interface.php&#039;&#039;, the function &#039;&#039;getPilotList&#039;&#039; and the parameters &#039;&#039;va_id=7&#039;&#039; and &#039;&#039;apikey=xxxxx&#039;&#039;. Some functions require additional parameters, these can be appended after the other parameters.&lt;br /&gt;
&lt;br /&gt;
The result of the request will be given in xml format with the base-tag being &#039;&#039;&amp;lt;fsa_output&amp;gt;&#039;&#039;. This tag has the attributes &#039;&#039;version&#039;&#039; and &#039;&#039;success&#039;&#039; which show the version number of the interface and if the request succeeded or not. In case of a failure the &#039;&#039;success&#039;&#039;-attribute shows the error message. The following example shows the return text of the above function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;fsa_output version=&amp;quot;1.0&amp;quot; success=&amp;quot;SUCCESS&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;data id=&amp;quot;1&amp;quot; name=&amp;quot;Konrad&amp;quot; surname=&amp;quot;Pustka&amp;quot; va_user=&amp;quot;SNA101&amp;quot; location=&amp;quot;EDDM&amp;quot; lastactive=&amp;quot;1287330550&amp;quot; budget=&amp;quot;198144&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;data id=&amp;quot;2&amp;quot; name=&amp;quot;Claudio&amp;quot; surname=&amp;quot;Gusmini&amp;quot; va_user=&amp;quot;SNA102&amp;quot; location=&amp;quot;EDDM&amp;quot; lastactive=&amp;quot;1286366261&amp;quot; budget=&amp;quot;216405101&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/fsa_output&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Inside the &#039;&#039;fsa_output&#039;&#039;-tag there are the &#039;&#039;data&#039;&#039;-tags which contain all the information.  &lt;br /&gt;
&lt;br /&gt;
When calling using this method the default output format is XML, you can get the out in JSON format by adding a format=json parameter to the request. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxx&amp;lt;/pre&amp;gt;&lt;br /&gt;
The output will be:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;status&amp;quot;: &amp;quot;SUCCESS&amp;quot;,&lt;br /&gt;
    &amp;quot;data&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;id&amp;quot;: 1,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Konrad&amp;quot;,&lt;br /&gt;
            &amp;quot;surname&amp;quot;: &amp;quot;Pustka&amp;quot;,&lt;br /&gt;
            &amp;quot;va_user&amp;quot;: &amp;quot;SNA101&amp;quot;,&lt;br /&gt;
            &amp;quot;location&amp;quot;: &amp;quot;ETSE&amp;quot;,&lt;br /&gt;
            &amp;quot;lastactive&amp;quot;: 1600285079,&lt;br /&gt;
            &amp;quot;budget&amp;quot;: 2400628&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;id&amp;quot;: 2,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Claudio&amp;quot;,&lt;br /&gt;
            &amp;quot;surname&amp;quot;: &amp;quot;Gusmini&amp;quot;,&lt;br /&gt;
            &amp;quot;va_user&amp;quot;: &amp;quot;SNA102&amp;quot;,&lt;br /&gt;
            &amp;quot;location&amp;quot;: &amp;quot;LIMG&amp;quot;,&lt;br /&gt;
            &amp;quot;lastactive&amp;quot;: 1605458811,&lt;br /&gt;
            &amp;quot;budget&amp;quot;: 216631042&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you need something to get started here&#039;s a small example PHP-script showing a list of your pilots&#039; names. Just replace the va_id by your own.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
  $ch = curl_init(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;);&lt;br /&gt;
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
  $http_status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);&lt;br /&gt;
  $http_text = curl_exec($ch);&lt;br /&gt;
&lt;br /&gt;
  $objDOM = new DOMDocument();&lt;br /&gt;
  $objDOM-&amp;gt;loadXML($http_text);&lt;br /&gt;
&lt;br /&gt;
  $dataNodes = $objDOM-&amp;gt;getElementsByTagName(&amp;quot;data&amp;quot;);&lt;br /&gt;
  foreach( $dataNodes as $node )&lt;br /&gt;
  {&lt;br /&gt;
    $name = $node-&amp;gt;getAttribute(&amp;quot;name&amp;quot;);&lt;br /&gt;
    $surname = $node-&amp;gt;getAttribute(&amp;quot;surname&amp;quot;);&lt;br /&gt;
    echo &amp;quot;{$name} {$surname} &amp;lt;br/&amp;gt;&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here is a sample of a PHP script reading the same data in JSON format.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
    $ch = curl_init(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;);&lt;br /&gt;
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
    $http_status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);&lt;br /&gt;
    $http_text = curl_exec($ch);&lt;br /&gt;
    $json_data = json_decode($http_text, true);&lt;br /&gt;
    if ($json_data[&#039;status&#039;] == &#039;SUCCESS&#039;) {&lt;br /&gt;
        foreach($json_data[&#039;data&#039;] as $node) {&lt;br /&gt;
            echo &amp;quot;{$node[&#039;name&#039;]} {$node[&#039;surname&#039;]}&amp;lt;br/&amp;gt;\n&amp;quot;;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a sample of a Python script reading the same data in json format.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    #!/usr/bin/python&lt;br /&gt;
    import requests&lt;br /&gt;
&lt;br /&gt;
    r = requests.get(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;)&lt;br /&gt;
    json_data = r.json()&lt;br /&gt;
    if json_data[&#039;status&#039;] == &#039;SUCCESS&#039;:&lt;br /&gt;
        for node in json_data[&#039;data&#039;]:&lt;br /&gt;
            print(&#039;{} {}&#039;.format(node[&#039;name&#039;], node[&#039;surname&#039;])&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==Pilot Login==&lt;br /&gt;
Several of the functions require that the pilot calling be logged in.  Previous versions of the interface required the call passed the pilots username and a hashed password as parameters.  That method has now been discontinued, in this version you will need to call the &#039;&#039;pilotLogin&#039;&#039; to create a token that can be used to call functions for that pilot.  Unlike other calls in the interface, the &#039;&#039;pilotLogin&#039;&#039; function is also a HTTP POST call rather than a GET call.  Here is an example of calling the &#039;&#039;pilotLogin&#039;&#039; function.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
$post = [&lt;br /&gt;
    &#039;user&#039; =&amp;gt; &#039;username&#039;,&lt;br /&gt;
    &#039;password&#039; =&amp;gt; &#039;xxxxxxxx&#039;&lt;br /&gt;
];&lt;br /&gt;
&lt;br /&gt;
$ch = curl_init(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=pilotLogin&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;);&lt;br /&gt;
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);&lt;br /&gt;
&lt;br /&gt;
$http_text = curl_exec($ch);&lt;br /&gt;
$data = json_decode($http_text, true);&lt;br /&gt;
&lt;br /&gt;
if ($data[&#039;status&#039;] == &#039;SUCCESS&#039;) {&lt;br /&gt;
    $fsa_token = $data[&#039;data&#039;][&#039;token&#039;];&lt;br /&gt;
} else {&lt;br /&gt;
    die(&amp;quot;Login failed&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The data returned in this request includes:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| token&lt;br /&gt;
| The pilots login token.&lt;br /&gt;
|-&lt;br /&gt;
| alt_code&lt;br /&gt;
| The alternate ICAO code of the airport they are currently located based on there default simulator.&lt;br /&gt;
|-&lt;br /&gt;
| budget&lt;br /&gt;
| The pilots current budget&lt;br /&gt;
|-&lt;br /&gt;
| default_sim&lt;br /&gt;
| The pilots default simulator.&lt;br /&gt;
|-&lt;br /&gt;
| location&lt;br /&gt;
| The FSA offical ICAO code of the airport the pilot is located.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| The pilots first name&lt;br /&gt;
|-&lt;br /&gt;
| pilot_id&lt;br /&gt;
| The id number of the pilot.&lt;br /&gt;
|-&lt;br /&gt;
| premium&lt;br /&gt;
| 1 of the pilot is a premium member, 0 if not.&lt;br /&gt;
|-&lt;br /&gt;
| rank&lt;br /&gt;
| The code for the pilots rank within their VA&lt;br /&gt;
|-&lt;br /&gt;
| rank_id&lt;br /&gt;
| The id of the pilots rank within their VA&lt;br /&gt;
|-&lt;br /&gt;
| surname&lt;br /&gt;
| The pilots last or given name &lt;br /&gt;
|-&lt;br /&gt;
| va_id&lt;br /&gt;
| The ID of the pilots VA&lt;br /&gt;
|-&lt;br /&gt;
| va_status&lt;br /&gt;
| The pilots within there airline&lt;br /&gt;
|-&lt;br /&gt;
| va_user&lt;br /&gt;
| The pilots ID within their VA.&lt;br /&gt;
|-&lt;br /&gt;
| weightunit&lt;br /&gt;
| The pilots default unit of measure (kg or lb).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Data==&lt;br /&gt;
The following section contains a detailed list of all the request-functions with their return values. Lately added options are marked &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;green&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Parameters===&lt;br /&gt;
All the request functions use parameters which need to be appended. The following table shows all the parameters and their meaning.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter&lt;br /&gt;
! Meaning&lt;br /&gt;
|- &lt;br /&gt;
| ac_id&lt;br /&gt;
| ID of the aircraft. Is part of the data received from other functions (e.g. getAircraftList).&lt;br /&gt;
|-&lt;br /&gt;
| accept_pp&lt;br /&gt;
| Must be set &#039;1&#039; if Privacy Policy is accepted.&lt;br /&gt;
|-&lt;br /&gt;
| acdb_id&lt;br /&gt;
| ID of the aircraft type. Is part of the data received from other functions (e.g. getAircraftList).&lt;br /&gt;
|-&lt;br /&gt;
| airport&lt;br /&gt;
| Starting airport. Where the user should be placed first.&lt;br /&gt;
|-&lt;br /&gt;
| arr&lt;br /&gt;
| ICAO code of the arrival airport.&lt;br /&gt;
|-&lt;br /&gt;
| count&lt;br /&gt;
| Number past flights which should be displayed.&lt;br /&gt;
|-&lt;br /&gt;
| country&lt;br /&gt;
| Name of the country. &lt;br /&gt;
|-&lt;br /&gt;
| days&lt;br /&gt;
| Number of past days from now which should be displayed.&lt;br /&gt;
|-&lt;br /&gt;
| dep&lt;br /&gt;
| ICAO code of the departure airport.&lt;br /&gt;
|-&lt;br /&gt;
| email&lt;br /&gt;
| E-Mail of the user.&lt;br /&gt;
|-&lt;br /&gt;
| fleet_id&lt;br /&gt;
| ID of the fleet. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| from_ts&lt;br /&gt;
| UNIX timestamp of the date where the listing should start.&lt;br /&gt;
|-&lt;br /&gt;
| givenname&lt;br /&gt;
| Given name of the user.&lt;br /&gt;
|-&lt;br /&gt;
| icao&lt;br /&gt;
| ICAO code of the airport.&lt;br /&gt;
|-&lt;br /&gt;
| pilot_id&lt;br /&gt;
| ID of the pilot. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| report_id&lt;br /&gt;
| ID of the report. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| surname&lt;br /&gt;
| Surname of the user.&lt;br /&gt;
|-&lt;br /&gt;
| to_ts&lt;br /&gt;
| UNIX timestamp of the date where the listing should end.&lt;br /&gt;
|-&lt;br /&gt;
| user&lt;br /&gt;
| Username of the pilot.&lt;br /&gt;
|-&lt;br /&gt;
| token&lt;br /&gt;
| Login token created by the pilotLogin function.&lt;br /&gt;
|-&lt;br /&gt;
| va_id&lt;br /&gt;
| ID of the [[Virtual Airline]]. Is displayed on the [[Overview]] page.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Aircraft Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftData&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, pax_economy, pax_business, pax_first, config_name&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftDBData&lt;br /&gt;
| va_id, acdb_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao, passengers, price, fuel, dow, mtow, speed, engines, cargo, mzfw, market_only, range&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftDBList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registration, state, ac_name, status, fleet_id, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftStats&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| flights, hours, distance&lt;br /&gt;
|-&lt;br /&gt;
| getFleetAircraftList&lt;br /&gt;
| va_id, fleet_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registration, state, ac_name, status, fleet_id, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getFleetList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name&lt;br /&gt;
|-&lt;br /&gt;
| getFleetStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getLeasedAircraftList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registraion, state, ac_name, status, fleet_id, fuel, va_id, name, expire&lt;br /&gt;
|- &lt;br /&gt;
| getPeriodFleetStats&lt;br /&gt;
| va_id, from_ts, to_ts&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Airport Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirportData&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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&lt;br /&gt;
|-&lt;br /&gt;
| getAirportList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| icao, name, city, country, fuel, lat, lon&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Airline Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirlineData&lt;br /&gt;
| va_id, id (=va_id)&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, base, code, budget, homepage, logo_l, logo_s, price (deprecated, will be removed in next release), reputation, pilotcharge, multiplier, mission&lt;br /&gt;
|-&lt;br /&gt;
| getAirlineStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, pax, cargo_kg&lt;br /&gt;
|-&lt;br /&gt;
| getCountryStats&lt;br /&gt;
| va_id, country&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| va_name, id, flights, rating hours, profit, distance, last, fuel_used, pax, cargo_kg&lt;br /&gt;
|- &lt;br /&gt;
| getRankList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, short, settings, pilots, aircrafts, fleet, flights, partnerships, advertisements, fleet_id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Financial Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getLast10Transactions&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| ts, value, reason&lt;br /&gt;
|-&lt;br /&gt;
| getNegTransactionSums&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| value, reason&lt;br /&gt;
|-&lt;br /&gt;
| getPosTransactionSums&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| value, reason&lt;br /&gt;
|-&lt;br /&gt;
| getDailyTransactions&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id ts value reason partner_id fleet_id object_id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Flight Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters in brackets are optional&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getActiveFlights&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| departure, arrival, passengers, cargo, user_id, ac_id, flightstate, timestamp, number, lon, lat, pax_economy, pax_business, pax_first&lt;br /&gt;
|-&lt;br /&gt;
| getBookedFlights&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| departure, arrival, passengers, cargo, user_id, ac_id, number, pax_economy, pax_business, pax_first&lt;br /&gt;
|-&lt;br /&gt;
| getFlightReports&lt;br /&gt;
| va_id, (acdb_id), (ac_id), (pilot_id), (days), (count)&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;pax_economy, pax_business, pax_first&amp;lt;/span&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
| getReportDetail&lt;br /&gt;
| va_id, report_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;vs, pax_economy, pax_business, pax_first, ticket_business, ticket_first, fuel_start, fuel_dep, fuel_takeoff, fuel_land, fuel_finish, ticket_factor, interface, simversion, os&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| getRouteData&lt;br /&gt;
| va_id, route_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, va_id, cs_vaid, number, dep, arr, deptime, arrtime, simrate, days, price, state, flighttype, acdb_list, ac_id, remarks, route, limit_pax, limit_cargo&lt;br /&gt;
|-&lt;br /&gt;
| getRouteList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, number, dep, dep_country, arr, arr_country, deptime, arrtime, simrate, days, price, state, flighttype, acdb_list, ac_id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Pilot Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getPeriodPilotStats&lt;br /&gt;
| va_id, from_ts, to_ts&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getPilotData&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, surname, user, va_user, rank_id, location, budget, lastactive, active, sigac, timezone, weightunit, language, msgmail, rank, flights, rating, hours, distance, pax, cargo_kg, picture&lt;br /&gt;
|-&lt;br /&gt;
| getPilotHours&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao, hours&lt;br /&gt;
|-&lt;br /&gt;
| getPilotList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, surname, user, va_user, rank_id, location, last_active, status, budget&lt;br /&gt;
|-&lt;br /&gt;
| getPilotRatings&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, training, manufacturer, type&lt;br /&gt;
|-&lt;br /&gt;
| getPilotStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getPilotStatus&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| ac_id, route_id, departure, arrival, dep_time, dist, duration, status, lon, lat, flightstate, passengers, income, ticket, timestamp, cargo, multiplier, flighttype&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Flight Booking===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| bookFlight&lt;br /&gt;
| va_id, pilot_id, token, route_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| success, message, codeshare, codeshare_msg&lt;br /&gt;
|-&lt;br /&gt;
| cancelFlight&lt;br /&gt;
| va_id, pilot_id, token&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| result, loss&lt;br /&gt;
|-&lt;br /&gt;
| getBookableRoutes&lt;br /&gt;
| va_id, pilot_id, token&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| number, dep, arr, deptime, arrtime, id, state, simrate, flighttype, training, price, list, ac_id&lt;br /&gt;
|-&lt;br /&gt;
| getBookableAircraft&lt;br /&gt;
| va_id, pilot_id, route_id, token&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| type, registration, state, id, name, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getBookStatus&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| status&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Miscellaneous User Functions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| createAccount&lt;br /&gt;
| va_id, givenname, surname, username, email, password, airport, accept_pp&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| success, message, code&lt;br /&gt;
|-&lt;br /&gt;
| getPilotID&lt;br /&gt;
| va_id, user, token&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id&lt;br /&gt;
|-&lt;br /&gt;
| getPrivacyPolicy&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS&lt;br /&gt;
| policy&lt;br /&gt;
|-&lt;br /&gt;
| getTransferCost&lt;br /&gt;
| va_id, arr, dep&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| cost&lt;br /&gt;
|-&lt;br /&gt;
| transferPilot&lt;br /&gt;
| va_id, pilot_id, token, icao&lt;br /&gt;
| SUCCESS, NOT FOUND, INSUFFICIENT FUNDS&lt;br /&gt;
| cost&lt;br /&gt;
|- &lt;br /&gt;
| getDistance&lt;br /&gt;
| va_id, icao_from, icao_to&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| distance&lt;br /&gt;
|- &lt;br /&gt;
| getMetar&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| metar&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Package Functions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirportPackageSummary&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| getVaPackageSummary&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| getAircraftPackages&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| getCenterPackages&lt;br /&gt;
| va_id, center_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Sample Responses&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getAirportPackageSummary&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;status&amp;quot;: &amp;quot;SUCCESS&amp;quot;,&lt;br /&gt;
    &amp;quot;data&amp;quot;: {&lt;br /&gt;
        &amp;quot;arr&amp;quot;: {&lt;br /&gt;
            &amp;quot;EDDK&amp;quot;: {&lt;br /&gt;
                &amp;quot;100000&amp;quot;: 1,&lt;br /&gt;
                &amp;quot;200&amp;quot;: 12,&lt;br /&gt;
                &amp;quot;2000&amp;quot;: 2,&lt;br /&gt;
                &amp;quot;bearing&amp;quot;: 29.528874983699,&lt;br /&gt;
                &amp;quot;city&amp;quot;: &amp;quot;Cologne-Bonn&amp;quot;,&lt;br /&gt;
                &amp;quot;distance&amp;quot;: 4872.3920956341,&lt;br /&gt;
                &amp;quot;total_kg&amp;quot;: 106400&lt;br /&gt;
            },&lt;br /&gt;
            &amp;quot;KBFL&amp;quot;: {&lt;br /&gt;
                &amp;quot;200&amp;quot;: 16,&lt;br /&gt;
                &amp;quot;40&amp;quot;: 310,&lt;br /&gt;
                &amp;quot;bearing&amp;quot;: 128.34209940912,&lt;br /&gt;
                &amp;quot;city&amp;quot;: &amp;quot;Bakersfield&amp;quot;,&lt;br /&gt;
                &amp;quot;distance&amp;quot;: 207.19199031933,&lt;br /&gt;
                &amp;quot;total_kg&amp;quot;: 15600&lt;br /&gt;
            },&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getVaPackageSummary&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;status&amp;quot;: &amp;quot;SUCCESS&amp;quot;,&lt;br /&gt;
    &amp;quot;data&amp;quot;: {&lt;br /&gt;
        &amp;quot;aircraft&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;ac_id&amp;quot;: 129691,&lt;br /&gt;
                &amp;quot;earliest_ts&amp;quot;: 1622293737,&lt;br /&gt;
                &amp;quot;location&amp;quot;: &amp;quot;EDDF&amp;quot;,&lt;br /&gt;
                &amp;quot;packages&amp;quot;: 13,&lt;br /&gt;
                &amp;quot;registration&amp;quot;: &amp;quot;D-AOGT&amp;quot;,&lt;br /&gt;
                &amp;quot;size_kg&amp;quot;: 26000&lt;br /&gt;
            }&lt;br /&gt;
        ],&lt;br /&gt;
        &amp;quot;centers&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;center_id&amp;quot;: 4347,&lt;br /&gt;
                &amp;quot;description&amp;quot;: &amp;quot;Himalayan Transport&amp;quot;,&lt;br /&gt;
                &amp;quot;earliest_ts&amp;quot;: 1621459008,&lt;br /&gt;
                &amp;quot;location&amp;quot;: &amp;quot;VNKT&amp;quot;,&lt;br /&gt;
                &amp;quot;packages&amp;quot;: 82,&lt;br /&gt;
                &amp;quot;size_kg&amp;quot;: 4080&lt;br /&gt;
            }&lt;br /&gt;
        ]&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Response Values&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;earliest_ts: The timestamp the of the oldest package in that aircraft/center&lt;br /&gt;
&amp;lt;li&amp;gt;packages: The count of packages stored&lt;br /&gt;
&amp;lt;li&amp;gt;size_kg: The total weight in kg of the packages stored.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getAircraftPackages&#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;getCenterPackages&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;status&amp;quot;: &amp;quot;SUCCESS&amp;quot;,&lt;br /&gt;
    &amp;quot;data&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;ac_id&amp;quot;: 129691,&lt;br /&gt;
            &amp;quot;arr&amp;quot;: &amp;quot;SBGL&amp;quot;,&lt;br /&gt;
            &amp;quot;arr_city&amp;quot;: &amp;quot;Rio De Janeiro&amp;quot;,&lt;br /&gt;
            &amp;quot;center_id&amp;quot;: null,&lt;br /&gt;
            &amp;quot;created_ts&amp;quot;: 1620830486,&lt;br /&gt;
            &amp;quot;delivered&amp;quot;: false,&lt;br /&gt;
            &amp;quot;dep&amp;quot;: &amp;quot;EDDF&amp;quot;,&lt;br /&gt;
            &amp;quot;fleet_id&amp;quot;: 72303,&lt;br /&gt;
            &amp;quot;id&amp;quot;: 302216085,&lt;br /&gt;
            &amp;quot;location&amp;quot;: &amp;quot;EDDF&amp;quot;,&lt;br /&gt;
            &amp;quot;mult&amp;quot;: 10,&lt;br /&gt;
            &amp;quot;package_type&amp;quot;: 0,&lt;br /&gt;
            &amp;quot;payment&amp;quot;: 59281,&lt;br /&gt;
            &amp;quot;payment_fact&amp;quot;: null,&lt;br /&gt;
            &amp;quot;pilot_id&amp;quot;: 98096,&lt;br /&gt;
            &amp;quot;size_kg&amp;quot;: 2000,&lt;br /&gt;
            &amp;quot;start_ts&amp;quot;: 1622293737,&lt;br /&gt;
            &amp;quot;updated_ts&amp;quot;: 1620830486&lt;br /&gt;
        },&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Response Values&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ac_id: The id of the aircraft holding the package&lt;br /&gt;
&amp;lt;li&amp;gt;arr: The ICAO of the destination airport&lt;br /&gt;
&amp;lt;li&amp;gt;arr_city: The city name of the destination airport&lt;br /&gt;
&amp;lt;li&amp;gt;center_id: The id center holding the aircraft&lt;br /&gt;
&amp;lt;li&amp;gt;created_ts: The unix timestamp of the the package was created.&lt;br /&gt;
&amp;lt;li&amp;gt;dep: The ICAO of the origin airport&lt;br /&gt;
&amp;lt;li&amp;gt;fleet_id: The fleet that picked up the package&lt;br /&gt;
&amp;lt;li&amp;gt;location: The airport the package is currently located&lt;br /&gt;
&amp;lt;li&amp;gt;mult: The VA financial multiplier when the package was picked up&lt;br /&gt;
&amp;lt;li&amp;gt;package_type: 0 for normal, 1 for priority&lt;br /&gt;
&amp;lt;li&amp;gt;payment: The base payment for when the package was created.&lt;br /&gt;
&amp;lt;li&amp;gt;pilot_id: The ID of the pilot who picked up the package.&lt;br /&gt;
&amp;lt;li&amp;gt;size_kg: The size in kg of the package&lt;br /&gt;
&amp;lt;li&amp;gt;start_ts: The unix timestamp of when the package was picked up.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Requested additional functions===&lt;br /&gt;
The following list contains all the functions which were requested by users but aren&#039;t implemented yet.&lt;br /&gt;
*Create, edit and delete routes&lt;/div&gt;</summary>
		<author><name>Joefremont</name></author>
	</entry>
	<entry>
		<id>https://wiki4.fsairlines.net/index.php?title=XML-Interface-v2&amp;diff=3306</id>
		<title>XML-Interface-v2</title>
		<link rel="alternate" type="text/html" href="https://wiki4.fsairlines.net/index.php?title=XML-Interface-v2&amp;diff=3306"/>
		<updated>2023-07-06T23:42:10Z</updated>

		<summary type="html">&lt;p&gt;Joefremont: /* Rate limits */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The XML-Interface is the core of the [[VA Integration Kit]]. It has been designed to give VA Administrators with the knowledge of dynamic web techniques the possibility to create their own layout and perfectly integrate the information into their own website using data from FSAirlines. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;This version of the XML interface is now released as official.&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Changes from the previous version==&lt;br /&gt;
Compared to the previous version of the XML-Interface the following change were made.&lt;br /&gt;
* Change from domain registration to API keys.&lt;br /&gt;
* Rate limits added.&lt;br /&gt;
* Json output format added.&lt;br /&gt;
* Output properly supports UTF-8 character set.&lt;br /&gt;
* Additional functions for packages added.&lt;br /&gt;
&lt;br /&gt;
==Rate limits==&lt;br /&gt;
The access to the interface is limited by the number of calls an VA can make each hour and each day.  An airline with a gold account can make 500 calls each hour and 6000 call each day. An airline with a platinum account can make 2500 calls each hour and 30000 call each day. If an airline has multiple members then those limits are added together for each premium account.  Example if an airline has one platinum member and two gold member there limits are 3500 an hour and 42000 per day.  Functions related to pilots booking flights do not count against the rate limits.&lt;br /&gt;
&lt;br /&gt;
==Access Restriction==&lt;br /&gt;
In order to be able to access data from the Data-Interface you need to create an API key, this can be done using the &#039;Api Key Management&#039; page.  To find this page on the website go to your VA Overview page and then in the options select &#039;Edit VA Settings&#039; and then &#039;Api Key Management&#039;.  &lt;br /&gt;
&lt;br /&gt;
There are two types of API keys that can be created.&lt;br /&gt;
&lt;br /&gt;
Site key:  This key is to be used by your main website/service and may be use the full rate limit allowed by your VA.  After one hundred calls using a site api key, the key will be locked to the IP address used.  If in the future you need to change the IP address all you need to do is delete the old key and create a new one.&lt;br /&gt;
&lt;br /&gt;
Developer key:  This key is used to help you create and test your website on a different machine than your main site.  It will not be limited to a single IP address but will be limited to the number of calls each day your VA is normally allowed each hour.   Usage of the developer key does apply against your VA&#039;s total rate limit.&lt;br /&gt;
&lt;br /&gt;
==Basic Usage==&lt;br /&gt;
The data can be received using HTTP calls to the interface script and add the desired function to the parameters. Here is an example request:&lt;br /&gt;
&amp;lt;pre&amp;gt;http://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;apikey=xxxxx&amp;lt;/pre&amp;gt;&lt;br /&gt;
As you can see there is the interface script &#039;&#039;va_interface.php&#039;&#039;, the function &#039;&#039;getPilotList&#039;&#039; and the parameters &#039;&#039;va_id=7&#039;&#039; and &#039;&#039;apikey=xxxxx&#039;&#039;. Some functions require additional parameters, these can be appended after the other parameters.&lt;br /&gt;
&lt;br /&gt;
The result of the request will be given in xml format with the base-tag being &#039;&#039;&amp;lt;fsa_output&amp;gt;&#039;&#039;. This tag has the attributes &#039;&#039;version&#039;&#039; and &#039;&#039;success&#039;&#039; which show the version number of the interface and if the request succeeded or not. In case of a failure the &#039;&#039;success&#039;&#039;-attribute shows the error message. The following example shows the return text of the above function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;fsa_output version=&amp;quot;1.0&amp;quot; success=&amp;quot;SUCCESS&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;data id=&amp;quot;1&amp;quot; name=&amp;quot;Konrad&amp;quot; surname=&amp;quot;Pustka&amp;quot; va_user=&amp;quot;SNA101&amp;quot; location=&amp;quot;EDDM&amp;quot; lastactive=&amp;quot;1287330550&amp;quot; budget=&amp;quot;198144&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;data id=&amp;quot;2&amp;quot; name=&amp;quot;Claudio&amp;quot; surname=&amp;quot;Gusmini&amp;quot; va_user=&amp;quot;SNA102&amp;quot; location=&amp;quot;EDDM&amp;quot; lastactive=&amp;quot;1286366261&amp;quot; budget=&amp;quot;216405101&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/fsa_output&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Inside the &#039;&#039;fsa_output&#039;&#039;-tag there are the &#039;&#039;data&#039;&#039;-tags which contain all the information.  &lt;br /&gt;
&lt;br /&gt;
When calling using this method the default output format is XML, you can get the out in JSON format by adding a format=json parameter to the request. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxx&amp;lt;/pre&amp;gt;&lt;br /&gt;
The output will be:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;status&amp;quot;: &amp;quot;SUCCESS&amp;quot;,&lt;br /&gt;
    &amp;quot;data&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;id&amp;quot;: 1,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Konrad&amp;quot;,&lt;br /&gt;
            &amp;quot;surname&amp;quot;: &amp;quot;Pustka&amp;quot;,&lt;br /&gt;
            &amp;quot;va_user&amp;quot;: &amp;quot;SNA101&amp;quot;,&lt;br /&gt;
            &amp;quot;location&amp;quot;: &amp;quot;ETSE&amp;quot;,&lt;br /&gt;
            &amp;quot;lastactive&amp;quot;: 1600285079,&lt;br /&gt;
            &amp;quot;budget&amp;quot;: 2400628&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;id&amp;quot;: 2,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Claudio&amp;quot;,&lt;br /&gt;
            &amp;quot;surname&amp;quot;: &amp;quot;Gusmini&amp;quot;,&lt;br /&gt;
            &amp;quot;va_user&amp;quot;: &amp;quot;SNA102&amp;quot;,&lt;br /&gt;
            &amp;quot;location&amp;quot;: &amp;quot;LIMG&amp;quot;,&lt;br /&gt;
            &amp;quot;lastactive&amp;quot;: 1605458811,&lt;br /&gt;
            &amp;quot;budget&amp;quot;: 216631042&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you need something to get started here&#039;s a small example PHP-script showing a list of your pilots&#039; names. Just replace the va_id by your own.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
  $ch = curl_init(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;);&lt;br /&gt;
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
  $http_status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);&lt;br /&gt;
  $http_text = curl_exec($ch);&lt;br /&gt;
&lt;br /&gt;
  $objDOM = new DOMDocument();&lt;br /&gt;
  $objDOM-&amp;gt;loadXML($http_text);&lt;br /&gt;
&lt;br /&gt;
  $dataNodes = $objDOM-&amp;gt;getElementsByTagName(&amp;quot;data&amp;quot;);&lt;br /&gt;
  foreach( $dataNodes as $node )&lt;br /&gt;
  {&lt;br /&gt;
    $name = $node-&amp;gt;getAttribute(&amp;quot;name&amp;quot;);&lt;br /&gt;
    $surname = $node-&amp;gt;getAttribute(&amp;quot;surname&amp;quot;);&lt;br /&gt;
    echo &amp;quot;{$name} {$surname} &amp;lt;br/&amp;gt;&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here is a sample of a PHP script reading the same data in JSON format.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
    $ch = curl_init(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;);&lt;br /&gt;
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
    $http_status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);&lt;br /&gt;
    $http_text = curl_exec($ch);&lt;br /&gt;
    $json_data = json_decode($http_text, true);&lt;br /&gt;
    if ($json_data[&#039;status&#039;] == &#039;SUCCESS&#039;) {&lt;br /&gt;
        foreach($json_data[&#039;data&#039;] as $node) {&lt;br /&gt;
            echo &amp;quot;{$node[&#039;name&#039;]} {$node[&#039;surname&#039;]}&amp;lt;br/&amp;gt;\n&amp;quot;;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a sample of a Python script reading the same data in json format.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    #!/usr/bin/python&lt;br /&gt;
    import requests&lt;br /&gt;
&lt;br /&gt;
    r = requests.get(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;)&lt;br /&gt;
    json_data = r.json()&lt;br /&gt;
    if json_data[&#039;status&#039;] == &#039;SUCCESS&#039;:&lt;br /&gt;
        for node in json_data[&#039;data&#039;]:&lt;br /&gt;
            print(&#039;{} {}&#039;.format(node[&#039;name&#039;], node[&#039;surname&#039;])&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==Pilot Login==&lt;br /&gt;
Several of the functions require that the pilot calling be logged in.  Previous versions of the interface required the call passed the pilots username and a hashed password as parameters.  That method has now been discontinued, in this version you will need to call the &#039;&#039;pilotLogin&#039;&#039; to create a token that can be used to call functions for that pilot.  Unlike other calls in the interface, the &#039;&#039;pilotLogin&#039;&#039; function is also a HTTP POST call rather than a GET call.  Here is an example of calling the &#039;&#039;pilotLogin&#039;&#039; function.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
$post = [&lt;br /&gt;
    &#039;user&#039; =&amp;gt; &#039;username&#039;,&lt;br /&gt;
    &#039;password&#039; =&amp;gt; &#039;xxxxxxxx&#039;&lt;br /&gt;
];&lt;br /&gt;
&lt;br /&gt;
$ch = curl_init(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=pilotLogin&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;);&lt;br /&gt;
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);&lt;br /&gt;
&lt;br /&gt;
$http_text = curl_exec($ch);&lt;br /&gt;
$data = json_decode($http_text, true);&lt;br /&gt;
&lt;br /&gt;
if ($data[&#039;status&#039;] == &#039;SUCCESS&#039;) {&lt;br /&gt;
    $fsa_token = $data[&#039;data&#039;][&#039;token&#039;];&lt;br /&gt;
} else {&lt;br /&gt;
    die(&amp;quot;Login failed&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The data returned in this request includes:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| token&lt;br /&gt;
| The pilots login token.&lt;br /&gt;
|-&lt;br /&gt;
| alt_code&lt;br /&gt;
| The alternate ICAO code of the airport they are currently located based on there default simulator.&lt;br /&gt;
|-&lt;br /&gt;
| budget&lt;br /&gt;
| The pilots current budget&lt;br /&gt;
|-&lt;br /&gt;
| default_sim&lt;br /&gt;
| The pilots default simulator.&lt;br /&gt;
|-&lt;br /&gt;
| location&lt;br /&gt;
| The FSA offical ICAO code of the airport the pilot is located.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| The pilots first name&lt;br /&gt;
|-&lt;br /&gt;
| pilot_id&lt;br /&gt;
| The id number of the pilot.&lt;br /&gt;
|-&lt;br /&gt;
| premium&lt;br /&gt;
| 1 of the pilot is a premium member, 0 if not.&lt;br /&gt;
|-&lt;br /&gt;
| rank&lt;br /&gt;
| The code for the pilots rank within their VA&lt;br /&gt;
|-&lt;br /&gt;
| rank_id&lt;br /&gt;
| The id of the pilots rank within their VA&lt;br /&gt;
|-&lt;br /&gt;
| surname&lt;br /&gt;
| The pilots last or given name &lt;br /&gt;
|-&lt;br /&gt;
| va_id&lt;br /&gt;
| The ID of the pilots VA&lt;br /&gt;
|-&lt;br /&gt;
| va_status&lt;br /&gt;
| The pilots within there airline&lt;br /&gt;
|-&lt;br /&gt;
| va_user&lt;br /&gt;
| The pilots ID within their VA.&lt;br /&gt;
|-&lt;br /&gt;
| weightunit&lt;br /&gt;
| The pilots default unit of measure (kg or lb).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Data==&lt;br /&gt;
The following section contains a detailed list of all the request-functions with their return values. Lately added options are marked &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;green&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Parameters===&lt;br /&gt;
All the request functions use parameters which need to be appended. The following table shows all the parameters and their meaning.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter&lt;br /&gt;
! Meaning&lt;br /&gt;
|- &lt;br /&gt;
| ac_id&lt;br /&gt;
| ID of the aircraft. Is part of the data received from other functions (e.g. getAircraftList).&lt;br /&gt;
|-&lt;br /&gt;
| accept_pp&lt;br /&gt;
| Must be set &#039;1&#039; if Privacy Policy is accepted.&lt;br /&gt;
|-&lt;br /&gt;
| acdb_id&lt;br /&gt;
| ID of the aircraft type. Is part of the data received from other functions (e.g. getAircraftList).&lt;br /&gt;
|-&lt;br /&gt;
| airport&lt;br /&gt;
| Starting airport. Where the user should be placed first.&lt;br /&gt;
|-&lt;br /&gt;
| arr&lt;br /&gt;
| ICAO code of the arrival airport.&lt;br /&gt;
|-&lt;br /&gt;
| count&lt;br /&gt;
| Number past flights which should be displayed.&lt;br /&gt;
|-&lt;br /&gt;
| country&lt;br /&gt;
| Name of the country. &lt;br /&gt;
|-&lt;br /&gt;
| days&lt;br /&gt;
| Number of past days from now which should be displayed.&lt;br /&gt;
|-&lt;br /&gt;
| dep&lt;br /&gt;
| ICAO code of the departure airport.&lt;br /&gt;
|-&lt;br /&gt;
| email&lt;br /&gt;
| E-Mail of the user.&lt;br /&gt;
|-&lt;br /&gt;
| fleet_id&lt;br /&gt;
| ID of the fleet. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| from_ts&lt;br /&gt;
| UNIX timestamp of the date where the listing should start.&lt;br /&gt;
|-&lt;br /&gt;
| givenname&lt;br /&gt;
| Given name of the user.&lt;br /&gt;
|-&lt;br /&gt;
| icao&lt;br /&gt;
| ICAO code of the airport.&lt;br /&gt;
|-&lt;br /&gt;
| pilot_id&lt;br /&gt;
| ID of the pilot. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| report_id&lt;br /&gt;
| ID of the report. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| surname&lt;br /&gt;
| Surname of the user.&lt;br /&gt;
|-&lt;br /&gt;
| to_ts&lt;br /&gt;
| UNIX timestamp of the date where the listing should end.&lt;br /&gt;
|-&lt;br /&gt;
| user&lt;br /&gt;
| Username of the pilot.&lt;br /&gt;
|-&lt;br /&gt;
| token&lt;br /&gt;
| Login token created by the pilotLogin function.&lt;br /&gt;
|-&lt;br /&gt;
| va_id&lt;br /&gt;
| ID of the [[Virtual Airline]]. Is displayed on the [[Overview]] page.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Aircraft Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftData&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, pax_economy, pax_business, pax_first, config_name&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftDBData&lt;br /&gt;
| va_id, acdb_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao, passengers, price, fuel, dow, mtow, speed, engines, cargo, mzfw, market_only, range&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftDBList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registration, state, ac_name, status, fleet_id, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftStats&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| flights, hours, distance&lt;br /&gt;
|-&lt;br /&gt;
| getFleetAircraftList&lt;br /&gt;
| va_id, fleet_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registration, state, ac_name, status, fleet_id, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getFleetList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name&lt;br /&gt;
|-&lt;br /&gt;
| getFleetStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getLeasedAircraftList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registraion, state, ac_name, status, fleet_id, fuel, va_id, name, expire&lt;br /&gt;
|- &lt;br /&gt;
| getPeriodFleetStats&lt;br /&gt;
| va_id, from_ts, to_ts&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Airport Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirportData&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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&lt;br /&gt;
|-&lt;br /&gt;
| getAirportList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| icao, name, city, country, fuel, lat, lon&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Airline Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirlineData&lt;br /&gt;
| va_id, id (=va_id)&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, base, code, budget, homepage, logo_l, logo_s, price (deprecated, will be removed in next release), reputation, pilotcharge, multiplier, mission&lt;br /&gt;
|-&lt;br /&gt;
| getAirlineStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, pax, cargo_kg&lt;br /&gt;
|-&lt;br /&gt;
| getCountryStats&lt;br /&gt;
| va_id, country&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| va_name, id, flights, rating hours, profit, distance, last, fuel_used, pax, cargo_kg&lt;br /&gt;
|- &lt;br /&gt;
| getRankList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, short, settings, pilots, aircrafts, fleet, flights, partnerships, advertisements, fleet_id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Financial Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getLast10Transactions&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| ts, value, reason&lt;br /&gt;
|-&lt;br /&gt;
| getNegTransactionSums&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| value, reason&lt;br /&gt;
|-&lt;br /&gt;
| getPosTransactionSums&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| value, reason&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Flight Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters in brackets are optional&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getActiveFlights&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| departure, arrival, passengers, cargo, user_id, ac_id, flightstate, timestamp, number, lon, lat, pax_economy, pax_business, pax_first&lt;br /&gt;
|-&lt;br /&gt;
| getBookedFlights&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| departure, arrival, passengers, cargo, user_id, ac_id, number, pax_economy, pax_business, pax_first&lt;br /&gt;
|-&lt;br /&gt;
| getFlightReports&lt;br /&gt;
| va_id, (acdb_id), (ac_id), (pilot_id), (days), (count)&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;pax_economy, pax_business, pax_first&amp;lt;/span&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
| getReportDetail&lt;br /&gt;
| va_id, report_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;vs, pax_economy, pax_business, pax_first, ticket_business, ticket_first, fuel_start, fuel_dep, fuel_takeoff, fuel_land, fuel_finish, ticket_factor, interface, simversion, os&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| getRouteData&lt;br /&gt;
| va_id, route_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, va_id, cs_vaid, number, dep, arr, deptime, arrtime, simrate, days, price, state, flighttype, acdb_list, ac_id, remarks, route, limit_pax, limit_cargo&lt;br /&gt;
|-&lt;br /&gt;
| getRouteList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, number, dep, dep_country, arr, arr_country, deptime, arrtime, simrate, days, price, state, flighttype, acdb_list, ac_id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Pilot Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getPeriodPilotStats&lt;br /&gt;
| va_id, from_ts, to_ts&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getPilotData&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, surname, user, va_user, rank_id, location, budget, lastactive, active, sigac, timezone, weightunit, language, msgmail, rank, flights, rating, hours, distance, pax, cargo_kg, picture&lt;br /&gt;
|-&lt;br /&gt;
| getPilotHours&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao, hours&lt;br /&gt;
|-&lt;br /&gt;
| getPilotList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, surname, user, va_user, rank_id, location, last_active, status, budget&lt;br /&gt;
|-&lt;br /&gt;
| getPilotRatings&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, training, manufacturer, type&lt;br /&gt;
|-&lt;br /&gt;
| getPilotStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getPilotStatus&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| ac_id, route_id, departure, arrival, dep_time, dist, duration, status, lon, lat, flightstate, passengers, income, ticket, timestamp, cargo, multiplier, flighttype&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Flight Booking===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| bookFlight&lt;br /&gt;
| va_id, pilot_id, token, route_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| success, message, codeshare, codeshare_msg&lt;br /&gt;
|-&lt;br /&gt;
| cancelFlight&lt;br /&gt;
| va_id, pilot_id, token&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| result, loss&lt;br /&gt;
|-&lt;br /&gt;
| getBookableRoutes&lt;br /&gt;
| va_id, pilot_id, token&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| number, dep, arr, deptime, arrtime, id, state, simrate, flighttype, training, price, list, ac_id&lt;br /&gt;
|-&lt;br /&gt;
| getBookableAircraft&lt;br /&gt;
| va_id, pilot_id, route_id, token&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| type, registration, state, id, name, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getBookStatus&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| status&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Miscellaneous User Functions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| createAccount&lt;br /&gt;
| va_id, givenname, surname, username, email, password, airport, accept_pp&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| success, message, code&lt;br /&gt;
|-&lt;br /&gt;
| getPilotID&lt;br /&gt;
| va_id, user, token&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id&lt;br /&gt;
|-&lt;br /&gt;
| getPrivacyPolicy&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS&lt;br /&gt;
| policy&lt;br /&gt;
|-&lt;br /&gt;
| getTransferCost&lt;br /&gt;
| va_id, arr, dep&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| cost&lt;br /&gt;
|-&lt;br /&gt;
| transferPilot&lt;br /&gt;
| va_id, pilot_id, token, icao&lt;br /&gt;
| SUCCESS, NOT FOUND, INSUFFICIENT FUNDS&lt;br /&gt;
| cost&lt;br /&gt;
|- &lt;br /&gt;
| getDistance&lt;br /&gt;
| va_id, icao_from, icao_to&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| distance&lt;br /&gt;
|- &lt;br /&gt;
| getMetar&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| metar&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Package Functions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirportPackageSummary&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| getVaPackageSummary&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| getAircraftPackages&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| getCenterPackages&lt;br /&gt;
| va_id, center_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Sample Responses&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getAirportPackageSummary&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;status&amp;quot;: &amp;quot;SUCCESS&amp;quot;,&lt;br /&gt;
    &amp;quot;data&amp;quot;: {&lt;br /&gt;
        &amp;quot;arr&amp;quot;: {&lt;br /&gt;
            &amp;quot;EDDK&amp;quot;: {&lt;br /&gt;
                &amp;quot;100000&amp;quot;: 1,&lt;br /&gt;
                &amp;quot;200&amp;quot;: 12,&lt;br /&gt;
                &amp;quot;2000&amp;quot;: 2,&lt;br /&gt;
                &amp;quot;bearing&amp;quot;: 29.528874983699,&lt;br /&gt;
                &amp;quot;city&amp;quot;: &amp;quot;Cologne-Bonn&amp;quot;,&lt;br /&gt;
                &amp;quot;distance&amp;quot;: 4872.3920956341,&lt;br /&gt;
                &amp;quot;total_kg&amp;quot;: 106400&lt;br /&gt;
            },&lt;br /&gt;
            &amp;quot;KBFL&amp;quot;: {&lt;br /&gt;
                &amp;quot;200&amp;quot;: 16,&lt;br /&gt;
                &amp;quot;40&amp;quot;: 310,&lt;br /&gt;
                &amp;quot;bearing&amp;quot;: 128.34209940912,&lt;br /&gt;
                &amp;quot;city&amp;quot;: &amp;quot;Bakersfield&amp;quot;,&lt;br /&gt;
                &amp;quot;distance&amp;quot;: 207.19199031933,&lt;br /&gt;
                &amp;quot;total_kg&amp;quot;: 15600&lt;br /&gt;
            },&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getVaPackageSummary&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;status&amp;quot;: &amp;quot;SUCCESS&amp;quot;,&lt;br /&gt;
    &amp;quot;data&amp;quot;: {&lt;br /&gt;
        &amp;quot;aircraft&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;ac_id&amp;quot;: 129691,&lt;br /&gt;
                &amp;quot;earliest_ts&amp;quot;: 1622293737,&lt;br /&gt;
                &amp;quot;location&amp;quot;: &amp;quot;EDDF&amp;quot;,&lt;br /&gt;
                &amp;quot;packages&amp;quot;: 13,&lt;br /&gt;
                &amp;quot;registration&amp;quot;: &amp;quot;D-AOGT&amp;quot;,&lt;br /&gt;
                &amp;quot;size_kg&amp;quot;: 26000&lt;br /&gt;
            }&lt;br /&gt;
        ],&lt;br /&gt;
        &amp;quot;centers&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;center_id&amp;quot;: 4347,&lt;br /&gt;
                &amp;quot;description&amp;quot;: &amp;quot;Himalayan Transport&amp;quot;,&lt;br /&gt;
                &amp;quot;earliest_ts&amp;quot;: 1621459008,&lt;br /&gt;
                &amp;quot;location&amp;quot;: &amp;quot;VNKT&amp;quot;,&lt;br /&gt;
                &amp;quot;packages&amp;quot;: 82,&lt;br /&gt;
                &amp;quot;size_kg&amp;quot;: 4080&lt;br /&gt;
            }&lt;br /&gt;
        ]&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Response Values&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;earliest_ts: The timestamp the of the oldest package in that aircraft/center&lt;br /&gt;
&amp;lt;li&amp;gt;packages: The count of packages stored&lt;br /&gt;
&amp;lt;li&amp;gt;size_kg: The total weight in kg of the packages stored.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getAircraftPackages&#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;getCenterPackages&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;status&amp;quot;: &amp;quot;SUCCESS&amp;quot;,&lt;br /&gt;
    &amp;quot;data&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;ac_id&amp;quot;: 129691,&lt;br /&gt;
            &amp;quot;arr&amp;quot;: &amp;quot;SBGL&amp;quot;,&lt;br /&gt;
            &amp;quot;arr_city&amp;quot;: &amp;quot;Rio De Janeiro&amp;quot;,&lt;br /&gt;
            &amp;quot;center_id&amp;quot;: null,&lt;br /&gt;
            &amp;quot;created_ts&amp;quot;: 1620830486,&lt;br /&gt;
            &amp;quot;delivered&amp;quot;: false,&lt;br /&gt;
            &amp;quot;dep&amp;quot;: &amp;quot;EDDF&amp;quot;,&lt;br /&gt;
            &amp;quot;fleet_id&amp;quot;: 72303,&lt;br /&gt;
            &amp;quot;id&amp;quot;: 302216085,&lt;br /&gt;
            &amp;quot;location&amp;quot;: &amp;quot;EDDF&amp;quot;,&lt;br /&gt;
            &amp;quot;mult&amp;quot;: 10,&lt;br /&gt;
            &amp;quot;package_type&amp;quot;: 0,&lt;br /&gt;
            &amp;quot;payment&amp;quot;: 59281,&lt;br /&gt;
            &amp;quot;payment_fact&amp;quot;: null,&lt;br /&gt;
            &amp;quot;pilot_id&amp;quot;: 98096,&lt;br /&gt;
            &amp;quot;size_kg&amp;quot;: 2000,&lt;br /&gt;
            &amp;quot;start_ts&amp;quot;: 1622293737,&lt;br /&gt;
            &amp;quot;updated_ts&amp;quot;: 1620830486&lt;br /&gt;
        },&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Response Values&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ac_id: The id of the aircraft holding the package&lt;br /&gt;
&amp;lt;li&amp;gt;arr: The ICAO of the destination airport&lt;br /&gt;
&amp;lt;li&amp;gt;arr_city: The city name of the destination airport&lt;br /&gt;
&amp;lt;li&amp;gt;center_id: The id center holding the aircraft&lt;br /&gt;
&amp;lt;li&amp;gt;created_ts: The unix timestamp of the the package was created.&lt;br /&gt;
&amp;lt;li&amp;gt;dep: The ICAO of the origin airport&lt;br /&gt;
&amp;lt;li&amp;gt;fleet_id: The fleet that picked up the package&lt;br /&gt;
&amp;lt;li&amp;gt;location: The airport the package is currently located&lt;br /&gt;
&amp;lt;li&amp;gt;mult: The VA financial multiplier when the package was picked up&lt;br /&gt;
&amp;lt;li&amp;gt;package_type: 0 for normal, 1 for priority&lt;br /&gt;
&amp;lt;li&amp;gt;payment: The base payment for when the package was created.&lt;br /&gt;
&amp;lt;li&amp;gt;pilot_id: The ID of the pilot who picked up the package.&lt;br /&gt;
&amp;lt;li&amp;gt;size_kg: The size in kg of the package&lt;br /&gt;
&amp;lt;li&amp;gt;start_ts: The unix timestamp of when the package was picked up.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Requested additional functions===&lt;br /&gt;
The following list contains all the functions which were requested by users but aren&#039;t implemented yet.&lt;br /&gt;
*Create, edit and delete routes&lt;/div&gt;</summary>
		<author><name>Joefremont</name></author>
	</entry>
	<entry>
		<id>https://wiki4.fsairlines.net/index.php?title=XML-Interface&amp;diff=3305</id>
		<title>XML-Interface</title>
		<link rel="alternate" type="text/html" href="https://wiki4.fsairlines.net/index.php?title=XML-Interface&amp;diff=3305"/>
		<updated>2023-07-06T23:39:21Z</updated>

		<summary type="html">&lt;p&gt;Joefremont: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The XML-Interface is the core of the [[VA Integration Kit]]. It has been designed to give VA Administrators with the knowledge of dynamic web techniques the possibility to create their own layout and perfectly integrate the information into their own website using XML data from FSAirlines. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;This interface is officially deprecated, all functions using username and password will be disabled 1 August 2023&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Access Restriction==&lt;br /&gt;
In order to be able to receive data from the XML-Interface the domain of your VA&#039;s website must be registered in our database. There are different access levels available:&lt;br /&gt;
*Read only access for your VA&lt;br /&gt;
*Read and write access (except account creation) for your VA. This access level will be given to you initially.&lt;br /&gt;
*Read and write access for your VA. This access level will be given to your VA if you show our privacy policy on your registration page.&lt;br /&gt;
To request one of these access levels, please contact the admins using a support ticket and don&#039;t forget to add the domain of your website.&lt;br /&gt;
&lt;br /&gt;
==Basic Usage==&lt;br /&gt;
The data can be received using HTTP calls to the interface script and add the desired function to the parameters. Here is an example request:&lt;br /&gt;
&amp;lt;pre&amp;gt;http://www.fsairlines.net/va_interface.php?function=getPilotList&amp;amp;va_id=7&amp;lt;/pre&amp;gt;&lt;br /&gt;
As you can see there is the interface script &#039;&#039;va_interface.php&#039;&#039;, the function &#039;&#039;getPilotList&#039;&#039; and one function parameter &#039;&#039;va_id=7&#039;&#039;. Some functions require additional parameters, these can be appended after the &#039;&#039;va_id&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The result of the request will be given in xml format with the base-tag being &#039;&#039;&amp;lt;fsa_output&amp;gt;&#039;&#039;. This tag has the attributes &#039;&#039;version&#039;&#039; and &#039;&#039;success&#039;&#039; which show the version number of the interface and if the request succeeded or not. In case of a failure the &#039;&#039;success&#039;&#039;-attribute shows the error message. The following example shows the return text of the above function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;fsa_output version=&amp;quot;1.0&amp;quot; success=&amp;quot;SUCCESS&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;data id=&amp;quot;1&amp;quot; name=&amp;quot;Konrad&amp;quot; surname=&amp;quot;Pustka&amp;quot; va_user=&amp;quot;SNA101&amp;quot; location=&amp;quot;EDDM&amp;quot; lastactive=&amp;quot;1287330550&amp;quot; budget=&amp;quot;198144&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;data id=&amp;quot;2&amp;quot; name=&amp;quot;Claudio&amp;quot; surname=&amp;quot;Gusmini&amp;quot; va_user=&amp;quot;SNA102&amp;quot; location=&amp;quot;EDDM&amp;quot; lastactive=&amp;quot;1286366261&amp;quot; budget=&amp;quot;216405101&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/fsa_output&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Inside the &#039;&#039;fsa_output&#039;&#039;-tag there are the &#039;&#039;data&#039;&#039;-tags which contain all the information.&lt;br /&gt;
To use this data in your own webpage you need some knowledge in dynamic web-programming, for example PHP. We can&#039;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 there.&lt;br /&gt;
&lt;br /&gt;
If you need something to get started here&#039;s a small example PHP-script showing a list of your pilots&#039; names. Just replace the va_id by your own.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
  $objDOM = new DOMDocument();&lt;br /&gt;
  $objDOM-&amp;gt;load(&amp;quot;http://www.fsairlines.net/va_interface.php?function=getPilotList&amp;amp;va_id=7&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  //uncomment to show raw xml-data&lt;br /&gt;
  //echo $objDOM-&amp;gt;saveXML();&lt;br /&gt;
&lt;br /&gt;
  $dataNodes = $objDOM-&amp;gt;getElementsByTagName(&amp;quot;data&amp;quot;);&lt;br /&gt;
  foreach( $dataNodes as $node )&lt;br /&gt;
  {&lt;br /&gt;
    $name = $node-&amp;gt;getAttribute(&amp;quot;name&amp;quot;);&lt;br /&gt;
    $surname = $node-&amp;gt;getAttribute(&amp;quot;surname&amp;quot;);&lt;br /&gt;
    echo &amp;quot;{$name} {$surname} &amp;lt;br/&amp;gt;&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Data==&lt;br /&gt;
The following section contains a detailed list of all the request-functions with their return values. Lately added options are marked &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;green&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Parameters===&lt;br /&gt;
All the request functions use parameters which need to be appended. The following table shows all the parameters and their meaning.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter&lt;br /&gt;
! Meaning&lt;br /&gt;
|- &lt;br /&gt;
| ac_id&lt;br /&gt;
| ID of the aircraft. Is part of the data received from other functions (e.g. getAircraftList).&lt;br /&gt;
|-&lt;br /&gt;
| accept_pp&lt;br /&gt;
| Must be set &#039;1&#039; if Privacy Policy is accepted.&lt;br /&gt;
|-&lt;br /&gt;
| acdb_id&lt;br /&gt;
| ID of the aircraft type. Is part of the data received from other functions (e.g. getAircraftList).&lt;br /&gt;
|-&lt;br /&gt;
| airport&lt;br /&gt;
| Starting airport. Where the user should be placed first.&lt;br /&gt;
|-&lt;br /&gt;
| arr&lt;br /&gt;
| ICAO code of the arrival airport.&lt;br /&gt;
|-&lt;br /&gt;
| count&lt;br /&gt;
| Number past flights which should be displayed.&lt;br /&gt;
|-&lt;br /&gt;
| country&lt;br /&gt;
| Name of the country. &lt;br /&gt;
|-&lt;br /&gt;
| days&lt;br /&gt;
| Number of past days from now which should be displayed.&lt;br /&gt;
|-&lt;br /&gt;
| dep&lt;br /&gt;
| ICAO code of the departure airport.&lt;br /&gt;
|-&lt;br /&gt;
| email&lt;br /&gt;
| E-Mail of the user.&lt;br /&gt;
|-&lt;br /&gt;
| fleet_id&lt;br /&gt;
| ID of the fleet. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| from_ts&lt;br /&gt;
| UNIX timestamp of the date where the listing should start.&lt;br /&gt;
|-&lt;br /&gt;
| givenname&lt;br /&gt;
| Given name of the user.&lt;br /&gt;
|-&lt;br /&gt;
| icao&lt;br /&gt;
| ICAO code of the airport.&lt;br /&gt;
|-&lt;br /&gt;
| passwd&lt;br /&gt;
| Password of the pilot (MD5 encrypted).&lt;br /&gt;
|-&lt;br /&gt;
| password&lt;br /&gt;
| Password of the user.&lt;br /&gt;
|-&lt;br /&gt;
| pilot_id&lt;br /&gt;
| ID of the pilot. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| report_id&lt;br /&gt;
| ID of the report. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| surname&lt;br /&gt;
| Surname of the user.&lt;br /&gt;
|-&lt;br /&gt;
| to_ts&lt;br /&gt;
| UNIX timestamp of the date where the listing should end.&lt;br /&gt;
|-&lt;br /&gt;
| user&lt;br /&gt;
| Username of the pilot.&lt;br /&gt;
|-&lt;br /&gt;
| username&lt;br /&gt;
| Requested username.&lt;br /&gt;
|-&lt;br /&gt;
| va_id&lt;br /&gt;
| ID of the [[Virtual Airline]]. Is displayed on the [[Overview]] page.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Aircraft Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftData&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, pax_economy, pax_business, pax_first, config_name&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftDBData&lt;br /&gt;
| va_id, acdb_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao, passengers, price, fuel, dow, mtow, speed, engines, cargo, mzfw, market_only, range&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftDBList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registration, state, ac_name, status, fleet_id, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftStats&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| flights, hours, distance&lt;br /&gt;
|-&lt;br /&gt;
| getFleetAircraftList&lt;br /&gt;
| va_id, fleet_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registration, state, ac_name, status, fleet_id, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getFleetList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name&lt;br /&gt;
|-&lt;br /&gt;
| getFleetStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getLeasedAircraftList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registraion, state, ac_name, status, fleet_id, fuel, va_id, name, expire&lt;br /&gt;
|- &lt;br /&gt;
| getPeriodFleetStats&lt;br /&gt;
| va_id, from_ts, to_ts&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Airport Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirportData&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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&lt;br /&gt;
|-&lt;br /&gt;
| getAirportList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| icao, name, city, country, fuel, lat, lon&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Airline Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirlineData&lt;br /&gt;
| va_id, id (=va_id)&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, base, code, budget, homepage, logo_l, logo_s, price (deprecated, will be removed in next release), reputation, pilotcharge, multiplier, mission&lt;br /&gt;
|-&lt;br /&gt;
| getAirlineStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, pax, cargo_kg&lt;br /&gt;
|-&lt;br /&gt;
| getCountryStats&lt;br /&gt;
| va_id, country&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| va_name, id, flights, rating hours, profit, distance, last, fuel_used, pax, cargo_kg&lt;br /&gt;
|- &lt;br /&gt;
| getRankList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, short, settings, pilots, aircrafts, fleet, flights, partnerships, advertisements, fleet_id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Financial Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getLast10Transactions&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| ts, value, reason&lt;br /&gt;
|-&lt;br /&gt;
| getNegTransactionSums&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| value, reason&lt;br /&gt;
|-&lt;br /&gt;
| getPosTransactionSums&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| value, reason&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Flight Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters in brackets are optional&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getActiveFlights&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| departure, arrival, passengers, cargo, user_id, ac_id, flightstate, timestamp, number, lon, lat, pax_economy, pax_business, pax_first&lt;br /&gt;
|-&lt;br /&gt;
| getBookedFlights&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| departure, arrival, passengers, cargo, user_id, ac_id, number, pax_economy, pax_business, pax_first&lt;br /&gt;
|-&lt;br /&gt;
| getFlightReports&lt;br /&gt;
| va_id, (acdb_id), (ac_id), (pilot_id), (days), (count)&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;pax_economy, pax_business, pax_first&amp;lt;/span&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
| getReportDetail&lt;br /&gt;
| va_id, report_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;vs, pax_economy, pax_business, pax_first, ticket_business, ticket_first, fuel_start, fuel_dep, fuel_takeoff, fuel_land, fuel_finish, ticket_factor, interface, simversion, os&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| getRouteData&lt;br /&gt;
| va_id, route_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, va_id, cs_vaid, number, dep, arr, deptime, arrtime, simrate, days, price, state, flighttype, acdb_list, ac_id, remarks, route, limit_pax, limit_cargo&lt;br /&gt;
|-&lt;br /&gt;
| getRouteList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, number, dep, dep_country, arr, arr_country, deptime, arrtime, simrate, days, price, state, flighttype, acdb_list, ac_id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Pilot Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getPeriodPilotStats&lt;br /&gt;
| va_id, from_ts, to_ts&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getPilotData&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, surname, user, va_user, rank_id, location, budget, lastactive, active, sigac, timezone, weightunit, language, msgmail, rank, flights, rating, hours, distance, pax, cargo_kg, picture&lt;br /&gt;
|-&lt;br /&gt;
| getPilotHours&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao, hours&lt;br /&gt;
|-&lt;br /&gt;
| getPilotList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, surname, user, va_user, rank_id, location, last_active, status, budget&lt;br /&gt;
|-&lt;br /&gt;
| getPilotRatings&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, training, manufacturer, type&lt;br /&gt;
|-&lt;br /&gt;
| getPilotStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getPilotStatus&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| ac_id, route_id, departure, arrival, dep_time, dist, duration, status, lon, lat, flightstate, passengers, income, ticket, timestamp, cargo, multiplier, flighttype&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Flight Booking===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| bookFlight&lt;br /&gt;
| va_id, pilot_id, passwd, route_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| success, message, codeshare, codeshare_msg&lt;br /&gt;
|-&lt;br /&gt;
| cancelFlight&lt;br /&gt;
| va_id, pilot_id, passwd&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| result, loss&lt;br /&gt;
|-&lt;br /&gt;
| getBookableRoutes&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| number, dep, arr, deptime, arrtime, id, state, simrate, flighttype, training, price, list, ac_id&lt;br /&gt;
|-&lt;br /&gt;
| getBookableAircraft&lt;br /&gt;
| va_id, pilot_id, route_id&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| type, registration, state, id, name, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getBookStatus&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| status&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Miscellaneous User Functions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| createAccount&lt;br /&gt;
| va_id, givenname, surname, username, email, password, airport, accept_pp&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| success, message, code&lt;br /&gt;
|-&lt;br /&gt;
| getPilotID&lt;br /&gt;
| va_id, user, passwd&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id&lt;br /&gt;
|-&lt;br /&gt;
| getPrivacyPolicy&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS&lt;br /&gt;
| policy&lt;br /&gt;
|-&lt;br /&gt;
| getTransferCost&lt;br /&gt;
| va_id, arr, dep&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| cost&lt;br /&gt;
|-&lt;br /&gt;
| transferPilot&lt;br /&gt;
| va_id, pilot_id, passwd, icao&lt;br /&gt;
| SUCCESS, NOT FOUND, INSUFFICIENT FUNDS&lt;br /&gt;
| cost&lt;br /&gt;
|- &lt;br /&gt;
| getDistance&lt;br /&gt;
| va_id, icao_from, icao_to&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| distance&lt;br /&gt;
|- &lt;br /&gt;
| getMetar&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| metar&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Requested additional functions===&lt;br /&gt;
The following list contains all the functions which were requested by users but aren&#039;t implemented yet.&lt;br /&gt;
*Create, edit and delete routes&lt;/div&gt;</summary>
		<author><name>Joefremont</name></author>
	</entry>
	<entry>
		<id>https://wiki4.fsairlines.net/index.php?title=XML-Interface-v2&amp;diff=3304</id>
		<title>XML-Interface-v2</title>
		<link rel="alternate" type="text/html" href="https://wiki4.fsairlines.net/index.php?title=XML-Interface-v2&amp;diff=3304"/>
		<updated>2023-07-06T23:37:59Z</updated>

		<summary type="html">&lt;p&gt;Joefremont: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The XML-Interface is the core of the [[VA Integration Kit]]. It has been designed to give VA Administrators with the knowledge of dynamic web techniques the possibility to create their own layout and perfectly integrate the information into their own website using data from FSAirlines. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;This version of the XML interface is now released as official.&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Changes from the previous version==&lt;br /&gt;
Compared to the previous version of the XML-Interface the following change were made.&lt;br /&gt;
* Change from domain registration to API keys.&lt;br /&gt;
* Rate limits added.&lt;br /&gt;
* Json output format added.&lt;br /&gt;
* Output properly supports UTF-8 character set.&lt;br /&gt;
* Additional functions for packages added.&lt;br /&gt;
&lt;br /&gt;
==Rate limits==&lt;br /&gt;
The access to the interface is limited by the number of calls an VA can make each hour and each day.  An airline with a gold account can make 100 calls each hour and 1200 call each day. An airline with a platinum account can make 500 calls each hour and 6000 call each day. If an airline has multiple members then those limits are added together for each premium account.  Example if an airline has one platinum member and two gold member there limits are 700 an hour and 8400 per day.  Functions related to pilots booking flights do not count against the rate limits.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Access Restriction==&lt;br /&gt;
In order to be able to access data from the Data-Interface you need to create an API key, this can be done using the &#039;Api Key Management&#039; page.  To find this page on the website go to your VA Overview page and then in the options select &#039;Edit VA Settings&#039; and then &#039;Api Key Management&#039;.  &lt;br /&gt;
&lt;br /&gt;
There are two types of API keys that can be created.&lt;br /&gt;
&lt;br /&gt;
Site key:  This key is to be used by your main website/service and may be use the full rate limit allowed by your VA.  After one hundred calls using a site api key, the key will be locked to the IP address used.  If in the future you need to change the IP address all you need to do is delete the old key and create a new one.&lt;br /&gt;
&lt;br /&gt;
Developer key:  This key is used to help you create and test your website on a different machine than your main site.  It will not be limited to a single IP address but will be limited to the number of calls each day your VA is normally allowed each hour.   Usage of the developer key does apply against your VA&#039;s total rate limit.&lt;br /&gt;
&lt;br /&gt;
==Basic Usage==&lt;br /&gt;
The data can be received using HTTP calls to the interface script and add the desired function to the parameters. Here is an example request:&lt;br /&gt;
&amp;lt;pre&amp;gt;http://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;apikey=xxxxx&amp;lt;/pre&amp;gt;&lt;br /&gt;
As you can see there is the interface script &#039;&#039;va_interface.php&#039;&#039;, the function &#039;&#039;getPilotList&#039;&#039; and the parameters &#039;&#039;va_id=7&#039;&#039; and &#039;&#039;apikey=xxxxx&#039;&#039;. Some functions require additional parameters, these can be appended after the other parameters.&lt;br /&gt;
&lt;br /&gt;
The result of the request will be given in xml format with the base-tag being &#039;&#039;&amp;lt;fsa_output&amp;gt;&#039;&#039;. This tag has the attributes &#039;&#039;version&#039;&#039; and &#039;&#039;success&#039;&#039; which show the version number of the interface and if the request succeeded or not. In case of a failure the &#039;&#039;success&#039;&#039;-attribute shows the error message. The following example shows the return text of the above function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;fsa_output version=&amp;quot;1.0&amp;quot; success=&amp;quot;SUCCESS&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;data id=&amp;quot;1&amp;quot; name=&amp;quot;Konrad&amp;quot; surname=&amp;quot;Pustka&amp;quot; va_user=&amp;quot;SNA101&amp;quot; location=&amp;quot;EDDM&amp;quot; lastactive=&amp;quot;1287330550&amp;quot; budget=&amp;quot;198144&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;data id=&amp;quot;2&amp;quot; name=&amp;quot;Claudio&amp;quot; surname=&amp;quot;Gusmini&amp;quot; va_user=&amp;quot;SNA102&amp;quot; location=&amp;quot;EDDM&amp;quot; lastactive=&amp;quot;1286366261&amp;quot; budget=&amp;quot;216405101&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/fsa_output&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Inside the &#039;&#039;fsa_output&#039;&#039;-tag there are the &#039;&#039;data&#039;&#039;-tags which contain all the information.  &lt;br /&gt;
&lt;br /&gt;
When calling using this method the default output format is XML, you can get the out in JSON format by adding a format=json parameter to the request. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxx&amp;lt;/pre&amp;gt;&lt;br /&gt;
The output will be:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;status&amp;quot;: &amp;quot;SUCCESS&amp;quot;,&lt;br /&gt;
    &amp;quot;data&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;id&amp;quot;: 1,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Konrad&amp;quot;,&lt;br /&gt;
            &amp;quot;surname&amp;quot;: &amp;quot;Pustka&amp;quot;,&lt;br /&gt;
            &amp;quot;va_user&amp;quot;: &amp;quot;SNA101&amp;quot;,&lt;br /&gt;
            &amp;quot;location&amp;quot;: &amp;quot;ETSE&amp;quot;,&lt;br /&gt;
            &amp;quot;lastactive&amp;quot;: 1600285079,&lt;br /&gt;
            &amp;quot;budget&amp;quot;: 2400628&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;id&amp;quot;: 2,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Claudio&amp;quot;,&lt;br /&gt;
            &amp;quot;surname&amp;quot;: &amp;quot;Gusmini&amp;quot;,&lt;br /&gt;
            &amp;quot;va_user&amp;quot;: &amp;quot;SNA102&amp;quot;,&lt;br /&gt;
            &amp;quot;location&amp;quot;: &amp;quot;LIMG&amp;quot;,&lt;br /&gt;
            &amp;quot;lastactive&amp;quot;: 1605458811,&lt;br /&gt;
            &amp;quot;budget&amp;quot;: 216631042&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you need something to get started here&#039;s a small example PHP-script showing a list of your pilots&#039; names. Just replace the va_id by your own.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
  $ch = curl_init(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;);&lt;br /&gt;
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
  $http_status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);&lt;br /&gt;
  $http_text = curl_exec($ch);&lt;br /&gt;
&lt;br /&gt;
  $objDOM = new DOMDocument();&lt;br /&gt;
  $objDOM-&amp;gt;loadXML($http_text);&lt;br /&gt;
&lt;br /&gt;
  $dataNodes = $objDOM-&amp;gt;getElementsByTagName(&amp;quot;data&amp;quot;);&lt;br /&gt;
  foreach( $dataNodes as $node )&lt;br /&gt;
  {&lt;br /&gt;
    $name = $node-&amp;gt;getAttribute(&amp;quot;name&amp;quot;);&lt;br /&gt;
    $surname = $node-&amp;gt;getAttribute(&amp;quot;surname&amp;quot;);&lt;br /&gt;
    echo &amp;quot;{$name} {$surname} &amp;lt;br/&amp;gt;&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here is a sample of a PHP script reading the same data in JSON format.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
    $ch = curl_init(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;);&lt;br /&gt;
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
    $http_status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);&lt;br /&gt;
    $http_text = curl_exec($ch);&lt;br /&gt;
    $json_data = json_decode($http_text, true);&lt;br /&gt;
    if ($json_data[&#039;status&#039;] == &#039;SUCCESS&#039;) {&lt;br /&gt;
        foreach($json_data[&#039;data&#039;] as $node) {&lt;br /&gt;
            echo &amp;quot;{$node[&#039;name&#039;]} {$node[&#039;surname&#039;]}&amp;lt;br/&amp;gt;\n&amp;quot;;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a sample of a Python script reading the same data in json format.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    #!/usr/bin/python&lt;br /&gt;
    import requests&lt;br /&gt;
&lt;br /&gt;
    r = requests.get(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;)&lt;br /&gt;
    json_data = r.json()&lt;br /&gt;
    if json_data[&#039;status&#039;] == &#039;SUCCESS&#039;:&lt;br /&gt;
        for node in json_data[&#039;data&#039;]:&lt;br /&gt;
            print(&#039;{} {}&#039;.format(node[&#039;name&#039;], node[&#039;surname&#039;])&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==Pilot Login==&lt;br /&gt;
Several of the functions require that the pilot calling be logged in.  Previous versions of the interface required the call passed the pilots username and a hashed password as parameters.  That method has now been discontinued, in this version you will need to call the &#039;&#039;pilotLogin&#039;&#039; to create a token that can be used to call functions for that pilot.  Unlike other calls in the interface, the &#039;&#039;pilotLogin&#039;&#039; function is also a HTTP POST call rather than a GET call.  Here is an example of calling the &#039;&#039;pilotLogin&#039;&#039; function.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
$post = [&lt;br /&gt;
    &#039;user&#039; =&amp;gt; &#039;username&#039;,&lt;br /&gt;
    &#039;password&#039; =&amp;gt; &#039;xxxxxxxx&#039;&lt;br /&gt;
];&lt;br /&gt;
&lt;br /&gt;
$ch = curl_init(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=pilotLogin&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;);&lt;br /&gt;
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);&lt;br /&gt;
&lt;br /&gt;
$http_text = curl_exec($ch);&lt;br /&gt;
$data = json_decode($http_text, true);&lt;br /&gt;
&lt;br /&gt;
if ($data[&#039;status&#039;] == &#039;SUCCESS&#039;) {&lt;br /&gt;
    $fsa_token = $data[&#039;data&#039;][&#039;token&#039;];&lt;br /&gt;
} else {&lt;br /&gt;
    die(&amp;quot;Login failed&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The data returned in this request includes:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| token&lt;br /&gt;
| The pilots login token.&lt;br /&gt;
|-&lt;br /&gt;
| alt_code&lt;br /&gt;
| The alternate ICAO code of the airport they are currently located based on there default simulator.&lt;br /&gt;
|-&lt;br /&gt;
| budget&lt;br /&gt;
| The pilots current budget&lt;br /&gt;
|-&lt;br /&gt;
| default_sim&lt;br /&gt;
| The pilots default simulator.&lt;br /&gt;
|-&lt;br /&gt;
| location&lt;br /&gt;
| The FSA offical ICAO code of the airport the pilot is located.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| The pilots first name&lt;br /&gt;
|-&lt;br /&gt;
| pilot_id&lt;br /&gt;
| The id number of the pilot.&lt;br /&gt;
|-&lt;br /&gt;
| premium&lt;br /&gt;
| 1 of the pilot is a premium member, 0 if not.&lt;br /&gt;
|-&lt;br /&gt;
| rank&lt;br /&gt;
| The code for the pilots rank within their VA&lt;br /&gt;
|-&lt;br /&gt;
| rank_id&lt;br /&gt;
| The id of the pilots rank within their VA&lt;br /&gt;
|-&lt;br /&gt;
| surname&lt;br /&gt;
| The pilots last or given name &lt;br /&gt;
|-&lt;br /&gt;
| va_id&lt;br /&gt;
| The ID of the pilots VA&lt;br /&gt;
|-&lt;br /&gt;
| va_status&lt;br /&gt;
| The pilots within there airline&lt;br /&gt;
|-&lt;br /&gt;
| va_user&lt;br /&gt;
| The pilots ID within their VA.&lt;br /&gt;
|-&lt;br /&gt;
| weightunit&lt;br /&gt;
| The pilots default unit of measure (kg or lb).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Data==&lt;br /&gt;
The following section contains a detailed list of all the request-functions with their return values. Lately added options are marked &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;green&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Parameters===&lt;br /&gt;
All the request functions use parameters which need to be appended. The following table shows all the parameters and their meaning.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter&lt;br /&gt;
! Meaning&lt;br /&gt;
|- &lt;br /&gt;
| ac_id&lt;br /&gt;
| ID of the aircraft. Is part of the data received from other functions (e.g. getAircraftList).&lt;br /&gt;
|-&lt;br /&gt;
| accept_pp&lt;br /&gt;
| Must be set &#039;1&#039; if Privacy Policy is accepted.&lt;br /&gt;
|-&lt;br /&gt;
| acdb_id&lt;br /&gt;
| ID of the aircraft type. Is part of the data received from other functions (e.g. getAircraftList).&lt;br /&gt;
|-&lt;br /&gt;
| airport&lt;br /&gt;
| Starting airport. Where the user should be placed first.&lt;br /&gt;
|-&lt;br /&gt;
| arr&lt;br /&gt;
| ICAO code of the arrival airport.&lt;br /&gt;
|-&lt;br /&gt;
| count&lt;br /&gt;
| Number past flights which should be displayed.&lt;br /&gt;
|-&lt;br /&gt;
| country&lt;br /&gt;
| Name of the country. &lt;br /&gt;
|-&lt;br /&gt;
| days&lt;br /&gt;
| Number of past days from now which should be displayed.&lt;br /&gt;
|-&lt;br /&gt;
| dep&lt;br /&gt;
| ICAO code of the departure airport.&lt;br /&gt;
|-&lt;br /&gt;
| email&lt;br /&gt;
| E-Mail of the user.&lt;br /&gt;
|-&lt;br /&gt;
| fleet_id&lt;br /&gt;
| ID of the fleet. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| from_ts&lt;br /&gt;
| UNIX timestamp of the date where the listing should start.&lt;br /&gt;
|-&lt;br /&gt;
| givenname&lt;br /&gt;
| Given name of the user.&lt;br /&gt;
|-&lt;br /&gt;
| icao&lt;br /&gt;
| ICAO code of the airport.&lt;br /&gt;
|-&lt;br /&gt;
| pilot_id&lt;br /&gt;
| ID of the pilot. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| report_id&lt;br /&gt;
| ID of the report. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| surname&lt;br /&gt;
| Surname of the user.&lt;br /&gt;
|-&lt;br /&gt;
| to_ts&lt;br /&gt;
| UNIX timestamp of the date where the listing should end.&lt;br /&gt;
|-&lt;br /&gt;
| user&lt;br /&gt;
| Username of the pilot.&lt;br /&gt;
|-&lt;br /&gt;
| token&lt;br /&gt;
| Login token created by the pilotLogin function.&lt;br /&gt;
|-&lt;br /&gt;
| va_id&lt;br /&gt;
| ID of the [[Virtual Airline]]. Is displayed on the [[Overview]] page.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Aircraft Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftData&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, pax_economy, pax_business, pax_first, config_name&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftDBData&lt;br /&gt;
| va_id, acdb_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao, passengers, price, fuel, dow, mtow, speed, engines, cargo, mzfw, market_only, range&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftDBList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registration, state, ac_name, status, fleet_id, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftStats&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| flights, hours, distance&lt;br /&gt;
|-&lt;br /&gt;
| getFleetAircraftList&lt;br /&gt;
| va_id, fleet_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registration, state, ac_name, status, fleet_id, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getFleetList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name&lt;br /&gt;
|-&lt;br /&gt;
| getFleetStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getLeasedAircraftList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registraion, state, ac_name, status, fleet_id, fuel, va_id, name, expire&lt;br /&gt;
|- &lt;br /&gt;
| getPeriodFleetStats&lt;br /&gt;
| va_id, from_ts, to_ts&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Airport Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirportData&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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&lt;br /&gt;
|-&lt;br /&gt;
| getAirportList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| icao, name, city, country, fuel, lat, lon&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Airline Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirlineData&lt;br /&gt;
| va_id, id (=va_id)&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, base, code, budget, homepage, logo_l, logo_s, price (deprecated, will be removed in next release), reputation, pilotcharge, multiplier, mission&lt;br /&gt;
|-&lt;br /&gt;
| getAirlineStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, pax, cargo_kg&lt;br /&gt;
|-&lt;br /&gt;
| getCountryStats&lt;br /&gt;
| va_id, country&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| va_name, id, flights, rating hours, profit, distance, last, fuel_used, pax, cargo_kg&lt;br /&gt;
|- &lt;br /&gt;
| getRankList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, short, settings, pilots, aircrafts, fleet, flights, partnerships, advertisements, fleet_id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Financial Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getLast10Transactions&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| ts, value, reason&lt;br /&gt;
|-&lt;br /&gt;
| getNegTransactionSums&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| value, reason&lt;br /&gt;
|-&lt;br /&gt;
| getPosTransactionSums&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| value, reason&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Flight Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters in brackets are optional&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getActiveFlights&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| departure, arrival, passengers, cargo, user_id, ac_id, flightstate, timestamp, number, lon, lat, pax_economy, pax_business, pax_first&lt;br /&gt;
|-&lt;br /&gt;
| getBookedFlights&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| departure, arrival, passengers, cargo, user_id, ac_id, number, pax_economy, pax_business, pax_first&lt;br /&gt;
|-&lt;br /&gt;
| getFlightReports&lt;br /&gt;
| va_id, (acdb_id), (ac_id), (pilot_id), (days), (count)&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;pax_economy, pax_business, pax_first&amp;lt;/span&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
| getReportDetail&lt;br /&gt;
| va_id, report_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;vs, pax_economy, pax_business, pax_first, ticket_business, ticket_first, fuel_start, fuel_dep, fuel_takeoff, fuel_land, fuel_finish, ticket_factor, interface, simversion, os&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| getRouteData&lt;br /&gt;
| va_id, route_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, va_id, cs_vaid, number, dep, arr, deptime, arrtime, simrate, days, price, state, flighttype, acdb_list, ac_id, remarks, route, limit_pax, limit_cargo&lt;br /&gt;
|-&lt;br /&gt;
| getRouteList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, number, dep, dep_country, arr, arr_country, deptime, arrtime, simrate, days, price, state, flighttype, acdb_list, ac_id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Pilot Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getPeriodPilotStats&lt;br /&gt;
| va_id, from_ts, to_ts&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getPilotData&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, surname, user, va_user, rank_id, location, budget, lastactive, active, sigac, timezone, weightunit, language, msgmail, rank, flights, rating, hours, distance, pax, cargo_kg, picture&lt;br /&gt;
|-&lt;br /&gt;
| getPilotHours&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao, hours&lt;br /&gt;
|-&lt;br /&gt;
| getPilotList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, surname, user, va_user, rank_id, location, last_active, status, budget&lt;br /&gt;
|-&lt;br /&gt;
| getPilotRatings&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, training, manufacturer, type&lt;br /&gt;
|-&lt;br /&gt;
| getPilotStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getPilotStatus&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| ac_id, route_id, departure, arrival, dep_time, dist, duration, status, lon, lat, flightstate, passengers, income, ticket, timestamp, cargo, multiplier, flighttype&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Flight Booking===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| bookFlight&lt;br /&gt;
| va_id, pilot_id, token, route_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| success, message, codeshare, codeshare_msg&lt;br /&gt;
|-&lt;br /&gt;
| cancelFlight&lt;br /&gt;
| va_id, pilot_id, token&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| result, loss&lt;br /&gt;
|-&lt;br /&gt;
| getBookableRoutes&lt;br /&gt;
| va_id, pilot_id, token&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| number, dep, arr, deptime, arrtime, id, state, simrate, flighttype, training, price, list, ac_id&lt;br /&gt;
|-&lt;br /&gt;
| getBookableAircraft&lt;br /&gt;
| va_id, pilot_id, route_id, token&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| type, registration, state, id, name, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getBookStatus&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| status&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Miscellaneous User Functions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| createAccount&lt;br /&gt;
| va_id, givenname, surname, username, email, password, airport, accept_pp&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| success, message, code&lt;br /&gt;
|-&lt;br /&gt;
| getPilotID&lt;br /&gt;
| va_id, user, token&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id&lt;br /&gt;
|-&lt;br /&gt;
| getPrivacyPolicy&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS&lt;br /&gt;
| policy&lt;br /&gt;
|-&lt;br /&gt;
| getTransferCost&lt;br /&gt;
| va_id, arr, dep&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| cost&lt;br /&gt;
|-&lt;br /&gt;
| transferPilot&lt;br /&gt;
| va_id, pilot_id, token, icao&lt;br /&gt;
| SUCCESS, NOT FOUND, INSUFFICIENT FUNDS&lt;br /&gt;
| cost&lt;br /&gt;
|- &lt;br /&gt;
| getDistance&lt;br /&gt;
| va_id, icao_from, icao_to&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| distance&lt;br /&gt;
|- &lt;br /&gt;
| getMetar&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| metar&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Package Functions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirportPackageSummary&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| getVaPackageSummary&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| getAircraftPackages&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| getCenterPackages&lt;br /&gt;
| va_id, center_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Sample Responses&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getAirportPackageSummary&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;status&amp;quot;: &amp;quot;SUCCESS&amp;quot;,&lt;br /&gt;
    &amp;quot;data&amp;quot;: {&lt;br /&gt;
        &amp;quot;arr&amp;quot;: {&lt;br /&gt;
            &amp;quot;EDDK&amp;quot;: {&lt;br /&gt;
                &amp;quot;100000&amp;quot;: 1,&lt;br /&gt;
                &amp;quot;200&amp;quot;: 12,&lt;br /&gt;
                &amp;quot;2000&amp;quot;: 2,&lt;br /&gt;
                &amp;quot;bearing&amp;quot;: 29.528874983699,&lt;br /&gt;
                &amp;quot;city&amp;quot;: &amp;quot;Cologne-Bonn&amp;quot;,&lt;br /&gt;
                &amp;quot;distance&amp;quot;: 4872.3920956341,&lt;br /&gt;
                &amp;quot;total_kg&amp;quot;: 106400&lt;br /&gt;
            },&lt;br /&gt;
            &amp;quot;KBFL&amp;quot;: {&lt;br /&gt;
                &amp;quot;200&amp;quot;: 16,&lt;br /&gt;
                &amp;quot;40&amp;quot;: 310,&lt;br /&gt;
                &amp;quot;bearing&amp;quot;: 128.34209940912,&lt;br /&gt;
                &amp;quot;city&amp;quot;: &amp;quot;Bakersfield&amp;quot;,&lt;br /&gt;
                &amp;quot;distance&amp;quot;: 207.19199031933,&lt;br /&gt;
                &amp;quot;total_kg&amp;quot;: 15600&lt;br /&gt;
            },&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getVaPackageSummary&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;status&amp;quot;: &amp;quot;SUCCESS&amp;quot;,&lt;br /&gt;
    &amp;quot;data&amp;quot;: {&lt;br /&gt;
        &amp;quot;aircraft&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;ac_id&amp;quot;: 129691,&lt;br /&gt;
                &amp;quot;earliest_ts&amp;quot;: 1622293737,&lt;br /&gt;
                &amp;quot;location&amp;quot;: &amp;quot;EDDF&amp;quot;,&lt;br /&gt;
                &amp;quot;packages&amp;quot;: 13,&lt;br /&gt;
                &amp;quot;registration&amp;quot;: &amp;quot;D-AOGT&amp;quot;,&lt;br /&gt;
                &amp;quot;size_kg&amp;quot;: 26000&lt;br /&gt;
            }&lt;br /&gt;
        ],&lt;br /&gt;
        &amp;quot;centers&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;center_id&amp;quot;: 4347,&lt;br /&gt;
                &amp;quot;description&amp;quot;: &amp;quot;Himalayan Transport&amp;quot;,&lt;br /&gt;
                &amp;quot;earliest_ts&amp;quot;: 1621459008,&lt;br /&gt;
                &amp;quot;location&amp;quot;: &amp;quot;VNKT&amp;quot;,&lt;br /&gt;
                &amp;quot;packages&amp;quot;: 82,&lt;br /&gt;
                &amp;quot;size_kg&amp;quot;: 4080&lt;br /&gt;
            }&lt;br /&gt;
        ]&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Response Values&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;earliest_ts: The timestamp the of the oldest package in that aircraft/center&lt;br /&gt;
&amp;lt;li&amp;gt;packages: The count of packages stored&lt;br /&gt;
&amp;lt;li&amp;gt;size_kg: The total weight in kg of the packages stored.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getAircraftPackages&#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;getCenterPackages&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;status&amp;quot;: &amp;quot;SUCCESS&amp;quot;,&lt;br /&gt;
    &amp;quot;data&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;ac_id&amp;quot;: 129691,&lt;br /&gt;
            &amp;quot;arr&amp;quot;: &amp;quot;SBGL&amp;quot;,&lt;br /&gt;
            &amp;quot;arr_city&amp;quot;: &amp;quot;Rio De Janeiro&amp;quot;,&lt;br /&gt;
            &amp;quot;center_id&amp;quot;: null,&lt;br /&gt;
            &amp;quot;created_ts&amp;quot;: 1620830486,&lt;br /&gt;
            &amp;quot;delivered&amp;quot;: false,&lt;br /&gt;
            &amp;quot;dep&amp;quot;: &amp;quot;EDDF&amp;quot;,&lt;br /&gt;
            &amp;quot;fleet_id&amp;quot;: 72303,&lt;br /&gt;
            &amp;quot;id&amp;quot;: 302216085,&lt;br /&gt;
            &amp;quot;location&amp;quot;: &amp;quot;EDDF&amp;quot;,&lt;br /&gt;
            &amp;quot;mult&amp;quot;: 10,&lt;br /&gt;
            &amp;quot;package_type&amp;quot;: 0,&lt;br /&gt;
            &amp;quot;payment&amp;quot;: 59281,&lt;br /&gt;
            &amp;quot;payment_fact&amp;quot;: null,&lt;br /&gt;
            &amp;quot;pilot_id&amp;quot;: 98096,&lt;br /&gt;
            &amp;quot;size_kg&amp;quot;: 2000,&lt;br /&gt;
            &amp;quot;start_ts&amp;quot;: 1622293737,&lt;br /&gt;
            &amp;quot;updated_ts&amp;quot;: 1620830486&lt;br /&gt;
        },&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Response Values&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ac_id: The id of the aircraft holding the package&lt;br /&gt;
&amp;lt;li&amp;gt;arr: The ICAO of the destination airport&lt;br /&gt;
&amp;lt;li&amp;gt;arr_city: The city name of the destination airport&lt;br /&gt;
&amp;lt;li&amp;gt;center_id: The id center holding the aircraft&lt;br /&gt;
&amp;lt;li&amp;gt;created_ts: The unix timestamp of the the package was created.&lt;br /&gt;
&amp;lt;li&amp;gt;dep: The ICAO of the origin airport&lt;br /&gt;
&amp;lt;li&amp;gt;fleet_id: The fleet that picked up the package&lt;br /&gt;
&amp;lt;li&amp;gt;location: The airport the package is currently located&lt;br /&gt;
&amp;lt;li&amp;gt;mult: The VA financial multiplier when the package was picked up&lt;br /&gt;
&amp;lt;li&amp;gt;package_type: 0 for normal, 1 for priority&lt;br /&gt;
&amp;lt;li&amp;gt;payment: The base payment for when the package was created.&lt;br /&gt;
&amp;lt;li&amp;gt;pilot_id: The ID of the pilot who picked up the package.&lt;br /&gt;
&amp;lt;li&amp;gt;size_kg: The size in kg of the package&lt;br /&gt;
&amp;lt;li&amp;gt;start_ts: The unix timestamp of when the package was picked up.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Requested additional functions===&lt;br /&gt;
The following list contains all the functions which were requested by users but aren&#039;t implemented yet.&lt;br /&gt;
*Create, edit and delete routes&lt;/div&gt;</summary>
		<author><name>Joefremont</name></author>
	</entry>
	<entry>
		<id>https://wiki4.fsairlines.net/index.php?title=VA_Integration_Kit&amp;diff=3303</id>
		<title>VA Integration Kit</title>
		<link rel="alternate" type="text/html" href="https://wiki4.fsairlines.net/index.php?title=VA_Integration_Kit&amp;diff=3303"/>
		<updated>2023-04-28T19:16:20Z</updated>

		<summary type="html">&lt;p&gt;Joefremont: /* Developer Account */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The VA Integration Kit enables [[Virtual Airlines]] to integrate FSAirlines into their own website. Using the Kit they can display nearly any kind of data from FSAirlines live on their site or even offer pilots to do some basic tasks without having to visit the FSAirlines website.&lt;br /&gt;
&lt;br /&gt;
==[[XML-Interface-v2]]==&lt;br /&gt;
The core of the Integration Kit is the [[XML-Interface-v2]]. It has been designed to give VA Administrators with the knowledge of advanced web techniques the possibility to create their own layout and perfectly integrate the data into their own website.&lt;br /&gt;
&lt;br /&gt;
You can use this link to view the previous version of the [[XML-Interface]].&lt;br /&gt;
&lt;br /&gt;
==[[:Category:Website Integration Packs|Website Integration Packs]]==&lt;br /&gt;
Building up on the XML-Interface FSAirlines offers a ready to use Integration Pack consisting of several HTML pages which can be easily integrated into any VA website. This Integration Pack is Open-Source and can be improved or enhanced by anybody. Everybody who made a completely different Integration Pack is also encouraged to put a link on the [[:Category:Website Integration Packs|Integration Packs]] site.&lt;br /&gt;
&lt;br /&gt;
==Help==&lt;br /&gt;
For more help, information or feature requests please ask in the Integration Kit section of the [http://www.fsairlines.net/forum/viewforum.php?f=72 FSAirlines forums].&lt;/div&gt;</summary>
		<author><name>Joefremont</name></author>
	</entry>
	<entry>
		<id>https://wiki4.fsairlines.net/index.php?title=Official_FSAirlines_Integration_Pack&amp;diff=3302</id>
		<title>Official FSAirlines Integration Pack</title>
		<link rel="alternate" type="text/html" href="https://wiki4.fsairlines.net/index.php?title=Official_FSAirlines_Integration_Pack&amp;diff=3302"/>
		<updated>2022-06-22T15:30:29Z</updated>

		<summary type="html">&lt;p&gt;Joefremont: /* Pages */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Website Integration Packs]]&lt;br /&gt;
{{Infobox integration pack&lt;br /&gt;
|Version=1.0&lt;br /&gt;
|Date=September 9th, 2010&lt;br /&gt;
|Developers=[[User:Konny|Konny]]&lt;br /&gt;
Joe&lt;br /&gt;
|Svn path=/trunk&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==How to use==&lt;br /&gt;
The Integration Pack has been designed for easy integration into any website. There are no special requirements to the webserver. The easiest way to get the data into your own website is by using the [http://www.w3schools.com/TAGS/tag_iframe.asp &amp;lt;iframe&amp;gt;] HTML-Tag. Here&#039;s an example HTML-code:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;iframe width=&amp;quot;600&amp;quot; height=&amp;quot;500&amp;quot; src=&amp;quot;http://remote.fsairlines.net/v1/roster.php?rvi=368&amp;amp;title=off&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;p&amp;gt;Your browser does not support iframes.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/iframe&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
The &#039;&#039;src=&amp;quot;...&amp;quot;&#039;&#039; part determines which data is shown. Just copy the required url from the list of [[#Pages|pages]]. There are several [[#Parameters|parameters]] which can be appended to the url. These can be used to change for example the language or the color of the included page. The &#039;&#039;rvi=xxxx&#039;&#039; parameter is mandatory and has to be changed to the [[Virtual Airline Overview|ID]] of your own Virtual Airline. All other parameters have to be added with a leading &#039;&amp;amp;&#039; just like the &#039;&amp;amp;title=off&#039; in the example.&lt;br /&gt;
&lt;br /&gt;
==For developers==&lt;br /&gt;
The FSAirlines Integration Pack is Open-Source, so everybody with a [[VA Integration Kit#Developer Account|developers account]] can enhance and improve the scripts. All the files are located in the trunk folder of the FSAirlines Subversion repository. We will review all the changes and from time to time publish the current revision under a new version number. You&#039;re welcome to implement anything you think is useful, but please stick to the following rules:&lt;br /&gt;
*Please don&#039;t do massive layout changes. If you want a completely different look please create a new branch, maybe you can convince us and we will merge it with the Official Integration Pack.&lt;br /&gt;
*Please don&#039;t remove any functionality. You&#039;re free to extend the scripts, but if you feel like there should be a page with less information, please create a new one.&lt;br /&gt;
*Don&#039;t use function calls to the [[XML-Interface]] in loops. If you need a different data set, please ask the developers to add a function for that to the [[XML-Interface]].&lt;br /&gt;
*Always keep record of your changes on this wiki page.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
Here is a list of all the parameters which are currently supported.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| &#039;&#039;&#039;rvi=XXX&#039;&#039;&#039;	&lt;br /&gt;
| &#039;&#039;&#039;Virtual Airline ID number (mandatory)&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| lng=XX	&lt;br /&gt;
| Language translation (Coming Soon)&lt;br /&gt;
|-&lt;br /&gt;
| title=off	&lt;br /&gt;
| Hide the title of the pages&lt;br /&gt;
|-&lt;br /&gt;
| hub=XXXX	&lt;br /&gt;
| Four letter ICAO code, used by Timetable to show flights to and from the selected airport&lt;br /&gt;
|-&lt;br /&gt;
| cli=XXXXXX	&lt;br /&gt;
| Link Color, Six letter HTML Color code&lt;br /&gt;
|-&lt;br /&gt;
| clv=XXXXXX	&lt;br /&gt;
| Visited Link Color, Six letter HTML Color code&lt;br /&gt;
|-&lt;br /&gt;
| clh=XXXXXX	&lt;br /&gt;
| Hover Link Color, Six letter HTML Color code&lt;br /&gt;
|-&lt;br /&gt;
| textcol=XXXXXX	&lt;br /&gt;
| Text Color, Six letter HTML Color code&lt;br /&gt;
|-&lt;br /&gt;
| tblcol=XXXXXX	&lt;br /&gt;
| Table Heading Background Color, Six letter HTML Color code&lt;br /&gt;
|-&lt;br /&gt;
| tbltextcol=XXXXXX	&lt;br /&gt;
| Table Heading Text Color, Six letter HTML Color code&lt;br /&gt;
|-&lt;br /&gt;
| row1=XXXXXX	&lt;br /&gt;
| Data Row 1 Color, Six letter HTML Color code&lt;br /&gt;
|-&lt;br /&gt;
| row2=XXXXXX	&lt;br /&gt;
| Data Row 2 Color, Six letter HTML Color code&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Pages==&lt;br /&gt;
The following table shows all the pages which you can include in your own VA website.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| Roster	&lt;br /&gt;
| https://remote.fsairlines.net/v1/roster.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Roster ( Alternate )	&lt;br /&gt;
| https://remote.fsairlines.net/v1/roster_2.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Fleet	&lt;br /&gt;
| https://remote.fsairlines.net/v1/fleet.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Fleet ( Alternate )	&lt;br /&gt;
| https://remote.fsairlines.net/v1/fleet_2.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Timetable	&lt;br /&gt;
| https://remote.fsairlines.net/v1/timetable.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Timetable ( Alternate )	&lt;br /&gt;
| https://remote.fsairlines.net/v1/timetable_2.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Flight Reports ( Pireps )	&lt;br /&gt;
| https://remote.fsairlines.net/v1/pireps.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Financial Report	&lt;br /&gt;
| https://remote.fsairlines.net/v1/finance.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Reliability Report	&lt;br /&gt;
| https://remote.fsairlines.net/v1/reliability.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Pilot Stats	&lt;br /&gt;
| https://remote.fsairlines.net/v1/pilotstats.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Monthly Pilot Stats	&lt;br /&gt;
| https://remote.fsairlines.net/v1/mpilotstats.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Fleet Stats	&lt;br /&gt;
| https://remote.fsairlines.net/v1/fleetstats.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Monthly Fleet Stats	&lt;br /&gt;
| https://remote.fsairlines.net/v1/mfleetstats.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Country Stats	&lt;br /&gt;
| https://remote.fsairlines.net/v1/countrystats.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Dispatch Office	&lt;br /&gt;
| https://remote.fsairlines.net/v1/dispatch.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Pilot Registration &amp;amp; Application (*)	&lt;br /&gt;
| https://remote.fsairlines.net/v1/application.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Infobox	&lt;br /&gt;
| https://remote.fsairlines.net/v1/infobox.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Infobox ( Alternate )	&lt;br /&gt;
| https://remote.fsairlines.net/v1/infobox2.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Booked Flights	&lt;br /&gt;
| https://remote.fsairlines.net/v1/flights_booked.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Active Flights	&lt;br /&gt;
| https://remote.fsairlines.net/v1/flights_active.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Active Flights ( Alternate )	&lt;br /&gt;
| https://remote.fsairlines.net/v1/flights_active2.php?rvi=368&lt;br /&gt;
|-&lt;br /&gt;
| Last Flights 	&lt;br /&gt;
| https://remote.fsairlines.net/v1/lastflights.php?rvi=368&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Demos==&lt;br /&gt;
Here can have a look at how the pages of the Integration Pack look like.&lt;br /&gt;
===Basic VA data===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Roster&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/roster.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Roster (Alternate)&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/roster_2.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Fleet&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/fleet.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Fleet (Alternate)&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/fleet_2.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Timetable&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/timetable.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Timetable (Alternate)&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/timetable_2.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Reports===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Flight Reports (PIREPs)&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/pireps.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Financial Report&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/finance.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Reliability Report&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/reliability.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Statistics===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Pilot Stats&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/pilotstats.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Monthly Pilot Stats&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/mpilotstats.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Fleet Stats&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/fleetstats.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Monthly Fleet Stats&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/mfleetstats.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Country Stats&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/countrystats.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Infobox&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/infobox.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Infobo (Alternate)&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/infobox2.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Interactive===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Dispatch Office&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/dispatch.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Pilot Registration &amp;amp; Application&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/application.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Flights===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Booked Flights&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/flights_booked.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Active Flights&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/flights_active.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Active Flights (Alternate)&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/flights_active2.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;NavFrame&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavHead&amp;quot;&amp;gt;Last Flights&amp;lt;/div&amp;gt;&lt;br /&gt;
  &amp;lt;div class=&amp;quot;NavContent&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;anyweb&amp;gt;http://remote.fsairlines.net/v1/lastflights.php?rvi=7&amp;amp;title=off&amp;lt;/anyweb&amp;gt;&lt;br /&gt;
  &amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;/div&gt;</summary>
		<author><name>Joefremont</name></author>
	</entry>
	<entry>
		<id>https://wiki4.fsairlines.net/index.php?title=XML-Interface-v2&amp;diff=3301</id>
		<title>XML-Interface-v2</title>
		<link rel="alternate" type="text/html" href="https://wiki4.fsairlines.net/index.php?title=XML-Interface-v2&amp;diff=3301"/>
		<updated>2021-06-07T20:47:50Z</updated>

		<summary type="html">&lt;p&gt;Joefremont: /* Flight Booking */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The XML-Interface is the core of the [[VA Integration Kit]]. It has been designed to give VA Administrators with the knowledge of dynamic web techniques the possibility to create their own layout and perfectly integrate the information into their own website using data from FSAirlines. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;This version of the XML interface is now released as beta.&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Changes from the previous version==&lt;br /&gt;
Compared to the previous version of the XML-Interface the following change were made.&lt;br /&gt;
* Change from domain registration to API keys.&lt;br /&gt;
* Rate limits added.&lt;br /&gt;
* Json output format added.&lt;br /&gt;
* Output properly supports UTF-8 character set.&lt;br /&gt;
* Additional functions for packages added.&lt;br /&gt;
&lt;br /&gt;
==Rate limits==&lt;br /&gt;
The access to the interface is limited by the number of calls an VA can make each hour and each day.  An airline with a gold account can make 100 calls each hour and 1200 call each day. An airline with a platinum account can make 500 calls each hour and 6000 call each day. If an airline has multiple members then those limits are added together for each premium account.  Example if an airline has one platinum member and two gold member there limits are 700 an hour and 8400 per day.  Functions related to pilots booking flights do not count against the rate limits.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Access Restriction==&lt;br /&gt;
In order to be able to access data from the Data-Interface you need to create an API key, this can be done using the &#039;Api Key Management&#039; page.  To find this page on the website go to your VA Overview page and then in the options select &#039;Edit VA Settings&#039; and then &#039;Api Key Management&#039;.  &lt;br /&gt;
&lt;br /&gt;
There are two types of API keys that can be created.&lt;br /&gt;
&lt;br /&gt;
Site key:  This key is to be used by your main website/service and may be use the full rate limit allowed by your VA.  After one hundred calls using a site api key, the key will be locked to the IP address used.  If in the future you need to change the IP address all you need to do is delete the old key and create a new one.&lt;br /&gt;
&lt;br /&gt;
Developer key:  This key is used to help you create and test your website on a different machine than your main site.  It will not be limited to a single IP address but will be limited to the number of calls each day your VA is normally allowed each hour.   Usage of the developer key does apply against your VA&#039;s total rate limit.&lt;br /&gt;
&lt;br /&gt;
==Basic Usage==&lt;br /&gt;
The data can be received using HTTP calls to the interface script and add the desired function to the parameters. Here is an example request:&lt;br /&gt;
&amp;lt;pre&amp;gt;http://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;apikey=xxxxx&amp;lt;/pre&amp;gt;&lt;br /&gt;
As you can see there is the interface script &#039;&#039;va_interface.php&#039;&#039;, the function &#039;&#039;getPilotList&#039;&#039; and the parameters &#039;&#039;va_id=7&#039;&#039; and &#039;&#039;apikey=xxxxx&#039;&#039;. Some functions require additional parameters, these can be appended after the other parameters.&lt;br /&gt;
&lt;br /&gt;
The result of the request will be given in xml format with the base-tag being &#039;&#039;&amp;lt;fsa_output&amp;gt;&#039;&#039;. This tag has the attributes &#039;&#039;version&#039;&#039; and &#039;&#039;success&#039;&#039; which show the version number of the interface and if the request succeeded or not. In case of a failure the &#039;&#039;success&#039;&#039;-attribute shows the error message. The following example shows the return text of the above function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;fsa_output version=&amp;quot;1.0&amp;quot; success=&amp;quot;SUCCESS&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;data id=&amp;quot;1&amp;quot; name=&amp;quot;Konrad&amp;quot; surname=&amp;quot;Pustka&amp;quot; va_user=&amp;quot;SNA101&amp;quot; location=&amp;quot;EDDM&amp;quot; lastactive=&amp;quot;1287330550&amp;quot; budget=&amp;quot;198144&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;data id=&amp;quot;2&amp;quot; name=&amp;quot;Claudio&amp;quot; surname=&amp;quot;Gusmini&amp;quot; va_user=&amp;quot;SNA102&amp;quot; location=&amp;quot;EDDM&amp;quot; lastactive=&amp;quot;1286366261&amp;quot; budget=&amp;quot;216405101&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/fsa_output&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Inside the &#039;&#039;fsa_output&#039;&#039;-tag there are the &#039;&#039;data&#039;&#039;-tags which contain all the information.  &lt;br /&gt;
&lt;br /&gt;
When calling using this method the default output format is XML, you can get the out in JSON format by adding a format=json parameter to the request. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxx&amp;lt;/pre&amp;gt;&lt;br /&gt;
The output will be:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;status&amp;quot;: &amp;quot;SUCCESS&amp;quot;,&lt;br /&gt;
    &amp;quot;data&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;id&amp;quot;: 1,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Konrad&amp;quot;,&lt;br /&gt;
            &amp;quot;surname&amp;quot;: &amp;quot;Pustka&amp;quot;,&lt;br /&gt;
            &amp;quot;va_user&amp;quot;: &amp;quot;SNA101&amp;quot;,&lt;br /&gt;
            &amp;quot;location&amp;quot;: &amp;quot;ETSE&amp;quot;,&lt;br /&gt;
            &amp;quot;lastactive&amp;quot;: 1600285079,&lt;br /&gt;
            &amp;quot;budget&amp;quot;: 2400628&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;id&amp;quot;: 2,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Claudio&amp;quot;,&lt;br /&gt;
            &amp;quot;surname&amp;quot;: &amp;quot;Gusmini&amp;quot;,&lt;br /&gt;
            &amp;quot;va_user&amp;quot;: &amp;quot;SNA102&amp;quot;,&lt;br /&gt;
            &amp;quot;location&amp;quot;: &amp;quot;LIMG&amp;quot;,&lt;br /&gt;
            &amp;quot;lastactive&amp;quot;: 1605458811,&lt;br /&gt;
            &amp;quot;budget&amp;quot;: 216631042&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you need something to get started here&#039;s a small example PHP-script showing a list of your pilots&#039; names. Just replace the va_id by your own.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
  $ch = curl_init(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;);&lt;br /&gt;
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
  $http_status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);&lt;br /&gt;
  $http_text = curl_exec($ch);&lt;br /&gt;
&lt;br /&gt;
  $objDOM = new DOMDocument();&lt;br /&gt;
  $objDOM-&amp;gt;loadXML($http_text);&lt;br /&gt;
&lt;br /&gt;
  $dataNodes = $objDOM-&amp;gt;getElementsByTagName(&amp;quot;data&amp;quot;);&lt;br /&gt;
  foreach( $dataNodes as $node )&lt;br /&gt;
  {&lt;br /&gt;
    $name = $node-&amp;gt;getAttribute(&amp;quot;name&amp;quot;);&lt;br /&gt;
    $surname = $node-&amp;gt;getAttribute(&amp;quot;surname&amp;quot;);&lt;br /&gt;
    echo &amp;quot;{$name} {$surname} &amp;lt;br/&amp;gt;&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here is a sample of a PHP script reading the same data in JSON format.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
    $ch = curl_init(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;);&lt;br /&gt;
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
    $http_status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);&lt;br /&gt;
    $http_text = curl_exec($ch);&lt;br /&gt;
    $json_data = json_decode($http_text, true);&lt;br /&gt;
    if ($json_data[&#039;status&#039;] == &#039;SUCCESS&#039;) {&lt;br /&gt;
        foreach($json_data[&#039;data&#039;] as $node) {&lt;br /&gt;
            echo &amp;quot;{$node[&#039;name&#039;]} {$node[&#039;surname&#039;]}&amp;lt;br/&amp;gt;\n&amp;quot;;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a sample of a Python script reading the same data in json format.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    #!/usr/bin/python&lt;br /&gt;
    import requests&lt;br /&gt;
&lt;br /&gt;
    r = requests.get(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;)&lt;br /&gt;
    json_data = r.json()&lt;br /&gt;
    if json_data[&#039;status&#039;] == &#039;SUCCESS&#039;:&lt;br /&gt;
        for node in json_data[&#039;data&#039;]:&lt;br /&gt;
            print(&#039;{} {}&#039;.format(node[&#039;name&#039;], node[&#039;surname&#039;])&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==Pilot Login==&lt;br /&gt;
Several of the functions require that the pilot calling be logged in.  Previous versions of the interface required the call passed the pilots username and a hashed password as parameters.  That method has now been discontinued, in this version you will need to call the &#039;&#039;pilotLogin&#039;&#039; to create a token that can be used to call functions for that pilot.  Unlike other calls in the interface, the &#039;&#039;pilotLogin&#039;&#039; function is also a HTTP POST call rather than a GET call.  Here is an example of calling the &#039;&#039;pilotLogin&#039;&#039; function.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
$post = [&lt;br /&gt;
    &#039;user&#039; =&amp;gt; &#039;username&#039;,&lt;br /&gt;
    &#039;password&#039; =&amp;gt; &#039;xxxxxxxx&#039;&lt;br /&gt;
];&lt;br /&gt;
&lt;br /&gt;
$ch = curl_init(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=pilotLogin&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;);&lt;br /&gt;
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);&lt;br /&gt;
&lt;br /&gt;
$http_text = curl_exec($ch);&lt;br /&gt;
$data = json_decode($http_text, true);&lt;br /&gt;
&lt;br /&gt;
if ($data[&#039;status&#039;] == &#039;SUCCESS&#039;) {&lt;br /&gt;
    $fsa_token = $data[&#039;data&#039;][&#039;token&#039;];&lt;br /&gt;
} else {&lt;br /&gt;
    die(&amp;quot;Login failed&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The data returned in this request includes:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| token&lt;br /&gt;
| The pilots login token.&lt;br /&gt;
|-&lt;br /&gt;
| alt_code&lt;br /&gt;
| The alternate ICAO code of the airport they are currently located based on there default simulator.&lt;br /&gt;
|-&lt;br /&gt;
| budget&lt;br /&gt;
| The pilots current budget&lt;br /&gt;
|-&lt;br /&gt;
| default_sim&lt;br /&gt;
| The pilots default simulator.&lt;br /&gt;
|-&lt;br /&gt;
| location&lt;br /&gt;
| The FSA offical ICAO code of the airport the pilot is located.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| The pilots first name&lt;br /&gt;
|-&lt;br /&gt;
| pilot_id&lt;br /&gt;
| The id number of the pilot.&lt;br /&gt;
|-&lt;br /&gt;
| premium&lt;br /&gt;
| 1 of the pilot is a premium member, 0 if not.&lt;br /&gt;
|-&lt;br /&gt;
| rank&lt;br /&gt;
| The code for the pilots rank within their VA&lt;br /&gt;
|-&lt;br /&gt;
| rank_id&lt;br /&gt;
| The id of the pilots rank within their VA&lt;br /&gt;
|-&lt;br /&gt;
| surname&lt;br /&gt;
| The pilots last or given name &lt;br /&gt;
|-&lt;br /&gt;
| va_id&lt;br /&gt;
| The ID of the pilots VA&lt;br /&gt;
|-&lt;br /&gt;
| va_status&lt;br /&gt;
| The pilots within there airline&lt;br /&gt;
|-&lt;br /&gt;
| va_user&lt;br /&gt;
| The pilots ID within their VA.&lt;br /&gt;
|-&lt;br /&gt;
| weightunit&lt;br /&gt;
| The pilots default unit of measure (kg or lb).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Data==&lt;br /&gt;
The following section contains a detailed list of all the request-functions with their return values. Lately added options are marked &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;green&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Parameters===&lt;br /&gt;
All the request functions use parameters which need to be appended. The following table shows all the parameters and their meaning.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter&lt;br /&gt;
! Meaning&lt;br /&gt;
|- &lt;br /&gt;
| ac_id&lt;br /&gt;
| ID of the aircraft. Is part of the data received from other functions (e.g. getAircraftList).&lt;br /&gt;
|-&lt;br /&gt;
| accept_pp&lt;br /&gt;
| Must be set &#039;1&#039; if Privacy Policy is accepted.&lt;br /&gt;
|-&lt;br /&gt;
| acdb_id&lt;br /&gt;
| ID of the aircraft type. Is part of the data received from other functions (e.g. getAircraftList).&lt;br /&gt;
|-&lt;br /&gt;
| airport&lt;br /&gt;
| Starting airport. Where the user should be placed first.&lt;br /&gt;
|-&lt;br /&gt;
| arr&lt;br /&gt;
| ICAO code of the arrival airport.&lt;br /&gt;
|-&lt;br /&gt;
| count&lt;br /&gt;
| Number past flights which should be displayed.&lt;br /&gt;
|-&lt;br /&gt;
| country&lt;br /&gt;
| Name of the country. &lt;br /&gt;
|-&lt;br /&gt;
| days&lt;br /&gt;
| Number of past days from now which should be displayed.&lt;br /&gt;
|-&lt;br /&gt;
| dep&lt;br /&gt;
| ICAO code of the departure airport.&lt;br /&gt;
|-&lt;br /&gt;
| email&lt;br /&gt;
| E-Mail of the user.&lt;br /&gt;
|-&lt;br /&gt;
| fleet_id&lt;br /&gt;
| ID of the fleet. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| from_ts&lt;br /&gt;
| UNIX timestamp of the date where the listing should start.&lt;br /&gt;
|-&lt;br /&gt;
| givenname&lt;br /&gt;
| Given name of the user.&lt;br /&gt;
|-&lt;br /&gt;
| icao&lt;br /&gt;
| ICAO code of the airport.&lt;br /&gt;
|-&lt;br /&gt;
| pilot_id&lt;br /&gt;
| ID of the pilot. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| report_id&lt;br /&gt;
| ID of the report. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| surname&lt;br /&gt;
| Surname of the user.&lt;br /&gt;
|-&lt;br /&gt;
| to_ts&lt;br /&gt;
| UNIX timestamp of the date where the listing should end.&lt;br /&gt;
|-&lt;br /&gt;
| user&lt;br /&gt;
| Username of the pilot.&lt;br /&gt;
|-&lt;br /&gt;
| token&lt;br /&gt;
| Login token created by the pilotLogin function.&lt;br /&gt;
|-&lt;br /&gt;
| va_id&lt;br /&gt;
| ID of the [[Virtual Airline]]. Is displayed on the [[Overview]] page.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Aircraft Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftData&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, pax_economy, pax_business, pax_first, config_name&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftDBData&lt;br /&gt;
| va_id, acdb_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao, passengers, price, fuel, dow, mtow, speed, engines, cargo, mzfw, market_only, range&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftDBList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registration, state, ac_name, status, fleet_id, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftStats&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| flights, hours, distance&lt;br /&gt;
|-&lt;br /&gt;
| getFleetAircraftList&lt;br /&gt;
| va_id, fleet_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registration, state, ac_name, status, fleet_id, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getFleetList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name&lt;br /&gt;
|-&lt;br /&gt;
| getFleetStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getLeasedAircraftList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registraion, state, ac_name, status, fleet_id, fuel, va_id, name, expire&lt;br /&gt;
|- &lt;br /&gt;
| getPeriodFleetStats&lt;br /&gt;
| va_id, from_ts, to_ts&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Airport Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirportData&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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&lt;br /&gt;
|-&lt;br /&gt;
| getAirportList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| icao, name, city, country, fuel, lat, lon&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Airline Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirlineData&lt;br /&gt;
| va_id, id (=va_id)&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, base, code, budget, homepage, logo_l, logo_s, price (deprecated, will be removed in next release), reputation, pilotcharge, multiplier, mission&lt;br /&gt;
|-&lt;br /&gt;
| getAirlineStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, pax, cargo_kg&lt;br /&gt;
|-&lt;br /&gt;
| getCountryStats&lt;br /&gt;
| va_id, country&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| va_name, id, flights, rating hours, profit, distance, last, fuel_used, pax, cargo_kg&lt;br /&gt;
|- &lt;br /&gt;
| getRankList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, short, settings, pilots, aircrafts, fleet, flights, partnerships, advertisements, fleet_id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Financial Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getLast10Transactions&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| ts, value, reason&lt;br /&gt;
|-&lt;br /&gt;
| getNegTransactionSums&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| value, reason&lt;br /&gt;
|-&lt;br /&gt;
| getPosTransactionSums&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| value, reason&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Flight Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters in brackets are optional&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getActiveFlights&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| departure, arrival, passengers, cargo, user_id, ac_id, flightstate, timestamp, number, lon, lat, pax_economy, pax_business, pax_first&lt;br /&gt;
|-&lt;br /&gt;
| getBookedFlights&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| departure, arrival, passengers, cargo, user_id, ac_id, number, pax_economy, pax_business, pax_first&lt;br /&gt;
|-&lt;br /&gt;
| getFlightReports&lt;br /&gt;
| va_id, (acdb_id), (ac_id), (pilot_id), (days), (count)&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;pax_economy, pax_business, pax_first&amp;lt;/span&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
| getReportDetail&lt;br /&gt;
| va_id, report_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;vs, pax_economy, pax_business, pax_first, ticket_business, ticket_first, fuel_start, fuel_dep, fuel_takeoff, fuel_land, fuel_finish, ticket_factor, interface, simversion, os&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| getRouteData&lt;br /&gt;
| va_id, route_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, va_id, cs_vaid, number, dep, arr, deptime, arrtime, simrate, days, price, state, flighttype, acdb_list, ac_id, remarks, route, limit_pax, limit_cargo&lt;br /&gt;
|-&lt;br /&gt;
| getRouteList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, number, dep, dep_country, arr, arr_country, deptime, arrtime, simrate, days, price, state, flighttype, acdb_list, ac_id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Pilot Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getPeriodPilotStats&lt;br /&gt;
| va_id, from_ts, to_ts&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getPilotData&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, surname, user, va_user, rank_id, location, budget, lastactive, active, sigac, timezone, weightunit, language, msgmail, rank, flights, rating, hours, distance, pax, cargo_kg, picture&lt;br /&gt;
|-&lt;br /&gt;
| getPilotHours&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao, hours&lt;br /&gt;
|-&lt;br /&gt;
| getPilotList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, surname, user, va_user, rank_id, location, last_active, status, budget&lt;br /&gt;
|-&lt;br /&gt;
| getPilotRatings&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, training, manufacturer, type&lt;br /&gt;
|-&lt;br /&gt;
| getPilotStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getPilotStatus&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| ac_id, route_id, departure, arrival, dep_time, dist, duration, status, lon, lat, flightstate, passengers, income, ticket, timestamp, cargo, multiplier, flighttype&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Flight Booking===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| bookFlight&lt;br /&gt;
| va_id, pilot_id, token, route_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| success, message, codeshare, codeshare_msg&lt;br /&gt;
|-&lt;br /&gt;
| cancelFlight&lt;br /&gt;
| va_id, pilot_id, token&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| result, loss&lt;br /&gt;
|-&lt;br /&gt;
| getBookableRoutes&lt;br /&gt;
| va_id, pilot_id, token&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| number, dep, arr, deptime, arrtime, id, state, simrate, flighttype, training, price, list, ac_id&lt;br /&gt;
|-&lt;br /&gt;
| getBookableAircraft&lt;br /&gt;
| va_id, pilot_id, route_id, token&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| type, registration, state, id, name, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getBookStatus&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| status&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Miscellaneous User Functions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| createAccount&lt;br /&gt;
| va_id, givenname, surname, username, email, password, airport, accept_pp&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| success, message, code&lt;br /&gt;
|-&lt;br /&gt;
| getPilotID&lt;br /&gt;
| va_id, user, token&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id&lt;br /&gt;
|-&lt;br /&gt;
| getPrivacyPolicy&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS&lt;br /&gt;
| policy&lt;br /&gt;
|-&lt;br /&gt;
| getTransferCost&lt;br /&gt;
| va_id, arr, dep&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| cost&lt;br /&gt;
|-&lt;br /&gt;
| transferPilot&lt;br /&gt;
| va_id, pilot_id, token, icao&lt;br /&gt;
| SUCCESS, NOT FOUND, INSUFFICIENT FUNDS&lt;br /&gt;
| cost&lt;br /&gt;
|- &lt;br /&gt;
| getDistance&lt;br /&gt;
| va_id, icao_from, icao_to&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| distance&lt;br /&gt;
|- &lt;br /&gt;
| getMetar&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| metar&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Package Functions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirportPackageSummary&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| getVaPackageSummary&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| getAircraftPackages&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| getCenterPackages&lt;br /&gt;
| va_id, center_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Sample Responses&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getAirportPackageSummary&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;status&amp;quot;: &amp;quot;SUCCESS&amp;quot;,&lt;br /&gt;
    &amp;quot;data&amp;quot;: {&lt;br /&gt;
        &amp;quot;arr&amp;quot;: {&lt;br /&gt;
            &amp;quot;EDDK&amp;quot;: {&lt;br /&gt;
                &amp;quot;100000&amp;quot;: 1,&lt;br /&gt;
                &amp;quot;200&amp;quot;: 12,&lt;br /&gt;
                &amp;quot;2000&amp;quot;: 2,&lt;br /&gt;
                &amp;quot;bearing&amp;quot;: 29.528874983699,&lt;br /&gt;
                &amp;quot;city&amp;quot;: &amp;quot;Cologne-Bonn&amp;quot;,&lt;br /&gt;
                &amp;quot;distance&amp;quot;: 4872.3920956341,&lt;br /&gt;
                &amp;quot;total_kg&amp;quot;: 106400&lt;br /&gt;
            },&lt;br /&gt;
            &amp;quot;KBFL&amp;quot;: {&lt;br /&gt;
                &amp;quot;200&amp;quot;: 16,&lt;br /&gt;
                &amp;quot;40&amp;quot;: 310,&lt;br /&gt;
                &amp;quot;bearing&amp;quot;: 128.34209940912,&lt;br /&gt;
                &amp;quot;city&amp;quot;: &amp;quot;Bakersfield&amp;quot;,&lt;br /&gt;
                &amp;quot;distance&amp;quot;: 207.19199031933,&lt;br /&gt;
                &amp;quot;total_kg&amp;quot;: 15600&lt;br /&gt;
            },&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getVaPackageSummary&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;status&amp;quot;: &amp;quot;SUCCESS&amp;quot;,&lt;br /&gt;
    &amp;quot;data&amp;quot;: {&lt;br /&gt;
        &amp;quot;aircraft&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;ac_id&amp;quot;: 129691,&lt;br /&gt;
                &amp;quot;earliest_ts&amp;quot;: 1622293737,&lt;br /&gt;
                &amp;quot;location&amp;quot;: &amp;quot;EDDF&amp;quot;,&lt;br /&gt;
                &amp;quot;packages&amp;quot;: 13,&lt;br /&gt;
                &amp;quot;registration&amp;quot;: &amp;quot;D-AOGT&amp;quot;,&lt;br /&gt;
                &amp;quot;size_kg&amp;quot;: 26000&lt;br /&gt;
            }&lt;br /&gt;
        ],&lt;br /&gt;
        &amp;quot;centers&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;center_id&amp;quot;: 4347,&lt;br /&gt;
                &amp;quot;description&amp;quot;: &amp;quot;Himalayan Transport&amp;quot;,&lt;br /&gt;
                &amp;quot;earliest_ts&amp;quot;: 1621459008,&lt;br /&gt;
                &amp;quot;location&amp;quot;: &amp;quot;VNKT&amp;quot;,&lt;br /&gt;
                &amp;quot;packages&amp;quot;: 82,&lt;br /&gt;
                &amp;quot;size_kg&amp;quot;: 4080&lt;br /&gt;
            }&lt;br /&gt;
        ]&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Response Values&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;earliest_ts: The timestamp the of the oldest package in that aircraft/center&lt;br /&gt;
&amp;lt;li&amp;gt;packages: The count of packages stored&lt;br /&gt;
&amp;lt;li&amp;gt;size_kg: The total weight in kg of the packages stored.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getAircraftPackages&#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;getCenterPackages&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;status&amp;quot;: &amp;quot;SUCCESS&amp;quot;,&lt;br /&gt;
    &amp;quot;data&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;ac_id&amp;quot;: 129691,&lt;br /&gt;
            &amp;quot;arr&amp;quot;: &amp;quot;SBGL&amp;quot;,&lt;br /&gt;
            &amp;quot;arr_city&amp;quot;: &amp;quot;Rio De Janeiro&amp;quot;,&lt;br /&gt;
            &amp;quot;center_id&amp;quot;: null,&lt;br /&gt;
            &amp;quot;created_ts&amp;quot;: 1620830486,&lt;br /&gt;
            &amp;quot;delivered&amp;quot;: false,&lt;br /&gt;
            &amp;quot;dep&amp;quot;: &amp;quot;EDDF&amp;quot;,&lt;br /&gt;
            &amp;quot;fleet_id&amp;quot;: 72303,&lt;br /&gt;
            &amp;quot;id&amp;quot;: 302216085,&lt;br /&gt;
            &amp;quot;location&amp;quot;: &amp;quot;EDDF&amp;quot;,&lt;br /&gt;
            &amp;quot;mult&amp;quot;: 10,&lt;br /&gt;
            &amp;quot;package_type&amp;quot;: 0,&lt;br /&gt;
            &amp;quot;payment&amp;quot;: 59281,&lt;br /&gt;
            &amp;quot;payment_fact&amp;quot;: null,&lt;br /&gt;
            &amp;quot;pilot_id&amp;quot;: 98096,&lt;br /&gt;
            &amp;quot;size_kg&amp;quot;: 2000,&lt;br /&gt;
            &amp;quot;start_ts&amp;quot;: 1622293737,&lt;br /&gt;
            &amp;quot;updated_ts&amp;quot;: 1620830486&lt;br /&gt;
        },&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Response Values&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ac_id: The id of the aircraft holding the package&lt;br /&gt;
&amp;lt;li&amp;gt;arr: The ICAO of the destination airport&lt;br /&gt;
&amp;lt;li&amp;gt;arr_city: The city name of the destination airport&lt;br /&gt;
&amp;lt;li&amp;gt;center_id: The id center holding the aircraft&lt;br /&gt;
&amp;lt;li&amp;gt;created_ts: The unix timestamp of the the package was created.&lt;br /&gt;
&amp;lt;li&amp;gt;dep: The ICAO of the origin airport&lt;br /&gt;
&amp;lt;li&amp;gt;fleet_id: The fleet that picked up the package&lt;br /&gt;
&amp;lt;li&amp;gt;location: The airport the package is currently located&lt;br /&gt;
&amp;lt;li&amp;gt;mult: The VA financial multiplier when the package was picked up&lt;br /&gt;
&amp;lt;li&amp;gt;package_type: 0 for normal, 1 for priority&lt;br /&gt;
&amp;lt;li&amp;gt;payment: The base payment for when the package was created.&lt;br /&gt;
&amp;lt;li&amp;gt;pilot_id: The ID of the pilot who picked up the package.&lt;br /&gt;
&amp;lt;li&amp;gt;size_kg: The size in kg of the package&lt;br /&gt;
&amp;lt;li&amp;gt;start_ts: The unix timestamp of when the package was picked up.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Requested additional functions===&lt;br /&gt;
The following list contains all the functions which were requested by users but aren&#039;t implemented yet.&lt;br /&gt;
*Create, edit and delete routes&lt;/div&gt;</summary>
		<author><name>Joefremont</name></author>
	</entry>
	<entry>
		<id>https://wiki4.fsairlines.net/index.php?title=How_to_merge_airlines&amp;diff=3300</id>
		<title>How to merge airlines</title>
		<link rel="alternate" type="text/html" href="https://wiki4.fsairlines.net/index.php?title=How_to_merge_airlines&amp;diff=3300"/>
		<updated>2021-06-05T19:57:38Z</updated>

		<summary type="html">&lt;p&gt;Joefremont: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Tutorials]]&lt;br /&gt;
The merger of airlines is occasionally allowed by the administrators, but only if the combined airline will have a value of less than 10 billion in total assets.&lt;br /&gt;
&lt;br /&gt;
Do not attempt to transfer assets between airlines.  Attempting to use the lease, loan, repeated sale of aircraft or any other method to transfer assets between airlines  is prohibited and may result in the forfeiture of all assets involved in the transfer.&lt;br /&gt;
&lt;br /&gt;
If you wish to merge airlines, both airlines must be partners and the CEO&#039;s/Presidents of both airlines should submit support tickets requesting the merger.&lt;/div&gt;</summary>
		<author><name>Joefremont</name></author>
	</entry>
	<entry>
		<id>https://wiki4.fsairlines.net/index.php?title=XML-Interface-v2&amp;diff=3299</id>
		<title>XML-Interface-v2</title>
		<link rel="alternate" type="text/html" href="https://wiki4.fsairlines.net/index.php?title=XML-Interface-v2&amp;diff=3299"/>
		<updated>2021-05-30T03:18:22Z</updated>

		<summary type="html">&lt;p&gt;Joefremont: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The XML-Interface is the core of the [[VA Integration Kit]]. It has been designed to give VA Administrators with the knowledge of dynamic web techniques the possibility to create their own layout and perfectly integrate the information into their own website using data from FSAirlines. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;This version of the XML interface is now released as beta.&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Changes from the previous version==&lt;br /&gt;
Compared to the previous version of the XML-Interface the following change were made.&lt;br /&gt;
* Change from domain registration to API keys.&lt;br /&gt;
* Rate limits added.&lt;br /&gt;
* Json output format added.&lt;br /&gt;
* Output properly supports UTF-8 character set.&lt;br /&gt;
* Additional functions for packages added.&lt;br /&gt;
&lt;br /&gt;
==Rate limits==&lt;br /&gt;
The access to the interface is limited by the number of calls an VA can make each hour and each day.  An airline with a gold account can make 100 calls each hour and 1200 call each day. An airline with a platinum account can make 500 calls each hour and 6000 call each day. If an airline has multiple members then those limits are added together for each premium account.  Example if an airline has one platinum member and two gold member there limits are 700 an hour and 8400 per day.  Functions related to pilots booking flights do not count against the rate limits.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Access Restriction==&lt;br /&gt;
In order to be able to access data from the Data-Interface you need to create an API key, this can be done using the &#039;Api Key Management&#039; page.  To find this page on the website go to your VA Overview page and then in the options select &#039;Edit VA Settings&#039; and then &#039;Api Key Management&#039;.  &lt;br /&gt;
&lt;br /&gt;
There are two types of API keys that can be created.&lt;br /&gt;
&lt;br /&gt;
Site key:  This key is to be used by your main website/service and may be use the full rate limit allowed by your VA.  After one hundred calls using a site api key, the key will be locked to the IP address used.  If in the future you need to change the IP address all you need to do is delete the old key and create a new one.&lt;br /&gt;
&lt;br /&gt;
Developer key:  This key is used to help you create and test your website on a different machine than your main site.  It will not be limited to a single IP address but will be limited to the number of calls each day your VA is normally allowed each hour.   Usage of the developer key does apply against your VA&#039;s total rate limit.&lt;br /&gt;
&lt;br /&gt;
==Basic Usage==&lt;br /&gt;
The data can be received using HTTP calls to the interface script and add the desired function to the parameters. Here is an example request:&lt;br /&gt;
&amp;lt;pre&amp;gt;http://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;apikey=xxxxx&amp;lt;/pre&amp;gt;&lt;br /&gt;
As you can see there is the interface script &#039;&#039;va_interface.php&#039;&#039;, the function &#039;&#039;getPilotList&#039;&#039; and the parameters &#039;&#039;va_id=7&#039;&#039; and &#039;&#039;apikey=xxxxx&#039;&#039;. Some functions require additional parameters, these can be appended after the other parameters.&lt;br /&gt;
&lt;br /&gt;
The result of the request will be given in xml format with the base-tag being &#039;&#039;&amp;lt;fsa_output&amp;gt;&#039;&#039;. This tag has the attributes &#039;&#039;version&#039;&#039; and &#039;&#039;success&#039;&#039; which show the version number of the interface and if the request succeeded or not. In case of a failure the &#039;&#039;success&#039;&#039;-attribute shows the error message. The following example shows the return text of the above function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;fsa_output version=&amp;quot;1.0&amp;quot; success=&amp;quot;SUCCESS&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;data id=&amp;quot;1&amp;quot; name=&amp;quot;Konrad&amp;quot; surname=&amp;quot;Pustka&amp;quot; va_user=&amp;quot;SNA101&amp;quot; location=&amp;quot;EDDM&amp;quot; lastactive=&amp;quot;1287330550&amp;quot; budget=&amp;quot;198144&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;data id=&amp;quot;2&amp;quot; name=&amp;quot;Claudio&amp;quot; surname=&amp;quot;Gusmini&amp;quot; va_user=&amp;quot;SNA102&amp;quot; location=&amp;quot;EDDM&amp;quot; lastactive=&amp;quot;1286366261&amp;quot; budget=&amp;quot;216405101&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/fsa_output&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Inside the &#039;&#039;fsa_output&#039;&#039;-tag there are the &#039;&#039;data&#039;&#039;-tags which contain all the information.  &lt;br /&gt;
&lt;br /&gt;
When calling using this method the default output format is XML, you can get the out in JSON format by adding a format=json parameter to the request. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxx&amp;lt;/pre&amp;gt;&lt;br /&gt;
The output will be:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;status&amp;quot;: &amp;quot;SUCCESS&amp;quot;,&lt;br /&gt;
    &amp;quot;data&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;id&amp;quot;: 1,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Konrad&amp;quot;,&lt;br /&gt;
            &amp;quot;surname&amp;quot;: &amp;quot;Pustka&amp;quot;,&lt;br /&gt;
            &amp;quot;va_user&amp;quot;: &amp;quot;SNA101&amp;quot;,&lt;br /&gt;
            &amp;quot;location&amp;quot;: &amp;quot;ETSE&amp;quot;,&lt;br /&gt;
            &amp;quot;lastactive&amp;quot;: 1600285079,&lt;br /&gt;
            &amp;quot;budget&amp;quot;: 2400628&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;id&amp;quot;: 2,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Claudio&amp;quot;,&lt;br /&gt;
            &amp;quot;surname&amp;quot;: &amp;quot;Gusmini&amp;quot;,&lt;br /&gt;
            &amp;quot;va_user&amp;quot;: &amp;quot;SNA102&amp;quot;,&lt;br /&gt;
            &amp;quot;location&amp;quot;: &amp;quot;LIMG&amp;quot;,&lt;br /&gt;
            &amp;quot;lastactive&amp;quot;: 1605458811,&lt;br /&gt;
            &amp;quot;budget&amp;quot;: 216631042&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you need something to get started here&#039;s a small example PHP-script showing a list of your pilots&#039; names. Just replace the va_id by your own.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
  $ch = curl_init(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;);&lt;br /&gt;
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
  $http_status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);&lt;br /&gt;
  $http_text = curl_exec($ch);&lt;br /&gt;
&lt;br /&gt;
  $objDOM = new DOMDocument();&lt;br /&gt;
  $objDOM-&amp;gt;loadXML($http_text);&lt;br /&gt;
&lt;br /&gt;
  $dataNodes = $objDOM-&amp;gt;getElementsByTagName(&amp;quot;data&amp;quot;);&lt;br /&gt;
  foreach( $dataNodes as $node )&lt;br /&gt;
  {&lt;br /&gt;
    $name = $node-&amp;gt;getAttribute(&amp;quot;name&amp;quot;);&lt;br /&gt;
    $surname = $node-&amp;gt;getAttribute(&amp;quot;surname&amp;quot;);&lt;br /&gt;
    echo &amp;quot;{$name} {$surname} &amp;lt;br/&amp;gt;&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here is a sample of a PHP script reading the same data in JSON format.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
    $ch = curl_init(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;);&lt;br /&gt;
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
    $http_status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);&lt;br /&gt;
    $http_text = curl_exec($ch);&lt;br /&gt;
    $json_data = json_decode($http_text, true);&lt;br /&gt;
    if ($json_data[&#039;status&#039;] == &#039;SUCCESS&#039;) {&lt;br /&gt;
        foreach($json_data[&#039;data&#039;] as $node) {&lt;br /&gt;
            echo &amp;quot;{$node[&#039;name&#039;]} {$node[&#039;surname&#039;]}&amp;lt;br/&amp;gt;\n&amp;quot;;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a sample of a Python script reading the same data in json format.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    #!/usr/bin/python&lt;br /&gt;
    import requests&lt;br /&gt;
&lt;br /&gt;
    r = requests.get(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;)&lt;br /&gt;
    json_data = r.json()&lt;br /&gt;
    if json_data[&#039;status&#039;] == &#039;SUCCESS&#039;:&lt;br /&gt;
        for node in json_data[&#039;data&#039;]:&lt;br /&gt;
            print(&#039;{} {}&#039;.format(node[&#039;name&#039;], node[&#039;surname&#039;])&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==Pilot Login==&lt;br /&gt;
Several of the functions require that the pilot calling be logged in.  Previous versions of the interface required the call passed the pilots username and a hashed password as parameters.  That method has now been discontinued, in this version you will need to call the &#039;&#039;pilotLogin&#039;&#039; to create a token that can be used to call functions for that pilot.  Unlike other calls in the interface, the &#039;&#039;pilotLogin&#039;&#039; function is also a HTTP POST call rather than a GET call.  Here is an example of calling the &#039;&#039;pilotLogin&#039;&#039; function.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
$post = [&lt;br /&gt;
    &#039;user&#039; =&amp;gt; &#039;username&#039;,&lt;br /&gt;
    &#039;password&#039; =&amp;gt; &#039;xxxxxxxx&#039;&lt;br /&gt;
];&lt;br /&gt;
&lt;br /&gt;
$ch = curl_init(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=pilotLogin&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;);&lt;br /&gt;
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);&lt;br /&gt;
&lt;br /&gt;
$http_text = curl_exec($ch);&lt;br /&gt;
$data = json_decode($http_text, true);&lt;br /&gt;
&lt;br /&gt;
if ($data[&#039;status&#039;] == &#039;SUCCESS&#039;) {&lt;br /&gt;
    $fsa_token = $data[&#039;data&#039;][&#039;token&#039;];&lt;br /&gt;
} else {&lt;br /&gt;
    die(&amp;quot;Login failed&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The data returned in this request includes:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| token&lt;br /&gt;
| The pilots login token.&lt;br /&gt;
|-&lt;br /&gt;
| alt_code&lt;br /&gt;
| The alternate ICAO code of the airport they are currently located based on there default simulator.&lt;br /&gt;
|-&lt;br /&gt;
| budget&lt;br /&gt;
| The pilots current budget&lt;br /&gt;
|-&lt;br /&gt;
| default_sim&lt;br /&gt;
| The pilots default simulator.&lt;br /&gt;
|-&lt;br /&gt;
| location&lt;br /&gt;
| The FSA offical ICAO code of the airport the pilot is located.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| The pilots first name&lt;br /&gt;
|-&lt;br /&gt;
| pilot_id&lt;br /&gt;
| The id number of the pilot.&lt;br /&gt;
|-&lt;br /&gt;
| premium&lt;br /&gt;
| 1 of the pilot is a premium member, 0 if not.&lt;br /&gt;
|-&lt;br /&gt;
| rank&lt;br /&gt;
| The code for the pilots rank within their VA&lt;br /&gt;
|-&lt;br /&gt;
| rank_id&lt;br /&gt;
| The id of the pilots rank within their VA&lt;br /&gt;
|-&lt;br /&gt;
| surname&lt;br /&gt;
| The pilots last or given name &lt;br /&gt;
|-&lt;br /&gt;
| va_id&lt;br /&gt;
| The ID of the pilots VA&lt;br /&gt;
|-&lt;br /&gt;
| va_status&lt;br /&gt;
| The pilots within there airline&lt;br /&gt;
|-&lt;br /&gt;
| va_user&lt;br /&gt;
| The pilots ID within their VA.&lt;br /&gt;
|-&lt;br /&gt;
| weightunit&lt;br /&gt;
| The pilots default unit of measure (kg or lb).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Data==&lt;br /&gt;
The following section contains a detailed list of all the request-functions with their return values. Lately added options are marked &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;green&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Parameters===&lt;br /&gt;
All the request functions use parameters which need to be appended. The following table shows all the parameters and their meaning.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter&lt;br /&gt;
! Meaning&lt;br /&gt;
|- &lt;br /&gt;
| ac_id&lt;br /&gt;
| ID of the aircraft. Is part of the data received from other functions (e.g. getAircraftList).&lt;br /&gt;
|-&lt;br /&gt;
| accept_pp&lt;br /&gt;
| Must be set &#039;1&#039; if Privacy Policy is accepted.&lt;br /&gt;
|-&lt;br /&gt;
| acdb_id&lt;br /&gt;
| ID of the aircraft type. Is part of the data received from other functions (e.g. getAircraftList).&lt;br /&gt;
|-&lt;br /&gt;
| airport&lt;br /&gt;
| Starting airport. Where the user should be placed first.&lt;br /&gt;
|-&lt;br /&gt;
| arr&lt;br /&gt;
| ICAO code of the arrival airport.&lt;br /&gt;
|-&lt;br /&gt;
| count&lt;br /&gt;
| Number past flights which should be displayed.&lt;br /&gt;
|-&lt;br /&gt;
| country&lt;br /&gt;
| Name of the country. &lt;br /&gt;
|-&lt;br /&gt;
| days&lt;br /&gt;
| Number of past days from now which should be displayed.&lt;br /&gt;
|-&lt;br /&gt;
| dep&lt;br /&gt;
| ICAO code of the departure airport.&lt;br /&gt;
|-&lt;br /&gt;
| email&lt;br /&gt;
| E-Mail of the user.&lt;br /&gt;
|-&lt;br /&gt;
| fleet_id&lt;br /&gt;
| ID of the fleet. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| from_ts&lt;br /&gt;
| UNIX timestamp of the date where the listing should start.&lt;br /&gt;
|-&lt;br /&gt;
| givenname&lt;br /&gt;
| Given name of the user.&lt;br /&gt;
|-&lt;br /&gt;
| icao&lt;br /&gt;
| ICAO code of the airport.&lt;br /&gt;
|-&lt;br /&gt;
| pilot_id&lt;br /&gt;
| ID of the pilot. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| report_id&lt;br /&gt;
| ID of the report. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| surname&lt;br /&gt;
| Surname of the user.&lt;br /&gt;
|-&lt;br /&gt;
| to_ts&lt;br /&gt;
| UNIX timestamp of the date where the listing should end.&lt;br /&gt;
|-&lt;br /&gt;
| user&lt;br /&gt;
| Username of the pilot.&lt;br /&gt;
|-&lt;br /&gt;
| token&lt;br /&gt;
| Login token created by the pilotLogin function.&lt;br /&gt;
|-&lt;br /&gt;
| va_id&lt;br /&gt;
| ID of the [[Virtual Airline]]. Is displayed on the [[Overview]] page.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Aircraft Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftData&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, pax_economy, pax_business, pax_first, config_name&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftDBData&lt;br /&gt;
| va_id, acdb_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao, passengers, price, fuel, dow, mtow, speed, engines, cargo, mzfw, market_only, range&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftDBList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registration, state, ac_name, status, fleet_id, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftStats&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| flights, hours, distance&lt;br /&gt;
|-&lt;br /&gt;
| getFleetAircraftList&lt;br /&gt;
| va_id, fleet_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registration, state, ac_name, status, fleet_id, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getFleetList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name&lt;br /&gt;
|-&lt;br /&gt;
| getFleetStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getLeasedAircraftList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registraion, state, ac_name, status, fleet_id, fuel, va_id, name, expire&lt;br /&gt;
|- &lt;br /&gt;
| getPeriodFleetStats&lt;br /&gt;
| va_id, from_ts, to_ts&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Airport Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirportData&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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&lt;br /&gt;
|-&lt;br /&gt;
| getAirportList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| icao, name, city, country, fuel, lat, lon&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Airline Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirlineData&lt;br /&gt;
| va_id, id (=va_id)&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, base, code, budget, homepage, logo_l, logo_s, price (deprecated, will be removed in next release), reputation, pilotcharge, multiplier, mission&lt;br /&gt;
|-&lt;br /&gt;
| getAirlineStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, pax, cargo_kg&lt;br /&gt;
|-&lt;br /&gt;
| getCountryStats&lt;br /&gt;
| va_id, country&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| va_name, id, flights, rating hours, profit, distance, last, fuel_used, pax, cargo_kg&lt;br /&gt;
|- &lt;br /&gt;
| getRankList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, short, settings, pilots, aircrafts, fleet, flights, partnerships, advertisements, fleet_id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Financial Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getLast10Transactions&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| ts, value, reason&lt;br /&gt;
|-&lt;br /&gt;
| getNegTransactionSums&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| value, reason&lt;br /&gt;
|-&lt;br /&gt;
| getPosTransactionSums&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| value, reason&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Flight Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters in brackets are optional&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getActiveFlights&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| departure, arrival, passengers, cargo, user_id, ac_id, flightstate, timestamp, number, lon, lat, pax_economy, pax_business, pax_first&lt;br /&gt;
|-&lt;br /&gt;
| getBookedFlights&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| departure, arrival, passengers, cargo, user_id, ac_id, number, pax_economy, pax_business, pax_first&lt;br /&gt;
|-&lt;br /&gt;
| getFlightReports&lt;br /&gt;
| va_id, (acdb_id), (ac_id), (pilot_id), (days), (count)&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;pax_economy, pax_business, pax_first&amp;lt;/span&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
| getReportDetail&lt;br /&gt;
| va_id, report_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;vs, pax_economy, pax_business, pax_first, ticket_business, ticket_first, fuel_start, fuel_dep, fuel_takeoff, fuel_land, fuel_finish, ticket_factor, interface, simversion, os&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| getRouteData&lt;br /&gt;
| va_id, route_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, va_id, cs_vaid, number, dep, arr, deptime, arrtime, simrate, days, price, state, flighttype, acdb_list, ac_id, remarks, route, limit_pax, limit_cargo&lt;br /&gt;
|-&lt;br /&gt;
| getRouteList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, number, dep, dep_country, arr, arr_country, deptime, arrtime, simrate, days, price, state, flighttype, acdb_list, ac_id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Pilot Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getPeriodPilotStats&lt;br /&gt;
| va_id, from_ts, to_ts&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getPilotData&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, surname, user, va_user, rank_id, location, budget, lastactive, active, sigac, timezone, weightunit, language, msgmail, rank, flights, rating, hours, distance, pax, cargo_kg, picture&lt;br /&gt;
|-&lt;br /&gt;
| getPilotHours&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao, hours&lt;br /&gt;
|-&lt;br /&gt;
| getPilotList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, surname, user, va_user, rank_id, location, last_active, status, budget&lt;br /&gt;
|-&lt;br /&gt;
| getPilotRatings&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, training, manufacturer, type&lt;br /&gt;
|-&lt;br /&gt;
| getPilotStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getPilotStatus&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| ac_id, route_id, departure, arrival, dep_time, dist, duration, status, lon, lat, flightstate, passengers, income, ticket, timestamp, cargo, multiplier, flighttype&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Flight Booking===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| bookFlight&lt;br /&gt;
| va_id, pilot_id, token, route_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| success, message, codeshare, codeshare_msg&lt;br /&gt;
|-&lt;br /&gt;
| cancelFlight&lt;br /&gt;
| va_id, pilot_id, token&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| result, loss&lt;br /&gt;
|-&lt;br /&gt;
| getBookableRoutes&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| number, dep, arr, deptime, arrtime, id, state, simrate, flighttype, training, price, list, ac_id&lt;br /&gt;
|-&lt;br /&gt;
| getBookableAircraft&lt;br /&gt;
| va_id, pilot_id, route_id&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| type, registration, state, id, name, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getBookStatus&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| status&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Miscellaneous User Functions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| createAccount&lt;br /&gt;
| va_id, givenname, surname, username, email, password, airport, accept_pp&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| success, message, code&lt;br /&gt;
|-&lt;br /&gt;
| getPilotID&lt;br /&gt;
| va_id, user, token&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id&lt;br /&gt;
|-&lt;br /&gt;
| getPrivacyPolicy&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS&lt;br /&gt;
| policy&lt;br /&gt;
|-&lt;br /&gt;
| getTransferCost&lt;br /&gt;
| va_id, arr, dep&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| cost&lt;br /&gt;
|-&lt;br /&gt;
| transferPilot&lt;br /&gt;
| va_id, pilot_id, token, icao&lt;br /&gt;
| SUCCESS, NOT FOUND, INSUFFICIENT FUNDS&lt;br /&gt;
| cost&lt;br /&gt;
|- &lt;br /&gt;
| getDistance&lt;br /&gt;
| va_id, icao_from, icao_to&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| distance&lt;br /&gt;
|- &lt;br /&gt;
| getMetar&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| metar&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Package Functions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirportPackageSummary&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| getVaPackageSummary&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| getAircraftPackages&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| getCenterPackages&lt;br /&gt;
| va_id, center_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Sample Responses&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getAirportPackageSummary&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;status&amp;quot;: &amp;quot;SUCCESS&amp;quot;,&lt;br /&gt;
    &amp;quot;data&amp;quot;: {&lt;br /&gt;
        &amp;quot;arr&amp;quot;: {&lt;br /&gt;
            &amp;quot;EDDK&amp;quot;: {&lt;br /&gt;
                &amp;quot;100000&amp;quot;: 1,&lt;br /&gt;
                &amp;quot;200&amp;quot;: 12,&lt;br /&gt;
                &amp;quot;2000&amp;quot;: 2,&lt;br /&gt;
                &amp;quot;bearing&amp;quot;: 29.528874983699,&lt;br /&gt;
                &amp;quot;city&amp;quot;: &amp;quot;Cologne-Bonn&amp;quot;,&lt;br /&gt;
                &amp;quot;distance&amp;quot;: 4872.3920956341,&lt;br /&gt;
                &amp;quot;total_kg&amp;quot;: 106400&lt;br /&gt;
            },&lt;br /&gt;
            &amp;quot;KBFL&amp;quot;: {&lt;br /&gt;
                &amp;quot;200&amp;quot;: 16,&lt;br /&gt;
                &amp;quot;40&amp;quot;: 310,&lt;br /&gt;
                &amp;quot;bearing&amp;quot;: 128.34209940912,&lt;br /&gt;
                &amp;quot;city&amp;quot;: &amp;quot;Bakersfield&amp;quot;,&lt;br /&gt;
                &amp;quot;distance&amp;quot;: 207.19199031933,&lt;br /&gt;
                &amp;quot;total_kg&amp;quot;: 15600&lt;br /&gt;
            },&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getVaPackageSummary&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;status&amp;quot;: &amp;quot;SUCCESS&amp;quot;,&lt;br /&gt;
    &amp;quot;data&amp;quot;: {&lt;br /&gt;
        &amp;quot;aircraft&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;ac_id&amp;quot;: 129691,&lt;br /&gt;
                &amp;quot;earliest_ts&amp;quot;: 1622293737,&lt;br /&gt;
                &amp;quot;location&amp;quot;: &amp;quot;EDDF&amp;quot;,&lt;br /&gt;
                &amp;quot;packages&amp;quot;: 13,&lt;br /&gt;
                &amp;quot;registration&amp;quot;: &amp;quot;D-AOGT&amp;quot;,&lt;br /&gt;
                &amp;quot;size_kg&amp;quot;: 26000&lt;br /&gt;
            }&lt;br /&gt;
        ],&lt;br /&gt;
        &amp;quot;centers&amp;quot;: [&lt;br /&gt;
            {&lt;br /&gt;
                &amp;quot;center_id&amp;quot;: 4347,&lt;br /&gt;
                &amp;quot;description&amp;quot;: &amp;quot;Himalayan Transport&amp;quot;,&lt;br /&gt;
                &amp;quot;earliest_ts&amp;quot;: 1621459008,&lt;br /&gt;
                &amp;quot;location&amp;quot;: &amp;quot;VNKT&amp;quot;,&lt;br /&gt;
                &amp;quot;packages&amp;quot;: 82,&lt;br /&gt;
                &amp;quot;size_kg&amp;quot;: 4080&lt;br /&gt;
            }&lt;br /&gt;
        ]&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Response Values&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;earliest_ts: The timestamp the of the oldest package in that aircraft/center&lt;br /&gt;
&amp;lt;li&amp;gt;packages: The count of packages stored&lt;br /&gt;
&amp;lt;li&amp;gt;size_kg: The total weight in kg of the packages stored.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;getAircraftPackages&#039;&#039;&#039;&lt;br /&gt;
&#039;&#039;&#039;getCenterPackages&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;status&amp;quot;: &amp;quot;SUCCESS&amp;quot;,&lt;br /&gt;
    &amp;quot;data&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;ac_id&amp;quot;: 129691,&lt;br /&gt;
            &amp;quot;arr&amp;quot;: &amp;quot;SBGL&amp;quot;,&lt;br /&gt;
            &amp;quot;arr_city&amp;quot;: &amp;quot;Rio De Janeiro&amp;quot;,&lt;br /&gt;
            &amp;quot;center_id&amp;quot;: null,&lt;br /&gt;
            &amp;quot;created_ts&amp;quot;: 1620830486,&lt;br /&gt;
            &amp;quot;delivered&amp;quot;: false,&lt;br /&gt;
            &amp;quot;dep&amp;quot;: &amp;quot;EDDF&amp;quot;,&lt;br /&gt;
            &amp;quot;fleet_id&amp;quot;: 72303,&lt;br /&gt;
            &amp;quot;id&amp;quot;: 302216085,&lt;br /&gt;
            &amp;quot;location&amp;quot;: &amp;quot;EDDF&amp;quot;,&lt;br /&gt;
            &amp;quot;mult&amp;quot;: 10,&lt;br /&gt;
            &amp;quot;package_type&amp;quot;: 0,&lt;br /&gt;
            &amp;quot;payment&amp;quot;: 59281,&lt;br /&gt;
            &amp;quot;payment_fact&amp;quot;: null,&lt;br /&gt;
            &amp;quot;pilot_id&amp;quot;: 98096,&lt;br /&gt;
            &amp;quot;size_kg&amp;quot;: 2000,&lt;br /&gt;
            &amp;quot;start_ts&amp;quot;: 1622293737,&lt;br /&gt;
            &amp;quot;updated_ts&amp;quot;: 1620830486&lt;br /&gt;
        },&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Response Values&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;ac_id: The id of the aircraft holding the package&lt;br /&gt;
&amp;lt;li&amp;gt;arr: The ICAO of the destination airport&lt;br /&gt;
&amp;lt;li&amp;gt;arr_city: The city name of the destination airport&lt;br /&gt;
&amp;lt;li&amp;gt;center_id: The id center holding the aircraft&lt;br /&gt;
&amp;lt;li&amp;gt;created_ts: The unix timestamp of the the package was created.&lt;br /&gt;
&amp;lt;li&amp;gt;dep: The ICAO of the origin airport&lt;br /&gt;
&amp;lt;li&amp;gt;fleet_id: The fleet that picked up the package&lt;br /&gt;
&amp;lt;li&amp;gt;location: The airport the package is currently located&lt;br /&gt;
&amp;lt;li&amp;gt;mult: The VA financial multiplier when the package was picked up&lt;br /&gt;
&amp;lt;li&amp;gt;package_type: 0 for normal, 1 for priority&lt;br /&gt;
&amp;lt;li&amp;gt;payment: The base payment for when the package was created.&lt;br /&gt;
&amp;lt;li&amp;gt;pilot_id: The ID of the pilot who picked up the package.&lt;br /&gt;
&amp;lt;li&amp;gt;size_kg: The size in kg of the package&lt;br /&gt;
&amp;lt;li&amp;gt;start_ts: The unix timestamp of when the package was picked up.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Requested additional functions===&lt;br /&gt;
The following list contains all the functions which were requested by users but aren&#039;t implemented yet.&lt;br /&gt;
*Create, edit and delete routes&lt;/div&gt;</summary>
		<author><name>Joefremont</name></author>
	</entry>
	<entry>
		<id>https://wiki4.fsairlines.net/index.php?title=XML-Interface-v2&amp;diff=3298</id>
		<title>XML-Interface-v2</title>
		<link rel="alternate" type="text/html" href="https://wiki4.fsairlines.net/index.php?title=XML-Interface-v2&amp;diff=3298"/>
		<updated>2021-05-29T20:08:07Z</updated>

		<summary type="html">&lt;p&gt;Joefremont: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The XML-Interface is the core of the [[VA Integration Kit]]. It has been designed to give VA Administrators with the knowledge of dynamic web techniques the possibility to create their own layout and perfectly integrate the information into their own website using data from FSAirlines. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;This version of the XML interface is now released as beta.&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Changes from the previous version==&lt;br /&gt;
Compared to the previous version of the XML-Interface the following change were made.&lt;br /&gt;
* Change from domain registration to API keys.&lt;br /&gt;
* Rate limits added.&lt;br /&gt;
* Json output format added.&lt;br /&gt;
* Output properly supports UTF-8 character set.&lt;br /&gt;
* Additional functions for packages added.&lt;br /&gt;
&lt;br /&gt;
==Rate limits==&lt;br /&gt;
The access to the interface is limited by the number of calls an VA can make each hour and each day.  An airline with a gold account can make 100 calls each hour and 1200 call each day. An airline with a platinum account can make 500 calls each hour and 6000 call each day. If an airline has multiple members then those limits are added together for each premium account.  Example if an airline has one platinum member and two gold member there limits are 700 an hour and 8400 per day.  Functions related to pilots booking flights do not count against the rate limits.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Access Restriction==&lt;br /&gt;
In order to be able to access data from the Data-Interface you need to create an API key, this can be done using the &#039;Api Key Management&#039; page.  To find this page on the website go to your VA Overview page and then in the options select &#039;Edit VA Settings&#039; and then &#039;Api Key Management&#039;.  &lt;br /&gt;
&lt;br /&gt;
There are two types of API keys that can be created.&lt;br /&gt;
&lt;br /&gt;
Site key:  This key is to be used by your main website/service and may be use the full rate limit allowed by your VA.  After one hundred calls using a site api key, the key will be locked to the IP address used.  If in the future you need to change the IP address all you need to do is delete the old key and create a new one.&lt;br /&gt;
&lt;br /&gt;
Developer key:  This key is used to help you create and test your website on a different machine than your main site.  It will not be limited to a single IP address but will be limited to the number of calls each day your VA is normally allowed each hour.   Usage of the developer key does apply against your VA&#039;s total rate limit.&lt;br /&gt;
&lt;br /&gt;
==Basic Usage==&lt;br /&gt;
The data can be received using HTTP calls to the interface script and add the desired function to the parameters. Here is an example request:&lt;br /&gt;
&amp;lt;pre&amp;gt;http://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;apikey=xxxxx&amp;lt;/pre&amp;gt;&lt;br /&gt;
As you can see there is the interface script &#039;&#039;va_interface.php&#039;&#039;, the function &#039;&#039;getPilotList&#039;&#039; and the parameters &#039;&#039;va_id=7&#039;&#039; and &#039;&#039;apikey=xxxxx&#039;&#039;. Some functions require additional parameters, these can be appended after the other parameters.&lt;br /&gt;
&lt;br /&gt;
The result of the request will be given in xml format with the base-tag being &#039;&#039;&amp;lt;fsa_output&amp;gt;&#039;&#039;. This tag has the attributes &#039;&#039;version&#039;&#039; and &#039;&#039;success&#039;&#039; which show the version number of the interface and if the request succeeded or not. In case of a failure the &#039;&#039;success&#039;&#039;-attribute shows the error message. The following example shows the return text of the above function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;fsa_output version=&amp;quot;1.0&amp;quot; success=&amp;quot;SUCCESS&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;data id=&amp;quot;1&amp;quot; name=&amp;quot;Konrad&amp;quot; surname=&amp;quot;Pustka&amp;quot; va_user=&amp;quot;SNA101&amp;quot; location=&amp;quot;EDDM&amp;quot; lastactive=&amp;quot;1287330550&amp;quot; budget=&amp;quot;198144&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;data id=&amp;quot;2&amp;quot; name=&amp;quot;Claudio&amp;quot; surname=&amp;quot;Gusmini&amp;quot; va_user=&amp;quot;SNA102&amp;quot; location=&amp;quot;EDDM&amp;quot; lastactive=&amp;quot;1286366261&amp;quot; budget=&amp;quot;216405101&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/fsa_output&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Inside the &#039;&#039;fsa_output&#039;&#039;-tag there are the &#039;&#039;data&#039;&#039;-tags which contain all the information.  &lt;br /&gt;
&lt;br /&gt;
When calling using this method the default output format is XML, you can get the out in JSON format by adding a format=json parameter to the request. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxx&amp;lt;/pre&amp;gt;&lt;br /&gt;
The output will be:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;status&amp;quot;: &amp;quot;SUCCESS&amp;quot;,&lt;br /&gt;
    &amp;quot;data&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;id&amp;quot;: 1,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Konrad&amp;quot;,&lt;br /&gt;
            &amp;quot;surname&amp;quot;: &amp;quot;Pustka&amp;quot;,&lt;br /&gt;
            &amp;quot;va_user&amp;quot;: &amp;quot;SNA101&amp;quot;,&lt;br /&gt;
            &amp;quot;location&amp;quot;: &amp;quot;ETSE&amp;quot;,&lt;br /&gt;
            &amp;quot;lastactive&amp;quot;: 1600285079,&lt;br /&gt;
            &amp;quot;budget&amp;quot;: 2400628&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;id&amp;quot;: 2,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Claudio&amp;quot;,&lt;br /&gt;
            &amp;quot;surname&amp;quot;: &amp;quot;Gusmini&amp;quot;,&lt;br /&gt;
            &amp;quot;va_user&amp;quot;: &amp;quot;SNA102&amp;quot;,&lt;br /&gt;
            &amp;quot;location&amp;quot;: &amp;quot;LIMG&amp;quot;,&lt;br /&gt;
            &amp;quot;lastactive&amp;quot;: 1605458811,&lt;br /&gt;
            &amp;quot;budget&amp;quot;: 216631042&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you need something to get started here&#039;s a small example PHP-script showing a list of your pilots&#039; names. Just replace the va_id by your own.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
  $ch = curl_init(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;);&lt;br /&gt;
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
  $http_status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);&lt;br /&gt;
  $http_text = curl_exec($ch);&lt;br /&gt;
&lt;br /&gt;
  $objDOM = new DOMDocument();&lt;br /&gt;
  $objDOM-&amp;gt;loadXML($http_text);&lt;br /&gt;
&lt;br /&gt;
  $dataNodes = $objDOM-&amp;gt;getElementsByTagName(&amp;quot;data&amp;quot;);&lt;br /&gt;
  foreach( $dataNodes as $node )&lt;br /&gt;
  {&lt;br /&gt;
    $name = $node-&amp;gt;getAttribute(&amp;quot;name&amp;quot;);&lt;br /&gt;
    $surname = $node-&amp;gt;getAttribute(&amp;quot;surname&amp;quot;);&lt;br /&gt;
    echo &amp;quot;{$name} {$surname} &amp;lt;br/&amp;gt;&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here is a sample of a PHP script reading the same data in JSON format.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
    $ch = curl_init(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;);&lt;br /&gt;
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
    $http_status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);&lt;br /&gt;
    $http_text = curl_exec($ch);&lt;br /&gt;
    $json_data = json_decode($http_text, true);&lt;br /&gt;
    if ($json_data[&#039;status&#039;] == &#039;SUCCESS&#039;) {&lt;br /&gt;
        foreach($json_data[&#039;data&#039;] as $node) {&lt;br /&gt;
            echo &amp;quot;{$node[&#039;name&#039;]} {$node[&#039;surname&#039;]}&amp;lt;br/&amp;gt;\n&amp;quot;;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a sample of a Python script reading the same data in json format.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    #!/usr/bin/python&lt;br /&gt;
    import requests&lt;br /&gt;
&lt;br /&gt;
    r = requests.get(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;)&lt;br /&gt;
    json_data = r.json()&lt;br /&gt;
    if json_data[&#039;status&#039;] == &#039;SUCCESS&#039;:&lt;br /&gt;
        for node in json_data[&#039;data&#039;]:&lt;br /&gt;
            print(&#039;{} {}&#039;.format(node[&#039;name&#039;], node[&#039;surname&#039;])&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==Pilot Login==&lt;br /&gt;
Several of the functions require that the pilot calling be logged in.  Previous versions of the interface required the call passed the pilots username and a hashed password as parameters.  That method has now been discontinued, in this version you will need to call the &#039;&#039;pilotLogin&#039;&#039; to create a token that can be used to call functions for that pilot.  Unlike other calls in the interface, the &#039;&#039;pilotLogin&#039;&#039; function is also a HTTP POST call rather than a GET call.  Here is an example of calling the &#039;&#039;pilotLogin&#039;&#039; function.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
$post = [&lt;br /&gt;
    &#039;user&#039; =&amp;gt; &#039;username&#039;,&lt;br /&gt;
    &#039;password&#039; =&amp;gt; &#039;xxxxxxxx&#039;&lt;br /&gt;
];&lt;br /&gt;
&lt;br /&gt;
$ch = curl_init(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=pilotLogin&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;);&lt;br /&gt;
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);&lt;br /&gt;
&lt;br /&gt;
$http_text = curl_exec($ch);&lt;br /&gt;
$data = json_decode($http_text, true);&lt;br /&gt;
&lt;br /&gt;
if ($data[&#039;status&#039;] == &#039;SUCCESS&#039;) {&lt;br /&gt;
    $fsa_token = $data[&#039;data&#039;][&#039;token&#039;];&lt;br /&gt;
} else {&lt;br /&gt;
    die(&amp;quot;Login failed&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The data returned in this request includes:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| token&lt;br /&gt;
| The pilots login token.&lt;br /&gt;
|-&lt;br /&gt;
| alt_code&lt;br /&gt;
| The alternate ICAO code of the airport they are currently located based on there default simulator.&lt;br /&gt;
|-&lt;br /&gt;
| budget&lt;br /&gt;
| The pilots current budget&lt;br /&gt;
|-&lt;br /&gt;
| default_sim&lt;br /&gt;
| The pilots default simulator.&lt;br /&gt;
|-&lt;br /&gt;
| location&lt;br /&gt;
| The FSA offical ICAO code of the airport the pilot is located.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| The pilots first name&lt;br /&gt;
|-&lt;br /&gt;
| pilot_id&lt;br /&gt;
| The id number of the pilot.&lt;br /&gt;
|-&lt;br /&gt;
| premium&lt;br /&gt;
| 1 of the pilot is a premium member, 0 if not.&lt;br /&gt;
|-&lt;br /&gt;
| rank&lt;br /&gt;
| The code for the pilots rank within their VA&lt;br /&gt;
|-&lt;br /&gt;
| rank_id&lt;br /&gt;
| The id of the pilots rank within their VA&lt;br /&gt;
|-&lt;br /&gt;
| surname&lt;br /&gt;
| The pilots last or given name &lt;br /&gt;
|-&lt;br /&gt;
| va_id&lt;br /&gt;
| The ID of the pilots VA&lt;br /&gt;
|-&lt;br /&gt;
| va_status&lt;br /&gt;
| The pilots within there airline&lt;br /&gt;
|-&lt;br /&gt;
| va_user&lt;br /&gt;
| The pilots ID within their VA.&lt;br /&gt;
|-&lt;br /&gt;
| weightunit&lt;br /&gt;
| The pilots default unit of measure (kg or lb).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Data==&lt;br /&gt;
The following section contains a detailed list of all the request-functions with their return values. Lately added options are marked &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;green&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Parameters===&lt;br /&gt;
All the request functions use parameters which need to be appended. The following table shows all the parameters and their meaning.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter&lt;br /&gt;
! Meaning&lt;br /&gt;
|- &lt;br /&gt;
| ac_id&lt;br /&gt;
| ID of the aircraft. Is part of the data received from other functions (e.g. getAircraftList).&lt;br /&gt;
|-&lt;br /&gt;
| accept_pp&lt;br /&gt;
| Must be set &#039;1&#039; if Privacy Policy is accepted.&lt;br /&gt;
|-&lt;br /&gt;
| acdb_id&lt;br /&gt;
| ID of the aircraft type. Is part of the data received from other functions (e.g. getAircraftList).&lt;br /&gt;
|-&lt;br /&gt;
| airport&lt;br /&gt;
| Starting airport. Where the user should be placed first.&lt;br /&gt;
|-&lt;br /&gt;
| arr&lt;br /&gt;
| ICAO code of the arrival airport.&lt;br /&gt;
|-&lt;br /&gt;
| count&lt;br /&gt;
| Number past flights which should be displayed.&lt;br /&gt;
|-&lt;br /&gt;
| country&lt;br /&gt;
| Name of the country. &lt;br /&gt;
|-&lt;br /&gt;
| days&lt;br /&gt;
| Number of past days from now which should be displayed.&lt;br /&gt;
|-&lt;br /&gt;
| dep&lt;br /&gt;
| ICAO code of the departure airport.&lt;br /&gt;
|-&lt;br /&gt;
| email&lt;br /&gt;
| E-Mail of the user.&lt;br /&gt;
|-&lt;br /&gt;
| fleet_id&lt;br /&gt;
| ID of the fleet. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| from_ts&lt;br /&gt;
| UNIX timestamp of the date where the listing should start.&lt;br /&gt;
|-&lt;br /&gt;
| givenname&lt;br /&gt;
| Given name of the user.&lt;br /&gt;
|-&lt;br /&gt;
| icao&lt;br /&gt;
| ICAO code of the airport.&lt;br /&gt;
|-&lt;br /&gt;
| pilot_id&lt;br /&gt;
| ID of the pilot. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| report_id&lt;br /&gt;
| ID of the report. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| surname&lt;br /&gt;
| Surname of the user.&lt;br /&gt;
|-&lt;br /&gt;
| to_ts&lt;br /&gt;
| UNIX timestamp of the date where the listing should end.&lt;br /&gt;
|-&lt;br /&gt;
| user&lt;br /&gt;
| Username of the pilot.&lt;br /&gt;
|-&lt;br /&gt;
| token&lt;br /&gt;
| Login token created by the pilotLogin function.&lt;br /&gt;
|-&lt;br /&gt;
| va_id&lt;br /&gt;
| ID of the [[Virtual Airline]]. Is displayed on the [[Overview]] page.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Aircraft Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftData&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, pax_economy, pax_business, pax_first, config_name&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftDBData&lt;br /&gt;
| va_id, acdb_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao, passengers, price, fuel, dow, mtow, speed, engines, cargo, mzfw, market_only, range&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftDBList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registration, state, ac_name, status, fleet_id, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftStats&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| flights, hours, distance&lt;br /&gt;
|-&lt;br /&gt;
| getFleetAircraftList&lt;br /&gt;
| va_id, fleet_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registration, state, ac_name, status, fleet_id, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getFleetList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name&lt;br /&gt;
|-&lt;br /&gt;
| getFleetStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getLeasedAircraftList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registraion, state, ac_name, status, fleet_id, fuel, va_id, name, expire&lt;br /&gt;
|- &lt;br /&gt;
| getPeriodFleetStats&lt;br /&gt;
| va_id, from_ts, to_ts&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Airport Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirportData&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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&lt;br /&gt;
|-&lt;br /&gt;
| getAirportList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| icao, name, city, country, fuel, lat, lon&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Airline Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirlineData&lt;br /&gt;
| va_id, id (=va_id)&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, base, code, budget, homepage, logo_l, logo_s, price (deprecated, will be removed in next release), reputation, pilotcharge, multiplier, mission&lt;br /&gt;
|-&lt;br /&gt;
| getAirlineStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, pax, cargo_kg&lt;br /&gt;
|-&lt;br /&gt;
| getCountryStats&lt;br /&gt;
| va_id, country&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| va_name, id, flights, rating hours, profit, distance, last, fuel_used, pax, cargo_kg&lt;br /&gt;
|- &lt;br /&gt;
| getRankList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, short, settings, pilots, aircrafts, fleet, flights, partnerships, advertisements, fleet_id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Financial Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getLast10Transactions&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| ts, value, reason&lt;br /&gt;
|-&lt;br /&gt;
| getNegTransactionSums&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| value, reason&lt;br /&gt;
|-&lt;br /&gt;
| getPosTransactionSums&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| value, reason&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Flight Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters in brackets are optional&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getActiveFlights&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| departure, arrival, passengers, cargo, user_id, ac_id, flightstate, timestamp, number, lon, lat, pax_economy, pax_business, pax_first&lt;br /&gt;
|-&lt;br /&gt;
| getBookedFlights&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| departure, arrival, passengers, cargo, user_id, ac_id, number, pax_economy, pax_business, pax_first&lt;br /&gt;
|-&lt;br /&gt;
| getFlightReports&lt;br /&gt;
| va_id, (acdb_id), (ac_id), (pilot_id), (days), (count)&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;pax_economy, pax_business, pax_first&amp;lt;/span&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
| getReportDetail&lt;br /&gt;
| va_id, report_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;vs, pax_economy, pax_business, pax_first, ticket_business, ticket_first, fuel_start, fuel_dep, fuel_takeoff, fuel_land, fuel_finish, ticket_factor, interface, simversion, os&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| getRouteData&lt;br /&gt;
| va_id, route_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, va_id, cs_vaid, number, dep, arr, deptime, arrtime, simrate, days, price, state, flighttype, acdb_list, ac_id, remarks, route, limit_pax, limit_cargo&lt;br /&gt;
|-&lt;br /&gt;
| getRouteList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, number, dep, dep_country, arr, arr_country, deptime, arrtime, simrate, days, price, state, flighttype, acdb_list, ac_id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Pilot Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getPeriodPilotStats&lt;br /&gt;
| va_id, from_ts, to_ts&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getPilotData&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, surname, user, va_user, rank_id, location, budget, lastactive, active, sigac, timezone, weightunit, language, msgmail, rank, flights, rating, hours, distance, pax, cargo_kg, picture&lt;br /&gt;
|-&lt;br /&gt;
| getPilotHours&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao, hours&lt;br /&gt;
|-&lt;br /&gt;
| getPilotList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, surname, user, va_user, rank_id, location, last_active, status, budget&lt;br /&gt;
|-&lt;br /&gt;
| getPilotRatings&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, training, manufacturer, type&lt;br /&gt;
|-&lt;br /&gt;
| getPilotStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getPilotStatus&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| ac_id, route_id, departure, arrival, dep_time, dist, duration, status, lon, lat, flightstate, passengers, income, ticket, timestamp, cargo, multiplier, flighttype&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Flight Booking===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| bookFlight&lt;br /&gt;
| va_id, pilot_id, token, route_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| success, message, codeshare, codeshare_msg&lt;br /&gt;
|-&lt;br /&gt;
| cancelFlight&lt;br /&gt;
| va_id, pilot_id, token&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| result, loss&lt;br /&gt;
|-&lt;br /&gt;
| getBookableRoutes&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| number, dep, arr, deptime, arrtime, id, state, simrate, flighttype, training, price, list, ac_id&lt;br /&gt;
|-&lt;br /&gt;
| getBookableAircraft&lt;br /&gt;
| va_id, pilot_id, route_id&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| type, registration, state, id, name, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getBookStatus&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| status&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Miscellaneous User Functions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| createAccount&lt;br /&gt;
| va_id, givenname, surname, username, email, password, airport, accept_pp&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| success, message, code&lt;br /&gt;
|-&lt;br /&gt;
| getPilotID&lt;br /&gt;
| va_id, user, token&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id&lt;br /&gt;
|-&lt;br /&gt;
| getPrivacyPolicy&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS&lt;br /&gt;
| policy&lt;br /&gt;
|-&lt;br /&gt;
| getTransferCost&lt;br /&gt;
| va_id, arr, dep&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| cost&lt;br /&gt;
|-&lt;br /&gt;
| transferPilot&lt;br /&gt;
| va_id, pilot_id, token, icao&lt;br /&gt;
| SUCCESS, NOT FOUND, INSUFFICIENT FUNDS&lt;br /&gt;
| cost&lt;br /&gt;
|- &lt;br /&gt;
| getDistance&lt;br /&gt;
| va_id, icao_from, icao_to&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| distance&lt;br /&gt;
|- &lt;br /&gt;
| getMetar&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| metar&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Package Functions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirportPackageSummary&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| getVaPackageSummary&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| getAircraftPackages&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| getCenterPackages&lt;br /&gt;
| va_id, center_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Requested additional functions===&lt;br /&gt;
The following list contains all the functions which were requested by users but aren&#039;t implemented yet.&lt;br /&gt;
*Create, edit and delete routes&lt;/div&gt;</summary>
		<author><name>Joefremont</name></author>
	</entry>
	<entry>
		<id>https://wiki4.fsairlines.net/index.php?title=VA_Integration_Kit&amp;diff=3297</id>
		<title>VA Integration Kit</title>
		<link rel="alternate" type="text/html" href="https://wiki4.fsairlines.net/index.php?title=VA_Integration_Kit&amp;diff=3297"/>
		<updated>2021-05-29T17:50:58Z</updated>

		<summary type="html">&lt;p&gt;Joefremont: /* XML-Interface */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The VA Integration Kit enables [[Virtual Airlines]] to integrate FSAirlines into their own website. Using the Kit they can display nearly any kind of data from FSAirlines live on their site or even offer pilots to do some basic tasks without having to visit the FSAirlines website.&lt;br /&gt;
&lt;br /&gt;
==[[XML-Interface-v2]]==&lt;br /&gt;
The core of the Integration Kit is the [[XML-Interface-v2]]. It has been designed to give VA Administrators with the knowledge of advanced web techniques the possibility to create their own layout and perfectly integrate the data into their own website.&lt;br /&gt;
&lt;br /&gt;
You can use this link to view the previous version of the [[XML-Interface]].&lt;br /&gt;
&lt;br /&gt;
==[[:Category:Website Integration Packs|Website Integration Packs]]==&lt;br /&gt;
Building up on the XML-Interface FSAirlines offers a ready to use Integration Pack consisting of several HTML pages which can be easily integrated into any VA website. This Integration Pack is Open-Source and can be improved or enhanced by anybody. Everybody who made a completely different Integration Pack is also encouraged to put a link on the [[:Category:Website Integration Packs|Integration Packs]] site.&lt;br /&gt;
&lt;br /&gt;
===Developer Account===&lt;br /&gt;
If you want to help improving the [[Official FSAirlines Integration Pack]] or develop your own variant you are free to use our Subversion Repository. Just contact one of the developers and you will be given a user account. The server&#039;s url is:&lt;br /&gt;
&amp;lt;pre&amp;gt;svn://svn.fsairlines.net/fsa/remote/&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you don&#039;t have any experience with Subversion, please have a look at one of the many tutorials in the internet. We recommend using [http://tortoisesvn.tigris.org/ TortoiseSVN] on Windows and [http://www.syntevo.com/smartsvn/index.html SmartSVN] on Mac.&lt;br /&gt;
&lt;br /&gt;
Last but not least some rules for the svn repository:&lt;br /&gt;
*If you create your own variant of the Integration Pack please add a new folder in the branch directory for your files and also create and maintain a wiki page about your work.&lt;br /&gt;
*Don&#039;t do massive layout changes to the trunk files. Create a new branch if you want to improve the design.&lt;br /&gt;
*Don&#039;t use function calls to the [[XML-Interface]] inside loops. If you need a different data set, please ask the developers to add a function for that to the [[XML-Interface]].&lt;br /&gt;
&lt;br /&gt;
==Help==&lt;br /&gt;
For more help, information or feature requests please ask in the Integration Kit section of the [http://www.fsairlines.net/forum/viewforum.php?f=72 FSAirlines forums].&lt;/div&gt;</summary>
		<author><name>Joefremont</name></author>
	</entry>
	<entry>
		<id>https://wiki4.fsairlines.net/index.php?title=XML-Interface-v2&amp;diff=3296</id>
		<title>XML-Interface-v2</title>
		<link rel="alternate" type="text/html" href="https://wiki4.fsairlines.net/index.php?title=XML-Interface-v2&amp;diff=3296"/>
		<updated>2021-05-29T17:46:03Z</updated>

		<summary type="html">&lt;p&gt;Joefremont: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The XML-Interface is the core of the [[VA Integration Kit]]. It has been designed to give VA Administrators with the knowledge of dynamic web techniques the possibility to create their own layout and perfectly integrate the information into their own website using data from FSAirlines. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;This version of the XML interface is now released as beta.&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Changes from the previous version==&lt;br /&gt;
Compared to the previous version of the XML-Interface the following change were made.&lt;br /&gt;
* Change from domain registration to API keys.&lt;br /&gt;
* Rate limits added.&lt;br /&gt;
* Json output format added.&lt;br /&gt;
* Output properly supports UTF-8 character set.&lt;br /&gt;
* Additional functions for packages added.&lt;br /&gt;
&lt;br /&gt;
==Rate limits==&lt;br /&gt;
The access to the interface is limited by the number of calls an VA can make each hour and each day.  An airline with a gold account can make 100 calls each hour and 1200 call each day. An airline with a platinum account can make 500 calls each hour and 6000 call each day. If an airline has multiple members then those limits are added together for each premium account.  Example if an airline has one platinum member and two gold member there limits are 700 an hour and 8400 per day.  Functions related to pilots booking flights do not count against the rate limits.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Access Restriction==&lt;br /&gt;
In order to be able to access data from the Data-Interface you need to create an API key, this can be done using the &#039;Api Key Management&#039; page.  To find this page on the website go to your VA Overview page and then in the options select &#039;Edit VA Settings&#039; and then &#039;Api Key Management&#039;.  &lt;br /&gt;
&lt;br /&gt;
There are two types of API keys that can be created.&lt;br /&gt;
&lt;br /&gt;
Site key:  This key is to be used by your main website/service and may be use the full rate limit allowed by your VA.  After one hundred calls using a site api key, the key will be locked to the IP address used.  If in the future you need to change the IP address all you need to do is delete the old key and create a new one.&lt;br /&gt;
&lt;br /&gt;
Developer key:  This key is used to help you create and test your website on a different machine than your main site.  It will not be limited to a single IP address but will be limited to the number of calls each day your VA is normally allowed each hour.   Usage of the developer key does apply against your VA&#039;s total rate limit.&lt;br /&gt;
&lt;br /&gt;
==Basic Usage==&lt;br /&gt;
The data can be received using HTTP calls to the interface script and add the desired function to the parameters. Here is an example request:&lt;br /&gt;
&amp;lt;pre&amp;gt;http://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;apikey=xxxxx&amp;lt;/pre&amp;gt;&lt;br /&gt;
As you can see there is the interface script &#039;&#039;va_interface.php&#039;&#039;, the function &#039;&#039;getPilotList&#039;&#039; and the parameters &#039;&#039;va_id=7&#039;&#039; and &#039;&#039;apikey=xxxxx&#039;&#039;. Some functions require additional parameters, these can be appended after the other parameters.&lt;br /&gt;
&lt;br /&gt;
The result of the request will be given in xml format with the base-tag being &#039;&#039;&amp;lt;fsa_output&amp;gt;&#039;&#039;. This tag has the attributes &#039;&#039;version&#039;&#039; and &#039;&#039;success&#039;&#039; which show the version number of the interface and if the request succeeded or not. In case of a failure the &#039;&#039;success&#039;&#039;-attribute shows the error message. The following example shows the return text of the above function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;fsa_output version=&amp;quot;1.0&amp;quot; success=&amp;quot;SUCCESS&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;data id=&amp;quot;1&amp;quot; name=&amp;quot;Konrad&amp;quot; surname=&amp;quot;Pustka&amp;quot; va_user=&amp;quot;SNA101&amp;quot; location=&amp;quot;EDDM&amp;quot; lastactive=&amp;quot;1287330550&amp;quot; budget=&amp;quot;198144&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;data id=&amp;quot;2&amp;quot; name=&amp;quot;Claudio&amp;quot; surname=&amp;quot;Gusmini&amp;quot; va_user=&amp;quot;SNA102&amp;quot; location=&amp;quot;EDDM&amp;quot; lastactive=&amp;quot;1286366261&amp;quot; budget=&amp;quot;216405101&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/fsa_output&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Inside the &#039;&#039;fsa_output&#039;&#039;-tag there are the &#039;&#039;data&#039;&#039;-tags which contain all the information.  &lt;br /&gt;
&lt;br /&gt;
When calling using this method the default output format is XML, you can get the out in JSON format by adding a format=json parameter to the request. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxx&amp;lt;/pre&amp;gt;&lt;br /&gt;
The output will be:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;status&amp;quot;: &amp;quot;SUCCESS&amp;quot;,&lt;br /&gt;
    &amp;quot;data&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;id&amp;quot;: 1,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Konrad&amp;quot;,&lt;br /&gt;
            &amp;quot;surname&amp;quot;: &amp;quot;Pustka&amp;quot;,&lt;br /&gt;
            &amp;quot;va_user&amp;quot;: &amp;quot;SNA101&amp;quot;,&lt;br /&gt;
            &amp;quot;location&amp;quot;: &amp;quot;ETSE&amp;quot;,&lt;br /&gt;
            &amp;quot;lastactive&amp;quot;: 1600285079,&lt;br /&gt;
            &amp;quot;budget&amp;quot;: 2400628&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;id&amp;quot;: 2,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Claudio&amp;quot;,&lt;br /&gt;
            &amp;quot;surname&amp;quot;: &amp;quot;Gusmini&amp;quot;,&lt;br /&gt;
            &amp;quot;va_user&amp;quot;: &amp;quot;SNA102&amp;quot;,&lt;br /&gt;
            &amp;quot;location&amp;quot;: &amp;quot;LIMG&amp;quot;,&lt;br /&gt;
            &amp;quot;lastactive&amp;quot;: 1605458811,&lt;br /&gt;
            &amp;quot;budget&amp;quot;: 216631042&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you need something to get started here&#039;s a small example PHP-script showing a list of your pilots&#039; names. Just replace the va_id by your own.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
  $ch = curl_init(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;);&lt;br /&gt;
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
  $http_status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);&lt;br /&gt;
  $http_text = curl_exec($ch);&lt;br /&gt;
&lt;br /&gt;
  $objDOM = new DOMDocument();&lt;br /&gt;
  $objDOM-&amp;gt;loadXML($http_text);&lt;br /&gt;
&lt;br /&gt;
  $dataNodes = $objDOM-&amp;gt;getElementsByTagName(&amp;quot;data&amp;quot;);&lt;br /&gt;
  foreach( $dataNodes as $node )&lt;br /&gt;
  {&lt;br /&gt;
    $name = $node-&amp;gt;getAttribute(&amp;quot;name&amp;quot;);&lt;br /&gt;
    $surname = $node-&amp;gt;getAttribute(&amp;quot;surname&amp;quot;);&lt;br /&gt;
    echo &amp;quot;{$name} {$surname} &amp;lt;br/&amp;gt;&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here is a sample of a PHP script reading the same data in JSON format.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
    $ch = curl_init(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;);&lt;br /&gt;
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
    $http_status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);&lt;br /&gt;
    $http_text = curl_exec($ch);&lt;br /&gt;
    $json_data = json_decode($http_text, true);&lt;br /&gt;
    if ($json_data[&#039;status&#039;] == &#039;SUCCESS&#039;) {&lt;br /&gt;
        foreach($json_data[&#039;data&#039;] as $node) {&lt;br /&gt;
            echo &amp;quot;{$node[&#039;name&#039;]} {$node[&#039;surname&#039;]}&amp;lt;br/&amp;gt;\n&amp;quot;;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a sample of a Python script reading the same data in json format.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    #!/usr/bin/python&lt;br /&gt;
    import requests&lt;br /&gt;
&lt;br /&gt;
    r = requests.get(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;)&lt;br /&gt;
    json_data = r.json()&lt;br /&gt;
    if json_data[&#039;status&#039;] == &#039;SUCCESS&#039;:&lt;br /&gt;
        for node in json_data[&#039;data&#039;]:&lt;br /&gt;
            print(&#039;{} {}&#039;.format(node[&#039;name&#039;], node[&#039;surname&#039;])&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==Pilot Login==&lt;br /&gt;
Several of the functions require that the pilot calling be logged in.  Previous versions of the interface required the call passed the pilots username and a hashed password as parameters.  That method has now been discontinued, in this version you will need to call the &#039;&#039;pilotLogin&#039;&#039; to create a token that can be used to call functions for that pilot.  Unlike other calls in the interface, the &#039;&#039;pilotLogin&#039;&#039; function is also a HTTP POST call rather than a GET call.  Here is an example of calling the &#039;&#039;pilotLogin&#039;&#039; function.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
$post = [&lt;br /&gt;
    &#039;user&#039; =&amp;gt; &#039;username&#039;,&lt;br /&gt;
    &#039;password&#039; =&amp;gt; &#039;xxxxxxxx&#039;&lt;br /&gt;
];&lt;br /&gt;
&lt;br /&gt;
$ch = curl_init(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=pilotLogin&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;);&lt;br /&gt;
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);&lt;br /&gt;
&lt;br /&gt;
$http_text = curl_exec($ch);&lt;br /&gt;
$data = json_decode($http_text, true);&lt;br /&gt;
&lt;br /&gt;
if ($data[&#039;status&#039;] == &#039;SUCCESS&#039;) {&lt;br /&gt;
    $fsa_token = $data[&#039;data&#039;][&#039;token&#039;];&lt;br /&gt;
} else {&lt;br /&gt;
    die(&amp;quot;Login failed&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The data returned in this request includes:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| token&lt;br /&gt;
| The pilots login token.&lt;br /&gt;
|-&lt;br /&gt;
| alt_code&lt;br /&gt;
| The alternate ICAO code of the airport they are currently located based on there default simulator.&lt;br /&gt;
|-&lt;br /&gt;
| budget&lt;br /&gt;
| The pilots current budget&lt;br /&gt;
|-&lt;br /&gt;
| default_sim&lt;br /&gt;
| The pilots default simulator.&lt;br /&gt;
|-&lt;br /&gt;
| location&lt;br /&gt;
| The FSA offical ICAO code of the airport the pilot is located.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| The pilots first name&lt;br /&gt;
|-&lt;br /&gt;
| pilot_id&lt;br /&gt;
| The id number of the pilot.&lt;br /&gt;
|-&lt;br /&gt;
| premium&lt;br /&gt;
| 1 of the pilot is a premium member, 0 if not.&lt;br /&gt;
|-&lt;br /&gt;
| rank&lt;br /&gt;
| The code for the pilots rank within their VA&lt;br /&gt;
|-&lt;br /&gt;
| rank_id&lt;br /&gt;
| The id of the pilots rank within their VA&lt;br /&gt;
|-&lt;br /&gt;
| surname&lt;br /&gt;
| The pilots last or given name &lt;br /&gt;
|-&lt;br /&gt;
| va_id&lt;br /&gt;
| The ID of the pilots VA&lt;br /&gt;
|-&lt;br /&gt;
| va_status&lt;br /&gt;
| The pilots within there airline&lt;br /&gt;
|-&lt;br /&gt;
| va_user&lt;br /&gt;
| The pilots ID within their VA.&lt;br /&gt;
|-&lt;br /&gt;
| weightunit&lt;br /&gt;
| The pilots default unit of measure (kg or lb).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Data==&lt;br /&gt;
The following section contains a detailed list of all the request-functions with their return values. Lately added options are marked &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;green&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Parameters===&lt;br /&gt;
All the request functions use parameters which need to be appended. The following table shows all the parameters and their meaning.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter&lt;br /&gt;
! Meaning&lt;br /&gt;
|- &lt;br /&gt;
| ac_id&lt;br /&gt;
| ID of the aircraft. Is part of the data received from other functions (e.g. getAircraftList).&lt;br /&gt;
|-&lt;br /&gt;
| accept_pp&lt;br /&gt;
| Must be set &#039;1&#039; if Privacy Policy is accepted.&lt;br /&gt;
|-&lt;br /&gt;
| acdb_id&lt;br /&gt;
| ID of the aircraft type. Is part of the data received from other functions (e.g. getAircraftList).&lt;br /&gt;
|-&lt;br /&gt;
| airport&lt;br /&gt;
| Starting airport. Where the user should be placed first.&lt;br /&gt;
|-&lt;br /&gt;
| arr&lt;br /&gt;
| ICAO code of the arrival airport.&lt;br /&gt;
|-&lt;br /&gt;
| count&lt;br /&gt;
| Number past flights which should be displayed.&lt;br /&gt;
|-&lt;br /&gt;
| country&lt;br /&gt;
| Name of the country. &lt;br /&gt;
|-&lt;br /&gt;
| days&lt;br /&gt;
| Number of past days from now which should be displayed.&lt;br /&gt;
|-&lt;br /&gt;
| dep&lt;br /&gt;
| ICAO code of the departure airport.&lt;br /&gt;
|-&lt;br /&gt;
| email&lt;br /&gt;
| E-Mail of the user.&lt;br /&gt;
|-&lt;br /&gt;
| fleet_id&lt;br /&gt;
| ID of the fleet. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| from_ts&lt;br /&gt;
| UNIX timestamp of the date where the listing should start.&lt;br /&gt;
|-&lt;br /&gt;
| givenname&lt;br /&gt;
| Given name of the user.&lt;br /&gt;
|-&lt;br /&gt;
| icao&lt;br /&gt;
| ICAO code of the airport.&lt;br /&gt;
|-&lt;br /&gt;
| pilot_id&lt;br /&gt;
| ID of the pilot. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| report_id&lt;br /&gt;
| ID of the report. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| surname&lt;br /&gt;
| Surname of the user.&lt;br /&gt;
|-&lt;br /&gt;
| to_ts&lt;br /&gt;
| UNIX timestamp of the date where the listing should end.&lt;br /&gt;
|-&lt;br /&gt;
| user&lt;br /&gt;
| Username of the pilot.&lt;br /&gt;
|-&lt;br /&gt;
| token&lt;br /&gt;
| Login token created by the pilotLogin function.&lt;br /&gt;
|-&lt;br /&gt;
| va_id&lt;br /&gt;
| ID of the [[Virtual Airline]]. Is displayed on the [[Overview]] page.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Aircraft Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftData&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, pax_economy, pax_business, pax_first, config_name&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftDBData&lt;br /&gt;
| va_id, acdb_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao, passengers, price, fuel, dow, mtow, speed, engines, cargo, mzfw, market_only, range&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftDBList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registration, state, ac_name, status, fleet_id, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftStats&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| flights, hours, distance&lt;br /&gt;
|-&lt;br /&gt;
| getFleetAircraftList&lt;br /&gt;
| va_id, fleet_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registration, state, ac_name, status, fleet_id, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getFleetList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name&lt;br /&gt;
|-&lt;br /&gt;
| getFleetStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getLeasedAircraftList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registraion, state, ac_name, status, fleet_id, fuel, va_id, name, expire&lt;br /&gt;
|- &lt;br /&gt;
| getPeriodFleetStats&lt;br /&gt;
| va_id, from_ts, to_ts&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Airport Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirportData&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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&lt;br /&gt;
|-&lt;br /&gt;
| getAirportList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| icao, name, city, country, fuel, lat, lon&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Airline Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirlineData&lt;br /&gt;
| va_id, id (=va_id)&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, base, code, budget, homepage, logo_l, logo_s, price (deprecated, will be removed in next release), reputation, pilotcharge, multiplier, mission&lt;br /&gt;
|-&lt;br /&gt;
| getAirlineStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, pax, cargo_kg&lt;br /&gt;
|-&lt;br /&gt;
| getCountryStats&lt;br /&gt;
| va_id, country&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| va_name, id, flights, rating hours, profit, distance, last, fuel_used, pax, cargo_kg&lt;br /&gt;
|- &lt;br /&gt;
| getRankList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, short, settings, pilots, aircrafts, fleet, flights, partnerships, advertisements, fleet_id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Financial Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getLast10Transactions&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| ts, value, reason&lt;br /&gt;
|-&lt;br /&gt;
| getNegTransactionSums&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| value, reason&lt;br /&gt;
|-&lt;br /&gt;
| getPosTransactionSums&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| value, reason&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Flight Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters in brackets are optional&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getActiveFlights&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| departure, arrival, passengers, cargo, user_id, ac_id, flightstate, timestamp, number, lon, lat, pax_economy, pax_business, pax_first&lt;br /&gt;
|-&lt;br /&gt;
| getBookedFlights&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| departure, arrival, passengers, cargo, user_id, ac_id, number, pax_economy, pax_business, pax_first&lt;br /&gt;
|-&lt;br /&gt;
| getFlightReports&lt;br /&gt;
| va_id, (acdb_id), (ac_id), (pilot_id), (days), (count)&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;pax_economy, pax_business, pax_first&amp;lt;/span&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
| getReportDetail&lt;br /&gt;
| va_id, report_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;vs, pax_economy, pax_business, pax_first, ticket_business, ticket_first, fuel_start, fuel_dep, fuel_takeoff, fuel_land, fuel_finish, ticket_factor, interface, simversion, os&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| getRouteData&lt;br /&gt;
| va_id, route_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, va_id, cs_vaid, number, dep, arr, deptime, arrtime, simrate, days, price, state, flighttype, acdb_list, ac_id, remarks, route, limit_pax, limit_cargo&lt;br /&gt;
|-&lt;br /&gt;
| getRouteList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, number, dep, dep_country, arr, arr_country, deptime, arrtime, simrate, days, price, state, flighttype, acdb_list, ac_id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Pilot Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getPeriodPilotStats&lt;br /&gt;
| va_id, from_ts, to_ts&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getPilotData&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, surname, user, va_user, rank_id, location, budget, lastactive, active, sigac, timezone, weightunit, language, msgmail, rank, flights, rating, hours, distance, pax, cargo_kg, picture&lt;br /&gt;
|-&lt;br /&gt;
| getPilotHours&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao, hours&lt;br /&gt;
|-&lt;br /&gt;
| getPilotList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, surname, user, va_user, rank_id, location, last_active, status, budget&lt;br /&gt;
|-&lt;br /&gt;
| getPilotRatings&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, training, manufacturer, type&lt;br /&gt;
|-&lt;br /&gt;
| getPilotStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getPilotStatus&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| ac_id, route_id, departure, arrival, dep_time, dist, duration, status, lon, lat, flightstate, passengers, income, ticket, timestamp, cargo, multiplier, flighttype&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Flight Booking===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| bookFlight&lt;br /&gt;
| va_id, pilot_id, token, route_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| success, message, codeshare, codeshare_msg&lt;br /&gt;
|-&lt;br /&gt;
| cancelFlight&lt;br /&gt;
| va_id, pilot_id, token&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| result, loss&lt;br /&gt;
|-&lt;br /&gt;
| getBookableRoutes&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| number, dep, arr, deptime, arrtime, id, state, simrate, flighttype, training, price, list, ac_id&lt;br /&gt;
|-&lt;br /&gt;
| getBookableAircraft&lt;br /&gt;
| va_id, pilot_id, route_id&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| type, registration, state, id, name, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getBookStatus&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| status&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Miscellaneous User Functions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| createAccount&lt;br /&gt;
| va_id, givenname, surname, username, email, password, airport, accept_pp&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| success, message, code&lt;br /&gt;
|-&lt;br /&gt;
| getPilotID&lt;br /&gt;
| va_id, user, token&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id&lt;br /&gt;
|-&lt;br /&gt;
| getPrivacyPolicy&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS&lt;br /&gt;
| policy&lt;br /&gt;
|-&lt;br /&gt;
| getTransferCost&lt;br /&gt;
| va_id, arr, dep&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| cost&lt;br /&gt;
|-&lt;br /&gt;
| transferPilot&lt;br /&gt;
| va_id, pilot_id, token, icao&lt;br /&gt;
| SUCCESS, NOT FOUND, INSUFFICIENT FUNDS&lt;br /&gt;
| cost&lt;br /&gt;
|- &lt;br /&gt;
| getDistance&lt;br /&gt;
| va_id, icao_from, icao_to&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| distance&lt;br /&gt;
|- &lt;br /&gt;
| getMetar&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| metar&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Requested additional functions===&lt;br /&gt;
The following list contains all the functions which were requested by users but aren&#039;t implemented yet.&lt;br /&gt;
*Create, edit and delete routes&lt;/div&gt;</summary>
		<author><name>Joefremont</name></author>
	</entry>
	<entry>
		<id>https://wiki4.fsairlines.net/index.php?title=XML-Interface-v2&amp;diff=3295</id>
		<title>XML-Interface-v2</title>
		<link rel="alternate" type="text/html" href="https://wiki4.fsairlines.net/index.php?title=XML-Interface-v2&amp;diff=3295"/>
		<updated>2021-04-07T00:08:35Z</updated>

		<summary type="html">&lt;p&gt;Joefremont: /* Access Restriction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The XML-Interface is the core of the [[VA Integration Kit]]. It has been designed to give VA Administrators with the knowledge of dynamic web techniques the possibility to create their own layout and perfectly integrate the information into their own website using data from FSAirlines. &lt;br /&gt;
&lt;br /&gt;
==Changes from the previous version==&lt;br /&gt;
Compared to the previous version of the XML-Interface the following change were made.&lt;br /&gt;
* Change from domain registration to API keys.&lt;br /&gt;
* Rate limits added.&lt;br /&gt;
* Json output format added.&lt;br /&gt;
* Output properly supports UTF-8 character set.&lt;br /&gt;
* Additional functions for packages added.&lt;br /&gt;
&lt;br /&gt;
==Rate limits==&lt;br /&gt;
The access to the interface is limited by the number of calls an VA can make each hour and each day.  An airline with a gold account can make 100 calls each hour and 1200 call each day. An airline with a platinum account can make 500 calls each hour and 6000 call each day. If an airline has multiple members then those limits are added together for each premium account.  Example if an airline has one platinum member and two gold member there limits are 700 an hour and 8400 per day.  Functions related to pilots booking flights do not count against the rate limits.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Access Restriction==&lt;br /&gt;
In order to be able to access data from the Data-Interface you need to create an API key, this can be done using the &#039;Api Key Management&#039; page.  To find this page on the website go to your VA Overview page and then in the options select &#039;Edit VA Settings&#039; and then &#039;Api Key Management&#039;.  &lt;br /&gt;
&lt;br /&gt;
There are two types of API keys that can be created.&lt;br /&gt;
&lt;br /&gt;
Site key:  This key is to be used by your main website/service and may be use the full rate limit allowed by your VA.  After one hundred calls using a site api key, the key will be locked to the IP address used.  If in the future you need to change the IP address all you need to do is delete the old key and create a new one.&lt;br /&gt;
&lt;br /&gt;
Developer key:  This key is used to help you create and test your website on a different machine than your main site.  It will not be limited to a single IP address but will be limited to the number of calls each day your VA is normally allowed each hour.   Usage of the developer key does apply against your VA&#039;s total rate limit.&lt;br /&gt;
&lt;br /&gt;
==Basic Usage==&lt;br /&gt;
The data can be received using HTTP calls to the interface script and add the desired function to the parameters. Here is an example request:&lt;br /&gt;
&amp;lt;pre&amp;gt;http://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;apikey=xxxxx&amp;lt;/pre&amp;gt;&lt;br /&gt;
As you can see there is the interface script &#039;&#039;va_interface.php&#039;&#039;, the function &#039;&#039;getPilotList&#039;&#039; and the parameters &#039;&#039;va_id=7&#039;&#039; and &#039;&#039;apikey=xxxxx&#039;&#039;. Some functions require additional parameters, these can be appended after the other parameters.&lt;br /&gt;
&lt;br /&gt;
The result of the request will be given in xml format with the base-tag being &#039;&#039;&amp;lt;fsa_output&amp;gt;&#039;&#039;. This tag has the attributes &#039;&#039;version&#039;&#039; and &#039;&#039;success&#039;&#039; which show the version number of the interface and if the request succeeded or not. In case of a failure the &#039;&#039;success&#039;&#039;-attribute shows the error message. The following example shows the return text of the above function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;fsa_output version=&amp;quot;1.0&amp;quot; success=&amp;quot;SUCCESS&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;data id=&amp;quot;1&amp;quot; name=&amp;quot;Konrad&amp;quot; surname=&amp;quot;Pustka&amp;quot; va_user=&amp;quot;SNA101&amp;quot; location=&amp;quot;EDDM&amp;quot; lastactive=&amp;quot;1287330550&amp;quot; budget=&amp;quot;198144&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;data id=&amp;quot;2&amp;quot; name=&amp;quot;Claudio&amp;quot; surname=&amp;quot;Gusmini&amp;quot; va_user=&amp;quot;SNA102&amp;quot; location=&amp;quot;EDDM&amp;quot; lastactive=&amp;quot;1286366261&amp;quot; budget=&amp;quot;216405101&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/fsa_output&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Inside the &#039;&#039;fsa_output&#039;&#039;-tag there are the &#039;&#039;data&#039;&#039;-tags which contain all the information.  &lt;br /&gt;
&lt;br /&gt;
When calling using this method the default output format is XML, you can get the out in JSON format by adding a format=json parameter to the request. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxx&amp;lt;/pre&amp;gt;&lt;br /&gt;
The output will be:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;status&amp;quot;: &amp;quot;SUCCESS&amp;quot;,&lt;br /&gt;
    &amp;quot;data&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;id&amp;quot;: 1,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Konrad&amp;quot;,&lt;br /&gt;
            &amp;quot;surname&amp;quot;: &amp;quot;Pustka&amp;quot;,&lt;br /&gt;
            &amp;quot;va_user&amp;quot;: &amp;quot;SNA101&amp;quot;,&lt;br /&gt;
            &amp;quot;location&amp;quot;: &amp;quot;ETSE&amp;quot;,&lt;br /&gt;
            &amp;quot;lastactive&amp;quot;: 1600285079,&lt;br /&gt;
            &amp;quot;budget&amp;quot;: 2400628&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;id&amp;quot;: 2,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Claudio&amp;quot;,&lt;br /&gt;
            &amp;quot;surname&amp;quot;: &amp;quot;Gusmini&amp;quot;,&lt;br /&gt;
            &amp;quot;va_user&amp;quot;: &amp;quot;SNA102&amp;quot;,&lt;br /&gt;
            &amp;quot;location&amp;quot;: &amp;quot;LIMG&amp;quot;,&lt;br /&gt;
            &amp;quot;lastactive&amp;quot;: 1605458811,&lt;br /&gt;
            &amp;quot;budget&amp;quot;: 216631042&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you need something to get started here&#039;s a small example PHP-script showing a list of your pilots&#039; names. Just replace the va_id by your own.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
  $ch = curl_init(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;);&lt;br /&gt;
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
  $http_status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);&lt;br /&gt;
  $http_text = curl_exec($ch);&lt;br /&gt;
&lt;br /&gt;
  $objDOM = new DOMDocument();&lt;br /&gt;
  $objDOM-&amp;gt;loadXML($http_text);&lt;br /&gt;
&lt;br /&gt;
  $dataNodes = $objDOM-&amp;gt;getElementsByTagName(&amp;quot;data&amp;quot;);&lt;br /&gt;
  foreach( $dataNodes as $node )&lt;br /&gt;
  {&lt;br /&gt;
    $name = $node-&amp;gt;getAttribute(&amp;quot;name&amp;quot;);&lt;br /&gt;
    $surname = $node-&amp;gt;getAttribute(&amp;quot;surname&amp;quot;);&lt;br /&gt;
    echo &amp;quot;{$name} {$surname} &amp;lt;br/&amp;gt;&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here is a sample of a PHP script reading the same data in JSON format.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
    $ch = curl_init(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;);&lt;br /&gt;
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
    $http_status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);&lt;br /&gt;
    $http_text = curl_exec($ch);&lt;br /&gt;
    $json_data = json_decode($http_text, true);&lt;br /&gt;
    if ($json_data[&#039;status&#039;] == &#039;SUCCESS&#039;) {&lt;br /&gt;
        foreach($json_data[&#039;data&#039;] as $node) {&lt;br /&gt;
            echo &amp;quot;{$node[&#039;name&#039;]} {$node[&#039;surname&#039;]}&amp;lt;br/&amp;gt;\n&amp;quot;;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a sample of a Python script reading the same data in json format.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    #!/usr/bin/python&lt;br /&gt;
    import requests&lt;br /&gt;
&lt;br /&gt;
    r = requests.get(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;)&lt;br /&gt;
    json_data = r.json()&lt;br /&gt;
    if json_data[&#039;status&#039;] == &#039;SUCCESS&#039;:&lt;br /&gt;
        for node in json_data[&#039;data&#039;]:&lt;br /&gt;
            print(&#039;{} {}&#039;.format(node[&#039;name&#039;], node[&#039;surname&#039;])&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==Pilot Login==&lt;br /&gt;
Several of the functions require that the pilot calling be logged in.  Previous versions of the interface required the call passed the pilots username and a hashed password as parameters.  That method has now been discontinued, in this version you will need to call the &#039;&#039;pilotLogin&#039;&#039; to create a token that can be used to call functions for that pilot.  Unlike other calls in the interface, the &#039;&#039;pilotLogin&#039;&#039; function is also a HTTP POST call rather than a GET call.  Here is an example of calling the &#039;&#039;pilotLogin&#039;&#039; function.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
$post = [&lt;br /&gt;
    &#039;user&#039; =&amp;gt; &#039;username&#039;,&lt;br /&gt;
    &#039;password&#039; =&amp;gt; &#039;xxxxxxxx&#039;&lt;br /&gt;
];&lt;br /&gt;
&lt;br /&gt;
$ch = curl_init(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=pilotLogin&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;);&lt;br /&gt;
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);&lt;br /&gt;
&lt;br /&gt;
$http_text = curl_exec($ch);&lt;br /&gt;
$data = json_decode($http_text, true);&lt;br /&gt;
&lt;br /&gt;
if ($data[&#039;status&#039;] == &#039;SUCCESS&#039;) {&lt;br /&gt;
    $fsa_token = $data[&#039;data&#039;][&#039;token&#039;];&lt;br /&gt;
} else {&lt;br /&gt;
    die(&amp;quot;Login failed&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The data returned in this request includes:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| token&lt;br /&gt;
| The pilots login token.&lt;br /&gt;
|-&lt;br /&gt;
| alt_code&lt;br /&gt;
| The alternate ICAO code of the airport they are currently located based on there default simulator.&lt;br /&gt;
|-&lt;br /&gt;
| budget&lt;br /&gt;
| The pilots current budget&lt;br /&gt;
|-&lt;br /&gt;
| default_sim&lt;br /&gt;
| The pilots default simulator.&lt;br /&gt;
|-&lt;br /&gt;
| location&lt;br /&gt;
| The FSA offical ICAO code of the airport the pilot is located.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| The pilots first name&lt;br /&gt;
|-&lt;br /&gt;
| pilot_id&lt;br /&gt;
| The id number of the pilot.&lt;br /&gt;
|-&lt;br /&gt;
| premium&lt;br /&gt;
| 1 of the pilot is a premium member, 0 if not.&lt;br /&gt;
|-&lt;br /&gt;
| rank&lt;br /&gt;
| The code for the pilots rank within their VA&lt;br /&gt;
|-&lt;br /&gt;
| rank_id&lt;br /&gt;
| The id of the pilots rank within their VA&lt;br /&gt;
|-&lt;br /&gt;
| surname&lt;br /&gt;
| The pilots last or given name &lt;br /&gt;
|-&lt;br /&gt;
| va_id&lt;br /&gt;
| The ID of the pilots VA&lt;br /&gt;
|-&lt;br /&gt;
| va_status&lt;br /&gt;
| The pilots within there airline&lt;br /&gt;
|-&lt;br /&gt;
| va_user&lt;br /&gt;
| The pilots ID within their VA.&lt;br /&gt;
|-&lt;br /&gt;
| weightunit&lt;br /&gt;
| The pilots default unit of measure (kg or lb).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Data==&lt;br /&gt;
The following section contains a detailed list of all the request-functions with their return values. Lately added options are marked &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;green&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Parameters===&lt;br /&gt;
All the request functions use parameters which need to be appended. The following table shows all the parameters and their meaning.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter&lt;br /&gt;
! Meaning&lt;br /&gt;
|- &lt;br /&gt;
| ac_id&lt;br /&gt;
| ID of the aircraft. Is part of the data received from other functions (e.g. getAircraftList).&lt;br /&gt;
|-&lt;br /&gt;
| accept_pp&lt;br /&gt;
| Must be set &#039;1&#039; if Privacy Policy is accepted.&lt;br /&gt;
|-&lt;br /&gt;
| acdb_id&lt;br /&gt;
| ID of the aircraft type. Is part of the data received from other functions (e.g. getAircraftList).&lt;br /&gt;
|-&lt;br /&gt;
| airport&lt;br /&gt;
| Starting airport. Where the user should be placed first.&lt;br /&gt;
|-&lt;br /&gt;
| arr&lt;br /&gt;
| ICAO code of the arrival airport.&lt;br /&gt;
|-&lt;br /&gt;
| count&lt;br /&gt;
| Number past flights which should be displayed.&lt;br /&gt;
|-&lt;br /&gt;
| country&lt;br /&gt;
| Name of the country. &lt;br /&gt;
|-&lt;br /&gt;
| days&lt;br /&gt;
| Number of past days from now which should be displayed.&lt;br /&gt;
|-&lt;br /&gt;
| dep&lt;br /&gt;
| ICAO code of the departure airport.&lt;br /&gt;
|-&lt;br /&gt;
| email&lt;br /&gt;
| E-Mail of the user.&lt;br /&gt;
|-&lt;br /&gt;
| fleet_id&lt;br /&gt;
| ID of the fleet. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| from_ts&lt;br /&gt;
| UNIX timestamp of the date where the listing should start.&lt;br /&gt;
|-&lt;br /&gt;
| givenname&lt;br /&gt;
| Given name of the user.&lt;br /&gt;
|-&lt;br /&gt;
| icao&lt;br /&gt;
| ICAO code of the airport.&lt;br /&gt;
|-&lt;br /&gt;
| pilot_id&lt;br /&gt;
| ID of the pilot. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| report_id&lt;br /&gt;
| ID of the report. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| surname&lt;br /&gt;
| Surname of the user.&lt;br /&gt;
|-&lt;br /&gt;
| to_ts&lt;br /&gt;
| UNIX timestamp of the date where the listing should end.&lt;br /&gt;
|-&lt;br /&gt;
| user&lt;br /&gt;
| Username of the pilot.&lt;br /&gt;
|-&lt;br /&gt;
| token&lt;br /&gt;
| Login token created by the pilotLogin function.&lt;br /&gt;
|-&lt;br /&gt;
| va_id&lt;br /&gt;
| ID of the [[Virtual Airline]]. Is displayed on the [[Overview]] page.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Aircraft Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftData&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, pax_economy, pax_business, pax_first, config_name&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftDBData&lt;br /&gt;
| va_id, acdb_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao, passengers, price, fuel, dow, mtow, speed, engines, cargo, mzfw, market_only, range&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftDBList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registration, state, ac_name, status, fleet_id, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftStats&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| flights, hours, distance&lt;br /&gt;
|-&lt;br /&gt;
| getFleetAircraftList&lt;br /&gt;
| va_id, fleet_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registration, state, ac_name, status, fleet_id, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getFleetList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name&lt;br /&gt;
|-&lt;br /&gt;
| getFleetStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getLeasedAircraftList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registraion, state, ac_name, status, fleet_id, fuel, va_id, name, expire&lt;br /&gt;
|- &lt;br /&gt;
| getPeriodFleetStats&lt;br /&gt;
| va_id, from_ts, to_ts&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Airport Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirportData&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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&lt;br /&gt;
|-&lt;br /&gt;
| getAirportList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| icao, name, city, country, fuel, lat, lon&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Airline Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirlineData&lt;br /&gt;
| va_id, id (=va_id)&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, base, code, budget, homepage, logo_l, logo_s, price (deprecated, will be removed in next release), reputation, pilotcharge, multiplier, mission&lt;br /&gt;
|-&lt;br /&gt;
| getAirlineStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, pax, cargo_kg&lt;br /&gt;
|-&lt;br /&gt;
| getCountryStats&lt;br /&gt;
| va_id, country&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| va_name, id, flights, rating hours, profit, distance, last, fuel_used, pax, cargo_kg&lt;br /&gt;
|- &lt;br /&gt;
| getRankList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, short, settings, pilots, aircrafts, fleet, flights, partnerships, advertisements, fleet_id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Financial Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getLast10Transactions&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| ts, value, reason&lt;br /&gt;
|-&lt;br /&gt;
| getNegTransactionSums&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| value, reason&lt;br /&gt;
|-&lt;br /&gt;
| getPosTransactionSums&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| value, reason&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Flight Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters in brackets are optional&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getActiveFlights&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| departure, arrival, passengers, cargo, user_id, ac_id, flightstate, timestamp, number, lon, lat, pax_economy, pax_business, pax_first&lt;br /&gt;
|-&lt;br /&gt;
| getBookedFlights&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| departure, arrival, passengers, cargo, user_id, ac_id, number, pax_economy, pax_business, pax_first&lt;br /&gt;
|-&lt;br /&gt;
| getFlightReports&lt;br /&gt;
| va_id, (acdb_id), (ac_id), (pilot_id), (days), (count)&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;pax_economy, pax_business, pax_first&amp;lt;/span&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
| getReportDetail&lt;br /&gt;
| va_id, report_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;vs, pax_economy, pax_business, pax_first, ticket_business, ticket_first, fuel_start, fuel_dep, fuel_takeoff, fuel_land, fuel_finish, ticket_factor, interface, simversion, os&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| getRouteData&lt;br /&gt;
| va_id, route_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, va_id, cs_vaid, number, dep, arr, deptime, arrtime, simrate, days, price, state, flighttype, acdb_list, ac_id, remarks, route, limit_pax, limit_cargo&lt;br /&gt;
|-&lt;br /&gt;
| getRouteList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, number, dep, dep_country, arr, arr_country, deptime, arrtime, simrate, days, price, state, flighttype, acdb_list, ac_id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Pilot Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getPeriodPilotStats&lt;br /&gt;
| va_id, from_ts, to_ts&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getPilotData&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, surname, user, va_user, rank_id, location, budget, lastactive, active, sigac, timezone, weightunit, language, msgmail, rank, flights, rating, hours, distance, pax, cargo_kg, picture&lt;br /&gt;
|-&lt;br /&gt;
| getPilotHours&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao, hours&lt;br /&gt;
|-&lt;br /&gt;
| getPilotList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, surname, user, va_user, rank_id, location, last_active, status, budget&lt;br /&gt;
|-&lt;br /&gt;
| getPilotRatings&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, training, manufacturer, type&lt;br /&gt;
|-&lt;br /&gt;
| getPilotStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getPilotStatus&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| ac_id, route_id, departure, arrival, dep_time, dist, duration, status, lon, lat, flightstate, passengers, income, ticket, timestamp, cargo, multiplier, flighttype&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Flight Booking===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| bookFlight&lt;br /&gt;
| va_id, pilot_id, token, route_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| success, message, codeshare, codeshare_msg&lt;br /&gt;
|-&lt;br /&gt;
| cancelFlight&lt;br /&gt;
| va_id, pilot_id, token&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| result, loss&lt;br /&gt;
|-&lt;br /&gt;
| getBookableRoutes&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| number, dep, arr, deptime, arrtime, id, state, simrate, flighttype, training, price, list, ac_id&lt;br /&gt;
|-&lt;br /&gt;
| getBookableAircraft&lt;br /&gt;
| va_id, pilot_id, route_id&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| type, registration, state, id, name, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getBookStatus&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| status&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Miscellaneous User Functions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| createAccount&lt;br /&gt;
| va_id, givenname, surname, username, email, password, airport, accept_pp&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| success, message, code&lt;br /&gt;
|-&lt;br /&gt;
| getPilotID&lt;br /&gt;
| va_id, user, token&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id&lt;br /&gt;
|-&lt;br /&gt;
| getPrivacyPolicy&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS&lt;br /&gt;
| policy&lt;br /&gt;
|-&lt;br /&gt;
| getTransferCost&lt;br /&gt;
| va_id, arr, dep&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| cost&lt;br /&gt;
|-&lt;br /&gt;
| transferPilot&lt;br /&gt;
| va_id, pilot_id, token, icao&lt;br /&gt;
| SUCCESS, NOT FOUND, INSUFFICIENT FUNDS&lt;br /&gt;
| cost&lt;br /&gt;
|- &lt;br /&gt;
| getDistance&lt;br /&gt;
| va_id, icao_from, icao_to&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| distance&lt;br /&gt;
|- &lt;br /&gt;
| getMetar&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| metar&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Requested additional functions===&lt;br /&gt;
The following list contains all the functions which were requested by users but aren&#039;t implemented yet.&lt;br /&gt;
*Create, edit and delete routes&lt;/div&gt;</summary>
		<author><name>Joefremont</name></author>
	</entry>
	<entry>
		<id>https://wiki4.fsairlines.net/index.php?title=XML-Interface-v2&amp;diff=3294</id>
		<title>XML-Interface-v2</title>
		<link rel="alternate" type="text/html" href="https://wiki4.fsairlines.net/index.php?title=XML-Interface-v2&amp;diff=3294"/>
		<updated>2021-03-25T00:17:32Z</updated>

		<summary type="html">&lt;p&gt;Joefremont: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The XML-Interface is the core of the [[VA Integration Kit]]. It has been designed to give VA Administrators with the knowledge of dynamic web techniques the possibility to create their own layout and perfectly integrate the information into their own website using data from FSAirlines. &lt;br /&gt;
&lt;br /&gt;
==Changes from the previous version==&lt;br /&gt;
Compared to the previous version of the XML-Interface the following change were made.&lt;br /&gt;
* Change from domain registration to API keys.&lt;br /&gt;
* Rate limits added.&lt;br /&gt;
* Json output format added.&lt;br /&gt;
* Output properly supports UTF-8 character set.&lt;br /&gt;
* Additional functions for packages added.&lt;br /&gt;
&lt;br /&gt;
==Rate limits==&lt;br /&gt;
The access to the interface is limited by the number of calls an VA can make each hour and each day.  An airline with a gold account can make 100 calls each hour and 1200 call each day. An airline with a platinum account can make 500 calls each hour and 6000 call each day. If an airline has multiple members then those limits are added together for each premium account.  Example if an airline has one platinum member and two gold member there limits are 700 an hour and 8400 per day.  Functions related to pilots booking flights do not count against the rate limits.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Access Restriction==&lt;br /&gt;
In order to be able to access data from the Data-Interface you need to create an API key, this can be done using the &#039;Api Key Management&#039; page on the website accessible from the options on the VA overview page.  There are two types of API keys that can be created.&lt;br /&gt;
&lt;br /&gt;
Site key:  This key is to be used by your main website/service and may be use the full rate limit allowed by your VA.  After one hundred calls using a site api key, the key will be locked to the IP address used.  If in the future you need to change the IP address all you need to do is delete the old key and create a new one.&lt;br /&gt;
&lt;br /&gt;
Developer key:  This key is used to help you create and test your website on a different machine than your main site.  It will not be limited to a single IP address but will be limited to the number of calls each day your VA is normally allowed each hour.   Usage of the developer key does apply against your VA&#039;s total rate limit.&lt;br /&gt;
&lt;br /&gt;
==Basic Usage==&lt;br /&gt;
The data can be received using HTTP calls to the interface script and add the desired function to the parameters. Here is an example request:&lt;br /&gt;
&amp;lt;pre&amp;gt;http://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;apikey=xxxxx&amp;lt;/pre&amp;gt;&lt;br /&gt;
As you can see there is the interface script &#039;&#039;va_interface.php&#039;&#039;, the function &#039;&#039;getPilotList&#039;&#039; and the parameters &#039;&#039;va_id=7&#039;&#039; and &#039;&#039;apikey=xxxxx&#039;&#039;. Some functions require additional parameters, these can be appended after the other parameters.&lt;br /&gt;
&lt;br /&gt;
The result of the request will be given in xml format with the base-tag being &#039;&#039;&amp;lt;fsa_output&amp;gt;&#039;&#039;. This tag has the attributes &#039;&#039;version&#039;&#039; and &#039;&#039;success&#039;&#039; which show the version number of the interface and if the request succeeded or not. In case of a failure the &#039;&#039;success&#039;&#039;-attribute shows the error message. The following example shows the return text of the above function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;fsa_output version=&amp;quot;1.0&amp;quot; success=&amp;quot;SUCCESS&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;data id=&amp;quot;1&amp;quot; name=&amp;quot;Konrad&amp;quot; surname=&amp;quot;Pustka&amp;quot; va_user=&amp;quot;SNA101&amp;quot; location=&amp;quot;EDDM&amp;quot; lastactive=&amp;quot;1287330550&amp;quot; budget=&amp;quot;198144&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;data id=&amp;quot;2&amp;quot; name=&amp;quot;Claudio&amp;quot; surname=&amp;quot;Gusmini&amp;quot; va_user=&amp;quot;SNA102&amp;quot; location=&amp;quot;EDDM&amp;quot; lastactive=&amp;quot;1286366261&amp;quot; budget=&amp;quot;216405101&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/fsa_output&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Inside the &#039;&#039;fsa_output&#039;&#039;-tag there are the &#039;&#039;data&#039;&#039;-tags which contain all the information.  &lt;br /&gt;
&lt;br /&gt;
When calling using this method the default output format is XML, you can get the out in JSON format by adding a format=json parameter to the request. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxx&amp;lt;/pre&amp;gt;&lt;br /&gt;
The output will be:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;status&amp;quot;: &amp;quot;SUCCESS&amp;quot;,&lt;br /&gt;
    &amp;quot;data&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;id&amp;quot;: 1,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Konrad&amp;quot;,&lt;br /&gt;
            &amp;quot;surname&amp;quot;: &amp;quot;Pustka&amp;quot;,&lt;br /&gt;
            &amp;quot;va_user&amp;quot;: &amp;quot;SNA101&amp;quot;,&lt;br /&gt;
            &amp;quot;location&amp;quot;: &amp;quot;ETSE&amp;quot;,&lt;br /&gt;
            &amp;quot;lastactive&amp;quot;: 1600285079,&lt;br /&gt;
            &amp;quot;budget&amp;quot;: 2400628&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;id&amp;quot;: 2,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Claudio&amp;quot;,&lt;br /&gt;
            &amp;quot;surname&amp;quot;: &amp;quot;Gusmini&amp;quot;,&lt;br /&gt;
            &amp;quot;va_user&amp;quot;: &amp;quot;SNA102&amp;quot;,&lt;br /&gt;
            &amp;quot;location&amp;quot;: &amp;quot;LIMG&amp;quot;,&lt;br /&gt;
            &amp;quot;lastactive&amp;quot;: 1605458811,&lt;br /&gt;
            &amp;quot;budget&amp;quot;: 216631042&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you need something to get started here&#039;s a small example PHP-script showing a list of your pilots&#039; names. Just replace the va_id by your own.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
  $ch = curl_init(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;);&lt;br /&gt;
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
  $http_status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);&lt;br /&gt;
  $http_text = curl_exec($ch);&lt;br /&gt;
&lt;br /&gt;
  $objDOM = new DOMDocument();&lt;br /&gt;
  $objDOM-&amp;gt;loadXML($http_text);&lt;br /&gt;
&lt;br /&gt;
  $dataNodes = $objDOM-&amp;gt;getElementsByTagName(&amp;quot;data&amp;quot;);&lt;br /&gt;
  foreach( $dataNodes as $node )&lt;br /&gt;
  {&lt;br /&gt;
    $name = $node-&amp;gt;getAttribute(&amp;quot;name&amp;quot;);&lt;br /&gt;
    $surname = $node-&amp;gt;getAttribute(&amp;quot;surname&amp;quot;);&lt;br /&gt;
    echo &amp;quot;{$name} {$surname} &amp;lt;br/&amp;gt;&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here is a sample of a PHP script reading the same data in JSON format.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
    $ch = curl_init(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;);&lt;br /&gt;
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
    $http_status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);&lt;br /&gt;
    $http_text = curl_exec($ch);&lt;br /&gt;
    $json_data = json_decode($http_text, true);&lt;br /&gt;
    if ($json_data[&#039;status&#039;] == &#039;SUCCESS&#039;) {&lt;br /&gt;
        foreach($json_data[&#039;data&#039;] as $node) {&lt;br /&gt;
            echo &amp;quot;{$node[&#039;name&#039;]} {$node[&#039;surname&#039;]}&amp;lt;br/&amp;gt;\n&amp;quot;;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a sample of a Python script reading the same data in json format.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    #!/usr/bin/python&lt;br /&gt;
    import requests&lt;br /&gt;
&lt;br /&gt;
    r = requests.get(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;)&lt;br /&gt;
    json_data = r.json()&lt;br /&gt;
    if json_data[&#039;status&#039;] == &#039;SUCCESS&#039;:&lt;br /&gt;
        for node in json_data[&#039;data&#039;]:&lt;br /&gt;
            print(&#039;{} {}&#039;.format(node[&#039;name&#039;], node[&#039;surname&#039;])&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==Pilot Login==&lt;br /&gt;
Several of the functions require that the pilot calling be logged in.  Previous versions of the interface required the call passed the pilots username and a hashed password as parameters.  That method has now been discontinued, in this version you will need to call the &#039;&#039;pilotLogin&#039;&#039; to create a token that can be used to call functions for that pilot.  Unlike other calls in the interface, the &#039;&#039;pilotLogin&#039;&#039; function is also a HTTP POST call rather than a GET call.  Here is an example of calling the &#039;&#039;pilotLogin&#039;&#039; function.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
$post = [&lt;br /&gt;
    &#039;user&#039; =&amp;gt; &#039;username&#039;,&lt;br /&gt;
    &#039;password&#039; =&amp;gt; &#039;xxxxxxxx&#039;&lt;br /&gt;
];&lt;br /&gt;
&lt;br /&gt;
$ch = curl_init(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=pilotLogin&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;);&lt;br /&gt;
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);&lt;br /&gt;
&lt;br /&gt;
$http_text = curl_exec($ch);&lt;br /&gt;
$data = json_decode($http_text, true);&lt;br /&gt;
&lt;br /&gt;
if ($data[&#039;status&#039;] == &#039;SUCCESS&#039;) {&lt;br /&gt;
    $fsa_token = $data[&#039;data&#039;][&#039;token&#039;];&lt;br /&gt;
} else {&lt;br /&gt;
    die(&amp;quot;Login failed&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The data returned in this request includes:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| token&lt;br /&gt;
| The pilots login token.&lt;br /&gt;
|-&lt;br /&gt;
| alt_code&lt;br /&gt;
| The alternate ICAO code of the airport they are currently located based on there default simulator.&lt;br /&gt;
|-&lt;br /&gt;
| budget&lt;br /&gt;
| The pilots current budget&lt;br /&gt;
|-&lt;br /&gt;
| default_sim&lt;br /&gt;
| The pilots default simulator.&lt;br /&gt;
|-&lt;br /&gt;
| location&lt;br /&gt;
| The FSA offical ICAO code of the airport the pilot is located.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| The pilots first name&lt;br /&gt;
|-&lt;br /&gt;
| pilot_id&lt;br /&gt;
| The id number of the pilot.&lt;br /&gt;
|-&lt;br /&gt;
| premium&lt;br /&gt;
| 1 of the pilot is a premium member, 0 if not.&lt;br /&gt;
|-&lt;br /&gt;
| rank&lt;br /&gt;
| The code for the pilots rank within their VA&lt;br /&gt;
|-&lt;br /&gt;
| rank_id&lt;br /&gt;
| The id of the pilots rank within their VA&lt;br /&gt;
|-&lt;br /&gt;
| surname&lt;br /&gt;
| The pilots last or given name &lt;br /&gt;
|-&lt;br /&gt;
| va_id&lt;br /&gt;
| The ID of the pilots VA&lt;br /&gt;
|-&lt;br /&gt;
| va_status&lt;br /&gt;
| The pilots within there airline&lt;br /&gt;
|-&lt;br /&gt;
| va_user&lt;br /&gt;
| The pilots ID within their VA.&lt;br /&gt;
|-&lt;br /&gt;
| weightunit&lt;br /&gt;
| The pilots default unit of measure (kg or lb).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Data==&lt;br /&gt;
The following section contains a detailed list of all the request-functions with their return values. Lately added options are marked &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;green&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Parameters===&lt;br /&gt;
All the request functions use parameters which need to be appended. The following table shows all the parameters and their meaning.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter&lt;br /&gt;
! Meaning&lt;br /&gt;
|- &lt;br /&gt;
| ac_id&lt;br /&gt;
| ID of the aircraft. Is part of the data received from other functions (e.g. getAircraftList).&lt;br /&gt;
|-&lt;br /&gt;
| accept_pp&lt;br /&gt;
| Must be set &#039;1&#039; if Privacy Policy is accepted.&lt;br /&gt;
|-&lt;br /&gt;
| acdb_id&lt;br /&gt;
| ID of the aircraft type. Is part of the data received from other functions (e.g. getAircraftList).&lt;br /&gt;
|-&lt;br /&gt;
| airport&lt;br /&gt;
| Starting airport. Where the user should be placed first.&lt;br /&gt;
|-&lt;br /&gt;
| arr&lt;br /&gt;
| ICAO code of the arrival airport.&lt;br /&gt;
|-&lt;br /&gt;
| count&lt;br /&gt;
| Number past flights which should be displayed.&lt;br /&gt;
|-&lt;br /&gt;
| country&lt;br /&gt;
| Name of the country. &lt;br /&gt;
|-&lt;br /&gt;
| days&lt;br /&gt;
| Number of past days from now which should be displayed.&lt;br /&gt;
|-&lt;br /&gt;
| dep&lt;br /&gt;
| ICAO code of the departure airport.&lt;br /&gt;
|-&lt;br /&gt;
| email&lt;br /&gt;
| E-Mail of the user.&lt;br /&gt;
|-&lt;br /&gt;
| fleet_id&lt;br /&gt;
| ID of the fleet. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| from_ts&lt;br /&gt;
| UNIX timestamp of the date where the listing should start.&lt;br /&gt;
|-&lt;br /&gt;
| givenname&lt;br /&gt;
| Given name of the user.&lt;br /&gt;
|-&lt;br /&gt;
| icao&lt;br /&gt;
| ICAO code of the airport.&lt;br /&gt;
|-&lt;br /&gt;
| pilot_id&lt;br /&gt;
| ID of the pilot. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| report_id&lt;br /&gt;
| ID of the report. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| surname&lt;br /&gt;
| Surname of the user.&lt;br /&gt;
|-&lt;br /&gt;
| to_ts&lt;br /&gt;
| UNIX timestamp of the date where the listing should end.&lt;br /&gt;
|-&lt;br /&gt;
| user&lt;br /&gt;
| Username of the pilot.&lt;br /&gt;
|-&lt;br /&gt;
| token&lt;br /&gt;
| Login token created by the pilotLogin function.&lt;br /&gt;
|-&lt;br /&gt;
| va_id&lt;br /&gt;
| ID of the [[Virtual Airline]]. Is displayed on the [[Overview]] page.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Aircraft Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftData&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, pax_economy, pax_business, pax_first, config_name&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftDBData&lt;br /&gt;
| va_id, acdb_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao, passengers, price, fuel, dow, mtow, speed, engines, cargo, mzfw, market_only, range&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftDBList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registration, state, ac_name, status, fleet_id, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftStats&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| flights, hours, distance&lt;br /&gt;
|-&lt;br /&gt;
| getFleetAircraftList&lt;br /&gt;
| va_id, fleet_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registration, state, ac_name, status, fleet_id, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getFleetList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name&lt;br /&gt;
|-&lt;br /&gt;
| getFleetStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getLeasedAircraftList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registraion, state, ac_name, status, fleet_id, fuel, va_id, name, expire&lt;br /&gt;
|- &lt;br /&gt;
| getPeriodFleetStats&lt;br /&gt;
| va_id, from_ts, to_ts&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Airport Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirportData&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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&lt;br /&gt;
|-&lt;br /&gt;
| getAirportList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| icao, name, city, country, fuel, lat, lon&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Airline Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirlineData&lt;br /&gt;
| va_id, id (=va_id)&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, base, code, budget, homepage, logo_l, logo_s, price (deprecated, will be removed in next release), reputation, pilotcharge, multiplier, mission&lt;br /&gt;
|-&lt;br /&gt;
| getAirlineStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, pax, cargo_kg&lt;br /&gt;
|-&lt;br /&gt;
| getCountryStats&lt;br /&gt;
| va_id, country&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| va_name, id, flights, rating hours, profit, distance, last, fuel_used, pax, cargo_kg&lt;br /&gt;
|- &lt;br /&gt;
| getRankList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, short, settings, pilots, aircrafts, fleet, flights, partnerships, advertisements, fleet_id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Financial Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getLast10Transactions&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| ts, value, reason&lt;br /&gt;
|-&lt;br /&gt;
| getNegTransactionSums&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| value, reason&lt;br /&gt;
|-&lt;br /&gt;
| getPosTransactionSums&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| value, reason&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Flight Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters in brackets are optional&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getActiveFlights&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| departure, arrival, passengers, cargo, user_id, ac_id, flightstate, timestamp, number, lon, lat, pax_economy, pax_business, pax_first&lt;br /&gt;
|-&lt;br /&gt;
| getBookedFlights&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| departure, arrival, passengers, cargo, user_id, ac_id, number, pax_economy, pax_business, pax_first&lt;br /&gt;
|-&lt;br /&gt;
| getFlightReports&lt;br /&gt;
| va_id, (acdb_id), (ac_id), (pilot_id), (days), (count)&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;pax_economy, pax_business, pax_first&amp;lt;/span&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
| getReportDetail&lt;br /&gt;
| va_id, report_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;vs, pax_economy, pax_business, pax_first, ticket_business, ticket_first, fuel_start, fuel_dep, fuel_takeoff, fuel_land, fuel_finish, ticket_factor, interface, simversion, os&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| getRouteData&lt;br /&gt;
| va_id, route_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, va_id, cs_vaid, number, dep, arr, deptime, arrtime, simrate, days, price, state, flighttype, acdb_list, ac_id, remarks, route, limit_pax, limit_cargo&lt;br /&gt;
|-&lt;br /&gt;
| getRouteList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, number, dep, dep_country, arr, arr_country, deptime, arrtime, simrate, days, price, state, flighttype, acdb_list, ac_id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Pilot Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getPeriodPilotStats&lt;br /&gt;
| va_id, from_ts, to_ts&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getPilotData&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, surname, user, va_user, rank_id, location, budget, lastactive, active, sigac, timezone, weightunit, language, msgmail, rank, flights, rating, hours, distance, pax, cargo_kg, picture&lt;br /&gt;
|-&lt;br /&gt;
| getPilotHours&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao, hours&lt;br /&gt;
|-&lt;br /&gt;
| getPilotList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, surname, user, va_user, rank_id, location, last_active, status, budget&lt;br /&gt;
|-&lt;br /&gt;
| getPilotRatings&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, training, manufacturer, type&lt;br /&gt;
|-&lt;br /&gt;
| getPilotStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getPilotStatus&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| ac_id, route_id, departure, arrival, dep_time, dist, duration, status, lon, lat, flightstate, passengers, income, ticket, timestamp, cargo, multiplier, flighttype&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Flight Booking===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| bookFlight&lt;br /&gt;
| va_id, pilot_id, token, route_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| success, message, codeshare, codeshare_msg&lt;br /&gt;
|-&lt;br /&gt;
| cancelFlight&lt;br /&gt;
| va_id, pilot_id, token&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| result, loss&lt;br /&gt;
|-&lt;br /&gt;
| getBookableRoutes&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| number, dep, arr, deptime, arrtime, id, state, simrate, flighttype, training, price, list, ac_id&lt;br /&gt;
|-&lt;br /&gt;
| getBookableAircraft&lt;br /&gt;
| va_id, pilot_id, route_id&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| type, registration, state, id, name, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getBookStatus&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| status&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Miscellaneous User Functions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| createAccount&lt;br /&gt;
| va_id, givenname, surname, username, email, password, airport, accept_pp&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| success, message, code&lt;br /&gt;
|-&lt;br /&gt;
| getPilotID&lt;br /&gt;
| va_id, user, token&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id&lt;br /&gt;
|-&lt;br /&gt;
| getPrivacyPolicy&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS&lt;br /&gt;
| policy&lt;br /&gt;
|-&lt;br /&gt;
| getTransferCost&lt;br /&gt;
| va_id, arr, dep&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| cost&lt;br /&gt;
|-&lt;br /&gt;
| transferPilot&lt;br /&gt;
| va_id, pilot_id, token, icao&lt;br /&gt;
| SUCCESS, NOT FOUND, INSUFFICIENT FUNDS&lt;br /&gt;
| cost&lt;br /&gt;
|- &lt;br /&gt;
| getDistance&lt;br /&gt;
| va_id, icao_from, icao_to&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| distance&lt;br /&gt;
|- &lt;br /&gt;
| getMetar&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| metar&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Requested additional functions===&lt;br /&gt;
The following list contains all the functions which were requested by users but aren&#039;t implemented yet.&lt;br /&gt;
*Create, edit and delete routes&lt;/div&gt;</summary>
		<author><name>Joefremont</name></author>
	</entry>
	<entry>
		<id>https://wiki4.fsairlines.net/index.php?title=XML-Interface-v2&amp;diff=3293</id>
		<title>XML-Interface-v2</title>
		<link rel="alternate" type="text/html" href="https://wiki4.fsairlines.net/index.php?title=XML-Interface-v2&amp;diff=3293"/>
		<updated>2021-03-25T00:16:51Z</updated>

		<summary type="html">&lt;p&gt;Joefremont: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The XML-Interface is the core of the [[VA Integration Kit]]. It has been designed to give VA Administrators with the knowledge of dynamic web techniques the possibility to create their own layout and perfectly integrate the information into their own website using data from FSAirlines. &lt;br /&gt;
&lt;br /&gt;
==Changes from the previous version==&lt;br /&gt;
Compared to the previous version of the XML-Interface the following change were made.&lt;br /&gt;
* Change from domain registration to API keys.&lt;br /&gt;
* Rate limits added.&lt;br /&gt;
* Json output format added.&lt;br /&gt;
* Output properly supports UTF-8 character set.&lt;br /&gt;
* Additional functions for packages added.&lt;br /&gt;
&lt;br /&gt;
==Rate limits==&lt;br /&gt;
The access to the interface is limited by the number of calls an VA can make each hour and each day.  An airline with a gold account can make 100 calls each hour and 1200 call each day. An airline with a platinum account can make 500 calls each hour and 6000 call each day. If an airline has multiple members then those limits are added together for each premium account.  Example if an airline has one platinum member and two gold member there limits are 700 an hour and 8400 per day.  Functions related to pilots booking flights do not count against the rate limits.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Access Restriction==&lt;br /&gt;
In order to be able to access data from the Data-Interface you need to create an API key, this can be done using the &#039;Api Key Management&#039; page on the website accessible from the options on the VA overview page.  There are two types of API keys that can be created.&lt;br /&gt;
&lt;br /&gt;
Site key:  This key is to be used by your main website/service and may be use the full rate limit allowed by your VA.  After one hundred calls using a site api key, the key will be locked to the IP address used.  If in the future you need to change the IP address all you need to do is delete the old key and create a new one.&lt;br /&gt;
&lt;br /&gt;
Developer key:  This key is used to help you create and test your website on a different machine than your main site.  It will not be limited to a single IP address but will be limited to the number of calls each day your VA is normally allowed each hour.   Usage of the developer key does apply against your VA&#039;s total rate limit.&lt;br /&gt;
&lt;br /&gt;
==Basic Usage==&lt;br /&gt;
The data can be received using HTTP calls to the interface script and add the desired function to the parameters. Here is an example request:&lt;br /&gt;
&amp;lt;pre&amp;gt;http://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;apikey=xxxxx&amp;lt;/pre&amp;gt;&lt;br /&gt;
As you can see there is the interface script &#039;&#039;va_interface.php&#039;&#039;, the function &#039;&#039;getPilotList&#039;&#039; and the parameters &#039;&#039;va_id=7&#039;&#039; and &#039;&#039;apikey=xxxxx&#039;&#039;. Some functions require additional parameters, these can be appended after the other parameters.&lt;br /&gt;
&lt;br /&gt;
The result of the request will be given in xml format with the base-tag being &#039;&#039;&amp;lt;fsa_output&amp;gt;&#039;&#039;. This tag has the attributes &#039;&#039;version&#039;&#039; and &#039;&#039;success&#039;&#039; which show the version number of the interface and if the request succeeded or not. In case of a failure the &#039;&#039;success&#039;&#039;-attribute shows the error message. The following example shows the return text of the above function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;fsa_output version=&amp;quot;1.0&amp;quot; success=&amp;quot;SUCCESS&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;data id=&amp;quot;1&amp;quot; name=&amp;quot;Konrad&amp;quot; surname=&amp;quot;Pustka&amp;quot; va_user=&amp;quot;SNA101&amp;quot; location=&amp;quot;EDDM&amp;quot; lastactive=&amp;quot;1287330550&amp;quot; budget=&amp;quot;198144&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;data id=&amp;quot;2&amp;quot; name=&amp;quot;Claudio&amp;quot; surname=&amp;quot;Gusmini&amp;quot; va_user=&amp;quot;SNA102&amp;quot; location=&amp;quot;EDDM&amp;quot; lastactive=&amp;quot;1286366261&amp;quot; budget=&amp;quot;216405101&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/fsa_output&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Inside the &#039;&#039;fsa_output&#039;&#039;-tag there are the &#039;&#039;data&#039;&#039;-tags which contain all the information.  &lt;br /&gt;
&lt;br /&gt;
When calling using this method the default output format is XML, you can get the out in JSON format by adding a format=json parameter to the request. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxx&amp;lt;/pre&amp;gt;&lt;br /&gt;
The output will be:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;status&amp;quot;: &amp;quot;SUCCESS&amp;quot;,&lt;br /&gt;
    &amp;quot;data&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;id&amp;quot;: 1,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Konrad&amp;quot;,&lt;br /&gt;
            &amp;quot;surname&amp;quot;: &amp;quot;Pustka&amp;quot;,&lt;br /&gt;
            &amp;quot;va_user&amp;quot;: &amp;quot;SNA101&amp;quot;,&lt;br /&gt;
            &amp;quot;location&amp;quot;: &amp;quot;ETSE&amp;quot;,&lt;br /&gt;
            &amp;quot;lastactive&amp;quot;: 1600285079,&lt;br /&gt;
            &amp;quot;budget&amp;quot;: 2400628&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;id&amp;quot;: 2,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Claudio&amp;quot;,&lt;br /&gt;
            &amp;quot;surname&amp;quot;: &amp;quot;Gusmini&amp;quot;,&lt;br /&gt;
            &amp;quot;va_user&amp;quot;: &amp;quot;SNA102&amp;quot;,&lt;br /&gt;
            &amp;quot;location&amp;quot;: &amp;quot;LIMG&amp;quot;,&lt;br /&gt;
            &amp;quot;lastactive&amp;quot;: 1605458811,&lt;br /&gt;
            &amp;quot;budget&amp;quot;: 216631042&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you need something to get started here&#039;s a small example PHP-script showing a list of your pilots&#039; names. Just replace the va_id by your own.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
  $ch = curl_init(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;);&lt;br /&gt;
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
  $http_status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);&lt;br /&gt;
  $http_text = curl_exec($ch);&lt;br /&gt;
&lt;br /&gt;
  $objDOM = new DOMDocument();&lt;br /&gt;
  $objDOM-&amp;gt;loadXML($http_text);&lt;br /&gt;
&lt;br /&gt;
  $dataNodes = $objDOM-&amp;gt;getElementsByTagName(&amp;quot;data&amp;quot;);&lt;br /&gt;
  foreach( $dataNodes as $node )&lt;br /&gt;
  {&lt;br /&gt;
    $name = $node-&amp;gt;getAttribute(&amp;quot;name&amp;quot;);&lt;br /&gt;
    $surname = $node-&amp;gt;getAttribute(&amp;quot;surname&amp;quot;);&lt;br /&gt;
    echo &amp;quot;{$name} {$surname} &amp;lt;br/&amp;gt;&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here is a sample of a PHP script reading the same data in JSON format.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
    $ch = curl_init(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;);&lt;br /&gt;
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
    $http_status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);&lt;br /&gt;
    $http_text = curl_exec($ch);&lt;br /&gt;
    $json_data = json_decode($http_text, true);&lt;br /&gt;
    if ($json_data[&#039;status&#039;] == &#039;SUCCESS&#039;) {&lt;br /&gt;
        foreach($json_data[&#039;data&#039;] as $node) {&lt;br /&gt;
            echo &amp;quot;{$node[&#039;name&#039;]} {$node[&#039;surname&#039;]}&amp;lt;br/&amp;gt;\n&amp;quot;;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a sample of a Python script reading the same data in json format.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    #!/usr/bin/python&lt;br /&gt;
    import requests&lt;br /&gt;
&lt;br /&gt;
    r = requests.get(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;)&lt;br /&gt;
    json_data = r.json()&lt;br /&gt;
    if json_data[&#039;status&#039;] == &#039;SUCCESS&#039;:&lt;br /&gt;
        for node in json_data[&#039;data&#039;]:&lt;br /&gt;
            print(&#039;{} {}&#039;.format(node[&#039;name&#039;], node[&#039;surname&#039;])&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==Pilot Login==&lt;br /&gt;
Several of the functions require that the pilot calling be logged in.  Previous versions of the interface required the call passed the pilots username and a hashed password as parameters.  That method has now been discontinued, in this version you will need to call the &#039;&#039;pilotLogin&#039;&#039; to create a token that can be used to call functions for that pilot.  Unlike other calls in the interface, the &#039;&#039;pilotLogin&#039;&#039; function is also a HTTP POST call rather than a GET call.  Here is an example of calling the &#039;&#039;pilotLogin&#039;&#039; function.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
$post = [&lt;br /&gt;
    &#039;user&#039; =&amp;gt; &#039;username&#039;,&lt;br /&gt;
    &#039;password&#039; =&amp;gt; &#039;xxxxxxxx&#039;&lt;br /&gt;
];&lt;br /&gt;
&lt;br /&gt;
$ch = curl_init(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=pilotLogin&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;);&lt;br /&gt;
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);&lt;br /&gt;
&lt;br /&gt;
$http_text = curl_exec($ch);&lt;br /&gt;
$data = json_decode($http_text, true);&lt;br /&gt;
&lt;br /&gt;
if ($data[&#039;status&#039;] == &#039;SUCCESS&#039;) {&lt;br /&gt;
    $fsa_token = $data[&#039;data&#039;][&#039;token&#039;];&lt;br /&gt;
} else {&lt;br /&gt;
    die(&amp;quot;Login failed&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The data returned in this request includes:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| token&lt;br /&gt;
| The pilots login token.&lt;br /&gt;
|-&lt;br /&gt;
| alt_code&lt;br /&gt;
| The alternate ICAO code of the airport they are currently located based on there default simulator.&lt;br /&gt;
|-&lt;br /&gt;
| budget&lt;br /&gt;
| The pilots current budget&lt;br /&gt;
|-&lt;br /&gt;
| default_sim&lt;br /&gt;
| The pilots default simulator.&lt;br /&gt;
|-&lt;br /&gt;
| location&lt;br /&gt;
| The FSA offical ICAO code of the airport the pilot is located.&lt;br /&gt;
|-&lt;br /&gt;
| name&lt;br /&gt;
| The pilots first name&lt;br /&gt;
|-&lt;br /&gt;
| pilot_id&lt;br /&gt;
| The id number of the pilot.&lt;br /&gt;
|-&lt;br /&gt;
| premium&lt;br /&gt;
| 1 of the pilot is a premium member, 0 if not.&lt;br /&gt;
|-&lt;br /&gt;
| rank&lt;br /&gt;
| The code for the pilots rank within their VA&lt;br /&gt;
|-&lt;br /&gt;
| rank_id&lt;br /&gt;
| The id of the pilots rank within their VA&lt;br /&gt;
|-&lt;br /&gt;
| surname&lt;br /&gt;
| The pilots last or given name &lt;br /&gt;
|-&lt;br /&gt;
| va_id&lt;br /&gt;
| The ID of the pilots VA&lt;br /&gt;
|-&lt;br /&gt;
| va_status&lt;br /&gt;
| The pilots within there airline&lt;br /&gt;
|-&lt;br /&gt;
| va_user&lt;br /&gt;
| The pilots ID within their VA.&lt;br /&gt;
|-&lt;br /&gt;
| weightunit&lt;br /&gt;
| The pilots default unit of measure (kg or lb).&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Data==&lt;br /&gt;
The following section contains a detailed list of all the request-functions with their return values. Lately added options are marked &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;green&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Parameters===&lt;br /&gt;
All the request functions use parameters which need to be appended. The following table shows all the parameters and their meaning.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter&lt;br /&gt;
! Meaning&lt;br /&gt;
|- &lt;br /&gt;
| ac_id&lt;br /&gt;
| ID of the aircraft. Is part of the data received from other functions (e.g. getAircraftList).&lt;br /&gt;
|-&lt;br /&gt;
| accept_pp&lt;br /&gt;
| Must be set &#039;1&#039; if Privacy Policy is accepted.&lt;br /&gt;
|-&lt;br /&gt;
| acdb_id&lt;br /&gt;
| ID of the aircraft type. Is part of the data received from other functions (e.g. getAircraftList).&lt;br /&gt;
|-&lt;br /&gt;
| airport&lt;br /&gt;
| Starting airport. Where the user should be placed first.&lt;br /&gt;
|-&lt;br /&gt;
| arr&lt;br /&gt;
| ICAO code of the arrival airport.&lt;br /&gt;
|-&lt;br /&gt;
| count&lt;br /&gt;
| Number past flights which should be displayed.&lt;br /&gt;
|-&lt;br /&gt;
| country&lt;br /&gt;
| Name of the country. &lt;br /&gt;
|-&lt;br /&gt;
| days&lt;br /&gt;
| Number of past days from now which should be displayed.&lt;br /&gt;
|-&lt;br /&gt;
| dep&lt;br /&gt;
| ICAO code of the departure airport.&lt;br /&gt;
|-&lt;br /&gt;
| email&lt;br /&gt;
| E-Mail of the user.&lt;br /&gt;
|-&lt;br /&gt;
| fleet_id&lt;br /&gt;
| ID of the fleet. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| from_ts&lt;br /&gt;
| UNIX timestamp of the date where the listing should start.&lt;br /&gt;
|-&lt;br /&gt;
| givenname&lt;br /&gt;
| Given name of the user.&lt;br /&gt;
|-&lt;br /&gt;
| icao&lt;br /&gt;
| ICAO code of the airport.&lt;br /&gt;
|-&lt;br /&gt;
| pilot_id&lt;br /&gt;
| ID of the pilot. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| report_id&lt;br /&gt;
| ID of the report. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| surname&lt;br /&gt;
| Surname of the user.&lt;br /&gt;
|-&lt;br /&gt;
| to_ts&lt;br /&gt;
| UNIX timestamp of the date where the listing should end.&lt;br /&gt;
|-&lt;br /&gt;
| user&lt;br /&gt;
| Username of the pilot.&lt;br /&gt;
|-&lt;br /&gt;
| token&lt;br /&gt;
| Login token created by the pilotLogin function.&lt;br /&gt;
|-&lt;br /&gt;
| va_id&lt;br /&gt;
| ID of the [[Virtual Airline]]. Is displayed on the [[Overview]] page.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Aircraft Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftData&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, pax_economy, pax_business, pax_first, config_name&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftDBData&lt;br /&gt;
| va_id, acdb_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao, passengers, price, fuel, dow, mtow, speed, engines, cargo, mzfw, market_only, range&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftDBList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registration, state, ac_name, status, fleet_id, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftStats&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| flights, hours, distance&lt;br /&gt;
|-&lt;br /&gt;
| getFleetAircraftList&lt;br /&gt;
| va_id, fleet_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registration, state, ac_name, status, fleet_id, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getFleetList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name&lt;br /&gt;
|-&lt;br /&gt;
| getFleetStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getLeasedAircraftList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registraion, state, ac_name, status, fleet_id, fuel, va_id, name, expire&lt;br /&gt;
|- &lt;br /&gt;
| getPeriodFleetStats&lt;br /&gt;
| va_id, from_ts, to_ts&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Airport Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirportData&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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&lt;br /&gt;
|-&lt;br /&gt;
| getAirportList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| icao, name, city, country, fuel, lat, lon&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Airline Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirlineData&lt;br /&gt;
| va_id, id (=va_id)&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, base, code, budget, homepage, logo_l, logo_s, price (deprecated, will be removed in next release), reputation, pilotcharge, multiplier, mission&lt;br /&gt;
|-&lt;br /&gt;
| getAirlineStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, pax, cargo_kg&lt;br /&gt;
|-&lt;br /&gt;
| getCountryStats&lt;br /&gt;
| va_id, country&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| va_name, id, flights, rating hours, profit, distance, last, fuel_used, pax, cargo_kg&lt;br /&gt;
|- &lt;br /&gt;
| getRankList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, short, settings, pilots, aircrafts, fleet, flights, partnerships, advertisements, fleet_id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Financial Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getLast10Transactions&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| ts, value, reason&lt;br /&gt;
|-&lt;br /&gt;
| getNegTransactionSums&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| value, reason&lt;br /&gt;
|-&lt;br /&gt;
| getPosTransactionSums&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| value, reason&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Flight Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters in brackets are optional&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getActiveFlights&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| departure, arrival, passengers, cargo, user_id, ac_id, flightstate, timestamp, number, lon, lat, pax_economy, pax_business, pax_first&lt;br /&gt;
|-&lt;br /&gt;
| getBookedFlights&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| departure, arrival, passengers, cargo, user_id, ac_id, number, pax_economy, pax_business, pax_first&lt;br /&gt;
|-&lt;br /&gt;
| getFlightReports&lt;br /&gt;
| va_id, (acdb_id), (ac_id), (pilot_id), (days), (count)&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;pax_economy, pax_business, pax_first&amp;lt;/span&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
| getReportDetail&lt;br /&gt;
| va_id, report_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;vs, pax_economy, pax_business, pax_first, ticket_business, ticket_first, fuel_start, fuel_dep, fuel_takeoff, fuel_land, fuel_finish, ticket_factor, interface, simversion, os&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| getRouteData&lt;br /&gt;
| va_id, route_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, va_id, cs_vaid, number, dep, arr, deptime, arrtime, simrate, days, price, state, flighttype, acdb_list, ac_id, remarks, route, limit_pax, limit_cargo&lt;br /&gt;
|-&lt;br /&gt;
| getRouteList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, number, dep, dep_country, arr, arr_country, deptime, arrtime, simrate, days, price, state, flighttype, acdb_list, ac_id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Pilot Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getPeriodPilotStats&lt;br /&gt;
| va_id, from_ts, to_ts&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getPilotData&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, surname, user, va_user, rank_id, location, budget, lastactive, active, sigac, timezone, weightunit, language, msgmail, rank, flights, rating, hours, distance, pax, cargo_kg, picture&lt;br /&gt;
|-&lt;br /&gt;
| getPilotHours&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao, hours&lt;br /&gt;
|-&lt;br /&gt;
| getPilotList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, surname, user, va_user, rank_id, location, last_active, status, budget&lt;br /&gt;
|-&lt;br /&gt;
| getPilotRatings&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, training, manufacturer, type&lt;br /&gt;
|-&lt;br /&gt;
| getPilotStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getPilotStatus&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| ac_id, route_id, departure, arrival, dep_time, dist, duration, status, lon, lat, flightstate, passengers, income, ticket, timestamp, cargo, multiplier, flighttype&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Flight Booking===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| bookFlight&lt;br /&gt;
| va_id, pilot_id, token, route_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| success, message, codeshare, codeshare_msg&lt;br /&gt;
|-&lt;br /&gt;
| cancelFlight&lt;br /&gt;
| va_id, pilot_id, token&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| result, loss&lt;br /&gt;
|-&lt;br /&gt;
| getBookableRoutes&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| number, dep, arr, deptime, arrtime, id, state, simrate, flighttype, training, price, list, ac_id&lt;br /&gt;
|-&lt;br /&gt;
| getBookableAircraft&lt;br /&gt;
| va_id, pilot_id, route_id&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| type, registration, state, id, name, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getBookStatus&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| status&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Miscellaneous User Functions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| createAccount&lt;br /&gt;
| va_id, givenname, surname, username, email, password, airport, accept_pp&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| success, message, code&lt;br /&gt;
|-&lt;br /&gt;
| getPilotID&lt;br /&gt;
| va_id, user, token&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id&lt;br /&gt;
|-&lt;br /&gt;
| getPrivacyPolicy&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS&lt;br /&gt;
| policy&lt;br /&gt;
|-&lt;br /&gt;
| getTransferCost&lt;br /&gt;
| va_id, arr, dep&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| cost&lt;br /&gt;
|-&lt;br /&gt;
| transferPilot&lt;br /&gt;
| va_id, pilot_id, token, icao&lt;br /&gt;
| SUCCESS, NOT FOUND, INSUFFICIENT FUNDS&lt;br /&gt;
| cost&lt;br /&gt;
|- &lt;br /&gt;
| getDistance&lt;br /&gt;
| va_id, icao_from, icao_to&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| distance&lt;br /&gt;
|- &lt;br /&gt;
| getMetar&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| metar&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Requested additional functions===&lt;br /&gt;
The following list contains all the functions which were requested by users but aren&#039;t implemented yet.&lt;br /&gt;
*Create, edit and delete routes&lt;/div&gt;</summary>
		<author><name>Joefremont</name></author>
	</entry>
	<entry>
		<id>https://wiki4.fsairlines.net/index.php?title=XML-Interface-v2&amp;diff=3292</id>
		<title>XML-Interface-v2</title>
		<link rel="alternate" type="text/html" href="https://wiki4.fsairlines.net/index.php?title=XML-Interface-v2&amp;diff=3292"/>
		<updated>2021-03-25T00:04:14Z</updated>

		<summary type="html">&lt;p&gt;Joefremont: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The XML-Interface is the core of the [[VA Integration Kit]]. It has been designed to give VA Administrators with the knowledge of dynamic web techniques the possibility to create their own layout and perfectly integrate the information into their own website using data from FSAirlines. &lt;br /&gt;
&lt;br /&gt;
==Changes from the previous version==&lt;br /&gt;
Compared to the previous version of the XML-Interface the following change were made.&lt;br /&gt;
* Change from domain registration to API keys.&lt;br /&gt;
* Rate limits added.&lt;br /&gt;
* Json output format added.&lt;br /&gt;
* Output properly supports UTF-8 character set.&lt;br /&gt;
* Additional functions for packages added.&lt;br /&gt;
&lt;br /&gt;
==Rate limits==&lt;br /&gt;
The access to the interface is limited by the number of calls an VA can make each hour and each day.  An airline with a gold account can make 100 calls each hour and 1200 call each day. An airline with a platinum account can make 500 calls each hour and 6000 call each day. If an airline has multiple members then those limits are added together for each premium account.  Example if an airline has one platinum member and two gold member there limits are 700 an hour and 8400 per day.  Functions related to pilots booking flights do not count against the rate limits.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Access Restriction==&lt;br /&gt;
In order to be able to access data from the Data-Interface you need to create an API key, this can be done using the &#039;Api Key Management&#039; page on the website accessible from the options on the VA overview page.  There are two types of API keys that can be created.&lt;br /&gt;
&lt;br /&gt;
Site key:  This key is to be used by your main website/service and may be use the full rate limit allowed by your VA.  After one hundred calls using a site api key, the key will be locked to the IP address used.  If in the future you need to change the IP address all you need to do is delete the old key and create a new one.&lt;br /&gt;
&lt;br /&gt;
Developer key:  This key is used to help you create and test your website on a different machine than your main site.  It will not be limited to a single IP address but will be limited to the number of calls each day your VA is normally allowed each hour.   Usage of the developer key does apply against your VA&#039;s total rate limit.&lt;br /&gt;
&lt;br /&gt;
==Basic Usage==&lt;br /&gt;
The data can be received using HTTP calls to the interface script and add the desired function to the parameters. Here is an example request:&lt;br /&gt;
&amp;lt;pre&amp;gt;http://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;apikey=xxxxx&amp;lt;/pre&amp;gt;&lt;br /&gt;
As you can see there is the interface script &#039;&#039;va_interface.php&#039;&#039;, the function &#039;&#039;getPilotList&#039;&#039; and the parameters &#039;&#039;va_id=7&#039;&#039; and &#039;&#039;apikey=xxxxx&#039;&#039;. Some functions require additional parameters, these can be appended after the other parameters.&lt;br /&gt;
&lt;br /&gt;
The result of the request will be given in xml format with the base-tag being &#039;&#039;&amp;lt;fsa_output&amp;gt;&#039;&#039;. This tag has the attributes &#039;&#039;version&#039;&#039; and &#039;&#039;success&#039;&#039; which show the version number of the interface and if the request succeeded or not. In case of a failure the &#039;&#039;success&#039;&#039;-attribute shows the error message. The following example shows the return text of the above function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;fsa_output version=&amp;quot;1.0&amp;quot; success=&amp;quot;SUCCESS&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;data id=&amp;quot;1&amp;quot; name=&amp;quot;Konrad&amp;quot; surname=&amp;quot;Pustka&amp;quot; va_user=&amp;quot;SNA101&amp;quot; location=&amp;quot;EDDM&amp;quot; lastactive=&amp;quot;1287330550&amp;quot; budget=&amp;quot;198144&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;data id=&amp;quot;2&amp;quot; name=&amp;quot;Claudio&amp;quot; surname=&amp;quot;Gusmini&amp;quot; va_user=&amp;quot;SNA102&amp;quot; location=&amp;quot;EDDM&amp;quot; lastactive=&amp;quot;1286366261&amp;quot; budget=&amp;quot;216405101&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/fsa_output&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Inside the &#039;&#039;fsa_output&#039;&#039;-tag there are the &#039;&#039;data&#039;&#039;-tags which contain all the information.  &lt;br /&gt;
&lt;br /&gt;
When calling using this method the default output format is XML, you can get the out in JSON format by adding a format=json parameter to the request. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxx&amp;lt;/pre&amp;gt;&lt;br /&gt;
The output will be:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;status&amp;quot;: &amp;quot;SUCCESS&amp;quot;,&lt;br /&gt;
    &amp;quot;data&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;id&amp;quot;: 1,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Konrad&amp;quot;,&lt;br /&gt;
            &amp;quot;surname&amp;quot;: &amp;quot;Pustka&amp;quot;,&lt;br /&gt;
            &amp;quot;va_user&amp;quot;: &amp;quot;SNA101&amp;quot;,&lt;br /&gt;
            &amp;quot;location&amp;quot;: &amp;quot;ETSE&amp;quot;,&lt;br /&gt;
            &amp;quot;lastactive&amp;quot;: 1600285079,&lt;br /&gt;
            &amp;quot;budget&amp;quot;: 2400628&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;id&amp;quot;: 2,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Claudio&amp;quot;,&lt;br /&gt;
            &amp;quot;surname&amp;quot;: &amp;quot;Gusmini&amp;quot;,&lt;br /&gt;
            &amp;quot;va_user&amp;quot;: &amp;quot;SNA102&amp;quot;,&lt;br /&gt;
            &amp;quot;location&amp;quot;: &amp;quot;LIMG&amp;quot;,&lt;br /&gt;
            &amp;quot;lastactive&amp;quot;: 1605458811,&lt;br /&gt;
            &amp;quot;budget&amp;quot;: 216631042&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you need something to get started here&#039;s a small example PHP-script showing a list of your pilots&#039; names. Just replace the va_id by your own.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
  $ch = curl_init(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;);&lt;br /&gt;
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
  $http_status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);&lt;br /&gt;
  $http_text = curl_exec($ch);&lt;br /&gt;
&lt;br /&gt;
  $objDOM = new DOMDocument();&lt;br /&gt;
  $objDOM-&amp;gt;loadXML($http_text);&lt;br /&gt;
&lt;br /&gt;
  $dataNodes = $objDOM-&amp;gt;getElementsByTagName(&amp;quot;data&amp;quot;);&lt;br /&gt;
  foreach( $dataNodes as $node )&lt;br /&gt;
  {&lt;br /&gt;
    $name = $node-&amp;gt;getAttribute(&amp;quot;name&amp;quot;);&lt;br /&gt;
    $surname = $node-&amp;gt;getAttribute(&amp;quot;surname&amp;quot;);&lt;br /&gt;
    echo &amp;quot;{$name} {$surname} &amp;lt;br/&amp;gt;&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here is a sample of a PHP script reading the same data in JSON format.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
    $ch = curl_init(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;);&lt;br /&gt;
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
    $http_status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);&lt;br /&gt;
    $http_text = curl_exec($ch);&lt;br /&gt;
    $json_data = json_decode($http_text, true);&lt;br /&gt;
    if ($json_data[&#039;status&#039;] == &#039;SUCCESS&#039;) {&lt;br /&gt;
        foreach($json_data[&#039;data&#039;] as $node) {&lt;br /&gt;
            echo &amp;quot;{$node[&#039;name&#039;]} {$node[&#039;surname&#039;]}&amp;lt;br/&amp;gt;\n&amp;quot;;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a sample of a Python script reading the same data in json format.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    #!/usr/bin/python&lt;br /&gt;
    import requests&lt;br /&gt;
&lt;br /&gt;
    r = requests.get(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;)&lt;br /&gt;
    json_data = r.json()&lt;br /&gt;
    if json_data[&#039;status&#039;] == &#039;SUCCESS&#039;:&lt;br /&gt;
        for node in json_data[&#039;data&#039;]:&lt;br /&gt;
            print(&#039;{} {}&#039;.format(node[&#039;name&#039;], node[&#039;surname&#039;])&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==Pilot Login==&lt;br /&gt;
Several of the functions require that the pilot calling be logged in.  Previous versions of the interface required the call passed the pilots username and a hashed password as parameters.  That method has now been discontinued, in this version you will need to call the &#039;&#039;pilotLogin&#039;&#039; to create a token that can be used to call functions for that pilot.  Unlike other calls in the interface, the &#039;&#039;pilotLogin&#039;&#039; function is also a HTTP POST call rather than a GET call.  Here is an example of calling the &#039;&#039;pilotLogin&#039;&#039; function.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
$post = [&lt;br /&gt;
    &#039;user&#039; =&amp;gt; &#039;username&#039;,&lt;br /&gt;
    &#039;password&#039; =&amp;gt; &#039;xxxxxxxx&#039;&lt;br /&gt;
];&lt;br /&gt;
&lt;br /&gt;
$ch = curl_init(&amp;quot;https://www.fsairlines.net/va_interface2.php?function=pilotLogin&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;);&lt;br /&gt;
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);&lt;br /&gt;
&lt;br /&gt;
$http_text = curl_exec($ch);&lt;br /&gt;
$data = json_decode($http_text, true);&lt;br /&gt;
&lt;br /&gt;
if ($data[&#039;status&#039;] == &#039;SUCCESS&#039;) {&lt;br /&gt;
    $fsa_token = $data[&#039;data&#039;][&#039;token&#039;];&lt;br /&gt;
} else {&lt;br /&gt;
    die(&amp;quot;Login failed&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Data==&lt;br /&gt;
The following section contains a detailed list of all the request-functions with their return values. Lately added options are marked &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;green&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Parameters===&lt;br /&gt;
All the request functions use parameters which need to be appended. The following table shows all the parameters and their meaning.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter&lt;br /&gt;
! Meaning&lt;br /&gt;
|- &lt;br /&gt;
| ac_id&lt;br /&gt;
| ID of the aircraft. Is part of the data received from other functions (e.g. getAircraftList).&lt;br /&gt;
|-&lt;br /&gt;
| accept_pp&lt;br /&gt;
| Must be set &#039;1&#039; if Privacy Policy is accepted.&lt;br /&gt;
|-&lt;br /&gt;
| acdb_id&lt;br /&gt;
| ID of the aircraft type. Is part of the data received from other functions (e.g. getAircraftList).&lt;br /&gt;
|-&lt;br /&gt;
| airport&lt;br /&gt;
| Starting airport. Where the user should be placed first.&lt;br /&gt;
|-&lt;br /&gt;
| arr&lt;br /&gt;
| ICAO code of the arrival airport.&lt;br /&gt;
|-&lt;br /&gt;
| count&lt;br /&gt;
| Number past flights which should be displayed.&lt;br /&gt;
|-&lt;br /&gt;
| country&lt;br /&gt;
| Name of the country. &lt;br /&gt;
|-&lt;br /&gt;
| days&lt;br /&gt;
| Number of past days from now which should be displayed.&lt;br /&gt;
|-&lt;br /&gt;
| dep&lt;br /&gt;
| ICAO code of the departure airport.&lt;br /&gt;
|-&lt;br /&gt;
| email&lt;br /&gt;
| E-Mail of the user.&lt;br /&gt;
|-&lt;br /&gt;
| fleet_id&lt;br /&gt;
| ID of the fleet. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| from_ts&lt;br /&gt;
| UNIX timestamp of the date where the listing should start.&lt;br /&gt;
|-&lt;br /&gt;
| givenname&lt;br /&gt;
| Given name of the user.&lt;br /&gt;
|-&lt;br /&gt;
| icao&lt;br /&gt;
| ICAO code of the airport.&lt;br /&gt;
|-&lt;br /&gt;
| pilot_id&lt;br /&gt;
| ID of the pilot. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| report_id&lt;br /&gt;
| ID of the report. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| surname&lt;br /&gt;
| Surname of the user.&lt;br /&gt;
|-&lt;br /&gt;
| to_ts&lt;br /&gt;
| UNIX timestamp of the date where the listing should end.&lt;br /&gt;
|-&lt;br /&gt;
| user&lt;br /&gt;
| Username of the pilot.&lt;br /&gt;
|-&lt;br /&gt;
| token&lt;br /&gt;
| Login token created by the pilotLogin function.&lt;br /&gt;
|-&lt;br /&gt;
| va_id&lt;br /&gt;
| ID of the [[Virtual Airline]]. Is displayed on the [[Overview]] page.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Aircraft Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftData&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, pax_economy, pax_business, pax_first, config_name&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftDBData&lt;br /&gt;
| va_id, acdb_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao, passengers, price, fuel, dow, mtow, speed, engines, cargo, mzfw, market_only, range&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftDBList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registration, state, ac_name, status, fleet_id, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftStats&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| flights, hours, distance&lt;br /&gt;
|-&lt;br /&gt;
| getFleetAircraftList&lt;br /&gt;
| va_id, fleet_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registration, state, ac_name, status, fleet_id, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getFleetList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name&lt;br /&gt;
|-&lt;br /&gt;
| getFleetStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getLeasedAircraftList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registraion, state, ac_name, status, fleet_id, fuel, va_id, name, expire&lt;br /&gt;
|- &lt;br /&gt;
| getPeriodFleetStats&lt;br /&gt;
| va_id, from_ts, to_ts&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Airport Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirportData&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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&lt;br /&gt;
|-&lt;br /&gt;
| getAirportList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| icao, name, city, country, fuel, lat, lon&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Airline Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirlineData&lt;br /&gt;
| va_id, id (=va_id)&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, base, code, budget, homepage, logo_l, logo_s, price (deprecated, will be removed in next release), reputation, pilotcharge, multiplier, mission&lt;br /&gt;
|-&lt;br /&gt;
| getAirlineStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, pax, cargo_kg&lt;br /&gt;
|-&lt;br /&gt;
| getCountryStats&lt;br /&gt;
| va_id, country&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| va_name, id, flights, rating hours, profit, distance, last, fuel_used, pax, cargo_kg&lt;br /&gt;
|- &lt;br /&gt;
| getRankList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, short, settings, pilots, aircrafts, fleet, flights, partnerships, advertisements, fleet_id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Financial Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getLast10Transactions&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| ts, value, reason&lt;br /&gt;
|-&lt;br /&gt;
| getNegTransactionSums&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| value, reason&lt;br /&gt;
|-&lt;br /&gt;
| getPosTransactionSums&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| value, reason&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Flight Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters in brackets are optional&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getActiveFlights&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| departure, arrival, passengers, cargo, user_id, ac_id, flightstate, timestamp, number, lon, lat, pax_economy, pax_business, pax_first&lt;br /&gt;
|-&lt;br /&gt;
| getBookedFlights&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| departure, arrival, passengers, cargo, user_id, ac_id, number, pax_economy, pax_business, pax_first&lt;br /&gt;
|-&lt;br /&gt;
| getFlightReports&lt;br /&gt;
| va_id, (acdb_id), (ac_id), (pilot_id), (days), (count)&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;pax_economy, pax_business, pax_first&amp;lt;/span&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
| getReportDetail&lt;br /&gt;
| va_id, report_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;vs, pax_economy, pax_business, pax_first, ticket_business, ticket_first, fuel_start, fuel_dep, fuel_takeoff, fuel_land, fuel_finish, ticket_factor, interface, simversion, os&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| getRouteData&lt;br /&gt;
| va_id, route_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, va_id, cs_vaid, number, dep, arr, deptime, arrtime, simrate, days, price, state, flighttype, acdb_list, ac_id, remarks, route, limit_pax, limit_cargo&lt;br /&gt;
|-&lt;br /&gt;
| getRouteList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, number, dep, dep_country, arr, arr_country, deptime, arrtime, simrate, days, price, state, flighttype, acdb_list, ac_id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Pilot Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getPeriodPilotStats&lt;br /&gt;
| va_id, from_ts, to_ts&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getPilotData&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, surname, user, va_user, rank_id, location, budget, lastactive, active, sigac, timezone, weightunit, language, msgmail, rank, flights, rating, hours, distance, pax, cargo_kg, picture&lt;br /&gt;
|-&lt;br /&gt;
| getPilotHours&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao, hours&lt;br /&gt;
|-&lt;br /&gt;
| getPilotList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, surname, user, va_user, rank_id, location, last_active, status, budget&lt;br /&gt;
|-&lt;br /&gt;
| getPilotRatings&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, training, manufacturer, type&lt;br /&gt;
|-&lt;br /&gt;
| getPilotStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getPilotStatus&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| ac_id, route_id, departure, arrival, dep_time, dist, duration, status, lon, lat, flightstate, passengers, income, ticket, timestamp, cargo, multiplier, flighttype&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Flight Booking===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| bookFlight&lt;br /&gt;
| va_id, pilot_id, passwd, route_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| success, message, codeshare, codeshare_msg&lt;br /&gt;
|-&lt;br /&gt;
| cancelFlight&lt;br /&gt;
| va_id, pilot_id, passwd&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| result, loss&lt;br /&gt;
|-&lt;br /&gt;
| getBookableRoutes&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| number, dep, arr, deptime, arrtime, id, state, simrate, flighttype, training, price, list, ac_id&lt;br /&gt;
|-&lt;br /&gt;
| getBookableAircraft&lt;br /&gt;
| va_id, pilot_id, route_id&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| type, registration, state, id, name, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getBookStatus&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| status&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Miscellaneous User Functions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| createAccount&lt;br /&gt;
| va_id, givenname, surname, username, email, password, airport, accept_pp&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| success, message, code&lt;br /&gt;
|-&lt;br /&gt;
| getPilotID&lt;br /&gt;
| va_id, user, passwd&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id&lt;br /&gt;
|-&lt;br /&gt;
| getPrivacyPolicy&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS&lt;br /&gt;
| policy&lt;br /&gt;
|-&lt;br /&gt;
| getTransferCost&lt;br /&gt;
| va_id, arr, dep&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| cost&lt;br /&gt;
|-&lt;br /&gt;
| transferPilot&lt;br /&gt;
| va_id, pilot_id, passwd, icao&lt;br /&gt;
| SUCCESS, NOT FOUND, INSUFFICIENT FUNDS&lt;br /&gt;
| cost&lt;br /&gt;
|- &lt;br /&gt;
| getDistance&lt;br /&gt;
| va_id, icao_from, icao_to&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| distance&lt;br /&gt;
|- &lt;br /&gt;
| getMetar&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| metar&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Requested additional functions===&lt;br /&gt;
The following list contains all the functions which were requested by users but aren&#039;t implemented yet.&lt;br /&gt;
*Create, edit and delete routes&lt;/div&gt;</summary>
		<author><name>Joefremont</name></author>
	</entry>
	<entry>
		<id>https://wiki4.fsairlines.net/index.php?title=XML-Interface-v2&amp;diff=3291</id>
		<title>XML-Interface-v2</title>
		<link rel="alternate" type="text/html" href="https://wiki4.fsairlines.net/index.php?title=XML-Interface-v2&amp;diff=3291"/>
		<updated>2021-03-24T00:16:55Z</updated>

		<summary type="html">&lt;p&gt;Joefremont: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The XML-Interface is the core of the [[VA Integration Kit]]. It has been designed to give VA Administrators with the knowledge of dynamic web techniques the possibility to create their own layout and perfectly integrate the information into their own website using data from FSAirlines. &lt;br /&gt;
&lt;br /&gt;
==Changes from the previous version==&lt;br /&gt;
Compared to the previous version of the XML-Interface the following change were made.&lt;br /&gt;
* Change from domain registration to API keys.&lt;br /&gt;
* Rate limits added.&lt;br /&gt;
* Json output format added.&lt;br /&gt;
* Output properly supports UTF-8 character set.&lt;br /&gt;
* Additional functions for packages added.&lt;br /&gt;
&lt;br /&gt;
==Rate limits==&lt;br /&gt;
The access to the interface is limited by the number of calls an VA can make each hour and each day.  An airline with a gold account can make 100 calls each hour and 1200 call each day. An airline with a platinum account can make 500 calls each hour and 6000 call each day. If an airline has multiple members then those limits are added together for each premium account.  Example if an airline has one platinum member and two gold member there limits are 700 an hour and 8400 per day.  Functions related to pilots booking flights do not count against the rate limits.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Access Restriction==&lt;br /&gt;
In order to be able to access data from the Data-Interface you need to create an API key, this can be done using the &#039;Api Key Management&#039; page on the website accessible from the options on the VA overview page.  There are two types of API keys that can be created.&lt;br /&gt;
&lt;br /&gt;
Site key:  This key is to be used by your main website/service and may be use the full rate limit allowed by your VA.  After one hundred calls using a site api key, the key will be locked to the IP address used.  If in the future you need to change the IP address all you need to do is delete the old key and create a new one.&lt;br /&gt;
&lt;br /&gt;
Developer key:  This key is used to help you create and test your website on a different machine than your main site.  It will not be limited to a single IP address but will be limited to the number of calls each day your VA is normally allowed each hour.   Usage of the developer key does apply against your VA&#039;s total rate limit.&lt;br /&gt;
&lt;br /&gt;
==Basic Usage==&lt;br /&gt;
The data can be received using HTTP calls to the interface script and add the desired function to the parameters. Here is an example request:&lt;br /&gt;
&amp;lt;pre&amp;gt;http://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;apikey=xxxxx&amp;lt;/pre&amp;gt;&lt;br /&gt;
As you can see there is the interface script &#039;&#039;va_interface.php&#039;&#039;, the function &#039;&#039;getPilotList&#039;&#039; and the parameters &#039;&#039;va_id=7&#039;&#039; and &#039;&#039;apikey=xxxxx&#039;&#039;. Some functions require additional parameters, these can be appended after the other parameters.&lt;br /&gt;
&lt;br /&gt;
The result of the request will be given in xml format with the base-tag being &#039;&#039;&amp;lt;fsa_output&amp;gt;&#039;&#039;. This tag has the attributes &#039;&#039;version&#039;&#039; and &#039;&#039;success&#039;&#039; which show the version number of the interface and if the request succeeded or not. In case of a failure the &#039;&#039;success&#039;&#039;-attribute shows the error message. The following example shows the return text of the above function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;fsa_output version=&amp;quot;1.0&amp;quot; success=&amp;quot;SUCCESS&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;data id=&amp;quot;1&amp;quot; name=&amp;quot;Konrad&amp;quot; surname=&amp;quot;Pustka&amp;quot; va_user=&amp;quot;SNA101&amp;quot; location=&amp;quot;EDDM&amp;quot; lastactive=&amp;quot;1287330550&amp;quot; budget=&amp;quot;198144&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;data id=&amp;quot;2&amp;quot; name=&amp;quot;Claudio&amp;quot; surname=&amp;quot;Gusmini&amp;quot; va_user=&amp;quot;SNA102&amp;quot; location=&amp;quot;EDDM&amp;quot; lastactive=&amp;quot;1286366261&amp;quot; budget=&amp;quot;216405101&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/fsa_output&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Inside the &#039;&#039;fsa_output&#039;&#039;-tag there are the &#039;&#039;data&#039;&#039;-tags which contain all the information.  &lt;br /&gt;
&lt;br /&gt;
When calling using this method the default output format is XML, you can get the out in JSON format by adding a format=json parameter to the request. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;http://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxx&amp;lt;/pre&amp;gt;&lt;br /&gt;
The output will be:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;status&amp;quot;: &amp;quot;SUCCESS&amp;quot;,&lt;br /&gt;
    &amp;quot;data&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;id&amp;quot;: 1,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Konrad&amp;quot;,&lt;br /&gt;
            &amp;quot;surname&amp;quot;: &amp;quot;Pustka&amp;quot;,&lt;br /&gt;
            &amp;quot;va_user&amp;quot;: &amp;quot;SNA101&amp;quot;,&lt;br /&gt;
            &amp;quot;location&amp;quot;: &amp;quot;ETSE&amp;quot;,&lt;br /&gt;
            &amp;quot;lastactive&amp;quot;: 1600285079,&lt;br /&gt;
            &amp;quot;budget&amp;quot;: 2400628&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;id&amp;quot;: 2,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Claudio&amp;quot;,&lt;br /&gt;
            &amp;quot;surname&amp;quot;: &amp;quot;Gusmini&amp;quot;,&lt;br /&gt;
            &amp;quot;va_user&amp;quot;: &amp;quot;SNA102&amp;quot;,&lt;br /&gt;
            &amp;quot;location&amp;quot;: &amp;quot;LIMG&amp;quot;,&lt;br /&gt;
            &amp;quot;lastactive&amp;quot;: 1605458811,&lt;br /&gt;
            &amp;quot;budget&amp;quot;: 216631042&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you need something to get started here&#039;s a small example PHP-script showing a list of your pilots&#039; names. Just replace the va_id by your own.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
  $ch = curl_init(&amp;quot;http://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;);&lt;br /&gt;
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
  $http_status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);&lt;br /&gt;
  $http_text = curl_exec($ch);&lt;br /&gt;
&lt;br /&gt;
  $objDOM = new DOMDocument();&lt;br /&gt;
  $objDOM-&amp;gt;loadXML($http_text);&lt;br /&gt;
&lt;br /&gt;
  $dataNodes = $objDOM-&amp;gt;getElementsByTagName(&amp;quot;data&amp;quot;);&lt;br /&gt;
  foreach( $dataNodes as $node )&lt;br /&gt;
  {&lt;br /&gt;
    $name = $node-&amp;gt;getAttribute(&amp;quot;name&amp;quot;);&lt;br /&gt;
    $surname = $node-&amp;gt;getAttribute(&amp;quot;surname&amp;quot;);&lt;br /&gt;
    echo &amp;quot;{$name} {$surname} &amp;lt;br/&amp;gt;&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here is a sample of a PHP script reading the same data in JSON format.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
    $ch = curl_init(&amp;quot;http://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;);&lt;br /&gt;
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
    $http_status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);&lt;br /&gt;
    $http_text = curl_exec($ch);&lt;br /&gt;
    $json_data = json_decode($http_text, true);&lt;br /&gt;
    if ($json_data[&#039;status&#039;] == &#039;SUCCESS&#039;) {&lt;br /&gt;
        foreach($json_data[&#039;data&#039;] as $node) {&lt;br /&gt;
            echo &amp;quot;{$node[&#039;name&#039;]} {$node[&#039;surname&#039;]}&amp;lt;br/&amp;gt;\n&amp;quot;;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a sample of a Python script reading the same data in json format.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    #!/usr/bin/python&lt;br /&gt;
    import requests&lt;br /&gt;
&lt;br /&gt;
    r = requests.get(&amp;quot;http://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;)&lt;br /&gt;
    json_data = r.json()&lt;br /&gt;
    if json_data[&#039;status&#039;] == &#039;SUCCESS&#039;:&lt;br /&gt;
        for node in json_data[&#039;data&#039;]:&lt;br /&gt;
            print(&#039;{} {}&#039;.format(node[&#039;name&#039;], node[&#039;surname&#039;])&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==Data==&lt;br /&gt;
The following section contains a detailed list of all the request-functions with their return values. Lately added options are marked &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;green&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Parameters===&lt;br /&gt;
All the request functions use parameters which need to be appended. The following table shows all the parameters and their meaning.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter&lt;br /&gt;
! Meaning&lt;br /&gt;
|- &lt;br /&gt;
| ac_id&lt;br /&gt;
| ID of the aircraft. Is part of the data received from other functions (e.g. getAircraftList).&lt;br /&gt;
|-&lt;br /&gt;
| accept_pp&lt;br /&gt;
| Must be set &#039;1&#039; if Privacy Policy is accepted.&lt;br /&gt;
|-&lt;br /&gt;
| acdb_id&lt;br /&gt;
| ID of the aircraft type. Is part of the data received from other functions (e.g. getAircraftList).&lt;br /&gt;
|-&lt;br /&gt;
| airport&lt;br /&gt;
| Starting airport. Where the user should be placed first.&lt;br /&gt;
|-&lt;br /&gt;
| arr&lt;br /&gt;
| ICAO code of the arrival airport.&lt;br /&gt;
|-&lt;br /&gt;
| count&lt;br /&gt;
| Number past flights which should be displayed.&lt;br /&gt;
|-&lt;br /&gt;
| country&lt;br /&gt;
| Name of the country. &lt;br /&gt;
|-&lt;br /&gt;
| days&lt;br /&gt;
| Number of past days from now which should be displayed.&lt;br /&gt;
|-&lt;br /&gt;
| dep&lt;br /&gt;
| ICAO code of the departure airport.&lt;br /&gt;
|-&lt;br /&gt;
| email&lt;br /&gt;
| E-Mail of the user.&lt;br /&gt;
|-&lt;br /&gt;
| fleet_id&lt;br /&gt;
| ID of the fleet. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| from_ts&lt;br /&gt;
| UNIX timestamp of the date where the listing should start.&lt;br /&gt;
|-&lt;br /&gt;
| givenname&lt;br /&gt;
| Given name of the user.&lt;br /&gt;
|-&lt;br /&gt;
| icao&lt;br /&gt;
| ICAO code of the airport.&lt;br /&gt;
|-&lt;br /&gt;
| passwd&lt;br /&gt;
| Password of the pilot (MD5 encrypted).&lt;br /&gt;
|-&lt;br /&gt;
| password&lt;br /&gt;
| Password of the user.&lt;br /&gt;
|-&lt;br /&gt;
| pilot_id&lt;br /&gt;
| ID of the pilot. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| report_id&lt;br /&gt;
| ID of the report. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| surname&lt;br /&gt;
| Surname of the user.&lt;br /&gt;
|-&lt;br /&gt;
| to_ts&lt;br /&gt;
| UNIX timestamp of the date where the listing should end.&lt;br /&gt;
|-&lt;br /&gt;
| user&lt;br /&gt;
| Username of the pilot.&lt;br /&gt;
|-&lt;br /&gt;
| username&lt;br /&gt;
| Requested username.&lt;br /&gt;
|-&lt;br /&gt;
| va_id&lt;br /&gt;
| ID of the [[Virtual Airline]]. Is displayed on the [[Overview]] page.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Aircraft Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftData&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, pax_economy, pax_business, pax_first, config_name&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftDBData&lt;br /&gt;
| va_id, acdb_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao, passengers, price, fuel, dow, mtow, speed, engines, cargo, mzfw, market_only, range&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftDBList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registration, state, ac_name, status, fleet_id, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftStats&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| flights, hours, distance&lt;br /&gt;
|-&lt;br /&gt;
| getFleetAircraftList&lt;br /&gt;
| va_id, fleet_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registration, state, ac_name, status, fleet_id, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getFleetList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name&lt;br /&gt;
|-&lt;br /&gt;
| getFleetStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getLeasedAircraftList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registraion, state, ac_name, status, fleet_id, fuel, va_id, name, expire&lt;br /&gt;
|- &lt;br /&gt;
| getPeriodFleetStats&lt;br /&gt;
| va_id, from_ts, to_ts&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Airport Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirportData&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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&lt;br /&gt;
|-&lt;br /&gt;
| getAirportList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| icao, name, city, country, fuel, lat, lon&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Airline Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirlineData&lt;br /&gt;
| va_id, id (=va_id)&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, base, code, budget, homepage, logo_l, logo_s, price (deprecated, will be removed in next release), reputation, pilotcharge, multiplier, mission&lt;br /&gt;
|-&lt;br /&gt;
| getAirlineStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, pax, cargo_kg&lt;br /&gt;
|-&lt;br /&gt;
| getCountryStats&lt;br /&gt;
| va_id, country&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| va_name, id, flights, rating hours, profit, distance, last, fuel_used, pax, cargo_kg&lt;br /&gt;
|- &lt;br /&gt;
| getRankList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, short, settings, pilots, aircrafts, fleet, flights, partnerships, advertisements, fleet_id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Financial Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getLast10Transactions&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| ts, value, reason&lt;br /&gt;
|-&lt;br /&gt;
| getNegTransactionSums&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| value, reason&lt;br /&gt;
|-&lt;br /&gt;
| getPosTransactionSums&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| value, reason&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Flight Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters in brackets are optional&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getActiveFlights&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| departure, arrival, passengers, cargo, user_id, ac_id, flightstate, timestamp, number, lon, lat, pax_economy, pax_business, pax_first&lt;br /&gt;
|-&lt;br /&gt;
| getBookedFlights&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| departure, arrival, passengers, cargo, user_id, ac_id, number, pax_economy, pax_business, pax_first&lt;br /&gt;
|-&lt;br /&gt;
| getFlightReports&lt;br /&gt;
| va_id, (acdb_id), (ac_id), (pilot_id), (days), (count)&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;pax_economy, pax_business, pax_first&amp;lt;/span&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
| getReportDetail&lt;br /&gt;
| va_id, report_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;vs, pax_economy, pax_business, pax_first, ticket_business, ticket_first, fuel_start, fuel_dep, fuel_takeoff, fuel_land, fuel_finish, ticket_factor, interface, simversion, os&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| getRouteData&lt;br /&gt;
| va_id, route_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, va_id, cs_vaid, number, dep, arr, deptime, arrtime, simrate, days, price, state, flighttype, acdb_list, ac_id, remarks, route, limit_pax, limit_cargo&lt;br /&gt;
|-&lt;br /&gt;
| getRouteList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, number, dep, dep_country, arr, arr_country, deptime, arrtime, simrate, days, price, state, flighttype, acdb_list, ac_id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Pilot Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getPeriodPilotStats&lt;br /&gt;
| va_id, from_ts, to_ts&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getPilotData&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, surname, user, va_user, rank_id, location, budget, lastactive, active, sigac, timezone, weightunit, language, msgmail, rank, flights, rating, hours, distance, pax, cargo_kg, picture&lt;br /&gt;
|-&lt;br /&gt;
| getPilotHours&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao, hours&lt;br /&gt;
|-&lt;br /&gt;
| getPilotList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, surname, user, va_user, rank_id, location, last_active, status, budget&lt;br /&gt;
|-&lt;br /&gt;
| getPilotRatings&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, training, manufacturer, type&lt;br /&gt;
|-&lt;br /&gt;
| getPilotStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getPilotStatus&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| ac_id, route_id, departure, arrival, dep_time, dist, duration, status, lon, lat, flightstate, passengers, income, ticket, timestamp, cargo, multiplier, flighttype&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Flight Booking===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| bookFlight&lt;br /&gt;
| va_id, pilot_id, passwd, route_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| success, message, codeshare, codeshare_msg&lt;br /&gt;
|-&lt;br /&gt;
| cancelFlight&lt;br /&gt;
| va_id, pilot_id, passwd&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| result, loss&lt;br /&gt;
|-&lt;br /&gt;
| getBookableRoutes&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| number, dep, arr, deptime, arrtime, id, state, simrate, flighttype, training, price, list, ac_id&lt;br /&gt;
|-&lt;br /&gt;
| getBookableAircraft&lt;br /&gt;
| va_id, pilot_id, route_id&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| type, registration, state, id, name, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getBookStatus&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| status&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Miscellaneous User Functions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| createAccount&lt;br /&gt;
| va_id, givenname, surname, username, email, password, airport, accept_pp&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| success, message, code&lt;br /&gt;
|-&lt;br /&gt;
| getPilotID&lt;br /&gt;
| va_id, user, passwd&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id&lt;br /&gt;
|-&lt;br /&gt;
| getPrivacyPolicy&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS&lt;br /&gt;
| policy&lt;br /&gt;
|-&lt;br /&gt;
| getTransferCost&lt;br /&gt;
| va_id, arr, dep&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| cost&lt;br /&gt;
|-&lt;br /&gt;
| transferPilot&lt;br /&gt;
| va_id, pilot_id, passwd, icao&lt;br /&gt;
| SUCCESS, NOT FOUND, INSUFFICIENT FUNDS&lt;br /&gt;
| cost&lt;br /&gt;
|- &lt;br /&gt;
| getDistance&lt;br /&gt;
| va_id, icao_from, icao_to&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| distance&lt;br /&gt;
|- &lt;br /&gt;
| getMetar&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| metar&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Requested additional functions===&lt;br /&gt;
The following list contains all the functions which were requested by users but aren&#039;t implemented yet.&lt;br /&gt;
*Create, edit and delete routes&lt;/div&gt;</summary>
		<author><name>Joefremont</name></author>
	</entry>
	<entry>
		<id>https://wiki4.fsairlines.net/index.php?title=XML-Interface-v2&amp;diff=3290</id>
		<title>XML-Interface-v2</title>
		<link rel="alternate" type="text/html" href="https://wiki4.fsairlines.net/index.php?title=XML-Interface-v2&amp;diff=3290"/>
		<updated>2021-03-23T00:37:05Z</updated>

		<summary type="html">&lt;p&gt;Joefremont: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The XML-Interface is the core of the [[VA Integration Kit]]. It has been designed to give VA Administrators with the knowledge of dynamic web techniques the possibility to create their own layout and perfectly integrate the information into their own website using data from FSAirlines. &lt;br /&gt;
&lt;br /&gt;
==Changes from the previous version==&lt;br /&gt;
Compared to the previous version of the XML-Interface the following change were made.&lt;br /&gt;
* Change from domain registration to API keys.&lt;br /&gt;
* Rate limits added.&lt;br /&gt;
* Json output format added.&lt;br /&gt;
* Output properly supports UTF-8 character set.&lt;br /&gt;
* Additional functions for packages added.&lt;br /&gt;
&lt;br /&gt;
==Rate limits==&lt;br /&gt;
The access to the interface is limited by the number of calls an VA can make each hour and each day.  An airline with a gold account can make 100 calls each hour and 1200 call each day. An airline with a platinum account can make 500 calls each hour and 6000 call each day. If an airline has multiple members then those limits are added together for each premium account.  Example if an airline has one platinum member and two gold member there limits are 700 an hour and 8400 per day.  Functions related to pilots booking flights do not count against the rate limits.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Access Restriction==&lt;br /&gt;
In order to be able to access data from the Data-Interface you need to create an API key, this can be done using the &#039;Api Key Management&#039; page on the website accessible from the options on the VA overview page.  There are two types of API keys that can be created.&lt;br /&gt;
&lt;br /&gt;
Site key:  This key is to be used by your main website/service and may be use the full rate limit allowed by your VA.  After one hundred calls using a site api key, the key will be locked to the IP address used.  If in the future you need to change the IP address all you need to do is delete the old key and create a new one.&lt;br /&gt;
&lt;br /&gt;
Developer key:  This key is used to help you create and test your website on a different machine than your main site.  It will not be limited to a single IP address but will be limited to the number of calls each day your VA is normally allowed each hour.   Usage of the developer key does apply against your VA&#039;s total rate limit.&lt;br /&gt;
&lt;br /&gt;
==Basic Usage==&lt;br /&gt;
The data can be received using HTTP calls to the interface script and add the desired function to the parameters. Here is an example request:&lt;br /&gt;
&amp;lt;pre&amp;gt;http://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;apikey=xxxxx&amp;lt;/pre&amp;gt;&lt;br /&gt;
As you can see there is the interface script &#039;&#039;va_interface.php&#039;&#039;, the function &#039;&#039;getPilotList&#039;&#039; and the parameters &#039;&#039;va_id=7&#039;&#039; and &#039;&#039;apikey=xxxxx&#039;&#039;. Some functions require additional parameters, these can be appended after the other parameters.&lt;br /&gt;
&lt;br /&gt;
The result of the request will be given in xml format with the base-tag being &#039;&#039;&amp;lt;fsa_output&amp;gt;&#039;&#039;. This tag has the attributes &#039;&#039;version&#039;&#039; and &#039;&#039;success&#039;&#039; which show the version number of the interface and if the request succeeded or not. In case of a failure the &#039;&#039;success&#039;&#039;-attribute shows the error message. The following example shows the return text of the above function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;fsa_output version=&amp;quot;1.0&amp;quot; success=&amp;quot;SUCCESS&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;data id=&amp;quot;1&amp;quot; name=&amp;quot;Konrad&amp;quot; surname=&amp;quot;Pustka&amp;quot; va_user=&amp;quot;SNA101&amp;quot; location=&amp;quot;EDDM&amp;quot; lastactive=&amp;quot;1287330550&amp;quot; budget=&amp;quot;198144&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;data id=&amp;quot;2&amp;quot; name=&amp;quot;Claudio&amp;quot; surname=&amp;quot;Gusmini&amp;quot; va_user=&amp;quot;SNA102&amp;quot; location=&amp;quot;EDDM&amp;quot; lastactive=&amp;quot;1286366261&amp;quot; budget=&amp;quot;216405101&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/fsa_output&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Inside the &#039;&#039;fsa_output&#039;&#039;-tag there are the &#039;&#039;data&#039;&#039;-tags which contain all the information.  &lt;br /&gt;
&lt;br /&gt;
When calling using this method the default output format is XML, you can get the out in JSON format by adding a format=json parameter to the request. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;http://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxx&amp;lt;/pre&amp;gt;&lt;br /&gt;
The output will be:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;status&amp;quot;: &amp;quot;SUCCESS&amp;quot;,&lt;br /&gt;
    &amp;quot;data&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;id&amp;quot;: 1,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Konrad&amp;quot;,&lt;br /&gt;
            &amp;quot;surname&amp;quot;: &amp;quot;Pustka&amp;quot;,&lt;br /&gt;
            &amp;quot;va_user&amp;quot;: &amp;quot;SNA101&amp;quot;,&lt;br /&gt;
            &amp;quot;location&amp;quot;: &amp;quot;ETSE&amp;quot;,&lt;br /&gt;
            &amp;quot;lastactive&amp;quot;: 1600285079,&lt;br /&gt;
            &amp;quot;budget&amp;quot;: 2400628&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;id&amp;quot;: 2,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Claudio&amp;quot;,&lt;br /&gt;
            &amp;quot;surname&amp;quot;: &amp;quot;Gusmini&amp;quot;,&lt;br /&gt;
            &amp;quot;va_user&amp;quot;: &amp;quot;SNA102&amp;quot;,&lt;br /&gt;
            &amp;quot;location&amp;quot;: &amp;quot;LIMG&amp;quot;,&lt;br /&gt;
            &amp;quot;lastactive&amp;quot;: 1605458811,&lt;br /&gt;
            &amp;quot;budget&amp;quot;: 216631042&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you need something to get started here&#039;s a small example PHP-script showing a list of your pilots&#039; names. Just replace the va_id by your own.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
  $objDOM = new DOMDocument();&lt;br /&gt;
  $objDOM-&amp;gt;load(&amp;quot;http://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;apikey=xxxxxx&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  //uncomment to show raw xml-data&lt;br /&gt;
  //echo $objDOM-&amp;gt;saveXML();&lt;br /&gt;
&lt;br /&gt;
  $dataNodes = $objDOM-&amp;gt;getElementsByTagName(&amp;quot;data&amp;quot;);&lt;br /&gt;
  foreach( $dataNodes as $node )&lt;br /&gt;
  {&lt;br /&gt;
    $name = $node-&amp;gt;getAttribute(&amp;quot;name&amp;quot;);&lt;br /&gt;
    $surname = $node-&amp;gt;getAttribute(&amp;quot;surname&amp;quot;);&lt;br /&gt;
    echo &amp;quot;{$name} {$surname} &amp;lt;br/&amp;gt;&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Here is a sample of a PHP script reading the same data in JSON format.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
    $ch = curl_init(&amp;quot;http://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;);&lt;br /&gt;
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);&lt;br /&gt;
    $http_status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);&lt;br /&gt;
    $http_text = curl_exec($ch);&lt;br /&gt;
    $json_data = json_decode($http_text, true);&lt;br /&gt;
    if ($json_data[&#039;status&#039;] == &#039;SUCCESS&#039;) {&lt;br /&gt;
        foreach($json_data[&#039;data&#039;] as $node) {&lt;br /&gt;
            echo &amp;quot;{$node[&#039;name&#039;]} {$node[&#039;surname&#039;]}&amp;lt;br/&amp;gt;\n&amp;quot;;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a sample of a Python script reading the same data in json format.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    #!/usr/bin/python&lt;br /&gt;
    import requests&lt;br /&gt;
&lt;br /&gt;
    r = requests.get(&amp;quot;http://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxxx&amp;quot;)&lt;br /&gt;
    json_data = r.json()&lt;br /&gt;
    if json_data[&#039;status&#039;] == &#039;SUCCESS&#039;:&lt;br /&gt;
        for node in json_data[&#039;data&#039;]:&lt;br /&gt;
            print(&#039;{} {}&#039;.format(node[&#039;name&#039;], node[&#039;surname&#039;])&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
==Data==&lt;br /&gt;
The following section contains a detailed list of all the request-functions with their return values. Lately added options are marked &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;green&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Parameters===&lt;br /&gt;
All the request functions use parameters which need to be appended. The following table shows all the parameters and their meaning.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter&lt;br /&gt;
! Meaning&lt;br /&gt;
|- &lt;br /&gt;
| ac_id&lt;br /&gt;
| ID of the aircraft. Is part of the data received from other functions (e.g. getAircraftList).&lt;br /&gt;
|-&lt;br /&gt;
| accept_pp&lt;br /&gt;
| Must be set &#039;1&#039; if Privacy Policy is accepted.&lt;br /&gt;
|-&lt;br /&gt;
| acdb_id&lt;br /&gt;
| ID of the aircraft type. Is part of the data received from other functions (e.g. getAircraftList).&lt;br /&gt;
|-&lt;br /&gt;
| airport&lt;br /&gt;
| Starting airport. Where the user should be placed first.&lt;br /&gt;
|-&lt;br /&gt;
| arr&lt;br /&gt;
| ICAO code of the arrival airport.&lt;br /&gt;
|-&lt;br /&gt;
| count&lt;br /&gt;
| Number past flights which should be displayed.&lt;br /&gt;
|-&lt;br /&gt;
| country&lt;br /&gt;
| Name of the country. &lt;br /&gt;
|-&lt;br /&gt;
| days&lt;br /&gt;
| Number of past days from now which should be displayed.&lt;br /&gt;
|-&lt;br /&gt;
| dep&lt;br /&gt;
| ICAO code of the departure airport.&lt;br /&gt;
|-&lt;br /&gt;
| email&lt;br /&gt;
| E-Mail of the user.&lt;br /&gt;
|-&lt;br /&gt;
| fleet_id&lt;br /&gt;
| ID of the fleet. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| from_ts&lt;br /&gt;
| UNIX timestamp of the date where the listing should start.&lt;br /&gt;
|-&lt;br /&gt;
| givenname&lt;br /&gt;
| Given name of the user.&lt;br /&gt;
|-&lt;br /&gt;
| icao&lt;br /&gt;
| ICAO code of the airport.&lt;br /&gt;
|-&lt;br /&gt;
| passwd&lt;br /&gt;
| Password of the pilot (MD5 encrypted).&lt;br /&gt;
|-&lt;br /&gt;
| password&lt;br /&gt;
| Password of the user.&lt;br /&gt;
|-&lt;br /&gt;
| pilot_id&lt;br /&gt;
| ID of the pilot. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| report_id&lt;br /&gt;
| ID of the report. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| surname&lt;br /&gt;
| Surname of the user.&lt;br /&gt;
|-&lt;br /&gt;
| to_ts&lt;br /&gt;
| UNIX timestamp of the date where the listing should end.&lt;br /&gt;
|-&lt;br /&gt;
| user&lt;br /&gt;
| Username of the pilot.&lt;br /&gt;
|-&lt;br /&gt;
| username&lt;br /&gt;
| Requested username.&lt;br /&gt;
|-&lt;br /&gt;
| va_id&lt;br /&gt;
| ID of the [[Virtual Airline]]. Is displayed on the [[Overview]] page.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Aircraft Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftData&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, pax_economy, pax_business, pax_first, config_name&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftDBData&lt;br /&gt;
| va_id, acdb_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao, passengers, price, fuel, dow, mtow, speed, engines, cargo, mzfw, market_only, range&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftDBList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registration, state, ac_name, status, fleet_id, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftStats&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| flights, hours, distance&lt;br /&gt;
|-&lt;br /&gt;
| getFleetAircraftList&lt;br /&gt;
| va_id, fleet_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registration, state, ac_name, status, fleet_id, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getFleetList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name&lt;br /&gt;
|-&lt;br /&gt;
| getFleetStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getLeasedAircraftList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registraion, state, ac_name, status, fleet_id, fuel, va_id, name, expire&lt;br /&gt;
|- &lt;br /&gt;
| getPeriodFleetStats&lt;br /&gt;
| va_id, from_ts, to_ts&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Airport Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirportData&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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&lt;br /&gt;
|-&lt;br /&gt;
| getAirportList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| icao, name, city, country, fuel, lat, lon&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Airline Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirlineData&lt;br /&gt;
| va_id, id (=va_id)&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, base, code, budget, homepage, logo_l, logo_s, price (deprecated, will be removed in next release), reputation, pilotcharge, multiplier, mission&lt;br /&gt;
|-&lt;br /&gt;
| getAirlineStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, pax, cargo_kg&lt;br /&gt;
|-&lt;br /&gt;
| getCountryStats&lt;br /&gt;
| va_id, country&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| va_name, id, flights, rating hours, profit, distance, last, fuel_used, pax, cargo_kg&lt;br /&gt;
|- &lt;br /&gt;
| getRankList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, short, settings, pilots, aircrafts, fleet, flights, partnerships, advertisements, fleet_id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Financial Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getLast10Transactions&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| ts, value, reason&lt;br /&gt;
|-&lt;br /&gt;
| getNegTransactionSums&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| value, reason&lt;br /&gt;
|-&lt;br /&gt;
| getPosTransactionSums&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| value, reason&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Flight Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters in brackets are optional&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getActiveFlights&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| departure, arrival, passengers, cargo, user_id, ac_id, flightstate, timestamp, number, lon, lat, pax_economy, pax_business, pax_first&lt;br /&gt;
|-&lt;br /&gt;
| getBookedFlights&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| departure, arrival, passengers, cargo, user_id, ac_id, number, pax_economy, pax_business, pax_first&lt;br /&gt;
|-&lt;br /&gt;
| getFlightReports&lt;br /&gt;
| va_id, (acdb_id), (ac_id), (pilot_id), (days), (count)&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;pax_economy, pax_business, pax_first&amp;lt;/span&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
| getReportDetail&lt;br /&gt;
| va_id, report_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;vs, pax_economy, pax_business, pax_first, ticket_business, ticket_first, fuel_start, fuel_dep, fuel_takeoff, fuel_land, fuel_finish, ticket_factor, interface, simversion, os&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| getRouteData&lt;br /&gt;
| va_id, route_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, va_id, cs_vaid, number, dep, arr, deptime, arrtime, simrate, days, price, state, flighttype, acdb_list, ac_id, remarks, route, limit_pax, limit_cargo&lt;br /&gt;
|-&lt;br /&gt;
| getRouteList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, number, dep, dep_country, arr, arr_country, deptime, arrtime, simrate, days, price, state, flighttype, acdb_list, ac_id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Pilot Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getPeriodPilotStats&lt;br /&gt;
| va_id, from_ts, to_ts&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getPilotData&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, surname, user, va_user, rank_id, location, budget, lastactive, active, sigac, timezone, weightunit, language, msgmail, rank, flights, rating, hours, distance, pax, cargo_kg, picture&lt;br /&gt;
|-&lt;br /&gt;
| getPilotHours&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao, hours&lt;br /&gt;
|-&lt;br /&gt;
| getPilotList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, surname, user, va_user, rank_id, location, last_active, status, budget&lt;br /&gt;
|-&lt;br /&gt;
| getPilotRatings&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, training, manufacturer, type&lt;br /&gt;
|-&lt;br /&gt;
| getPilotStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getPilotStatus&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| ac_id, route_id, departure, arrival, dep_time, dist, duration, status, lon, lat, flightstate, passengers, income, ticket, timestamp, cargo, multiplier, flighttype&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Flight Booking===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| bookFlight&lt;br /&gt;
| va_id, pilot_id, passwd, route_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| success, message, codeshare, codeshare_msg&lt;br /&gt;
|-&lt;br /&gt;
| cancelFlight&lt;br /&gt;
| va_id, pilot_id, passwd&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| result, loss&lt;br /&gt;
|-&lt;br /&gt;
| getBookableRoutes&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| number, dep, arr, deptime, arrtime, id, state, simrate, flighttype, training, price, list, ac_id&lt;br /&gt;
|-&lt;br /&gt;
| getBookableAircraft&lt;br /&gt;
| va_id, pilot_id, route_id&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| type, registration, state, id, name, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getBookStatus&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| status&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Miscellaneous User Functions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| createAccount&lt;br /&gt;
| va_id, givenname, surname, username, email, password, airport, accept_pp&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| success, message, code&lt;br /&gt;
|-&lt;br /&gt;
| getPilotID&lt;br /&gt;
| va_id, user, passwd&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id&lt;br /&gt;
|-&lt;br /&gt;
| getPrivacyPolicy&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS&lt;br /&gt;
| policy&lt;br /&gt;
|-&lt;br /&gt;
| getTransferCost&lt;br /&gt;
| va_id, arr, dep&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| cost&lt;br /&gt;
|-&lt;br /&gt;
| transferPilot&lt;br /&gt;
| va_id, pilot_id, passwd, icao&lt;br /&gt;
| SUCCESS, NOT FOUND, INSUFFICIENT FUNDS&lt;br /&gt;
| cost&lt;br /&gt;
|- &lt;br /&gt;
| getDistance&lt;br /&gt;
| va_id, icao_from, icao_to&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| distance&lt;br /&gt;
|- &lt;br /&gt;
| getMetar&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| metar&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Requested additional functions===&lt;br /&gt;
The following list contains all the functions which were requested by users but aren&#039;t implemented yet.&lt;br /&gt;
*Create, edit and delete routes&lt;/div&gt;</summary>
		<author><name>Joefremont</name></author>
	</entry>
	<entry>
		<id>https://wiki4.fsairlines.net/index.php?title=XML-Interface-v2&amp;diff=3289</id>
		<title>XML-Interface-v2</title>
		<link rel="alternate" type="text/html" href="https://wiki4.fsairlines.net/index.php?title=XML-Interface-v2&amp;diff=3289"/>
		<updated>2021-03-21T18:06:24Z</updated>

		<summary type="html">&lt;p&gt;Joefremont: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The XML-Interface is the core of the [[VA Integration Kit]]. It has been designed to give VA Administrators with the knowledge of dynamic web techniques the possibility to create their own layout and perfectly integrate the information into their own website using data from FSAirlines. &lt;br /&gt;
&lt;br /&gt;
==Changes from the previous version==&lt;br /&gt;
Compared to the previous version of the XML-Interface the following change were made.&lt;br /&gt;
* Change from domain registration to API keys.&lt;br /&gt;
* Rate limits added.&lt;br /&gt;
* Json output format added.&lt;br /&gt;
* Output properly supports UTF-8 character set.&lt;br /&gt;
* Additional functions for packages added.&lt;br /&gt;
&lt;br /&gt;
==Rate limits==&lt;br /&gt;
The access to the interface is limited by the number of calls an VA can make each hour and each day.  An airline with a gold account can make 100 calls each hour and 1200 call each day. An airline with a platinum account can make 500 calls each hour and 6000 call each day. If an airline has multiple members then those limits are added together for each premium account.  Example if an airline has one platinum member and two gold member there limits are 700 an hour and 8400 per day.  Functions related to pilots booking flights do not count against the rate limits.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Access Restriction==&lt;br /&gt;
In order to be able to access data from the Data-Interface you need to create an API key, this can be done using the &#039;Api Key Management&#039; page on the website accessible from the options on the VA overview page.  There are two types of API keys that can be created.&lt;br /&gt;
&lt;br /&gt;
Site key:  This key is to be used by your main website/service and may be use the full rate limit allowed by your VA.  After one hundred calls using a site api key, the key will be locked to the IP address used.  If in the future you need to change the IP address all you need to do is delete the old key and create a new one.&lt;br /&gt;
&lt;br /&gt;
Developer key:  This key is used to help you create and test your website on a different machine than your main site.  It will not be limited to a single IP address but will be limited to the number of calls each day your VA is normally allowed each hour.   Usage of the developer key does apply against your VA&#039;s total rate limit.&lt;br /&gt;
&lt;br /&gt;
==Basic Usage==&lt;br /&gt;
The data can be received using HTTP calls to the interface script and add the desired function to the parameters. Here is an example request:&lt;br /&gt;
&amp;lt;pre&amp;gt;http://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;apikey=xxxxx&amp;lt;/pre&amp;gt;&lt;br /&gt;
As you can see there is the interface script &#039;&#039;va_interface.php&#039;&#039;, the function &#039;&#039;getPilotList&#039;&#039; and the parameters &#039;&#039;va_id=7&#039;&#039; and &#039;&#039;apikey=xxxxx&#039;&#039;. Some functions require additional parameters, these can be appended after the other parameters.&lt;br /&gt;
&lt;br /&gt;
The result of the request will be given in xml format with the base-tag being &#039;&#039;&amp;lt;fsa_output&amp;gt;&#039;&#039;. This tag has the attributes &#039;&#039;version&#039;&#039; and &#039;&#039;success&#039;&#039; which show the version number of the interface and if the request succeeded or not. In case of a failure the &#039;&#039;success&#039;&#039;-attribute shows the error message. The following example shows the return text of the above function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;fsa_output version=&amp;quot;1.0&amp;quot; success=&amp;quot;SUCCESS&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;data id=&amp;quot;1&amp;quot; name=&amp;quot;Konrad&amp;quot; surname=&amp;quot;Pustka&amp;quot; va_user=&amp;quot;SNA101&amp;quot; location=&amp;quot;EDDM&amp;quot; lastactive=&amp;quot;1287330550&amp;quot; budget=&amp;quot;198144&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;data id=&amp;quot;2&amp;quot; name=&amp;quot;Claudio&amp;quot; surname=&amp;quot;Gusmini&amp;quot; va_user=&amp;quot;SNA102&amp;quot; location=&amp;quot;EDDM&amp;quot; lastactive=&amp;quot;1286366261&amp;quot; budget=&amp;quot;216405101&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/fsa_output&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Inside the &#039;&#039;fsa_output&#039;&#039;-tag there are the &#039;&#039;data&#039;&#039;-tags which contain all the information.  &lt;br /&gt;
&lt;br /&gt;
When calling using this method the default output format is XML, you can get the out in JSON format by adding a format=json parameter to the request. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;http://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxx&amp;lt;/pre&amp;gt;&lt;br /&gt;
The output will be:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;status&amp;quot;: &amp;quot;SUCCESS&amp;quot;,&lt;br /&gt;
    &amp;quot;data&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;id&amp;quot;: 1,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Konrad&amp;quot;,&lt;br /&gt;
            &amp;quot;surname&amp;quot;: &amp;quot;Pustka&amp;quot;,&lt;br /&gt;
            &amp;quot;va_user&amp;quot;: &amp;quot;SNA101&amp;quot;,&lt;br /&gt;
            &amp;quot;location&amp;quot;: &amp;quot;ETSE&amp;quot;,&lt;br /&gt;
            &amp;quot;lastactive&amp;quot;: 1600285079,&lt;br /&gt;
            &amp;quot;budget&amp;quot;: 2400628&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;id&amp;quot;: 2,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Claudio&amp;quot;,&lt;br /&gt;
            &amp;quot;surname&amp;quot;: &amp;quot;Gusmini&amp;quot;,&lt;br /&gt;
            &amp;quot;va_user&amp;quot;: &amp;quot;SNA102&amp;quot;,&lt;br /&gt;
            &amp;quot;location&amp;quot;: &amp;quot;LIMG&amp;quot;,&lt;br /&gt;
            &amp;quot;lastactive&amp;quot;: 1605458811,&lt;br /&gt;
            &amp;quot;budget&amp;quot;: 216631042&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you need something to get started here&#039;s a small example PHP-script showing a list of your pilots&#039; names. Just replace the va_id by your own.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
  $objDOM = new DOMDocument();&lt;br /&gt;
  $objDOM-&amp;gt;load(&amp;quot;http://www.fsairlines.net/va_interface.php?function=getPilotList&amp;amp;va_id=7&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  //uncomment to show raw xml-data&lt;br /&gt;
  //echo $objDOM-&amp;gt;saveXML();&lt;br /&gt;
&lt;br /&gt;
  $dataNodes = $objDOM-&amp;gt;getElementsByTagName(&amp;quot;data&amp;quot;);&lt;br /&gt;
  foreach( $dataNodes as $node )&lt;br /&gt;
  {&lt;br /&gt;
    $name = $node-&amp;gt;getAttribute(&amp;quot;name&amp;quot;);&lt;br /&gt;
    $surname = $node-&amp;gt;getAttribute(&amp;quot;surname&amp;quot;);&lt;br /&gt;
    echo &amp;quot;{$name} {$surname} &amp;lt;br/&amp;gt;&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Data==&lt;br /&gt;
The following section contains a detailed list of all the request-functions with their return values. Lately added options are marked &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;green&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Parameters===&lt;br /&gt;
All the request functions use parameters which need to be appended. The following table shows all the parameters and their meaning.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter&lt;br /&gt;
! Meaning&lt;br /&gt;
|- &lt;br /&gt;
| ac_id&lt;br /&gt;
| ID of the aircraft. Is part of the data received from other functions (e.g. getAircraftList).&lt;br /&gt;
|-&lt;br /&gt;
| accept_pp&lt;br /&gt;
| Must be set &#039;1&#039; if Privacy Policy is accepted.&lt;br /&gt;
|-&lt;br /&gt;
| acdb_id&lt;br /&gt;
| ID of the aircraft type. Is part of the data received from other functions (e.g. getAircraftList).&lt;br /&gt;
|-&lt;br /&gt;
| airport&lt;br /&gt;
| Starting airport. Where the user should be placed first.&lt;br /&gt;
|-&lt;br /&gt;
| arr&lt;br /&gt;
| ICAO code of the arrival airport.&lt;br /&gt;
|-&lt;br /&gt;
| count&lt;br /&gt;
| Number past flights which should be displayed.&lt;br /&gt;
|-&lt;br /&gt;
| country&lt;br /&gt;
| Name of the country. &lt;br /&gt;
|-&lt;br /&gt;
| days&lt;br /&gt;
| Number of past days from now which should be displayed.&lt;br /&gt;
|-&lt;br /&gt;
| dep&lt;br /&gt;
| ICAO code of the departure airport.&lt;br /&gt;
|-&lt;br /&gt;
| email&lt;br /&gt;
| E-Mail of the user.&lt;br /&gt;
|-&lt;br /&gt;
| fleet_id&lt;br /&gt;
| ID of the fleet. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| from_ts&lt;br /&gt;
| UNIX timestamp of the date where the listing should start.&lt;br /&gt;
|-&lt;br /&gt;
| givenname&lt;br /&gt;
| Given name of the user.&lt;br /&gt;
|-&lt;br /&gt;
| icao&lt;br /&gt;
| ICAO code of the airport.&lt;br /&gt;
|-&lt;br /&gt;
| passwd&lt;br /&gt;
| Password of the pilot (MD5 encrypted).&lt;br /&gt;
|-&lt;br /&gt;
| password&lt;br /&gt;
| Password of the user.&lt;br /&gt;
|-&lt;br /&gt;
| pilot_id&lt;br /&gt;
| ID of the pilot. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| report_id&lt;br /&gt;
| ID of the report. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| surname&lt;br /&gt;
| Surname of the user.&lt;br /&gt;
|-&lt;br /&gt;
| to_ts&lt;br /&gt;
| UNIX timestamp of the date where the listing should end.&lt;br /&gt;
|-&lt;br /&gt;
| user&lt;br /&gt;
| Username of the pilot.&lt;br /&gt;
|-&lt;br /&gt;
| username&lt;br /&gt;
| Requested username.&lt;br /&gt;
|-&lt;br /&gt;
| va_id&lt;br /&gt;
| ID of the [[Virtual Airline]]. Is displayed on the [[Overview]] page.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Aircraft Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftData&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, pax_economy, pax_business, pax_first, config_name&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftDBData&lt;br /&gt;
| va_id, acdb_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao, passengers, price, fuel, dow, mtow, speed, engines, cargo, mzfw, market_only, range&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftDBList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registration, state, ac_name, status, fleet_id, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftStats&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| flights, hours, distance&lt;br /&gt;
|-&lt;br /&gt;
| getFleetAircraftList&lt;br /&gt;
| va_id, fleet_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registration, state, ac_name, status, fleet_id, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getFleetList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name&lt;br /&gt;
|-&lt;br /&gt;
| getFleetStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getLeasedAircraftList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registraion, state, ac_name, status, fleet_id, fuel, va_id, name, expire&lt;br /&gt;
|- &lt;br /&gt;
| getPeriodFleetStats&lt;br /&gt;
| va_id, from_ts, to_ts&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Airport Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirportData&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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&lt;br /&gt;
|-&lt;br /&gt;
| getAirportList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| icao, name, city, country, fuel, lat, lon&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Airline Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirlineData&lt;br /&gt;
| va_id, id (=va_id)&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, base, code, budget, homepage, logo_l, logo_s, price (deprecated, will be removed in next release), reputation, pilotcharge, multiplier, mission&lt;br /&gt;
|-&lt;br /&gt;
| getAirlineStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, pax, cargo_kg&lt;br /&gt;
|-&lt;br /&gt;
| getCountryStats&lt;br /&gt;
| va_id, country&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| va_name, id, flights, rating hours, profit, distance, last, fuel_used, pax, cargo_kg&lt;br /&gt;
|- &lt;br /&gt;
| getRankList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, short, settings, pilots, aircrafts, fleet, flights, partnerships, advertisements, fleet_id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Financial Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getLast10Transactions&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| ts, value, reason&lt;br /&gt;
|-&lt;br /&gt;
| getNegTransactionSums&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| value, reason&lt;br /&gt;
|-&lt;br /&gt;
| getPosTransactionSums&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| value, reason&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Flight Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters in brackets are optional&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getActiveFlights&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| departure, arrival, passengers, cargo, user_id, ac_id, flightstate, timestamp, number, lon, lat, pax_economy, pax_business, pax_first&lt;br /&gt;
|-&lt;br /&gt;
| getBookedFlights&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| departure, arrival, passengers, cargo, user_id, ac_id, number, pax_economy, pax_business, pax_first&lt;br /&gt;
|-&lt;br /&gt;
| getFlightReports&lt;br /&gt;
| va_id, (acdb_id), (ac_id), (pilot_id), (days), (count)&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;pax_economy, pax_business, pax_first&amp;lt;/span&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
| getReportDetail&lt;br /&gt;
| va_id, report_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;vs, pax_economy, pax_business, pax_first, ticket_business, ticket_first, fuel_start, fuel_dep, fuel_takeoff, fuel_land, fuel_finish, ticket_factor, interface, simversion, os&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| getRouteData&lt;br /&gt;
| va_id, route_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, va_id, cs_vaid, number, dep, arr, deptime, arrtime, simrate, days, price, state, flighttype, acdb_list, ac_id, remarks, route, limit_pax, limit_cargo&lt;br /&gt;
|-&lt;br /&gt;
| getRouteList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, number, dep, dep_country, arr, arr_country, deptime, arrtime, simrate, days, price, state, flighttype, acdb_list, ac_id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Pilot Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getPeriodPilotStats&lt;br /&gt;
| va_id, from_ts, to_ts&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getPilotData&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, surname, user, va_user, rank_id, location, budget, lastactive, active, sigac, timezone, weightunit, language, msgmail, rank, flights, rating, hours, distance, pax, cargo_kg, picture&lt;br /&gt;
|-&lt;br /&gt;
| getPilotHours&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao, hours&lt;br /&gt;
|-&lt;br /&gt;
| getPilotList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, surname, user, va_user, rank_id, location, last_active, status, budget&lt;br /&gt;
|-&lt;br /&gt;
| getPilotRatings&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, training, manufacturer, type&lt;br /&gt;
|-&lt;br /&gt;
| getPilotStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getPilotStatus&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| ac_id, route_id, departure, arrival, dep_time, dist, duration, status, lon, lat, flightstate, passengers, income, ticket, timestamp, cargo, multiplier, flighttype&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Flight Booking===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| bookFlight&lt;br /&gt;
| va_id, pilot_id, passwd, route_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| success, message, codeshare, codeshare_msg&lt;br /&gt;
|-&lt;br /&gt;
| cancelFlight&lt;br /&gt;
| va_id, pilot_id, passwd&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| result, loss&lt;br /&gt;
|-&lt;br /&gt;
| getBookableRoutes&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| number, dep, arr, deptime, arrtime, id, state, simrate, flighttype, training, price, list, ac_id&lt;br /&gt;
|-&lt;br /&gt;
| getBookableAircraft&lt;br /&gt;
| va_id, pilot_id, route_id&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| type, registration, state, id, name, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getBookStatus&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| status&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Miscellaneous User Functions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| createAccount&lt;br /&gt;
| va_id, givenname, surname, username, email, password, airport, accept_pp&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| success, message, code&lt;br /&gt;
|-&lt;br /&gt;
| getPilotID&lt;br /&gt;
| va_id, user, passwd&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id&lt;br /&gt;
|-&lt;br /&gt;
| getPrivacyPolicy&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS&lt;br /&gt;
| policy&lt;br /&gt;
|-&lt;br /&gt;
| getTransferCost&lt;br /&gt;
| va_id, arr, dep&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| cost&lt;br /&gt;
|-&lt;br /&gt;
| transferPilot&lt;br /&gt;
| va_id, pilot_id, passwd, icao&lt;br /&gt;
| SUCCESS, NOT FOUND, INSUFFICIENT FUNDS&lt;br /&gt;
| cost&lt;br /&gt;
|- &lt;br /&gt;
| getDistance&lt;br /&gt;
| va_id, icao_from, icao_to&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| distance&lt;br /&gt;
|- &lt;br /&gt;
| getMetar&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| metar&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Requested additional functions===&lt;br /&gt;
The following list contains all the functions which were requested by users but aren&#039;t implemented yet.&lt;br /&gt;
*Create, edit and delete routes&lt;/div&gt;</summary>
		<author><name>Joefremont</name></author>
	</entry>
	<entry>
		<id>https://wiki4.fsairlines.net/index.php?title=XML-Interface-v2&amp;diff=3288</id>
		<title>XML-Interface-v2</title>
		<link rel="alternate" type="text/html" href="https://wiki4.fsairlines.net/index.php?title=XML-Interface-v2&amp;diff=3288"/>
		<updated>2021-03-21T18:04:36Z</updated>

		<summary type="html">&lt;p&gt;Joefremont: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Data-Interface is the core of the [[VA Integration Kit]]. It has been designed to give VA Administrators with the knowledge of dynamic web techniques the possibility to create their own layout and perfectly integrate the information into their own website using data from FSAirlines. &lt;br /&gt;
&lt;br /&gt;
==Changes from the previous version==&lt;br /&gt;
Compared to the previous version of the Data-Interface (previously referred to as the &#039;&#039;XML-Interface&#039;&#039;) the following change were made.&lt;br /&gt;
* Change from domain registration to API keys.&lt;br /&gt;
* Rate limits added.&lt;br /&gt;
* Json output format added.&lt;br /&gt;
* Output properly supports UTF-8 character set.&lt;br /&gt;
* Additional functions for packages added.&lt;br /&gt;
&lt;br /&gt;
==Rate limits==&lt;br /&gt;
The access to the interface is limited by the number of calls an VA can make each hour and each day.  An airline with a gold account can make 100 calls each hour and 1200 call each day. An airline with a platinum account can make 500 calls each hour and 6000 call each day. If an airline has multiple members then those limits are added together for each premium account.  Example if an airline has one platinum member and two gold member there limits are 700 an hour and 8400 per day.  Functions related to pilots booking flights do not count against the rate limits.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Access Restriction==&lt;br /&gt;
In order to be able to access data from the Data-Interface you need to create an API key, this can be done using the &#039;Api Key Management&#039; page on the website accessible from the options on the VA overview page.  There are two types of API keys that can be created.&lt;br /&gt;
&lt;br /&gt;
Site key:  This key is to be used by your main website/service and may be use the full rate limit allowed by your VA.  After one hundred calls using a site api key, the key will be locked to the IP address used.  If in the future you need to change the IP address all you need to do is delete the old key and create a new one.&lt;br /&gt;
&lt;br /&gt;
Developer key:  This key is used to help you create and test your website on a different machine than your main site.  It will not be limited to a single IP address but will be limited to the number of calls each day your VA is normally allowed each hour.   Usage of the developer key does apply against your VA&#039;s total rate limit.&lt;br /&gt;
&lt;br /&gt;
==Basic Usage==&lt;br /&gt;
The data can be received using HTTP calls to the interface script and add the desired function to the parameters. Here is an example request:&lt;br /&gt;
&amp;lt;pre&amp;gt;http://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;apikey=xxxxx&amp;lt;/pre&amp;gt;&lt;br /&gt;
As you can see there is the interface script &#039;&#039;va_interface.php&#039;&#039;, the function &#039;&#039;getPilotList&#039;&#039; and the parameters &#039;&#039;va_id=7&#039;&#039; and &#039;&#039;apikey=xxxxx&#039;&#039;. Some functions require additional parameters, these can be appended after the other parameters.&lt;br /&gt;
&lt;br /&gt;
The result of the request will be given in xml format with the base-tag being &#039;&#039;&amp;lt;fsa_output&amp;gt;&#039;&#039;. This tag has the attributes &#039;&#039;version&#039;&#039; and &#039;&#039;success&#039;&#039; which show the version number of the interface and if the request succeeded or not. In case of a failure the &#039;&#039;success&#039;&#039;-attribute shows the error message. The following example shows the return text of the above function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;fsa_output version=&amp;quot;1.0&amp;quot; success=&amp;quot;SUCCESS&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;data id=&amp;quot;1&amp;quot; name=&amp;quot;Konrad&amp;quot; surname=&amp;quot;Pustka&amp;quot; va_user=&amp;quot;SNA101&amp;quot; location=&amp;quot;EDDM&amp;quot; lastactive=&amp;quot;1287330550&amp;quot; budget=&amp;quot;198144&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;data id=&amp;quot;2&amp;quot; name=&amp;quot;Claudio&amp;quot; surname=&amp;quot;Gusmini&amp;quot; va_user=&amp;quot;SNA102&amp;quot; location=&amp;quot;EDDM&amp;quot; lastactive=&amp;quot;1286366261&amp;quot; budget=&amp;quot;216405101&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/fsa_output&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Inside the &#039;&#039;fsa_output&#039;&#039;-tag there are the &#039;&#039;data&#039;&#039;-tags which contain all the information.  &lt;br /&gt;
&lt;br /&gt;
When calling using this method the default output format is XML, you can get the out in JSON format by adding a format=json parameter to the request. Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;http://www.fsairlines.net/va_interface2.php?function=getPilotList&amp;amp;va_id=7&amp;amp;format=json&amp;amp;apikey=xxxxx&amp;lt;/pre&amp;gt;&lt;br /&gt;
The output will be:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;status&amp;quot;: &amp;quot;SUCCESS&amp;quot;,&lt;br /&gt;
    &amp;quot;data&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;id&amp;quot;: 1,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Konrad&amp;quot;,&lt;br /&gt;
            &amp;quot;surname&amp;quot;: &amp;quot;Pustka&amp;quot;,&lt;br /&gt;
            &amp;quot;va_user&amp;quot;: &amp;quot;SNA101&amp;quot;,&lt;br /&gt;
            &amp;quot;location&amp;quot;: &amp;quot;ETSE&amp;quot;,&lt;br /&gt;
            &amp;quot;lastactive&amp;quot;: 1600285079,&lt;br /&gt;
            &amp;quot;budget&amp;quot;: 2400628&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;id&amp;quot;: 2,&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;Claudio&amp;quot;,&lt;br /&gt;
            &amp;quot;surname&amp;quot;: &amp;quot;Gusmini&amp;quot;,&lt;br /&gt;
            &amp;quot;va_user&amp;quot;: &amp;quot;SNA102&amp;quot;,&lt;br /&gt;
            &amp;quot;location&amp;quot;: &amp;quot;LIMG&amp;quot;,&lt;br /&gt;
            &amp;quot;lastactive&amp;quot;: 1605458811,&lt;br /&gt;
            &amp;quot;budget&amp;quot;: 216631042&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you need something to get started here&#039;s a small example PHP-script showing a list of your pilots&#039; names. Just replace the va_id by your own.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
  $objDOM = new DOMDocument();&lt;br /&gt;
  $objDOM-&amp;gt;load(&amp;quot;http://www.fsairlines.net/va_interface.php?function=getPilotList&amp;amp;va_id=7&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  //uncomment to show raw xml-data&lt;br /&gt;
  //echo $objDOM-&amp;gt;saveXML();&lt;br /&gt;
&lt;br /&gt;
  $dataNodes = $objDOM-&amp;gt;getElementsByTagName(&amp;quot;data&amp;quot;);&lt;br /&gt;
  foreach( $dataNodes as $node )&lt;br /&gt;
  {&lt;br /&gt;
    $name = $node-&amp;gt;getAttribute(&amp;quot;name&amp;quot;);&lt;br /&gt;
    $surname = $node-&amp;gt;getAttribute(&amp;quot;surname&amp;quot;);&lt;br /&gt;
    echo &amp;quot;{$name} {$surname} &amp;lt;br/&amp;gt;&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Data==&lt;br /&gt;
The following section contains a detailed list of all the request-functions with their return values. Lately added options are marked &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;green&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Parameters===&lt;br /&gt;
All the request functions use parameters which need to be appended. The following table shows all the parameters and their meaning.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter&lt;br /&gt;
! Meaning&lt;br /&gt;
|- &lt;br /&gt;
| ac_id&lt;br /&gt;
| ID of the aircraft. Is part of the data received from other functions (e.g. getAircraftList).&lt;br /&gt;
|-&lt;br /&gt;
| accept_pp&lt;br /&gt;
| Must be set &#039;1&#039; if Privacy Policy is accepted.&lt;br /&gt;
|-&lt;br /&gt;
| acdb_id&lt;br /&gt;
| ID of the aircraft type. Is part of the data received from other functions (e.g. getAircraftList).&lt;br /&gt;
|-&lt;br /&gt;
| airport&lt;br /&gt;
| Starting airport. Where the user should be placed first.&lt;br /&gt;
|-&lt;br /&gt;
| arr&lt;br /&gt;
| ICAO code of the arrival airport.&lt;br /&gt;
|-&lt;br /&gt;
| count&lt;br /&gt;
| Number past flights which should be displayed.&lt;br /&gt;
|-&lt;br /&gt;
| country&lt;br /&gt;
| Name of the country. &lt;br /&gt;
|-&lt;br /&gt;
| days&lt;br /&gt;
| Number of past days from now which should be displayed.&lt;br /&gt;
|-&lt;br /&gt;
| dep&lt;br /&gt;
| ICAO code of the departure airport.&lt;br /&gt;
|-&lt;br /&gt;
| email&lt;br /&gt;
| E-Mail of the user.&lt;br /&gt;
|-&lt;br /&gt;
| fleet_id&lt;br /&gt;
| ID of the fleet. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| from_ts&lt;br /&gt;
| UNIX timestamp of the date where the listing should start.&lt;br /&gt;
|-&lt;br /&gt;
| givenname&lt;br /&gt;
| Given name of the user.&lt;br /&gt;
|-&lt;br /&gt;
| icao&lt;br /&gt;
| ICAO code of the airport.&lt;br /&gt;
|-&lt;br /&gt;
| passwd&lt;br /&gt;
| Password of the pilot (MD5 encrypted).&lt;br /&gt;
|-&lt;br /&gt;
| password&lt;br /&gt;
| Password of the user.&lt;br /&gt;
|-&lt;br /&gt;
| pilot_id&lt;br /&gt;
| ID of the pilot. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| report_id&lt;br /&gt;
| ID of the report. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| surname&lt;br /&gt;
| Surname of the user.&lt;br /&gt;
|-&lt;br /&gt;
| to_ts&lt;br /&gt;
| UNIX timestamp of the date where the listing should end.&lt;br /&gt;
|-&lt;br /&gt;
| user&lt;br /&gt;
| Username of the pilot.&lt;br /&gt;
|-&lt;br /&gt;
| username&lt;br /&gt;
| Requested username.&lt;br /&gt;
|-&lt;br /&gt;
| va_id&lt;br /&gt;
| ID of the [[Virtual Airline]]. Is displayed on the [[Overview]] page.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Aircraft Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftData&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, pax_economy, pax_business, pax_first, config_name&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftDBData&lt;br /&gt;
| va_id, acdb_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao, passengers, price, fuel, dow, mtow, speed, engines, cargo, mzfw, market_only, range&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftDBList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registration, state, ac_name, status, fleet_id, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftStats&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| flights, hours, distance&lt;br /&gt;
|-&lt;br /&gt;
| getFleetAircraftList&lt;br /&gt;
| va_id, fleet_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registration, state, ac_name, status, fleet_id, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getFleetList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name&lt;br /&gt;
|-&lt;br /&gt;
| getFleetStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getLeasedAircraftList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registraion, state, ac_name, status, fleet_id, fuel, va_id, name, expire&lt;br /&gt;
|- &lt;br /&gt;
| getPeriodFleetStats&lt;br /&gt;
| va_id, from_ts, to_ts&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Airport Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirportData&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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&lt;br /&gt;
|-&lt;br /&gt;
| getAirportList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| icao, name, city, country, fuel, lat, lon&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Airline Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirlineData&lt;br /&gt;
| va_id, id (=va_id)&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, base, code, budget, homepage, logo_l, logo_s, price (deprecated, will be removed in next release), reputation, pilotcharge, multiplier, mission&lt;br /&gt;
|-&lt;br /&gt;
| getAirlineStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, pax, cargo_kg&lt;br /&gt;
|-&lt;br /&gt;
| getCountryStats&lt;br /&gt;
| va_id, country&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| va_name, id, flights, rating hours, profit, distance, last, fuel_used, pax, cargo_kg&lt;br /&gt;
|- &lt;br /&gt;
| getRankList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, short, settings, pilots, aircrafts, fleet, flights, partnerships, advertisements, fleet_id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Financial Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getLast10Transactions&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| ts, value, reason&lt;br /&gt;
|-&lt;br /&gt;
| getNegTransactionSums&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| value, reason&lt;br /&gt;
|-&lt;br /&gt;
| getPosTransactionSums&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| value, reason&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Flight Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters in brackets are optional&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getActiveFlights&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| departure, arrival, passengers, cargo, user_id, ac_id, flightstate, timestamp, number, lon, lat, pax_economy, pax_business, pax_first&lt;br /&gt;
|-&lt;br /&gt;
| getBookedFlights&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| departure, arrival, passengers, cargo, user_id, ac_id, number, pax_economy, pax_business, pax_first&lt;br /&gt;
|-&lt;br /&gt;
| getFlightReports&lt;br /&gt;
| va_id, (acdb_id), (ac_id), (pilot_id), (days), (count)&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;pax_economy, pax_business, pax_first&amp;lt;/span&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
| getReportDetail&lt;br /&gt;
| va_id, report_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;vs, pax_economy, pax_business, pax_first, ticket_business, ticket_first, fuel_start, fuel_dep, fuel_takeoff, fuel_land, fuel_finish, ticket_factor, interface, simversion, os&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| getRouteData&lt;br /&gt;
| va_id, route_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, va_id, cs_vaid, number, dep, arr, deptime, arrtime, simrate, days, price, state, flighttype, acdb_list, ac_id, remarks, route, limit_pax, limit_cargo&lt;br /&gt;
|-&lt;br /&gt;
| getRouteList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, number, dep, dep_country, arr, arr_country, deptime, arrtime, simrate, days, price, state, flighttype, acdb_list, ac_id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Pilot Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getPeriodPilotStats&lt;br /&gt;
| va_id, from_ts, to_ts&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getPilotData&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, surname, user, va_user, rank_id, location, budget, lastactive, active, sigac, timezone, weightunit, language, msgmail, rank, flights, rating, hours, distance, pax, cargo_kg, picture&lt;br /&gt;
|-&lt;br /&gt;
| getPilotHours&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao, hours&lt;br /&gt;
|-&lt;br /&gt;
| getPilotList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, surname, user, va_user, rank_id, location, last_active, status, budget&lt;br /&gt;
|-&lt;br /&gt;
| getPilotRatings&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, training, manufacturer, type&lt;br /&gt;
|-&lt;br /&gt;
| getPilotStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getPilotStatus&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| ac_id, route_id, departure, arrival, dep_time, dist, duration, status, lon, lat, flightstate, passengers, income, ticket, timestamp, cargo, multiplier, flighttype&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Flight Booking===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| bookFlight&lt;br /&gt;
| va_id, pilot_id, passwd, route_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| success, message, codeshare, codeshare_msg&lt;br /&gt;
|-&lt;br /&gt;
| cancelFlight&lt;br /&gt;
| va_id, pilot_id, passwd&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| result, loss&lt;br /&gt;
|-&lt;br /&gt;
| getBookableRoutes&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| number, dep, arr, deptime, arrtime, id, state, simrate, flighttype, training, price, list, ac_id&lt;br /&gt;
|-&lt;br /&gt;
| getBookableAircraft&lt;br /&gt;
| va_id, pilot_id, route_id&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| type, registration, state, id, name, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getBookStatus&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| status&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Miscellaneous User Functions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| createAccount&lt;br /&gt;
| va_id, givenname, surname, username, email, password, airport, accept_pp&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| success, message, code&lt;br /&gt;
|-&lt;br /&gt;
| getPilotID&lt;br /&gt;
| va_id, user, passwd&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id&lt;br /&gt;
|-&lt;br /&gt;
| getPrivacyPolicy&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS&lt;br /&gt;
| policy&lt;br /&gt;
|-&lt;br /&gt;
| getTransferCost&lt;br /&gt;
| va_id, arr, dep&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| cost&lt;br /&gt;
|-&lt;br /&gt;
| transferPilot&lt;br /&gt;
| va_id, pilot_id, passwd, icao&lt;br /&gt;
| SUCCESS, NOT FOUND, INSUFFICIENT FUNDS&lt;br /&gt;
| cost&lt;br /&gt;
|- &lt;br /&gt;
| getDistance&lt;br /&gt;
| va_id, icao_from, icao_to&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| distance&lt;br /&gt;
|- &lt;br /&gt;
| getMetar&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| metar&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Requested additional functions===&lt;br /&gt;
The following list contains all the functions which were requested by users but aren&#039;t implemented yet.&lt;br /&gt;
*Create, edit and delete routes&lt;/div&gt;</summary>
		<author><name>Joefremont</name></author>
	</entry>
	<entry>
		<id>https://wiki4.fsairlines.net/index.php?title=XML-Interface-v2&amp;diff=3287</id>
		<title>XML-Interface-v2</title>
		<link rel="alternate" type="text/html" href="https://wiki4.fsairlines.net/index.php?title=XML-Interface-v2&amp;diff=3287"/>
		<updated>2021-02-15T19:33:03Z</updated>

		<summary type="html">&lt;p&gt;Joefremont: Created page with &amp;quot;The XML-Interface is the core of the VA Integration Kit. It has been designed to give VA Administrators with the knowledge of dynamic web techniques the possibility to cre...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The XML-Interface is the core of the [[VA Integration Kit]]. It has been designed to give VA Administrators with the knowledge of dynamic web techniques the possibility to create their own layout and perfectly integrate the information into their own website using XML data from FSAirlines. &lt;br /&gt;
&lt;br /&gt;
==Access Restriction==&lt;br /&gt;
In order to be able to receive data from the XML-Interface the domain of your VA&#039;s website must be registered in our database. There are different access levels available:&lt;br /&gt;
*Read only access for your VA&lt;br /&gt;
*Read and write access (except account creation) for your VA. This access level will be given to you initially.&lt;br /&gt;
*Read and write access for your VA. This access level will be given to your VA if you show our privacy policy on your registration page.&lt;br /&gt;
To request one of these access levels, please contact the admins using a support ticket and don&#039;t forget to add the domain of your website.&lt;br /&gt;
&lt;br /&gt;
==Basic Usage==&lt;br /&gt;
The data can be received using HTTP calls to the interface script and add the desired function to the parameters. Here is an example request:&lt;br /&gt;
&amp;lt;pre&amp;gt;http://www.fsairlines.net/va_interface.php?function=getPilotList&amp;amp;va_id=7&amp;lt;/pre&amp;gt;&lt;br /&gt;
As you can see there is the interface script &#039;&#039;va_interface.php&#039;&#039;, the function &#039;&#039;getPilotList&#039;&#039; and one function parameter &#039;&#039;va_id=7&#039;&#039;. Some functions require additional parameters, these can be appended after the &#039;&#039;va_id&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The result of the request will be given in xml format with the base-tag being &#039;&#039;&amp;lt;fsa_output&amp;gt;&#039;&#039;. This tag has the attributes &#039;&#039;version&#039;&#039; and &#039;&#039;success&#039;&#039; which show the version number of the interface and if the request succeeded or not. In case of a failure the &#039;&#039;success&#039;&#039;-attribute shows the error message. The following example shows the return text of the above function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;fsa_output version=&amp;quot;1.0&amp;quot; success=&amp;quot;SUCCESS&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;data id=&amp;quot;1&amp;quot; name=&amp;quot;Konrad&amp;quot; surname=&amp;quot;Pustka&amp;quot; va_user=&amp;quot;SNA101&amp;quot; location=&amp;quot;EDDM&amp;quot; lastactive=&amp;quot;1287330550&amp;quot; budget=&amp;quot;198144&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;data id=&amp;quot;2&amp;quot; name=&amp;quot;Claudio&amp;quot; surname=&amp;quot;Gusmini&amp;quot; va_user=&amp;quot;SNA102&amp;quot; location=&amp;quot;EDDM&amp;quot; lastactive=&amp;quot;1286366261&amp;quot; budget=&amp;quot;216405101&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/fsa_output&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Inside the &#039;&#039;fsa_output&#039;&#039;-tag there are the &#039;&#039;data&#039;&#039;-tags which contain all the information.&lt;br /&gt;
To use this data in your own webpage you need some knowledge in dynamic web-programming, for example PHP. We can&#039;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 there.&lt;br /&gt;
&lt;br /&gt;
If you need something to get started here&#039;s a small example PHP-script showing a list of your pilots&#039; names. Just replace the va_id by your own.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
  $objDOM = new DOMDocument();&lt;br /&gt;
  $objDOM-&amp;gt;load(&amp;quot;http://www.fsairlines.net/va_interface.php?function=getPilotList&amp;amp;va_id=7&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  //uncomment to show raw xml-data&lt;br /&gt;
  //echo $objDOM-&amp;gt;saveXML();&lt;br /&gt;
&lt;br /&gt;
  $dataNodes = $objDOM-&amp;gt;getElementsByTagName(&amp;quot;data&amp;quot;);&lt;br /&gt;
  foreach( $dataNodes as $node )&lt;br /&gt;
  {&lt;br /&gt;
    $name = $node-&amp;gt;getAttribute(&amp;quot;name&amp;quot;);&lt;br /&gt;
    $surname = $node-&amp;gt;getAttribute(&amp;quot;surname&amp;quot;);&lt;br /&gt;
    echo &amp;quot;{$name} {$surname} &amp;lt;br/&amp;gt;&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Data==&lt;br /&gt;
The following section contains a detailed list of all the request-functions with their return values. Lately added options are marked &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;green&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Parameters===&lt;br /&gt;
All the request functions use parameters which need to be appended. The following table shows all the parameters and their meaning.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter&lt;br /&gt;
! Meaning&lt;br /&gt;
|- &lt;br /&gt;
| ac_id&lt;br /&gt;
| ID of the aircraft. Is part of the data received from other functions (e.g. getAircraftList).&lt;br /&gt;
|-&lt;br /&gt;
| accept_pp&lt;br /&gt;
| Must be set &#039;1&#039; if Privacy Policy is accepted.&lt;br /&gt;
|-&lt;br /&gt;
| acdb_id&lt;br /&gt;
| ID of the aircraft type. Is part of the data received from other functions (e.g. getAircraftList).&lt;br /&gt;
|-&lt;br /&gt;
| airport&lt;br /&gt;
| Starting airport. Where the user should be placed first.&lt;br /&gt;
|-&lt;br /&gt;
| arr&lt;br /&gt;
| ICAO code of the arrival airport.&lt;br /&gt;
|-&lt;br /&gt;
| count&lt;br /&gt;
| Number past flights which should be displayed.&lt;br /&gt;
|-&lt;br /&gt;
| country&lt;br /&gt;
| Name of the country. &lt;br /&gt;
|-&lt;br /&gt;
| days&lt;br /&gt;
| Number of past days from now which should be displayed.&lt;br /&gt;
|-&lt;br /&gt;
| dep&lt;br /&gt;
| ICAO code of the departure airport.&lt;br /&gt;
|-&lt;br /&gt;
| email&lt;br /&gt;
| E-Mail of the user.&lt;br /&gt;
|-&lt;br /&gt;
| fleet_id&lt;br /&gt;
| ID of the fleet. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| from_ts&lt;br /&gt;
| UNIX timestamp of the date where the listing should start.&lt;br /&gt;
|-&lt;br /&gt;
| givenname&lt;br /&gt;
| Given name of the user.&lt;br /&gt;
|-&lt;br /&gt;
| icao&lt;br /&gt;
| ICAO code of the airport.&lt;br /&gt;
|-&lt;br /&gt;
| passwd&lt;br /&gt;
| Password of the pilot (MD5 encrypted).&lt;br /&gt;
|-&lt;br /&gt;
| password&lt;br /&gt;
| Password of the user.&lt;br /&gt;
|-&lt;br /&gt;
| pilot_id&lt;br /&gt;
| ID of the pilot. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| report_id&lt;br /&gt;
| ID of the report. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| surname&lt;br /&gt;
| Surname of the user.&lt;br /&gt;
|-&lt;br /&gt;
| to_ts&lt;br /&gt;
| UNIX timestamp of the date where the listing should end.&lt;br /&gt;
|-&lt;br /&gt;
| user&lt;br /&gt;
| Username of the pilot.&lt;br /&gt;
|-&lt;br /&gt;
| username&lt;br /&gt;
| Requested username.&lt;br /&gt;
|-&lt;br /&gt;
| va_id&lt;br /&gt;
| ID of the [[Virtual Airline]]. Is displayed on the [[Overview]] page.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Aircraft Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftData&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, pax_economy, pax_business, pax_first, config_name&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftDBData&lt;br /&gt;
| va_id, acdb_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao, passengers, price, fuel, dow, mtow, speed, engines, cargo, mzfw, market_only, range&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftDBList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registration, state, ac_name, status, fleet_id, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftStats&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| flights, hours, distance&lt;br /&gt;
|-&lt;br /&gt;
| getFleetAircraftList&lt;br /&gt;
| va_id, fleet_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registration, state, ac_name, status, fleet_id, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getFleetList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name&lt;br /&gt;
|-&lt;br /&gt;
| getFleetStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getLeasedAircraftList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registraion, state, ac_name, status, fleet_id, fuel, va_id, name, expire&lt;br /&gt;
|- &lt;br /&gt;
| getPeriodFleetStats&lt;br /&gt;
| va_id, from_ts, to_ts&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Airport Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirportData&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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&lt;br /&gt;
|-&lt;br /&gt;
| getAirportList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| icao, name, city, country, fuel, lat, lon&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Airline Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirlineData&lt;br /&gt;
| va_id, id (=va_id)&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, base, code, budget, homepage, logo_l, logo_s, price (deprecated, will be removed in next release), reputation, pilotcharge, multiplier, mission&lt;br /&gt;
|-&lt;br /&gt;
| getAirlineStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, pax, cargo_kg&lt;br /&gt;
|-&lt;br /&gt;
| getCountryStats&lt;br /&gt;
| va_id, country&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| va_name, id, flights, rating hours, profit, distance, last, fuel_used, pax, cargo_kg&lt;br /&gt;
|- &lt;br /&gt;
| getRankList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, short, settings, pilots, aircrafts, fleet, flights, partnerships, advertisements, fleet_id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Financial Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getLast10Transactions&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| ts, value, reason&lt;br /&gt;
|-&lt;br /&gt;
| getNegTransactionSums&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| value, reason&lt;br /&gt;
|-&lt;br /&gt;
| getPosTransactionSums&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| value, reason&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Flight Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters in brackets are optional&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getActiveFlights&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| departure, arrival, passengers, cargo, user_id, ac_id, flightstate, timestamp, number, lon, lat, pax_economy, pax_business, pax_first&lt;br /&gt;
|-&lt;br /&gt;
| getBookedFlights&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| departure, arrival, passengers, cargo, user_id, ac_id, number, pax_economy, pax_business, pax_first&lt;br /&gt;
|-&lt;br /&gt;
| getFlightReports&lt;br /&gt;
| va_id, (acdb_id), (ac_id), (pilot_id), (days), (count)&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;pax_economy, pax_business, pax_first&amp;lt;/span&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
| getReportDetail&lt;br /&gt;
| va_id, report_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;vs, pax_economy, pax_business, pax_first, ticket_business, ticket_first, fuel_start, fuel_dep, fuel_takeoff, fuel_land, fuel_finish, ticket_factor, interface, simversion, os&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| getRouteData&lt;br /&gt;
| va_id, route_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, va_id, cs_vaid, number, dep, arr, deptime, arrtime, simrate, days, price, state, flighttype, acdb_list, ac_id, remarks, route, limit_pax, limit_cargo&lt;br /&gt;
|-&lt;br /&gt;
| getRouteList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, number, dep, dep_country, arr, arr_country, deptime, arrtime, simrate, days, price, state, flighttype, acdb_list, ac_id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Pilot Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getPeriodPilotStats&lt;br /&gt;
| va_id, from_ts, to_ts&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getPilotData&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, surname, user, va_user, rank_id, location, budget, lastactive, active, sigac, timezone, weightunit, language, msgmail, rank, flights, rating, hours, distance, pax, cargo_kg, picture&lt;br /&gt;
|-&lt;br /&gt;
| getPilotHours&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao, hours&lt;br /&gt;
|-&lt;br /&gt;
| getPilotList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, surname, user, va_user, rank_id, location, last_active, status, budget&lt;br /&gt;
|-&lt;br /&gt;
| getPilotRatings&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, training, manufacturer, type&lt;br /&gt;
|-&lt;br /&gt;
| getPilotStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getPilotStatus&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| ac_id, route_id, departure, arrival, dep_time, dist, duration, status, lon, lat, flightstate, passengers, income, ticket, timestamp, cargo, multiplier, flighttype&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Flight Booking===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| bookFlight&lt;br /&gt;
| va_id, pilot_id, passwd, route_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| success, message, codeshare, codeshare_msg&lt;br /&gt;
|-&lt;br /&gt;
| cancelFlight&lt;br /&gt;
| va_id, pilot_id, passwd&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| result, loss&lt;br /&gt;
|-&lt;br /&gt;
| getBookableRoutes&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| number, dep, arr, deptime, arrtime, id, state, simrate, flighttype, training, price, list, ac_id&lt;br /&gt;
|-&lt;br /&gt;
| getBookableAircraft&lt;br /&gt;
| va_id, pilot_id, route_id&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| type, registration, state, id, name, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getBookStatus&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| status&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Miscellaneous User Functions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| createAccount&lt;br /&gt;
| va_id, givenname, surname, username, email, password, airport, accept_pp&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| success, message, code&lt;br /&gt;
|-&lt;br /&gt;
| getPilotID&lt;br /&gt;
| va_id, user, passwd&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id&lt;br /&gt;
|-&lt;br /&gt;
| getPrivacyPolicy&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS&lt;br /&gt;
| policy&lt;br /&gt;
|-&lt;br /&gt;
| getTransferCost&lt;br /&gt;
| va_id, arr, dep&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| cost&lt;br /&gt;
|-&lt;br /&gt;
| transferPilot&lt;br /&gt;
| va_id, pilot_id, passwd, icao&lt;br /&gt;
| SUCCESS, NOT FOUND, INSUFFICIENT FUNDS&lt;br /&gt;
| cost&lt;br /&gt;
|- &lt;br /&gt;
| getDistance&lt;br /&gt;
| va_id, icao_from, icao_to&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| distance&lt;br /&gt;
|- &lt;br /&gt;
| getMetar&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| metar&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Requested additional functions===&lt;br /&gt;
The following list contains all the functions which were requested by users but aren&#039;t implemented yet.&lt;br /&gt;
*Create, edit and delete routes&lt;/div&gt;</summary>
		<author><name>Joefremont</name></author>
	</entry>
	<entry>
		<id>https://wiki4.fsairlines.net/index.php?title=Multiplier&amp;diff=3286</id>
		<title>Multiplier</title>
		<link rel="alternate" type="text/html" href="https://wiki4.fsairlines.net/index.php?title=Multiplier&amp;diff=3286"/>
		<updated>2019-01-07T22:00:22Z</updated>

		<summary type="html">&lt;p&gt;Joefremont: Protected &amp;quot;Multiplier&amp;quot; ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite))&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Features]]&lt;br /&gt;
The multiplier is a factor which is multiplied by the flight profit to determine the income for the virtual airline. It has been added to make it easier for the airlines to grow and buy new aircraft. Real airlines do hundreds of flights a day, so on FSAirlines you can do one flight, but the income you get is the same as if you did this flight for example 50 times.&lt;br /&gt;
&lt;br /&gt;
====Maximum possible multiplier====&lt;br /&gt;
To make it easier for new airlines to built up a decent fleet the maximum possible multiplier depends on the overall airline value (cash+aircraft) and gets lower the bigger an airline grows. We say &amp;lt;i&amp;gt;maximum possible&amp;lt;/i&amp;gt; multiplier because an airline can always manually set it lower for a more realistic simulation.&lt;br /&gt;
&lt;br /&gt;
This is how the maximum possible multiplier is calculated:&lt;br /&gt;
*airline value &amp;lt; 500,000,000v$    : &#039;&#039;&#039;1000&#039;&#039;&#039;&lt;br /&gt;
*airline value &amp;lt; 1,000,000,000v$  :  &#039;&#039;&#039;700&#039;&#039;&#039;&lt;br /&gt;
*airline value &amp;lt; 1,500,000,000v$  :  &#039;&#039;&#039;500&#039;&#039;&#039;&lt;br /&gt;
*airline value &amp;lt; 2,000,000,000v$  :  &#039;&#039;&#039;300&#039;&#039;&#039;&lt;br /&gt;
*airline value &amp;lt; 2,500,000,000v$  :  &#039;&#039;&#039;225&#039;&#039;&#039;&lt;br /&gt;
*airline value &amp;lt; 3,000,000,000v$  :  &#039;&#039;&#039;150&#039;&#039;&#039;&lt;br /&gt;
*airline value &amp;lt; 3,500,000,000v$ :   &#039;&#039;&#039;100&#039;&#039;&#039;&lt;br /&gt;
*airline value &amp;lt; 4,000,000,000v$ :   &#039;&#039;&#039;75&#039;&#039;&#039;&lt;br /&gt;
*airline value &amp;lt; 4,500,000,000v$ :   &#039;&#039;&#039;50&#039;&#039;&#039;&lt;br /&gt;
*airline value &amp;lt; 5,000,000,000v$ :   &#039;&#039;&#039;35&#039;&#039;&#039;&lt;br /&gt;
*airline value &amp;gt; 5,000,000,000v$ :   &#039;&#039;&#039;25&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Edit the multiplier===&lt;br /&gt;
CEOs or pilots who have the rights to edit VA settings can change the multiplier on the &#039;&#039;&#039;edit VA settings&#039;&#039;&#039; page. The multiplier can be either set to &#039;&#039;&#039;dynamic&#039;&#039;&#039; which means that always the maximum possible value is taken or to a fixed value less than the maximum possible value. But remember that if you set it to a fixed value and your airline&#039;s value raises above the limit for this multiplier it will be automatically changed to the maximum possible value.&lt;/div&gt;</summary>
		<author><name>Joefremont</name></author>
	</entry>
	<entry>
		<id>https://wiki4.fsairlines.net/index.php?title=Multiplier&amp;diff=3285</id>
		<title>Multiplier</title>
		<link rel="alternate" type="text/html" href="https://wiki4.fsairlines.net/index.php?title=Multiplier&amp;diff=3285"/>
		<updated>2019-01-07T22:00:12Z</updated>

		<summary type="html">&lt;p&gt;Joefremont: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Features]]&lt;br /&gt;
The multiplier is a factor which is multiplied by the flight profit to determine the income for the virtual airline. It has been added to make it easier for the airlines to grow and buy new aircraft. Real airlines do hundreds of flights a day, so on FSAirlines you can do one flight, but the income you get is the same as if you did this flight for example 50 times.&lt;br /&gt;
&lt;br /&gt;
====Maximum possible multiplier====&lt;br /&gt;
To make it easier for new airlines to built up a decent fleet the maximum possible multiplier depends on the overall airline value (cash+aircraft) and gets lower the bigger an airline grows. We say &amp;lt;i&amp;gt;maximum possible&amp;lt;/i&amp;gt; multiplier because an airline can always manually set it lower for a more realistic simulation.&lt;br /&gt;
&lt;br /&gt;
This is how the maximum possible multiplier is calculated:&lt;br /&gt;
*airline value &amp;lt; 500,000,000v$    : &#039;&#039;&#039;1000&#039;&#039;&#039;&lt;br /&gt;
*airline value &amp;lt; 1,000,000,000v$  :  &#039;&#039;&#039;700&#039;&#039;&#039;&lt;br /&gt;
*airline value &amp;lt; 1,500,000,000v$  :  &#039;&#039;&#039;500&#039;&#039;&#039;&lt;br /&gt;
*airline value &amp;lt; 2,000,000,000v$  :  &#039;&#039;&#039;300&#039;&#039;&#039;&lt;br /&gt;
*airline value &amp;lt; 2,500,000,000v$  :  &#039;&#039;&#039;225&#039;&#039;&#039;&lt;br /&gt;
*airline value &amp;lt; 3,000,000,000v$  :  &#039;&#039;&#039;150&#039;&#039;&#039;&lt;br /&gt;
*airline value &amp;lt; 3,500,000,000v$ :   &#039;&#039;&#039;100&#039;&#039;&#039;&lt;br /&gt;
*airline value &amp;lt; 4,000,000,000v$ :   &#039;&#039;&#039;75&#039;&#039;&#039;&lt;br /&gt;
*airline value &amp;lt; 4,500,000,000v$ :   &#039;&#039;&#039;50&#039;&#039;&#039;&lt;br /&gt;
*airline value &amp;lt; 5,000,000,000v$ :   &#039;&#039;&#039;35&#039;&#039;&#039;&lt;br /&gt;
*airline value &amp;gt; 5,000,000,000v$ :   &#039;&#039;&#039;25&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Edit the multiplier===&lt;br /&gt;
CEOs or pilots who have the rights to edit VA settings can change the multiplier on the &#039;&#039;&#039;edit VA settings&#039;&#039;&#039; page. The multiplier can be either set to &#039;&#039;&#039;dynamic&#039;&#039;&#039; which means that always the maximum possible value is taken or to a fixed value less than the maximum possible value. But remember that if you set it to a fixed value and your airline&#039;s value raises above the limit for this multiplier it will be automatically changed to the maximum possible value.&lt;/div&gt;</summary>
		<author><name>Joefremont</name></author>
	</entry>
	<entry>
		<id>https://wiki4.fsairlines.net/index.php?title=Multiplier&amp;diff=3284</id>
		<title>Multiplier</title>
		<link rel="alternate" type="text/html" href="https://wiki4.fsairlines.net/index.php?title=Multiplier&amp;diff=3284"/>
		<updated>2019-01-07T21:58:46Z</updated>

		<summary type="html">&lt;p&gt;Joefremont: Removed protection from &amp;quot;Multiplier&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Features]]&lt;br /&gt;
The multiplier is a factor which is multiplied by the flight profit to determine the income for the virtual airline. It has been added to make it easier for the airlines to grow and buy new aircraft. Real airlines do hundreds of flights a day, so on FSAirlines you can do one flight, but the income you get is the same as if you did this flight for example 50 times.&lt;br /&gt;
&lt;br /&gt;
====Maximum possible multiplier====&lt;br /&gt;
To make it easier for new airlines to built up a decent fleet the maximum possible multiplier depends on the overall airline value (cash+aircraft) and gets lower the bigger an airline grows. We say &amp;lt;i&amp;gt;maximum possible&amp;lt;/i&amp;gt; multiplier because an airline can always manually set it lower for a more realistic simulation.&lt;br /&gt;
&lt;br /&gt;
This is how the maximum possible multiplier is calculated:&lt;br /&gt;
*airline value &amp;lt; 500,000,000v$    : &#039;&#039;&#039;1000&#039;&#039;&#039;&lt;br /&gt;
*airline value &amp;lt; 1,000,000,000v$  :  &#039;&#039;&#039;500&#039;&#039;&#039;&lt;br /&gt;
*airline value &amp;lt; 2,000,000,000v$  :  &#039;&#039;&#039;400&#039;&#039;&#039;&lt;br /&gt;
*airline value &amp;lt; 3,000,000,000v$  :  &#039;&#039;&#039;300&#039;&#039;&#039;&lt;br /&gt;
*airline value &amp;lt; 4,000,000,000v$  :  &#039;&#039;&#039;200&#039;&#039;&#039;&lt;br /&gt;
*airline value &amp;lt; 5,000,000,000v$  :  &#039;&#039;&#039;100&#039;&#039;&#039;&lt;br /&gt;
*airline value &amp;lt; 10,000,000,000v$ :   &#039;&#039;&#039;50&#039;&#039;&#039;&lt;br /&gt;
*airline value &amp;gt; 10,000,000,000v$ :   &#039;&#039;&#039;25&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Edit the multiplier===&lt;br /&gt;
CEOs or pilots who have the rights to edit VA settings can change the multiplier on the &#039;&#039;&#039;edit VA settings&#039;&#039;&#039; page. The multiplier can be either set to &#039;&#039;&#039;dynamic&#039;&#039;&#039; which means that always the maximum possible value is taken or to a fixed value less than the maximum possible value. But remember that if you set it to a fixed value and your airline&#039;s value raises above the limit for this multiplier it will be automatically changed to the maximum possible value.&lt;/div&gt;</summary>
		<author><name>Joefremont</name></author>
	</entry>
	<entry>
		<id>https://wiki4.fsairlines.net/index.php?title=Multiplier&amp;diff=3283</id>
		<title>Multiplier</title>
		<link rel="alternate" type="text/html" href="https://wiki4.fsairlines.net/index.php?title=Multiplier&amp;diff=3283"/>
		<updated>2019-01-07T21:58:15Z</updated>

		<summary type="html">&lt;p&gt;Joefremont: Changed protection level for &amp;quot;Multiplier&amp;quot; ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Features]]&lt;br /&gt;
The multiplier is a factor which is multiplied by the flight profit to determine the income for the virtual airline. It has been added to make it easier for the airlines to grow and buy new aircraft. Real airlines do hundreds of flights a day, so on FSAirlines you can do one flight, but the income you get is the same as if you did this flight for example 50 times.&lt;br /&gt;
&lt;br /&gt;
====Maximum possible multiplier====&lt;br /&gt;
To make it easier for new airlines to built up a decent fleet the maximum possible multiplier depends on the overall airline value (cash+aircraft) and gets lower the bigger an airline grows. We say &amp;lt;i&amp;gt;maximum possible&amp;lt;/i&amp;gt; multiplier because an airline can always manually set it lower for a more realistic simulation.&lt;br /&gt;
&lt;br /&gt;
This is how the maximum possible multiplier is calculated:&lt;br /&gt;
*airline value &amp;lt; 500,000,000v$    : &#039;&#039;&#039;1000&#039;&#039;&#039;&lt;br /&gt;
*airline value &amp;lt; 1,000,000,000v$  :  &#039;&#039;&#039;500&#039;&#039;&#039;&lt;br /&gt;
*airline value &amp;lt; 2,000,000,000v$  :  &#039;&#039;&#039;400&#039;&#039;&#039;&lt;br /&gt;
*airline value &amp;lt; 3,000,000,000v$  :  &#039;&#039;&#039;300&#039;&#039;&#039;&lt;br /&gt;
*airline value &amp;lt; 4,000,000,000v$  :  &#039;&#039;&#039;200&#039;&#039;&#039;&lt;br /&gt;
*airline value &amp;lt; 5,000,000,000v$  :  &#039;&#039;&#039;100&#039;&#039;&#039;&lt;br /&gt;
*airline value &amp;lt; 10,000,000,000v$ :   &#039;&#039;&#039;50&#039;&#039;&#039;&lt;br /&gt;
*airline value &amp;gt; 10,000,000,000v$ :   &#039;&#039;&#039;25&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Edit the multiplier===&lt;br /&gt;
CEOs or pilots who have the rights to edit VA settings can change the multiplier on the &#039;&#039;&#039;edit VA settings&#039;&#039;&#039; page. The multiplier can be either set to &#039;&#039;&#039;dynamic&#039;&#039;&#039; which means that always the maximum possible value is taken or to a fixed value less than the maximum possible value. But remember that if you set it to a fixed value and your airline&#039;s value raises above the limit for this multiplier it will be automatically changed to the maximum possible value.&lt;/div&gt;</summary>
		<author><name>Joefremont</name></author>
	</entry>
	<entry>
		<id>https://wiki4.fsairlines.net/index.php?title=XML-Interface&amp;diff=3282</id>
		<title>XML-Interface</title>
		<link rel="alternate" type="text/html" href="https://wiki4.fsairlines.net/index.php?title=XML-Interface&amp;diff=3282"/>
		<updated>2016-07-08T15:35:43Z</updated>

		<summary type="html">&lt;p&gt;Joefremont: /* Basic Usage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The XML-Interface is the core of the [[VA Integration Kit]]. It has been designed to give VA Administrators with the knowledge of dynamic web techniques the possibility to create their own layout and perfectly integrate the information into their own website using XML data from FSAirlines. &lt;br /&gt;
&lt;br /&gt;
==Access Restriction==&lt;br /&gt;
In order to be able to receive data from the XML-Interface the domain of your VA&#039;s website must be registered in our database. There are different access levels available:&lt;br /&gt;
*Read only access for your VA&lt;br /&gt;
*Read and write access (except account creation) for your VA. This access level will be given to you initially.&lt;br /&gt;
*Read and write access for your VA. This access level will be given to your VA if you show our privacy policy on your registration page.&lt;br /&gt;
To request one of these access levels, please contact the admins using a support ticket and don&#039;t forget to add the domain of your website.&lt;br /&gt;
&lt;br /&gt;
==Basic Usage==&lt;br /&gt;
The data can be received using HTTP calls to the interface script and add the desired function to the parameters. Here is an example request:&lt;br /&gt;
&amp;lt;pre&amp;gt;http://www.fsairlines.net/va_interface.php?function=getPilotList&amp;amp;va_id=7&amp;lt;/pre&amp;gt;&lt;br /&gt;
As you can see there is the interface script &#039;&#039;va_interface.php&#039;&#039;, the function &#039;&#039;getPilotList&#039;&#039; and one function parameter &#039;&#039;va_id=7&#039;&#039;. Some functions require additional parameters, these can be appended after the &#039;&#039;va_id&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The result of the request will be given in xml format with the base-tag being &#039;&#039;&amp;lt;fsa_output&amp;gt;&#039;&#039;. This tag has the attributes &#039;&#039;version&#039;&#039; and &#039;&#039;success&#039;&#039; which show the version number of the interface and if the request succeeded or not. In case of a failure the &#039;&#039;success&#039;&#039;-attribute shows the error message. The following example shows the return text of the above function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;fsa_output version=&amp;quot;1.0&amp;quot; success=&amp;quot;SUCCESS&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;data id=&amp;quot;1&amp;quot; name=&amp;quot;Konrad&amp;quot; surname=&amp;quot;Pustka&amp;quot; va_user=&amp;quot;SNA101&amp;quot; location=&amp;quot;EDDM&amp;quot; lastactive=&amp;quot;1287330550&amp;quot; budget=&amp;quot;198144&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;data id=&amp;quot;2&amp;quot; name=&amp;quot;Claudio&amp;quot; surname=&amp;quot;Gusmini&amp;quot; va_user=&amp;quot;SNA102&amp;quot; location=&amp;quot;EDDM&amp;quot; lastactive=&amp;quot;1286366261&amp;quot; budget=&amp;quot;216405101&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/fsa_output&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Inside the &#039;&#039;fsa_output&#039;&#039;-tag there are the &#039;&#039;data&#039;&#039;-tags which contain all the information.&lt;br /&gt;
To use this data in your own webpage you need some knowledge in dynamic web-programming, for example PHP. We can&#039;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 there.&lt;br /&gt;
&lt;br /&gt;
If you need something to get started here&#039;s a small example PHP-script showing a list of your pilots&#039; names. Just replace the va_id by your own.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
  $objDOM = new DOMDocument();&lt;br /&gt;
  $objDOM-&amp;gt;load(&amp;quot;http://www.fsairlines.net/va_interface.php?function=getPilotList&amp;amp;va_id=7&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  //uncomment to show raw xml-data&lt;br /&gt;
  //echo $objDOM-&amp;gt;saveXML();&lt;br /&gt;
&lt;br /&gt;
  $dataNodes = $objDOM-&amp;gt;getElementsByTagName(&amp;quot;data&amp;quot;);&lt;br /&gt;
  foreach( $dataNodes as $node )&lt;br /&gt;
  {&lt;br /&gt;
    $name = $node-&amp;gt;getAttribute(&amp;quot;name&amp;quot;);&lt;br /&gt;
    $surname = $node-&amp;gt;getAttribute(&amp;quot;surname&amp;quot;);&lt;br /&gt;
    echo &amp;quot;{$name} {$surname} &amp;lt;br/&amp;gt;&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Data==&lt;br /&gt;
The following section contains a detailed list of all the request-functions with their return values. Lately added options are marked &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;green&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Parameters===&lt;br /&gt;
All the request functions use parameters which need to be appended. The following table shows all the parameters and their meaning.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter&lt;br /&gt;
! Meaning&lt;br /&gt;
|- &lt;br /&gt;
| ac_id&lt;br /&gt;
| ID of the aircraft. Is part of the data received from other functions (e.g. getAircraftList).&lt;br /&gt;
|-&lt;br /&gt;
| accept_pp&lt;br /&gt;
| Must be set &#039;1&#039; if Privacy Policy is accepted.&lt;br /&gt;
|-&lt;br /&gt;
| acdb_id&lt;br /&gt;
| ID of the aircraft type. Is part of the data received from other functions (e.g. getAircraftList).&lt;br /&gt;
|-&lt;br /&gt;
| airport&lt;br /&gt;
| Starting airport. Where the user should be placed first.&lt;br /&gt;
|-&lt;br /&gt;
| arr&lt;br /&gt;
| ICAO code of the arrival airport.&lt;br /&gt;
|-&lt;br /&gt;
| count&lt;br /&gt;
| Number past flights which should be displayed.&lt;br /&gt;
|-&lt;br /&gt;
| country&lt;br /&gt;
| Name of the country. &lt;br /&gt;
|-&lt;br /&gt;
| days&lt;br /&gt;
| Number of past days from now which should be displayed.&lt;br /&gt;
|-&lt;br /&gt;
| dep&lt;br /&gt;
| ICAO code of the departure airport.&lt;br /&gt;
|-&lt;br /&gt;
| email&lt;br /&gt;
| E-Mail of the user.&lt;br /&gt;
|-&lt;br /&gt;
| fleet_id&lt;br /&gt;
| ID of the fleet. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| from_ts&lt;br /&gt;
| UNIX timestamp of the date where the listing should start.&lt;br /&gt;
|-&lt;br /&gt;
| givenname&lt;br /&gt;
| Given name of the user.&lt;br /&gt;
|-&lt;br /&gt;
| icao&lt;br /&gt;
| ICAO code of the airport.&lt;br /&gt;
|-&lt;br /&gt;
| passwd&lt;br /&gt;
| Password of the pilot (MD5 encrypted).&lt;br /&gt;
|-&lt;br /&gt;
| password&lt;br /&gt;
| Password of the user.&lt;br /&gt;
|-&lt;br /&gt;
| pilot_id&lt;br /&gt;
| ID of the pilot. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| report_id&lt;br /&gt;
| ID of the report. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| surname&lt;br /&gt;
| Surname of the user.&lt;br /&gt;
|-&lt;br /&gt;
| to_ts&lt;br /&gt;
| UNIX timestamp of the date where the listing should end.&lt;br /&gt;
|-&lt;br /&gt;
| user&lt;br /&gt;
| Username of the pilot.&lt;br /&gt;
|-&lt;br /&gt;
| username&lt;br /&gt;
| Requested username.&lt;br /&gt;
|-&lt;br /&gt;
| va_id&lt;br /&gt;
| ID of the [[Virtual Airline]]. Is displayed on the [[Overview]] page.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Aircraft Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftData&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, pax_economy, pax_business, pax_first, config_name&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftDBData&lt;br /&gt;
| va_id, acdb_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao, passengers, price, fuel, dow, mtow, speed, engines, cargo, mzfw, market_only, range&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftDBList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registration, state, ac_name, status, fleet_id, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftStats&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| flights, hours, distance&lt;br /&gt;
|-&lt;br /&gt;
| getFleetAircraftList&lt;br /&gt;
| va_id, fleet_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registration, state, ac_name, status, fleet_id, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getFleetList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name&lt;br /&gt;
|-&lt;br /&gt;
| getFleetStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getLeasedAircraftList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registraion, state, ac_name, status, fleet_id, fuel, va_id, name, expire&lt;br /&gt;
|- &lt;br /&gt;
| getPeriodFleetStats&lt;br /&gt;
| va_id, from_ts, to_ts&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Airport Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirportData&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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&lt;br /&gt;
|-&lt;br /&gt;
| getAirportList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| icao, name, city, country, fuel, lat, lon&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Airline Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirlineData&lt;br /&gt;
| va_id, id (=va_id)&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, base, code, budget, homepage, logo_l, logo_s, price (deprecated, will be removed in next release), reputation, pilotcharge, multiplier, mission&lt;br /&gt;
|-&lt;br /&gt;
| getAirlineStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, pax, cargo_kg&lt;br /&gt;
|-&lt;br /&gt;
| getCountryStats&lt;br /&gt;
| va_id, country&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| va_name, id, flights, rating hours, profit, distance, last, fuel_used, pax, cargo_kg&lt;br /&gt;
|- &lt;br /&gt;
| getRankList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, short, settings, pilots, aircrafts, fleet, flights, partnerships, advertisements, fleet_id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Financial Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getLast10Transactions&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| ts, value, reason&lt;br /&gt;
|-&lt;br /&gt;
| getNegTransactionSums&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| value, reason&lt;br /&gt;
|-&lt;br /&gt;
| getPosTransactionSums&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| value, reason&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Flight Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters in brackets are optional&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getActiveFlights&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| departure, arrival, passengers, cargo, user_id, ac_id, flightstate, timestamp, number, lon, lat, pax_economy, pax_business, pax_first&lt;br /&gt;
|-&lt;br /&gt;
| getBookedFlights&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| departure, arrival, passengers, cargo, user_id, ac_id, number, pax_economy, pax_business, pax_first&lt;br /&gt;
|-&lt;br /&gt;
| getFlightReports&lt;br /&gt;
| va_id, (acdb_id), (ac_id), (pilot_id), (days), (count)&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;pax_economy, pax_business, pax_first&amp;lt;/span&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
| getReportDetail&lt;br /&gt;
| va_id, report_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;vs, pax_economy, pax_business, pax_first, ticket_business, ticket_first, fuel_start, fuel_dep, fuel_takeoff, fuel_land, fuel_finish, ticket_factor, interface, simversion, os&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| getRouteData&lt;br /&gt;
| va_id, route_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, va_id, cs_vaid, number, dep, arr, deptime, arrtime, simrate, days, price, state, flighttype, acdb_list, ac_id, remarks, route, limit_pax, limit_cargo&lt;br /&gt;
|-&lt;br /&gt;
| getRouteList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, number, dep, dep_country, arr, arr_country, deptime, arrtime, simrate, days, price, state, flighttype, acdb_list, ac_id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Pilot Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getPeriodPilotStats&lt;br /&gt;
| va_id, from_ts, to_ts&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getPilotData&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, surname, user, va_user, rank_id, location, budget, lastactive, active, sigac, timezone, weightunit, language, msgmail, rank, flights, rating, hours, distance, pax, cargo_kg, picture&lt;br /&gt;
|-&lt;br /&gt;
| getPilotHours&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao, hours&lt;br /&gt;
|-&lt;br /&gt;
| getPilotList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, surname, user, va_user, rank_id, location, last_active, status, budget&lt;br /&gt;
|-&lt;br /&gt;
| getPilotRatings&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, training, manufacturer, type&lt;br /&gt;
|-&lt;br /&gt;
| getPilotStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getPilotStatus&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| ac_id, route_id, departure, arrival, dep_time, dist, duration, status, lon, lat, flightstate, passengers, income, ticket, timestamp, cargo, multiplier, flighttype&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Flight Booking===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| bookFlight&lt;br /&gt;
| va_id, pilot_id, passwd, route_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| success, message, codeshare, codeshare_msg&lt;br /&gt;
|-&lt;br /&gt;
| cancelFlight&lt;br /&gt;
| va_id, pilot_id, passwd&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| result, loss&lt;br /&gt;
|-&lt;br /&gt;
| getBookableRoutes&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| number, dep, arr, deptime, arrtime, id, state, simrate, flighttype, training, price, list, ac_id&lt;br /&gt;
|-&lt;br /&gt;
| getBookableAircraft&lt;br /&gt;
| va_id, pilot_id, route_id&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| type, registration, state, id, name, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getBookStatus&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| status&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Miscellaneous User Functions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| createAccount&lt;br /&gt;
| va_id, givenname, surname, username, email, password, airport, accept_pp&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| success, message, code&lt;br /&gt;
|-&lt;br /&gt;
| getPilotID&lt;br /&gt;
| va_id, user, passwd&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id&lt;br /&gt;
|-&lt;br /&gt;
| getPrivacyPolicy&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS&lt;br /&gt;
| policy&lt;br /&gt;
|-&lt;br /&gt;
| getTransferCost&lt;br /&gt;
| va_id, arr, dep&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| cost&lt;br /&gt;
|-&lt;br /&gt;
| transferPilot&lt;br /&gt;
| va_id, pilot_id, passwd, icao&lt;br /&gt;
| SUCCESS, NOT FOUND, INSUFFICIENT FUNDS&lt;br /&gt;
| cost&lt;br /&gt;
|- &lt;br /&gt;
| getDistance&lt;br /&gt;
| va_id, icao_from, icao_to&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| distance&lt;br /&gt;
|- &lt;br /&gt;
| getMetar&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| metar&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Requested additional functions===&lt;br /&gt;
The following list contains all the functions which were requested by users but aren&#039;t implemented yet.&lt;br /&gt;
*Create, edit and delete routes&lt;/div&gt;</summary>
		<author><name>Joefremont</name></author>
	</entry>
	<entry>
		<id>https://wiki4.fsairlines.net/index.php?title=XML-Interface&amp;diff=3281</id>
		<title>XML-Interface</title>
		<link rel="alternate" type="text/html" href="https://wiki4.fsairlines.net/index.php?title=XML-Interface&amp;diff=3281"/>
		<updated>2016-07-08T15:34:48Z</updated>

		<summary type="html">&lt;p&gt;Joefremont: /* Basic Usage */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The XML-Interface is the core of the [[VA Integration Kit]]. It has been designed to give VA Administrators with the knowledge of dynamic web techniques the possibility to create their own layout and perfectly integrate the information into their own website using XML data from FSAirlines. &lt;br /&gt;
&lt;br /&gt;
==Access Restriction==&lt;br /&gt;
In order to be able to receive data from the XML-Interface the domain of your VA&#039;s website must be registered in our database. There are different access levels available:&lt;br /&gt;
*Read only access for your VA&lt;br /&gt;
*Read and write access (except account creation) for your VA. This access level will be given to you initially.&lt;br /&gt;
*Read and write access for your VA. This access level will be given to your VA if you show our privacy policy on your registration page.&lt;br /&gt;
To request one of these access levels, please contact the admins using a support ticket and don&#039;t forget to add the domain of your website.&lt;br /&gt;
&lt;br /&gt;
==Basic Usage==&lt;br /&gt;
The data can be received using HTTP calls to the interface script and add the desired function to the parameters. Here is an example request:&lt;br /&gt;
&amp;lt;pre&amp;gt;http://www.fsairlines.net/va_interface.php5?function=getPilotList&amp;amp;va_id=7&amp;lt;/pre&amp;gt;&lt;br /&gt;
As you can see there is the interface script &#039;&#039;va_interface.php&#039;&#039;, the function &#039;&#039;getPilotList&#039;&#039; and one function parameter &#039;&#039;va_id=7&#039;&#039;. Some functions require additional parameters, these can be appended after the &#039;&#039;va_id&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The result of the request will be given in xml format with the base-tag being &#039;&#039;&amp;lt;fsa_output&amp;gt;&#039;&#039;. This tag has the attributes &#039;&#039;version&#039;&#039; and &#039;&#039;success&#039;&#039; which show the version number of the interface and if the request succeeded or not. In case of a failure the &#039;&#039;success&#039;&#039;-attribute shows the error message. The following example shows the return text of the above function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;fsa_output version=&amp;quot;1.0&amp;quot; success=&amp;quot;SUCCESS&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;data id=&amp;quot;1&amp;quot; name=&amp;quot;Konrad&amp;quot; surname=&amp;quot;Pustka&amp;quot; va_user=&amp;quot;SNA101&amp;quot; location=&amp;quot;EDDM&amp;quot; lastactive=&amp;quot;1287330550&amp;quot; budget=&amp;quot;198144&amp;quot; /&amp;gt;&lt;br /&gt;
  &amp;lt;data id=&amp;quot;2&amp;quot; name=&amp;quot;Claudio&amp;quot; surname=&amp;quot;Gusmini&amp;quot; va_user=&amp;quot;SNA102&amp;quot; location=&amp;quot;EDDM&amp;quot; lastactive=&amp;quot;1286366261&amp;quot; budget=&amp;quot;216405101&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/fsa_output&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Inside the &#039;&#039;fsa_output&#039;&#039;-tag there are the &#039;&#039;data&#039;&#039;-tags which contain all the information.&lt;br /&gt;
To use this data in your own webpage you need some knowledge in dynamic web-programming, for example PHP. We can&#039;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 there.&lt;br /&gt;
&lt;br /&gt;
If you need something to get started here&#039;s a small example PHP-script showing a list of your pilots&#039; names. Just replace the va_id by your own.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
  $objDOM = new DOMDocument();&lt;br /&gt;
  $objDOM-&amp;gt;load(&amp;quot;http://www.fsairlines.net/va_interface.php?function=getPilotList&amp;amp;va_id=7&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
  //uncomment to show raw xml-data&lt;br /&gt;
  //echo $objDOM-&amp;gt;saveXML();&lt;br /&gt;
&lt;br /&gt;
  $dataNodes = $objDOM-&amp;gt;getElementsByTagName(&amp;quot;data&amp;quot;);&lt;br /&gt;
  foreach( $dataNodes as $node )&lt;br /&gt;
  {&lt;br /&gt;
    $name = $node-&amp;gt;getAttribute(&amp;quot;name&amp;quot;);&lt;br /&gt;
    $surname = $node-&amp;gt;getAttribute(&amp;quot;surname&amp;quot;);&lt;br /&gt;
    echo &amp;quot;{$name} {$surname} &amp;lt;br/&amp;gt;&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Data==&lt;br /&gt;
The following section contains a detailed list of all the request-functions with their return values. Lately added options are marked &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;green&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Parameters===&lt;br /&gt;
All the request functions use parameters which need to be appended. The following table shows all the parameters and their meaning.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter&lt;br /&gt;
! Meaning&lt;br /&gt;
|- &lt;br /&gt;
| ac_id&lt;br /&gt;
| ID of the aircraft. Is part of the data received from other functions (e.g. getAircraftList).&lt;br /&gt;
|-&lt;br /&gt;
| accept_pp&lt;br /&gt;
| Must be set &#039;1&#039; if Privacy Policy is accepted.&lt;br /&gt;
|-&lt;br /&gt;
| acdb_id&lt;br /&gt;
| ID of the aircraft type. Is part of the data received from other functions (e.g. getAircraftList).&lt;br /&gt;
|-&lt;br /&gt;
| airport&lt;br /&gt;
| Starting airport. Where the user should be placed first.&lt;br /&gt;
|-&lt;br /&gt;
| arr&lt;br /&gt;
| ICAO code of the arrival airport.&lt;br /&gt;
|-&lt;br /&gt;
| count&lt;br /&gt;
| Number past flights which should be displayed.&lt;br /&gt;
|-&lt;br /&gt;
| country&lt;br /&gt;
| Name of the country. &lt;br /&gt;
|-&lt;br /&gt;
| days&lt;br /&gt;
| Number of past days from now which should be displayed.&lt;br /&gt;
|-&lt;br /&gt;
| dep&lt;br /&gt;
| ICAO code of the departure airport.&lt;br /&gt;
|-&lt;br /&gt;
| email&lt;br /&gt;
| E-Mail of the user.&lt;br /&gt;
|-&lt;br /&gt;
| fleet_id&lt;br /&gt;
| ID of the fleet. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| from_ts&lt;br /&gt;
| UNIX timestamp of the date where the listing should start.&lt;br /&gt;
|-&lt;br /&gt;
| givenname&lt;br /&gt;
| Given name of the user.&lt;br /&gt;
|-&lt;br /&gt;
| icao&lt;br /&gt;
| ICAO code of the airport.&lt;br /&gt;
|-&lt;br /&gt;
| passwd&lt;br /&gt;
| Password of the pilot (MD5 encrypted).&lt;br /&gt;
|-&lt;br /&gt;
| password&lt;br /&gt;
| Password of the user.&lt;br /&gt;
|-&lt;br /&gt;
| pilot_id&lt;br /&gt;
| ID of the pilot. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| report_id&lt;br /&gt;
| ID of the report. Is part of the data received from other functions.&lt;br /&gt;
|-&lt;br /&gt;
| surname&lt;br /&gt;
| Surname of the user.&lt;br /&gt;
|-&lt;br /&gt;
| to_ts&lt;br /&gt;
| UNIX timestamp of the date where the listing should end.&lt;br /&gt;
|-&lt;br /&gt;
| user&lt;br /&gt;
| Username of the pilot.&lt;br /&gt;
|-&lt;br /&gt;
| username&lt;br /&gt;
| Requested username.&lt;br /&gt;
|-&lt;br /&gt;
| va_id&lt;br /&gt;
| ID of the [[Virtual Airline]]. Is displayed on the [[Overview]] page.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Aircraft Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftData&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, pax_economy, pax_business, pax_first, config_name&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftDBData&lt;br /&gt;
| va_id, acdb_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao, passengers, price, fuel, dow, mtow, speed, engines, cargo, mzfw, market_only, range&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftDBList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registration, state, ac_name, status, fleet_id, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getAircraftStats&lt;br /&gt;
| va_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| flights, hours, distance&lt;br /&gt;
|-&lt;br /&gt;
| getFleetAircraftList&lt;br /&gt;
| va_id, fleet_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registration, state, ac_name, status, fleet_id, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getFleetList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name&lt;br /&gt;
|-&lt;br /&gt;
| getFleetStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getLeasedAircraftList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, acdb_id, icao, value, location, registraion, state, ac_name, status, fleet_id, fuel, va_id, name, expire&lt;br /&gt;
|- &lt;br /&gt;
| getPeriodFleetStats&lt;br /&gt;
| va_id, from_ts, to_ts&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Airport Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirportData&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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&lt;br /&gt;
|-&lt;br /&gt;
| getAirportList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| icao, name, city, country, fuel, lat, lon&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Airline Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getAirlineData&lt;br /&gt;
| va_id, id (=va_id)&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, base, code, budget, homepage, logo_l, logo_s, price (deprecated, will be removed in next release), reputation, pilotcharge, multiplier, mission&lt;br /&gt;
|-&lt;br /&gt;
| getAirlineStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, pax, cargo_kg&lt;br /&gt;
|-&lt;br /&gt;
| getCountryStats&lt;br /&gt;
| va_id, country&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| va_name, id, flights, rating hours, profit, distance, last, fuel_used, pax, cargo_kg&lt;br /&gt;
|- &lt;br /&gt;
| getRankList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, short, settings, pilots, aircrafts, fleet, flights, partnerships, advertisements, fleet_id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Financial Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getLast10Transactions&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| ts, value, reason&lt;br /&gt;
|-&lt;br /&gt;
| getNegTransactionSums&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| value, reason&lt;br /&gt;
|-&lt;br /&gt;
| getPosTransactionSums&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| value, reason&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Flight Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters in brackets are optional&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getActiveFlights&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| departure, arrival, passengers, cargo, user_id, ac_id, flightstate, timestamp, number, lon, lat, pax_economy, pax_business, pax_first&lt;br /&gt;
|-&lt;br /&gt;
| getBookedFlights&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| departure, arrival, passengers, cargo, user_id, ac_id, number, pax_economy, pax_business, pax_first&lt;br /&gt;
|-&lt;br /&gt;
| getFlightReports&lt;br /&gt;
| va_id, (acdb_id), (ac_id), (pilot_id), (days), (count)&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;pax_economy, pax_business, pax_first&amp;lt;/span&amp;gt;&lt;br /&gt;
|- &lt;br /&gt;
| getReportDetail&lt;br /&gt;
| va_id, report_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| 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, &amp;lt;span style=&amp;quot;background-color:#B9FFC5;&amp;quot;&amp;gt;vs, pax_economy, pax_business, pax_first, ticket_business, ticket_first, fuel_start, fuel_dep, fuel_takeoff, fuel_land, fuel_finish, ticket_factor, interface, simversion, os&amp;lt;/span&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| getRouteData&lt;br /&gt;
| va_id, route_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, va_id, cs_vaid, number, dep, arr, deptime, arrtime, simrate, days, price, state, flighttype, acdb_list, ac_id, remarks, route, limit_pax, limit_cargo&lt;br /&gt;
|-&lt;br /&gt;
| getRouteList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, number, dep, dep_country, arr, arr_country, deptime, arrtime, simrate, days, price, state, flighttype, acdb_list, ac_id&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Pilot Data===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| getPeriodPilotStats&lt;br /&gt;
| va_id, from_ts, to_ts&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getPilotData&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, surname, user, va_user, rank_id, location, budget, lastactive, active, sigac, timezone, weightunit, language, msgmail, rank, flights, rating, hours, distance, pax, cargo_kg, picture&lt;br /&gt;
|-&lt;br /&gt;
| getPilotHours&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, manufacturer, type, icao, hours&lt;br /&gt;
|-&lt;br /&gt;
| getPilotList&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, name, surname, user, va_user, rank_id, location, last_active, status, budget&lt;br /&gt;
|-&lt;br /&gt;
| getPilotRatings&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, training, manufacturer, type&lt;br /&gt;
|-&lt;br /&gt;
| getPilotStats&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id, flights, rating, hours, distance, last, fuel_used, profit, cargo_kg, pax&lt;br /&gt;
|-&lt;br /&gt;
| getPilotStatus&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| ac_id, route_id, departure, arrival, dep_time, dist, duration, status, lon, lat, flightstate, passengers, income, ticket, timestamp, cargo, multiplier, flighttype&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Flight Booking===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| bookFlight&lt;br /&gt;
| va_id, pilot_id, passwd, route_id, ac_id&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| success, message, codeshare, codeshare_msg&lt;br /&gt;
|-&lt;br /&gt;
| cancelFlight&lt;br /&gt;
| va_id, pilot_id, passwd&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| result, loss&lt;br /&gt;
|-&lt;br /&gt;
| getBookableRoutes&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| number, dep, arr, deptime, arrtime, id, state, simrate, flighttype, training, price, list, ac_id&lt;br /&gt;
|-&lt;br /&gt;
| getBookableAircraft&lt;br /&gt;
| va_id, pilot_id, route_id&lt;br /&gt;
| SUCCESS, NOT FOUND, FLIGHT BOOKED, GROUNDED, SUSPENDED, VA INACTIVE&lt;br /&gt;
| type, registration, state, id, name, fuel&lt;br /&gt;
|-&lt;br /&gt;
| getBookStatus&lt;br /&gt;
| va_id, pilot_id&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| status&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Miscellaneous User Functions===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Function&lt;br /&gt;
! Parameters&lt;br /&gt;
! Return Codes&lt;br /&gt;
! Data&lt;br /&gt;
|-&lt;br /&gt;
| createAccount&lt;br /&gt;
| va_id, givenname, surname, username, email, password, airport, accept_pp&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| success, message, code&lt;br /&gt;
|-&lt;br /&gt;
| getPilotID&lt;br /&gt;
| va_id, user, passwd&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| id&lt;br /&gt;
|-&lt;br /&gt;
| getPrivacyPolicy&lt;br /&gt;
| va_id&lt;br /&gt;
| SUCCESS&lt;br /&gt;
| policy&lt;br /&gt;
|-&lt;br /&gt;
| getTransferCost&lt;br /&gt;
| va_id, arr, dep&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| cost&lt;br /&gt;
|-&lt;br /&gt;
| transferPilot&lt;br /&gt;
| va_id, pilot_id, passwd, icao&lt;br /&gt;
| SUCCESS, NOT FOUND, INSUFFICIENT FUNDS&lt;br /&gt;
| cost&lt;br /&gt;
|- &lt;br /&gt;
| getDistance&lt;br /&gt;
| va_id, icao_from, icao_to&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| distance&lt;br /&gt;
|- &lt;br /&gt;
| getMetar&lt;br /&gt;
| va_id, icao&lt;br /&gt;
| SUCCESS, NOT FOUND&lt;br /&gt;
| metar&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Notes===&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Requested additional functions===&lt;br /&gt;
The following list contains all the functions which were requested by users but aren&#039;t implemented yet.&lt;br /&gt;
*Create, edit and delete routes&lt;/div&gt;</summary>
		<author><name>Joefremont</name></author>
	</entry>
</feed>