Generating a voucher

If you use an automated hotel management system, such as Fidelio, Opera or 1C, you will be able to configure it to interact with our service. For example, when checking in a guest, at the moment when you enter his personal details, you can send a request to generate a voucher. In the request, you specify the required parameters, for example, the voucher access speed and validity period, and in return you receive a username/password that can be printed and sent to the guest. Also, if you wish to store users’ personal data in our system, you can transfer them using optional parameters.

In order to generate a voucher, you must send a GET or POST request to our server https://api.wifi-sys.com/api, specifying the number of parameters.

Parameter Description Type
act The user needs to pass the create_voucher value compulsory
key API key, is in your personal area, in the User Profile section compulsory
voucher_type Type of voucher. Possible values: 1 – time-limited, 2 – traffic-limited compulsory
amount The face value of the voucher, validity period in hours or size in megabytes. It is set depending on the selected type compulsory
speed Internet access speed, in Mbps. 0 – unlimited speed compulsory
expire The voucher’s validity period (in days) after first activation compulsory
data User’s personal information. Full name, date of birth, place of birth, etc. not compulsory
simultaneous Maximum number of connected devices per voucher. Default value is 5 not compulsory

Example of a GET Request

https://api.wifi-sys.com/api.xml?act=create_voucher&key=9a9b42a034562a4954a9a30d6b221b
&voucher_type=1&amount=72&speed=3&expire=7&data=Ivanov%20Ivan&simultaneous=3

This example generates a voucher with a time type, a total time of 72 hours, with an access speed of 3 Mbps, which will expire 7 days after the first activation.

You can receive the response in text, json or xml formats.

https://api.wifi-sys.com/api?options…
https://api.wifi-sys.com/api.json?options…
https://api.wifi-sys.com/api.xml?options…

The response contains the status of the request, and a username/password pair for your visitors’ access.

Parameter Status description
result Response code
resulttxt Text interpretation of code
username Login
password Password

Example of response

xml format

<voucher>
<result>0</result>
<resulttxt>OK</resulttxt>
<username>zs3x8rf7</username>
<password>6128</password>
</voucher>

Statuses can take the following values:

Status code, result Status description, resulttxt
0 ОК
1 The API key does not exist
2 The voucher type does not exist
3 Required parameters are missing
5 The allowed daily limit for voucher creation has been exceeded
7 Voucher generation is prohibited
8 You don’t have enough money on your account
9 Value is too small
10 Value is too big

Changing a voucher

To change a voucher, you need to send a GET or POST Request to our server https://api.wifi-sys.com/api , specifying the number of parameters.

Parameter Description Type
act The user needs to pass the update_voucher value compulsory
key API key, is in your personal area, in the User Profile section compulsory
username Login voucher compulsory
amount The face value of the voucher, validity period in hours or size in megabytes. It is set depending on the selected type compulsory
speed Internet access speed, in Mbps. 0 – unlimited speed compulsory
expire The voucher’s validity period (in days) after first activation compulsory
data User’s personal information. Full name, date of birth, place of birth, etc. not compulsory
simultaneous Maximum number of connected devices per voucher. Default value is 5 not compulsory

Example of a GET Request

https://api.wifi-sys.com/api.xml?act=update_voucher&key=9a9b42a034562a4954a9a30d6b221b
&username=asx7pk29x&amount=72&speed=3&expire=7&data=Ivanov%20Ivan&simultaneous=3

Generating a voucher using one field, login only by username

This feature can be used as a “white list”, for example, you can use the “club card” number or your guest’s phone number to grant Internet access to a specific person.

It is important to understand that you are issuing this voucher for permanent use, and the amount and expiry parameters must be set large enough. Since if your guest exceeds these limits, Internet access will be cut off. If you intentionally want to terminate such a voucher, then you will need to send a command to change it, for example, reducing the amount or expiry parameter to 1.

In order to generate a voucher, you must send a GET or POST request to our server https://api.wifi-sys.com/api, specifying the number of parameters.

Parameter Description Type
act The user needs to pass the create_voucher value2 compulsory
key API key, is in your personal area, in the User Profile section compulsory
voucher_type Type of voucher. Possible values: 1 – time-limited, 2 – traffic-limited compulsory
amount The face value of the voucher, validity period in hours or size in megabytes. It is set depending on the selected type compulsory
speed Internet access speed, in Mbps. 0 – unlimited speed compulsory
expire The voucher’s validity period (in days) after first activation compulsory
data User’s personal information. Full name, date of birth, place of birth, etc. not compulsory
simultaneous Maximum number of connected devices per voucher. Default value is 5 not compulsory
username Username to login with, for example, your «club card»  number compulsory
password Password, you always need to specify 1 compulsory
nasid Hotspot’s NAS ID compulsory

Example of a GET Request

https://api.wifi-sys.com/api.xml?act=create_voucher2&key=9a9b42a034562a4954a9a30d6b221b&voucher_type=1
&amount=72&speed=3&expire=7&data=Ivanov%20Ivan&simultaneous=3&nasid=your_nasid&username=4442123366558899&password=1

This example generates a voucher with a time type, a total time of 72 hours, with an access speed of 3 Mbps, which will expire 7 days after the first activation.

You can receive the response in text, json or xml formats.

https://api.wifi-sys.com/api?options…
https://api.wifi-sys.com/api.json?options…
https://api.wifi-sys.com/api.xml?options…

The response contains the status of the request, and a username/password pair for your visitors’ access.

Parameter Status description
result Response code
resulttxt Text interpretation of code
username Login
password Password, you always need to specify 1

Example of response

xml format

<voucher>
<result>0</result>
<resulttxt>OK</resulttxt>
<username>4442123366558899</username>
<password>1</password>
</voucher>

Statuses can take the following values:

Status code, result Status description, resulttxt
0 ОК
1 The API key does not exist
2 The voucher type does not exist
3 Required parameters are missing
5 The allowed daily limit for voucher creation has been exceeded
7 Voucher generation is prohibited
8 You don’t have enough money on your account
9 Value is too small
10 Value is too big

Changing a voucher using one field

To change a voucher, you need to send a GET or POST Request to our server https://api.wifi-sys.com/api , specifying the number of parameters.

Parameter Description Type
act The user needs to pass the update_voucher2 value compulsory
key API key, is in your personal area, in the User Profile section compulsory
username Login voucher compulsory
amount The face value of the voucher, validity period in hours or size in megabytes. It is set depending on the selected type compulsory
speed Internet access speed, in Mbps. 0 – unlimited speed compulsory
expire The voucher’s validity period (in days) after first activation compulsory
data User’s personal information. Full name, date of birth, place of birth, etc. not compulsory
simultaneous Maximum number of connected devices per voucher. Default value is 5 not compulsory
nasid Hotspot’s NAS ID compulsory

Example of a GET Request

https://api.wifi-sys.com/api.xml?act=update_voucher2&key=9a9b42a034562a4954a9a30d6b221b&amount=3000
&speed=100&expire=100&data=Ivanov%20Ivan&simultaneous=3&nasid=your_nasid&username=4442123366558899

Generating a voucher using room number and date of birth

The room number is used as the username, while the guest’s date of birth is the password – this is very convenient because your guest does not need to remember his login details to access the Internet.

In order to generate a voucher, you must send a GET or POST request to our server https://api.wifi-sys.com/api, specifying the number of parameters.

Parameter Description Type
act The user needs to pass the create_voucher3 value compulsory
key API key, is in your personal area, in the User Profile section compulsory
voucher_type Type of voucher. Possible values: 1 – time-limited, 2 – traffic-limited compulsory
amount The face value of the voucher, validity period in hours or size in megabytes. It is set depending on the selected type compulsory
speed Internet access speed, in Mbps. 0 – unlimited speed compulsory
expire The voucher’s validity period (in days) after first activation compulsory
data User’s personal information. Full name, date of birth, place of birth, etc. not compulsory
simultaneous Maximum number of connected devices per voucher. Default value is 5 not compulsory
username Username to login with, for example, room number compulsory
password Password must be in the format YYYYMMDD compulsory
nasid Hotspot’s NAS ID compulsory

Example of a GET Request

https://api.wifi-sys.com/api.xml?act=create_voucher3&key=9a9b42a034562a4954a9a30d6b221b&voucher_type=1&amount=72
&speed=3&expire=7&data=Ivanov%20Ivan&simultaneous=3&nasid=your_nasid&username=315&password=19830327

This example generates a voucher with a time type, a total time of 72 hours, with an access speed of 3 Mbps, which will expire 7 days after the first activation.

You can receive the response in text, json or xml formats.

https://api.wifi-sys.com/api?options…
https://api.wifi-sys.com/api.json?options…
https://api.wifi-sys.com/api.xml?options…

The response contains the status of the request, and a username/password pair for your visitors’ access.

Parameter Status description
result Response code
resulttxt Text interpretation of code
username Login
password Password, birthday YYYYMMDD

Example of response

xml format

<voucher>
<result>0</result>
<resulttxt>OK</resulttxt>
<username>315</username>
<password>19830327</password>
</voucher>

Statuses can take the following values:

Status code, result Status description, resulttxt
0 ОК
1 The API key does not exist
2 The voucher type does not exist
3 Required parameters are missing
5 The allowed daily limit for voucher creation has been exceeded
7 Voucher generation is prohibited
8 You don’t have enough money on your account
9 Value is too small
10 Value is too big

Changing a voucher with room number and date of birth

To change a voucher, you need to send a GET or POST Request to our server https://api.wifi-sys.com/api , specifying the number of parameters.

Parameter Description Type
act The user needs to pass the update_voucher2 value compulsory
key API key, is in your personal area, in the User Profile section compulsory
username Login voucher compulsory
password Password voucher compulsory
amount The face value of the voucher, validity period in hours or size in megabytes. It is set depending on the selected type compulsory
speed Internet access speed, in Mbps. 0 – unlimited speed compulsory
expire The voucher’s validity period (in days) after first activation compulsory
data User’s personal information. Full name, date of birth, place of birth, etc. not compulsory
simultaneous Maximum number of connected devices per voucher. Default value is 5 not compulsory
nasid Hotspot’s NAS ID compulsory

Example of a GET Request

https://api.wifi-sys.com/api.xml?act=update_voucher3&key=9a9b42a034562a4954a9a30d6b221b&amount=3000
&speed=100&expire=100&data=Ivanov%20Ivan&simultaneous=3&nasid=your_nasid&username=4442123366558899

Getting a phone number and MAC address after authentication

At the time of completing the authentication procedure, data about a visitor can be transferred to your information system.

To obtain information about authenticated users, you can use special tags in the parameters.

Тег Description Type
{phone} Visitor’s phone number not compulsory
{mac} MAC address of the visitor’s device not compulsory
{signature} Used to check sent parameters. It is formed as md5 (phone+mac+API key). The API key is in your personal area in the User Profile section not compulsory
{nasid} ID of the hotspot where authentication occurred not compulsory

Tags are set when configuring a hotspot in your personal area in the “User Redirection Link” field, for example:

http://your-site.com/?phone={phone}&mac={mac}&signature={signature}&nasid={nasid}

The URL must begin with http. The use of https is not allowed.

Managing a hotspot

You can block, unblock or find out the status of a hotspot.

Тег Description Type
{key} API key, is in your personal area, in the User Profile section compulsory
{nasid} Hotspot Identity (NAS ID) compulsory
{uamsecret} Password (UAM Secret) compulsory

Blocking a hotspot

https://api.wifi-sys.com/api?act=block_hotspot&key={key}&nasid={nasid}&uamsecret={uamsecret}

Unblocking a hotspot

https://api.wifi-sys.com/api?act=unlock_hotspot&key={key}&nasid={nasid}&uamsecret={uamsecret}

Getting a hotspot status

https://api.wifi-sys.com/api?act=get_hotspot_status&key={key}&nasid={nasid}&uamsecret={uamsecret}

Statuses can take the following values:

Parameter, result Status description, resulttxt
501 Hotspot status: unblocked
502 Hotspot status: blocked
503 Hotspot unblocked
504 Hotspot blocked
505 Hotspot is already unblocked
506 Hotspot is already blocked

Getting account balance

Account balance request:

https://api.wifi-sys.com/api?act=get_balance&key={key}

Тег Description Type
{key} API key, is in your personal area, in the User Profile section compulsory

Received response:

Parameter Description
balance Account balance