We require that all requests are done over SSL.
Every string passed to and from the API needs to be UTF-8 encoded.
All dates in the API are strings in the following format:
"2013-05-21 17:53:39"
The API uses HTTP Basic Authentication, which is secure since all requests use SSL.
The API key can be specified in the authentication section of the request. If your language requires a username and password, enter the API key in the username and leave the password empty.
Your API key can be generated from the Control Center > Tools & Settings > API Keys menu.
Every request includes an HTTP status code with the result. The status code should examined before the response. In most cases, the response body will contain further details.
code | description |
---|---|
401 |
Authorization required. |
404 |
Not Found. |
500 |
Internal Server Error. |
{ "success": false, "error": { "code": 401, "message": "Authorization Required" } }
curl -v -H "Content-Type: application/json" -X GET -u <api_key>:x https://api.hotspotsystem.com/v1.0/locations.json
More on cURL command line tool
<? ini_set('display_errors', 1); error_reporting(-1); $resCurl = curl_init(); curl_setopt($resCurl, CURLOPT_URL, "https://api.hotspotsystem.com/v1.0/locations.json"); curl_setopt($resCurl, CURLOPT_USERPWD, "/*api_key*/"); curl_setopt($resCurl, CURLOPT_TIMEOUT, 30); curl_setopt($resCurl, CURLOPT_RETURNTRANSFER, true); curl_setopt($resCurl, CURLOPT_VERBOSE, true); $sReturnValue = curl_exec($resCurl); $aResponseInfo = curl_getinfo($resCurl); ?>
Returns the registered locations.
https://api.hotspotsystem.com/<version>/locations.<format>
v1.0
json
or xml
offset + limit
.
Returns the registered locations.
{ "success": true, "metadata": { "limit": 1, "offset": 2, "total_count": 4, "links": { "self_link": "https://api.hotspotsystem.com/v1.0/locations.json?limit=1&offset=2", "next_link": "https://api.hotspotsystem.com/v1.0/locations.json?limit=1&offset=3", "previous_link": "https://api.hotspotsystem.com/v1.0/locations.json?limit=1&offset=1" } }, "results": [ { "location_id": "1", "location_name": "Budapest", "address": "Váci Way", "city": "Budapest", "state": null, "zip": "1133", "country_code": "HU" } ] }
field | description |
---|---|
limit |
The requested number of objects returned by the server. |
offset |
The requested start point of the region of objects. |
total_count |
Total length of the collection. |
self_link |
Query link that returns the current region of objects. |
next_link |
Query link that returns the next region of objects, if present. |
previous_link |
Query link that returns the previous region of objects, if present. |
location_id |
Unique identifier of the location. |
location_name |
Common name of the location. |
address |
Street name with house number. |
city |
City name. |
state |
County name. |
zip |
Postal code. |
country_code |
Two-letter country code. |
code | description |
---|---|
1001 |
Insufficient privileges. |
1002 |
Invaild field parameter. |
1003 |
Invalid request detected. |
1004 |
Invalid filter parameter. |
1005 |
Invalid sort parameter. |
Returns the customers.
https://api.hotspotsystem.com/<version>/customers.<format>
v1.0
json
or xml
offset + limit
.
Returns the customers.
{ "success": true, "metadata": { "limit": 100, "offset": 0, "total_count": 1, "links": { "self_link": "https://api.hotspotsystem.com/v1.0/subscribers.json?limit=100&offset=0" } }, "results": [ { "customer_id": "1", "customer_name": "John Doe", "user_name": "jdoe", "email": "jdoe@example.net", "company_name": null, "address": "Váci Way", "city": "Budapest", "state": null, "zip": "1133", "country_code": "HU", "phone": "+36 1 000 0000", "registered_at": "2013-05-21 17:53:39" } ] }
field | description |
---|---|
customer_id |
Unique identifier of the user. |
customer_name |
Full name of the person. |
user_name |
User name of the person. |
email |
E-mail address of the user. |
company_name |
Type of business entity associated with the person. |
address |
Street name with house number. |
city |
City name. |
state |
County name. |
zip |
Postal code. |
country_code |
Two-letter country code. |
phone |
Cell phone number of the user. |
registered_at |
Date and time of the creation of the user. |
code | description |
---|---|
1001 |
Insufficient privileges. |
1002 |
Invaild field parameter. |
1003 |
Invalid request detected. |
1004 |
Invalid filter parameter. |
1005 |
Invalid sort parameter. |
Returns the customers at the requested location.
https://api.hotspotsystem.com/<version>/locations/<id>/customers.<format>
v1.0
json
or xml
offset + limit
.
Returns the customers at the requested location.
{ "success": true, "metadata": { "limit": 100, "offset": 0, "total_count": 1, "links": { "self_link": "https://api.hotspotsystem.com/v1.0/subscribers.json?limit=100&offset=0" } }, "results": [ { "customer_id": "1", "customer_name": "John Doe", "user_name": "jdoe", "email": "jdoe@example.net", "company_name": null, "address": "Váci Way", "city": "Budapest", "state": null, "zip": "1133", "country_code": "HU", "phone": "+36 1 000 0000", "registered_at": "2013-05-21 17:53:39" } ] }
field | description |
---|---|
customer_id |
Unique identifier of the user. |
customer_name |
Full name of the person. |
user_name |
User name of the person. |
email |
E-mail address of the user. |
company_name |
Type of business entity associated with the person. |
address |
Street name with house number. |
city |
City name. |
state |
County name. |
zip |
Postal code. |
country_code |
Two-letter country code. |
phone |
Cell phone number of the user. |
registered_at |
Date and time of the creation of the user. |
code | description |
---|---|
1001 |
Insufficient privileges. |
1002 |
Invaild field parameter. |
1003 |
Invalid request detected. |
1004 |
Invalid filter parameter. |
1005 |
Invalid sort parameter. |
Returns the newsletter subscribers.
https://api.hotspotsystem.com/<version>/subscribers.<format>
v1.0
json
or xml
offset + limit
.
Returns the newsletter subscribers.
{ "success": true, "metadata": { "limit": 100, "offset": 0, "total_count": 1, "links": { "self_link": "https://api.hotspotsystem.com/v1.0/subscribers.json?limit=100&offset=0" } }, "results": [ { "customer_id": "1", "customer_name": "John Doe", "user_name": "jdoe", "email": "jdoe@example.net", "company_name": null, "address": "Váci Way", "city": "Budapest", "state": null, "zip": "1133", "country_code": "HU", "phone": "+36 1 000 0000", "registered_at": "2013-05-21 17:53:39" } ] }
field | description |
---|---|
customer_id |
Unique identifier of the user. |
customer_name |
Full name of the person. |
user_name |
User name of the person. |
email |
E-mail address of the user. |
company_name |
Type of business entity associated with the person. |
address |
Street name with house number. |
city |
City name. |
state |
County name. |
zip |
Postal code. |
country_code |
Two-letter country code. |
phone |
Cell phone number of the user. |
registered_at |
Date and time of the creation of the user. |
code | description |
---|---|
1001 |
Insufficient privileges. |
1002 |
Invaild field parameter. |
1003 |
Invalid request detected. |
1004 |
Invalid filter parameter. |
1005 |
Invalid sort parameter. |
Returns the newsletter subscribers at the requested location.
https://api.hotspotsystem.com/<version>/locations/<id>/subscribers.<format>
v1.0
json
or xml
offset + limit
.
Returns the newsletter subscribers at the requested location.
{ "success": true, "metadata": { "limit": 100, "offset": 0, "total_count": 1, "links": { "self_link": "https://api.hotspotsystem.com/v1.0/subscribers.json?limit=100&offset=0" } }, "results": [ { "customer_id": "1", "customer_name": "John Doe", "user_name": "jdoe", "email": "jdoe@example.net", "company_name": null, "address": "Váci Way", "city": "Budapest", "state": null, "zip": "1133", "country_code": "HU", "phone": "+36 1 000 0000", "registered_at": "2013-05-21 17:53:39" } ] }
field | description |
---|---|
customer_id |
Unique identifier of the user. |
customer_name |
Full name of the person. |
user_name |
User name of the person. |
email |
E-mail address of the user. |
company_name |
Type of business entity associated with the person. |
address |
Street name with house number. |
city |
City name. |
state |
County name. |
zip |
Postal code. |
country_code |
Two-letter country code. |
phone |
Cell phone number of the user. |
registered_at |
Date and time of the creation of the user. |
code | description |
---|---|
1001 |
Insufficient privileges. |
1002 |
Invaild field parameter. |
1003 |
Invalid request detected. |
1004 |
Invalid filter parameter. |
1005 |
Invalid sort parameter. |
Returns the pre-paid vouchers.
https://api.hotspotsystem.com/<version>/vouchers.<format>
v1.0
json
or xml
offset + limit
.
Returns the pre-paid vouchers.
{ "success": true, "metadata": { "limit": 1, "offset": 2, "total_count": 26, "links": { "self_link": "https://api.hotspotsystem.com/v1.0/vouchers.json?limit=1&offset=2", "next_link": "https://api.hotspotsystem.com/v1.0/vouchers.json?limit=1&offset=3", "previous_link": "https://api.hotspotsystem.com/v1.0/vouchers.json?limit=1&offset=1" } }, "results": [ { "serial": "1229604629-75347", "voucher_code": "1h-651978", "limit_tl": -1, "simultaneous_use": 1, "limit_dl": -1, "limit_ul": -1, "usage_exp": "1 day", "validity": 30, "price_enduser": "0 HUF" } ] }
field | description |
---|---|
serial |
Unique identifier of the voucher. |
voucher_code |
Users must type in this additional code. |
limit_tl |
Traffic limit in bytes. If the return value is -1, no location context is set. |
simultaneous_use |
The number of simultaneous connections allowed. |
limit_dl |
Download limit in bytes. If the return value is -1, no location context is set. |
limit_ul |
Upload limit in bytes. If the return value is -1, no location context is set. |
usage_exp |
Expiration time left from today. |
validity |
Can be used for the amount of minutes returned. |
price_enduser |
The price and currency it was sold for. |
code | description |
---|---|
1001 |
Insufficient privileges. |
1002 |
Invaild field parameter. |
1003 |
Invalid request detected. |
1004 |
Invalid filter parameter. |
1005 |
Invalid sort parameter. |
Returns the pre-paid vouchers at the requested location.
https://api.hotspotsystem.com/<version>/locations/<id>/vouchers.<format>
v1.0
json
or xml
offset + limit
.
Returns the pre-paid vouchers at the requested location.
{ "success": true, "metadata": { "limit": 1, "offset": 2, "total_count": 26, "links": { "self_link": "https://api.hotspotsystem.com/v1.0/vouchers.json?limit=1&offset=2", "next_link": "https://api.hotspotsystem.com/v1.0/vouchers.json?limit=1&offset=3", "previous_link": "https://api.hotspotsystem.com/v1.0/vouchers.json?limit=1&offset=1" } }, "results": [ { "serial": "1229604629-75347", "voucher_code": "1h-651978", "limit_tl": -1, "simultaneous_use": 1, "limit_dl": -1, "limit_ul": -1, "usage_exp": "1 day", "validity": 30, "price_enduser": "0 HUF" } ] }
field | description |
---|---|
serial |
Unique identifier of the voucher. |
voucher_code |
Users must type in this additional code. |
limit_tl |
Traffic limit in bytes. If the return value is -1, no location context is set. |
simultaneous_use |
The number of simultaneous connections allowed. |
limit_dl |
Download limit in bytes. If the return value is -1, no location context is set. |
limit_ul |
Upload limit in bytes. If the return value is -1, no location context is set. |
usage_exp |
Expiration time left from today. |
validity |
Can be used for the amount of minutes returned. |
price_enduser |
The price and currency it was sold for. |
code | description |
---|---|
1001 |
Insufficient privileges. |
1002 |
Invaild field parameter. |
1003 |
Invalid request detected. |
1004 |
Invalid filter parameter. |
1005 |
Invalid sort parameter. |
Generate a voucher code on the fly against voucher credits.
https://api.hotspotsystem.com/<version>/locations/<id>/generate/voucher.<format>
v1.0
json
or xml
Generate a voucher code on the fly against voucher credits.
{ "success": true, "access_code": "1w-6669999" }
field | description |
---|---|
access_code |
The generated code of the voucher. |
code | description |
---|---|
1001 |
Insufficient privileges. |
1006 |
Insufficient voucher credit. |
1009 |
Invalid package ID. |
1010 |
Currency mismatch. |
1011 |
Invalid Location. |