ATC booking interface

Support forum for VATBOOK, the flight booking system. For general vroute queries please use vroute.premium forums above.

Moderator: Michal Rok

User avatar
Michal Rok
Five Star Club
Posts: 2450
Joined: Wed Aug 31, 2005 4:23 pm

ATC booking interface

Post by Michal Rok » Fri Jun 02, 2006 5:05 am

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
Last edited by Michal Rok on Sat Jul 08, 2006 7:50 pm, edited 1 time in total.

pverras
Posts: 5
Joined: Sat Jun 10, 2006 4:04 pm

Post by pverras » Sat Jul 08, 2006 6:33 pm

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
Panagiotis Verras
ACCGR10
Hellenic vACC Webmaster

User avatar
Michal Rok
Five Star Club
Posts: 2450
Joined: Wed Aug 31, 2005 4:23 pm

Post by Michal Rok » Sat Jul 08, 2006 7:46 pm

Done - please try now. To trigger this new mode, use Local_URL=noredir as a parameter, instead of a normal URL.


Michal

pverras
Posts: 5
Joined: Sat Jun 10, 2006 4:04 pm

Post by pverras » Sun Jul 09, 2006 1:48 am

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!
Panagiotis Verras
ACCGR10
Hellenic vACC Webmaster

User avatar
Michal Rok
Five Star Club
Posts: 2450
Joined: Wed Aug 31, 2005 4:23 pm

Post by Michal Rok » Sun Jul 09, 2006 4:24 am

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

pverras
Posts: 5
Joined: Sat Jun 10, 2006 4:04 pm

Post by pverras » Sat Jun 09, 2007 6:56 pm

Hi everyone, i know it's been a while since i said i will develop this but several things have happened since then. Anyway just to let you know this is now in progress and soon ready.

Panos
Panagiotis Verras
ACCGR10
Hellenic vACC Webmaster

Andreas Fuchs
Posts: 34
Joined: Sat Jun 10, 2006 3:59 pm

Post by Andreas Fuchs » Sat Jun 09, 2007 7:01 pm

Hello Panos!

Thanks for letting us know :)
Cheers, Andreas

User avatar
Michal Rok
Five Star Club
Posts: 2450
Joined: Wed Aug 31, 2005 4:23 pm

Re: ATC booking interface

Post by Michal Rok » Mon Aug 11, 2008 7:53 pm

To supply controller's VATSIM ID (recommended and used by i.e. vroute) please add cid=xxxxxx parameter to the URL.


Michal

Knaze
Posts: 10
Joined: Thu Aug 14, 2008 6:06 pm

Re: ATC booking interface

Post by Knaze » Tue Oct 28, 2008 8:55 am

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!

Ivan Kovacevic
Posts: 2
Joined: Mon Dec 21, 2009 6:46 pm

Re: ATC booking interface

Post by Ivan Kovacevic » Mon Dec 21, 2009 6:49 pm

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...)?

User avatar
Michal Rok
Five Star Club
Posts: 2450
Joined: Wed Aug 31, 2005 4:23 pm

Re: ATC booking interface

Post by Michal Rok » Mon Dec 21, 2009 6:53 pm

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

Ivan Kovacevic
Posts: 2
Joined: Mon Dec 21, 2009 6:46 pm

Re: ATC booking interface

Post by Ivan Kovacevic » Mon Dec 21, 2009 6:54 pm

Thanks for the prompt reply Michal! :mrgreen:

Sava Markovic
Posts: 1
Joined: Wed Aug 15, 2012 2:06 pm

Re: ATC booking interface

Post by Sava Markovic » Wed Aug 15, 2012 2:08 pm

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

User avatar
Michal Rok
Five Star Club
Posts: 2450
Joined: Wed Aug 31, 2005 4:23 pm

Re: ATC booking interface

Post by Michal Rok » Thu Aug 16, 2012 2:09 pm

Sent by email.


Michal

Sergey Balandin
Posts: 4
Joined: Tue Jan 29, 2013 4:24 am

Re: ATC booking interface

Post by Sergey Balandin » Tue Jan 29, 2013 4:37 am

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.

Post Reply