Guide to Operation Copyright © Fire4 Systems, Inc., 2013. All Rights Reserved www . guest - internet . com 148
Guest Internet Login
Code API
Any computer or other system capable of performing HTTP communications can control the
login codes on the GIS R and K units remotely. The programmer must have the password
for the CODES login in order to perform API commands.
The access code API has been designed to allow systems such as POS (Point-of-Sale) to
automatically manage code generation, removal and testing. Hotspot administrators
wishing to control codes from a web browser should not use the API, instead they should
use the web user interface at http://aplogin.com/codes.
Access to the API is controlled via a username and password. The username is always set
to ‘codes’; the password can be changed via the password page in the web management
interface. There is no default password.
The API is designed for programmers and systems integrators who understand HTTP
communications; how to form queries and how to parse responses from a web server. A
hotel or restaurant wishing to implement the GIS API on their PoS system should seek
advice from the PoS supplier before deciding to use the feature: there will be some cost
associated with implementing the API calls in the PoS software.
Codes can be added to the system via a single HTTP call, the URL to use is:
http://aplogin.com/codes/makecode.cgi
The IP of the GIS device can also be used instead of the
hostname
Parameters to pass include:
Number of codes to create
Argument must be included in the call. The maximum number of
codes is limited by the codes available on the gateway (see
error messages)
Argument must be included in the call.
Type of code:
n = normal / single user
m = multi-user
Argument must be included in the call.
Argument is optional and is not necessary for the call
Argument is optional and is not necessary for the call
An example call would be:
http://aplogin.com/codes/makecode.cgi?num=1&time=30&type=n
This would create a normal, single user code with a 30 minute duration.
The API call will either return a new code which is ready to use or an error; the possible
errors are listed below:
ERROR: Invalid parameters
ERROR: You can't create more than XX codes
ERROR: Code type not valid
ERROR: Code time not valid
ERROR: Code upload limit not valid
ERROR: Code download limit not valid
If not logged in to the device, the password should be passed as an argument:
http://codes:password@aplogin.com/codes/makecode.cgi