ATC booking interface
Moderator: Michal Rok
- Michal Rok
- Five Star Club
- Posts: 2450
- Joined: Wed Aug 31, 2005 4:23 pm
ATC booking interface
Here's a reminder how to use the ATC booking interface:
----
There are three URLs for three commands you can send - insert new booking, update an existing one, or delete it. The following parameters are common for all calls:
- Local_URL (* see bottom for meaning of special value "noredir" *)
- Local_ID
- EU_ID (* update/delete only *)
You need to redirect your user's browser to one of the URL commands. VATBOOK will read the parameters, analyze them, and if everything is correct - redirect the user's browser back to originating website according to Local_URL. If something is wrong, an error message will be shown and no redirection will happen.
Local_URL will be appended with two parameters:
- Local_ID is the local numeric ID from the original database (your database) as supplied in the call
- EU_ID is VATBOOK's numeric ID of the booking. In case of new/updated bookings you should keep it in case later you want to update/delete.
- Event_ID - this parameter will be always zero and is added to maintain compatibility
Example of the Local_URL with parameters added:
* You call with Local_URL=http://www.pl-vacc.org/pol3/admin/booking.php
* VATBOOK takes your Local_ID=1742 (supplied on input)
* adds it's own EU_ID
* adds Event_ID=0 (compatibility)
* and redirects the user to http://www.pl-vacc.org/pol3/admin/booki ... Event_ID=0
Other parameters are specific to the function called.
The "insert" function
Adds new booking. Required parameters are:
* Local_URL - as in common section
* Local_ID - as in common section
* b_day - day of month on which the ATC session will start
* b_month - month part of the start date
* b_year - year part of the start date (4 digits)
* Controller - booking user's full name
* Position - callsign on which the service will be provided (up to 11 chars)
* sTime - start time in UTC, 4 digits, no separator between hours and minutes
* eTime - end time in UTC, as above. If eTime < sTime, then it means booked session ends on the next day
* T - 0 for normal session, 1 for training (display applications show these differently)
* E - 0 for normal session, 1 if it is part of event. For events, additional parameter E_URL is required and it specifies a URL where the user will be redirected to
* voice - 0 for text, 1 for voice, 2 for unknown
On success, redirects the user to Local_URL with parameters added (see common section for more info).
The "update" function
Takes the same parameters as "insert" plus:
* EU_ID - numeric ID of a booking previously made
and overwrites that booking with new data. All parameters must be supplied as with insert - and not just the ones being changed. If original booking (the one to be updated) is not found, a new one is created.
http://vatbook.euroutepro.com/atc/updat ... =0&voice=1
The "delete" function
Required parameters:
* Local_URL - as in common section
* Local_ID - as in common section
* EU_ID - as in common section
Deletes booking record referenced by Local_ID + EU_ID. Both IDs must be supplied to prove that you made the original entry.
http://vatbook.euroutepro.com/atc/delet ... al_ID=1741
--- Added 2006.07.08
Specify Local_URL=noredir (instead of URL) to receive instead of a redirect, a plain text response with the following sample content:
action=update
Local_ID=1742
EU_ID=2345
Event_ID=0
Action can be update, insert or delete, depending on what was requested. The other parameters have identical meaning as in a normal, redirection-based response.
---
Any corrections, additional information - please contact mrok@mrok.com
Michal
----
There are three URLs for three commands you can send - insert new booking, update an existing one, or delete it. The following parameters are common for all calls:
- Local_URL (* see bottom for meaning of special value "noredir" *)
- Local_ID
- EU_ID (* update/delete only *)
You need to redirect your user's browser to one of the URL commands. VATBOOK will read the parameters, analyze them, and if everything is correct - redirect the user's browser back to originating website according to Local_URL. If something is wrong, an error message will be shown and no redirection will happen.
Local_URL will be appended with two parameters:
- Local_ID is the local numeric ID from the original database (your database) as supplied in the call
- EU_ID is VATBOOK's numeric ID of the booking. In case of new/updated bookings you should keep it in case later you want to update/delete.
- Event_ID - this parameter will be always zero and is added to maintain compatibility
Example of the Local_URL with parameters added:
* You call with Local_URL=http://www.pl-vacc.org/pol3/admin/booking.php
* VATBOOK takes your Local_ID=1742 (supplied on input)
* adds it's own EU_ID
* adds Event_ID=0 (compatibility)
* and redirects the user to http://www.pl-vacc.org/pol3/admin/booki ... Event_ID=0
Other parameters are specific to the function called.
The "insert" function
Adds new booking. Required parameters are:
* Local_URL - as in common section
* Local_ID - as in common section
* b_day - day of month on which the ATC session will start
* b_month - month part of the start date
* b_year - year part of the start date (4 digits)
* Controller - booking user's full name
* Position - callsign on which the service will be provided (up to 11 chars)
* sTime - start time in UTC, 4 digits, no separator between hours and minutes
* eTime - end time in UTC, as above. If eTime < sTime, then it means booked session ends on the next day
* T - 0 for normal session, 1 for training (display applications show these differently)
* E - 0 for normal session, 1 if it is part of event. For events, additional parameter E_URL is required and it specifies a URL where the user will be redirected to
* voice - 0 for text, 1 for voice, 2 for unknown
On success, redirects the user to Local_URL with parameters added (see common section for more info).
The "update" function
Takes the same parameters as "insert" plus:
* EU_ID - numeric ID of a booking previously made
and overwrites that booking with new data. All parameters must be supplied as with insert - and not just the ones being changed. If original booking (the one to be updated) is not found, a new one is created.
http://vatbook.euroutepro.com/atc/updat ... =0&voice=1
The "delete" function
Required parameters:
* Local_URL - as in common section
* Local_ID - as in common section
* EU_ID - as in common section
Deletes booking record referenced by Local_ID + EU_ID. Both IDs must be supplied to prove that you made the original entry.
http://vatbook.euroutepro.com/atc/delet ... al_ID=1741
--- Added 2006.07.08
Specify Local_URL=noredir (instead of URL) to receive instead of a redirect, a plain text response with the following sample content:
action=update
Local_ID=1742
EU_ID=2345
Event_ID=0
Action can be update, insert or delete, depending on what was requested. The other parameters have identical meaning as in a normal, redirection-based response.
---
Any corrections, additional information - please contact mrok@mrok.com
Michal
Last edited by Michal Rok on Sat Jul 08, 2006 7:50 pm, edited 1 time in total.
Hi Michal,
I'm working now on that ASP.NET component i was talking about.
Will it be possible to provide alternative pages for booking without redirection?
Say for example instead of redirecting to local url with parameters return a normal page (only text without html) with them like this:
d=add
Local_ID=1742
EU_ID=505076505
Event_ID=0
Thanks
I'm working now on that ASP.NET component i was talking about.
Will it be possible to provide alternative pages for booking without redirection?
Say for example instead of redirecting to local url with parameters return a normal page (only text without html) with them like this:
d=add
Local_ID=1742
EU_ID=505076505
Event_ID=0
Thanks
Panagiotis Verras
ACCGR10
Hellenic vACC Webmaster
ACCGR10
Hellenic vACC Webmaster
- Michal Rok
- Five Star Club
- Posts: 2450
- Joined: Wed Aug 31, 2005 4:23 pm
Wow i didn't expect so soon your reply. Thanks you very much Michal you saved me a lot of time
. Yes works fine.
A quick question, when you try to delete or update something that doesn't exist no error is generated and indication is the same as a succes, is this the way it is supposed to be?
Also is there a status page that you get the bookings directly? so i can check the actual result of the booking? I'm a bit confused about the cascading of the geardown and vatbook which one the servinfo reads? if a booking doesn't appear in servinfo immediatelly is it because of db synchro or something went wrong?
Again thanks a lot!

A quick question, when you try to delete or update something that doesn't exist no error is generated and indication is the same as a succes, is this the way it is supposed to be?
Also is there a status page that you get the bookings directly? so i can check the actual result of the booking? I'm a bit confused about the cascading of the geardown and vatbook which one the servinfo reads? if a booking doesn't appear in servinfo immediatelly is it because of db synchro or something went wrong?
Again thanks a lot!
Panagiotis Verras
ACCGR10
Hellenic vACC Webmaster
ACCGR10
Hellenic vACC Webmaster
- Michal Rok
- Five Star Club
- Posts: 2450
- Joined: Wed Aug 31, 2005 4:23 pm
There is intentionally no error message. The purpose is to make the whole thing transparent to the user, because it is the user that would get this message - not the system administrator.
ServInfo gets its data directly from VATBOOK. The file that it reads consists of a snapshot of Geardown and VATBOOK's own entries, and is updated every 10 minutes.
I would prefer not to give out the direct URL to VATBOOK immediate snapshot - I don't want people to read from it and cause unnecessary call to the database everytime they do so.
Michal
ServInfo gets its data directly from VATBOOK. The file that it reads consists of a snapshot of Geardown and VATBOOK's own entries, and is updated every 10 minutes.
I would prefer not to give out the direct URL to VATBOOK immediate snapshot - I don't want people to read from it and cause unnecessary call to the database everytime they do so.
Michal
-
- Posts: 34
- Joined: Sat Jun 10, 2006 3:59 pm
- Michal Rok
- Five Star Club
- Posts: 2450
- Joined: Wed Aug 31, 2005 4:23 pm
Re: ATC booking interface
To supply controller's VATSIM ID (recommended and used by i.e. vroute) please add cid=xxxxxx parameter to the URL.
Michal
Michal
Re: ATC booking interface
Friends! Can anybody me help and explain as correctly to write the line of request for sending of booking ATCO's? (PHP5)
$url = "http://vatbook.euroutepro.com/atc/insert.asp?.... etc.
How? And whare take EU_ID?
Thks!
$url = "http://vatbook.euroutepro.com/atc/insert.asp?.... etc.
How? And whare take EU_ID?
Thks!
-
- Posts: 2
- Joined: Mon Dec 21, 2009 6:46 pm
Re: ATC booking interface
Hello,
Is there a way to test whether the custom built booking system really works (ie. the data is accepted by VATBook? Where could I check that the thing I just booked appears as it should?
Also, is there any specific procedure for testing a booking system (like using TEST_APP to book, with a test name...)?
Is there a way to test whether the custom built booking system really works (ie. the data is accepted by VATBook? Where could I check that the thing I just booked appears as it should?
Also, is there any specific procedure for testing a booking system (like using TEST_APP to book, with a test name...)?
- Michal Rok
- Five Star Club
- Posts: 2450
- Joined: Wed Aug 31, 2005 4:23 pm
Re: ATC booking interface
Hi,
you can send bookings with additional parameter TEST=1 which makes the system behave just like the real thing except the booking will not be saved.
In order to check if your booking appears as it should, you need to create a real one (not TEST) and check it yourself (i.e. in vroute). You can later delete that booking.
Michal
you can send bookings with additional parameter TEST=1 which makes the system behave just like the real thing except the booking will not be saved.
In order to check if your booking appears as it should, you need to create a real one (not TEST) and check it yourself (i.e. in vroute). You can later delete that booking.
Michal
-
- Posts: 2
- Joined: Mon Dec 21, 2009 6:46 pm
Re: ATC booking interface
Thanks for the prompt reply Michal! 

-
- Posts: 1
- Joined: Wed Aug 15, 2012 2:06 pm
Re: ATC booking interface
Hello.
I am looking at obtaining the required keys and IDs to allow submitting of both controller and pilot bookings to vroute by our vACC members.
My email is events (youknowwhat) scgvacc.net
Thanks.
Sava
I am looking at obtaining the required keys and IDs to allow submitting of both controller and pilot bookings to vroute by our vACC members.
My email is events (youknowwhat) scgvacc.net
Thanks.
Sava
- Michal Rok
- Five Star Club
- Posts: 2450
- Joined: Wed Aug 31, 2005 4:23 pm
Re: ATC booking interface
Sent by email.
Michal
Michal
-
- Posts: 4
- Joined: Tue Jan 29, 2013 4:24 am
Re: ATC booking interface
Hello Michal, I'm VATSIM Russia deputy director we're building booking system based on VATBOOK and need your help. Would you help us to give EID and EKEY for our division as for ATC and pilots booking. Thanks.
Sergey Balandin, VATRUS2.