HotSpot API Integration

Antamedia HotSpot can be easily integrated with third-party software.

This feature is located on HotSpot Setup – Options – API Integration page.
Integration is done using HTTP GET query and XML response which offer very short integration time.

To put it simply, it works this way:

1. Your software should send a formatted query similar to URL you type in the browser to see the certain web page
2. Our software gets this query, parse it and execute the actions (example: generate accounts)
3. Our software generates XML response with details (example: account details) and returns it to your software
4. Your software parse XML and process the data (example: use account details to print receipt)

To activate this feature please Enable Integration, specify the port (82 by default), and Secret PassPhrase.

Purpose of the PassPhrase is to protect from unauthorized usage while allowing you to use integration commands from different IP addresses.

For example, multiple instances of your program can communicate with HotSpot and generate accounts.

For the purpose of this manual, we will take 192.168.0.1 as HotSpot IP address, port 82 and PASS as PassPhrase.

API integration examples:

http://192.168.0.1/generateaccounts?number=5&priceplan=1&pass=PASS

This command will generate 5 accounts and assign price plan 1 to those accounts. You can put a button in your software and send such command after the user clicks on it. XML response contains all account data, like username, password, time, quota, expiration.

http://192.168.0.1/generateaccounts?number=3&priceplan=2&print=1&preview=0&pass=PASS

This command will generate 3 accounts, assign them price plan 2 and print the accounts in HotSpot software without print preview. If you intend to handle printing from your software, printing is not needed.

http://192.168.0.1/generateaccounts?account=TEST&pass=PASS

This command will generate one account with username TEST. It is suitable in cases when you always generate unique accounts, like personal ID number from the ID card. The account will not be generated if such an account already exists.

http://192.168.0.1/getpriceplans?pass=PASS

This command is used to retrieve all price plans from HotSpot software. XML response will contain price plan description, cost, time and quota values, expiration, etc. You can use these details to store them in your controls (like Listbox, Combobox) and allow a customer to choose a price plan before you send a command to generate the accounts.

http://192.168.0.1/deleteaccount?account=TEST&pass=PASS

This command will delete the account TEST from the HotSpot software.

The time is displayed in seconds, Quota, Download, Upload are in bytes.
Other fields with 0 and 1 represent false and true.

If you have a specific integration requirement, please contact Antamedia.

API XML response example for generated accounts looks like:

<?xml version=”1.0″ encoding=”UTF-8″ ?>
<!DOCTYPE Accounts (View Source for full doctype…)>
<Accounts>
<Account>
<Username>TEST15</Username>
<Password>FD61U</Password>
<TimeUsed>0</TimeUsed>
<TimeLeft>3600</TimeLeft>
<UnlimitedTime>False</UnlimitedTime>
<Quota>0</Quota>
<UnlimitedQuota>True</UnlimitedQuota>
<GroupPlanID>2</GroupPlanID>
<AccessFromTo>False</AccessFromTo>
<AccessID>1</AccessID>
<ExpireIn>1</ExpireIn>
<ExpireAfter>1</ExpireAfter>
<EnableDailyTime>False</EnableDailyTime>
<DailyTime>0</DailyTime>
<EnableDailyQuota>False</EnableDailyQuota>
<DailyQuota>0</DailyQuota>
<EnableDailyLogins />
<DailyLogins />
<Download>131072</Download>
<Upload>65536</Upload>
<GenerateID>15</GenerateID>
</Account>
</Accounts>

Updated on November 23, 2024

Was this article helpful?