API (Application Programming Interface) is a method of communication between software operations and enables interaction between data, applications, and devices. API processes requests, deliver data and facilitates connectivity between devices and programs to ensure the seamless functioning of various software components. API parameters are defined below, each parameter has the name, value type, and optional description.
We use swagger to allow visualization and interaction with our API resources without having any of the implementation logic in place.
General response class returns status 200 when executed, with parameters:
Parameter | Type | Description |
---|---|---|
Success | boolean | Request was sucessfully executed and data is returned |
Error | string | Contains error description and returns only if request was not sucessfully executed |
Response | string | Contains response data |
Search by the Hotspot Id (Guid)
Parameter | Type | Description |
---|---|---|
Id | string | Unique Hotspot Id |
Search by the Hotspot MAC
Parameter | Type | Description |
---|---|---|
mac | string | Hotspot MAC |
Search by the Hotspot name (or part of the name)
Parameter | Type | Description |
---|---|---|
name | string | Hotspot name |
Search by the location name (or part of the name)
Parameter | Type | Description |
---|---|---|
location | string | Hotspot location name |
Search by Hotspot model (or part of the name)
Parameter | Type | Description |
---|---|---|
model | string | Hotspot model |
Parameters returned in responses
Model | Type | Description |
---|---|---|
Id | string | Unique Hotspot Id |
Name | string | Hotspot name |
Model | string | Hotspot model |
Active | boolean | License active or expired |
ActiveTo | integer | License expiration time |
DateCreated | integer | Date of the license creation |
LogoutURL | string | Logout URL |
LocationName | string | Location name |
LocationId | string | Unique location Id |
AccountId | string | Unique account Id |
LicenceId | string | Unique Licence Id |
Search by the InternetPlan Id (Guid)
Parameter | Type | Description |
---|---|---|
Id | string | Unique InternetPlan Id |
Search by the InternetPlan MAC
Parameter | Type | Description |
---|---|---|
name | string | InternetPlan name |
Parameters returned in responses
Model | Type | Description |
---|---|---|
Id | string | Unique InternetPlan Id |
Name | string | Internet Plan name |
Active | boolean | If it is selected, the price plan is active and can be used for account generating |
Price | integer | Internet plan price |
Download | integer | Download rate limitation |
Upload | integer | Upload rate limitation |
Quota | integer | Bandwidth traffic available to a user |
UnlimitedQuota | boolean | Enable this option if you do not wish to limit users bandwidth quota |
Time | integer | Time limitation |
UnlimitedTime | boolean | Enable this option if you do not wish to limit users in time |
EnableExpire | boolean | Enable Expiration feature on the Internet plan |
Expire | string | Set expire date from the first login |
ExpireIn | integer | Account expires from the first use in defined number of minutes |
Autologin | boolean | Enable Autologin feature for account |
MultiLogin | boolean | Enable login for multiple devices |
LoginsPerAccount | integer | Number of user devices allowed to login with the same account |
EnableDailyTime | boolean | Enable Daily Time on the Internet plan |
DailyTime | integer | Total time available for Internet usage on a daily basis |
Reuse | boolean |
Allow or prevent reuse of Internet plan during signup
|
ReuseInterval | integer | A user may signup again after specified interval |
Search by the Location name (Guid)
Parameter | Type | Description |
---|---|---|
Id | string | Unique Location Id |
Search by the Location name
Parameter | Type | Description |
---|---|---|
name | string | Location name |
Parameters returned in responses
Model | Type | Description |
---|---|---|
Id | string | Unique Location Id |
Name | string | Location name |
SplashPage | string | Location Splash page |
RedirectType | integer | Location Redirect Type |
RedirectURL | string | Location Redirect URL |
DateCreated | string | Date of the location creation |
string | Location email | |
Address | string | Location address |
City | string | Location city |
Url | string | Location URL |
Parameter | Type | Description |
---|---|---|
from | string | Filter by start date in format MM/DD/YYYY |
to | string | Filter by end date in format MM/DD/YYYY |
skip | integer | Skip desired number of rows |
count | integer | Number of accounts to create |
order | integer | Order ascending (0) or descending (1) |
Search by the Payment Id (Guid)
Parameter | Type | Description |
---|---|---|
Id | string | Unique Payment Id |
Parameters returned in responses
Model | Type | Description |
---|---|---|
Id | string | Unique Payment Id |
TransactionTime | string | Transaction time |
Status | string | Payment status |
Username | string | Customer Username |
MAC | string | Customer MAC address |
Amount | string | Price of the user account. If specified, it’s recorded in payments on first usage |
Currency | string | The currency of the price |
InternetPlan | string | Internet Plan |
InternetPlanId | string | Id of the Internet plan |
Firstname | string | Customer name |
Lastname | string | Customer last name |
string | Customer email | |
Mobile | string | Customer mobile phone number |
Address | string | Customer address |
City | string | Customer city |
Country | string | Customer country |
Postalcode | string | Customer postal code |
State | string | Customer state |
LocationName | string | Unique Location name |
HotspotName | string | Unique Hotspot name |
HotspotMAC | string | Hotspot MAC address |
TransactionCode | string | Transaction code |
PaymentType | string | Payment type |
Invoice | string | Invoice |
UserTypeId | string | Type of user account to create ; 1-user/pass, 2-login code |
PaymentGatewayId | string | Payment Gateway Id |
PaymentGatewayName | string | Payment Gateway Name |
AccountId | string | Unique Account Id |
LocationId | string | Unique Location Id |
HotspotId | string | Unique Hotspot Id |
Parameter | Type | Description |
---|---|---|
from | string | Filter by start date in format MM/DD/YYYY |
to | string | Filter by end date in format MM/DD/YYYY |
skip | integer | Skip desired number of rows |
count | integer | Number of rows to return |
order | integer | Order ascending (0) or descending (1) |
Search by the Session Id (Guid)
Parameter | Type | Description |
---|---|---|
Id | string | Unique Session Id |
Parameters returned in responses
Model | Type | Description |
---|---|---|
Id | string | Unique Session Id |
Username | string | Customer username |
StartTime | string | Session Start time |
EndTime | string | Session End time |
LocationName | string | Location name |
HotspotName | string | Hotspot name |
HotspotMAC | string | Hotspot MAC address |
HotspotIP | string | Hotspot IP address |
MAC | string | AP MAC address |
IP | string | AP IP address |
SessionTime | string | Session duration |
Download | string | Download rate limitation |
Upload | string | Upload rate limitation |
Bandwidth | string | Bandwidth traffic |
Device | string | Customer device |
DeviceType | string | Customer device type |
Browser | string | Web Browser |
Language | string | Browser language |
UserId | string | Unique User Id |
LocationId | string | Unique Location Id |
HotspotId | string | Unique Hotspot Id |
SessionId | string | Unique Session Id |
TerminateDesc | string | Session terminate description |
Parameter | Type | Description |
---|---|---|
from | string | Filter by start date in format MM/DD/YYYY |
to | string | Filter by end date in format MM/DD/YYYY |
skip | integer | Skip desired number of rows |
count | integer | Number of rows to return |
order | integer | Order ascending (0) or descending (1) |
Parameter | Type | Description |
---|---|---|
Id | string | Unique User Id |
Search by the User ID
Parameter | Type | Description |
---|---|---|
id | string | Unique User Id |
Search by the Username
Parameter | Type | Description |
---|---|---|
username | string | Username |
Search by the user email
Parameter | Type | Description |
---|---|---|
string | User email |
Parameter | Type | Description |
---|---|---|
id | string | Unique User Id |
username | string | Customer username |
password | string | Customer password |
mac | string | AP MAC address |
Firstname | string | Customer name |
Lastname | string | Customer last name |
string | Customer email | |
Mobile | string | Customer mobile phone number |
Address | string | Customer address |
City | string | Customer city |
Country | string | Customer country |
Postalcode | string | Customer postal code |
State | string | Customer state |
ProfileImageUrl | string | Customer image |
Sex | integer | Customer gender |
Birthday | string | Customer birthday |
InternetPlan | string | Internet Plan |
ContactPermission | boolean | Ask users to accept or deny contact permission to comply with the GDPR consent requirements |
Active | boolean | If it is selected, the price plan is active and can be used for account generating |
Download | integer | Download rate limitation |
Upload | integr | Upload rate limitation |
Quota | integer | Total bandwidth traffic available to a user |
UnlimitedQuota | boolean | Enable this option if you do not wish to limit users bandwidth quota |
Timeleft | integer | Time left on the user account |
UnlimitedTime | boolean | Enable this option if you do not wish to limit users in time |
EnableExpire | boolean | Enable Expiration feature on the account |
Expire | string | Set expire date from the first login |
ExpireIn | integer | Configure the account to expire in X days, Y hours, and Z minutes |
UserTypeId | integer | Type of user account to create ; 1-user/pass, 2-login code |
Autologin | boolean | Enable Autologin feature for account |
MultiLogin | boolean | Enable Multilogin feature for account |
LoginsPerAccount | integer | Allows more than one user (device) to login with the same account |
CustomField1 | string | Configure custom fields based on your requirements |
CustomField2 | string | |
CustomField3 | string | |
DateCreated | string | Date of account creation |
LastUsed | string | Date when account is last time used |
SignUpSourceId | integer | If amount is specified, account is marked as sold when added to payments |
UserStatus | integer | If amount is specified, account is marked as sold when added to payments |
Amount | integer | Price of the user account. If specified, it’s recorded in payments on first usage |
DailyTime | integer | Total time available for Internet usage on a daily basis |
DailyTimeLeft | integer | Daily time left on the user account |
DailyQuota | integer | Total daily bandwidth traffic available to a user |
DailyQuotaLeft | integer | Daily quota left on the user account |
Sold | boolean | If amount is specified, account is marked as sold when added to payments |
LocationId | string | Unique Location Id |
HotspotId | string | Unique Hotspot Id |
AdministratorId | string | Unique Administrator Id |
Parameter | Type | Description |
---|---|---|
userType | integer | Type of user account to create ; 1-user/pass, 2-login code |
count | integer | Number of accounts to create |
prefix | string | Prefix letters to add in front of generated username or code |
internetPlanId | integer | ID of the Internet plan |
download | integer | Download rate limitation |
upload | integer | Upload rate limitation |
Create a new User
Parameter | Type | Description |
---|---|---|
Usertype | integer | Type of user account to create ; 1-user/pass, 2-login code |
Username | string | Customer username |
Password | string | Customer password |
MAC | string | AP MAC address |
InternetPlanID | integer | ID of the Internet plan |
Download | integer | Download rate limitation |
Upload | integer | Upload rate limitation |
UnlimitedQuota | boolean | Enable this option if you do not wish to limit users bandwidth quota |
Quota | integer | Total bandwidth traffic available to a user |
UnlimitedTime | boolean | Enable this option if you do not wish to limit users in time |
Timeleft | integer | Time left on the user account |
EnableExpire | boolean | Enable Expiration feature on the account |
Expire | string | Set expire date from the first login |
ExpireIn | integer | Configure the account to expire in X days, Y hours, and Z minutes |
Autologin | boolean | Enable Autologin feature for account |
Active | boolean | If it is selected, the price plan is active and can be used for account generating |
Multilogin | boolean | Enable Multilogin feature for account |
LoginsPerAccount | integer | Allows more than one user (device) to login with the same account |
DailyTim | integer | Total time available for Internet usage on a daily basis |
FirstName | string | Customer name |
LastName | string | Customer last name |
string | Customer email | |
Mobile | string | Customer mobile phone number |
ContactPermission | boolean | Ask users to accept or deny contact permission to comply with the GDPR consent requirements |
Address | string | Customer address |
City | string | Customer city |
Country | string | Customer country |
Postalcode | string | Customer postal code |
State | string | Customer state |
ProfileImageUrl | string | Customer image |
Gender | integer | Customer gender |
Birthday | string | Customer birthday |
CustomField1 | string | Configure custom fields based on your requirements |
CustomField2 | string | |
CustomField3 | string | |
Amount | integer | Price of the user account. If specified, it’s recorded in payments on first usage |
Sold | boolean | If amount is specified, account is marked as sold when added to payments |
Parameter | Type | Description |
---|---|---|
id | string | Unique User Id |
username | string | Customer username |
password | string | Customer password |
mac | string | AP MAC address |
internetPlanID | integer | ID of the Internet plan |
download | integer | Download rate limitation |
upload | integer | Upload rate limitation |
unlimitedQuota | boolean | Enable this option if you do not wish to limit users bandwidth quota |
quota | integer | Total bandwidth traffic available to a user |
unlimitedTime | boolean | Enable this option if you do not wish to limit users in time |
timeleft | integer | Time left on the user account |
enableExpire | boolean | Enable Expiration feature on the account |
expire | string | Set expire date from the first login |
expireIn | integer | Configure the account to expire in X days, Y hours, and Z minutes |
autologin | boolean | Enable Autologin feature for account |
active | boolean | If it is selected, the price plan is active and can be used for account generating |
multilogin | boolean | Enable Multilogin feature for account |
loginsPerAccount | integer | Allows more than one user (device) to login with the same account |
dailyTim | integer | Total time available for Internet usage on a daily basis |
firstName | string | Customer name |
lastName | string | Customer last name |
string | Customer email | |
mobile | string | Customer mobile phone number |
contactPermission | boolean | Ask users to accept or deny contact permission to comply with the GDPR consent requirements |
address | string | Customer address |
city | string | Customer city |
country | string | Customer country |
postalcode | string | Customer postal code |
state | string | Customer state |
profileImageUrl | string | Customer image |
gender | integer | Customer gender |
birthday | string | Customer birthday |
customField1 | string | Configure custom fields based on your requirements |
customField2 | string | |
customField3 | string | |
amount | integer | Price of the user account. If specified, it’s recorded in payments on first usage |
sold | boolean | If amount is specified, account is marked as sold when added to payments |
Parameters returned in responses
Parameter | Type | Description | |
---|---|---|---|
id | string | Unique User Id | |
username | string | Customer username | |
password | string | Customer password | |
mac | string | AP MAC address | |
Firstname | string | Customer name | |
Lastname | string | Customer last name | |
string | Customer email | ||
Mobile | string | Customer mobile phone number | |
Address | string | Customer address | |
City | string | Customer city | |
Country | string | Customer country | |
Postalcode | string | Customer postal code | |
State | string | Customer state | |
ProfileImageUrl | string | Customer image | |
Sex | integer | Customer gender | |
Birthday | string | Customer birthday | |
InternetPlan | string | Internet plan | |
ContactPermission | boolean | Ask users to accept or deny contact permission to comply with the GDPR consent requirements | |
Active | boolean | If it is selected, the price plan is active and can be used for account generating | |
Download | integer | Download rate limitation | |
Upload | integr | Upload rate limitation | |
Quota | integer | Total bandwidth traffic available to a user | |
UnlimitedQuota | boolean | Enable this option if you do not wish to limit users bandwidth quota | |
Timeleft | integer | Time left on the user account | |
UnlimitedTime | boolean | Enable this option if you do not wish to limit users in time | |
EnableExpire | boolean | Enable Expiration feature on the account | |
Expire | string |
|
|
ExpireIn | integer |
|
|
UserTypeId | integer | Type of user account to create ; 1-user/pass, 2-login code | |
Autologin | boolean |
|
|
MultiLogin | boolean | Enable Multilogin feature for account | |
LoginsPerAccount | integer | Allows more than one user (device) to login with the same account | |
CustomField1 | string | Configure custom fields based on your requirements | |
CustomField2 | string | ||
CustomField3 | string | ||
DateCreated | string | Date of account creation | |
LastUsed | string | Date when account is last time used | |
SignUpSourceId | integer | If amount is specified, account is marked as sold when added to payments | |
UserStatus | integer | If amount is specified, account is marked as sold when added to payments | |
Amount | integer | Price of the user account. If specified, it’s recorded in payments on first usage | |
DailyTime | integer | Total time available for Internet usage on a daily basis | |
DailyTimeLeft | integer | Daily time left on the user account | |
DailyQuota | integer | Total daily bandwidth traffic available to a user | |
DailyQuotaLeft | integer | Daily quota left on the user account | |
Sold | boolean | If amount is specified, account is marked as sold when added to payments | |
LocationId | string | Unique Location Id | |
HotspotId | string | Unique Hotspot Id | |
AdministratorId | string | Unique Administrator Id |
C# Example:
public ActionResult GetAPIUserData() { using (var client = new System.Net.Http.HttpClient()) { // HTTP POST client.BaseAddress = new Uri("https://wifihotspot.io"); client.DefaultRequestHeaders.Add("ApiKey", "your-api-key-guid"); client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); var response = client.GetAsync("/api/user/").Result; string res = ""; using (HttpContent content = response.Content) { // ... Read the string. Task<string> result = content.ReadAsStringAsync(); res = result.Result; return Content(res); } } }
Example:
Here are examples how to use API.
In this example we will change Internet Plan name on user account and it will be done on SOMETESTUSER account.
Initial Start Hotspot user account screen:
You can open Swagger directly using this link
https://wifihotspot.io
Put there API key and press Explore button.
We’ll put some data:
Before executing, open up inspector in your browser (F12 ) and go to Network tab.
We’ll get this response:
Let’s check browser inspector:
It’s a post.
ApiKey needs to be stated in Request Header, with params:
api_key is not required in params, only in header.
Postman example:
To update user account, you need to specify each field you want to change, like download, upload, quota, time left, name of the plan. etc.
Changing plan id, replaces just this one field, not all associated fields of the user account.