0% found this document useful (0 votes)
19 views

Developer Manual

Uploaded by

DiegoAmaral
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

Developer Manual

Uploaded by

DiegoAmaral
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 214

HSNM Hotspot Manager 9.

3
Developer Manual
Manual Version 2.2.2
For HSNM Version 9.3.61

April 2022

PROMETEO S.R.L.
Via Roma, 61
31010 Fonte
Treviso
Italy
Tel. +39 0423 9292
Fax. +39 0423 929392
[email protected]
www.hsnetworkmanager.com
THE SPECIFICATIONS AND INFORMATION CONTAINED IN THIS MANUAL ARE SUBJECT TO CHANGE
WITHOUT ANY NOTICE. ALL STATEMENTS, INFORMATION AND RECOMMENDATIONS IN THIS MANUAL
ARE INTENDED TO BE ACCURATE BUT ARE PRESENTED WITHOUT WARRANTY OF ANY KIND, EITHER
EXPRESS OR IMPLIED. USERS ASSUME FULL RESPONSIBILITY FOR THE USE.

IN NO EVENT SHALL PROMETEO S.R.L OR ITS SUPPLIERS BE LIABLE FOR ANY INDIRECT, SPECIAL,
CONSEQUENTIAL OR INCIDENTAL DAMAGES, INCLUDING WITHOUT LIMITATION LOSS OF PROFITS OR
LOSS OR DAMAGE TO DATA ARISING OUT OF THE USE OR INABILITY TO USE THE MANUAL THOUGH
PROMETEO S.R.L OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

Prometeo, HSNM, HsNetworkManager and logos Prometeo, HSNM and HsNetworkManager are
trademarks of PROMETEO S.R.L. The third-party trademarks are the property of their respective owners.

Copyright © 2022 PROMETEO S.R.L


All rights reserved.
Contents

CONTENTS
INTRODUCTION ............................................................................................................................................................................. 5
STYLES ................................................................................................................................................................................................. 5
GLOSSARY............................................................................................................................................................................................. 6
PRODUCT OVERVIEW .................................................................................................................................................................... 9
WHAT IS HSNM.................................................................................................................................................................................... 9
PURPOSE OF THIS MANUAL ...................................................................................................................................................................... 9
USE OF RESTFUL APIS .................................................................................................................................................................. 10
APIS VERSION 2 .................................................................................................................................................................................. 11
Security ....................................................................................................................................................................................... 11
Examples of API Calls Version 2 .................................................................................................................................................. 11
The RESTfulAPI class of APIs v2 in PHP ....................................................................................................................................................... 12
Data Types of the Object Properties ........................................................................................................................................... 13
The data types used .................................................................................................................................................................................... 13
Timezone Type Properties .......................................................................................................................................................................... 13
Date time Type Properties .......................................................................................................................................................................... 13
Country Type Properties ............................................................................................................................................................................. 13
Currency Type Properties ........................................................................................................................................................................... 13
Properties with Multilingual Content ......................................................................................................................................................... 13
Properties with Images ............................................................................................................................................................................... 14
Properties that define the Color ................................................................................................................................................................. 14
Properties Defining Permissions ................................................................................................................................................................. 15
Properties Returned by the Endpoints ........................................................................................................................................ 16
The Properties Returned in the “Read”-Type Calls ..................................................................................................................................... 16
The Properties Returned in the “Write”-Type Calls .................................................................................................................................... 16
The Properties Returned in the “Find”-Type Calls ...................................................................................................................................... 16
The Properties Returned in the “Delete”-Type Calls .................................................................................................................................. 17
Read Commands ......................................................................................................................................................................... 18
Using the Where Property in Find and Count Commands .......................................................................................................... 18
Using Wildcard Characters .......................................................................................................................................................................... 18
Proprierties Returned from “Find” ............................................................................................................................................................. 19
Using the OrderBy Property in the Find Commands ................................................................................................................... 19
Available API Endpoints in APIs Version 2 .................................................................................................................................. 20
accesspointRead, accesspointWrite, accesspointFind, accesspointDelete and accesspointCount............................................................. 21
advertiserRead, advertiserWrite, advertiserFind, advertiserDelete and advertiserCount ......................................................................... 24
advertisersystemuserRead, advertisersystemuserWrite, advertisersystemuserFind e advertisersystemuserDelete ................................ 26
campaignRead, campaignWrite, campaignFind, campaignDelete and campaignCount ............................................................................. 30
cardAdd....................................................................................................................................................................................................... 37
certificateRead, certificateWrite, certificateFind e certificateDelete ......................................................................................................... 38
domainfederationgroupRead, domainfederationgroupWrite, domainfederationgroupFind e domainfederationgroupDelete ................ 40
domainRead, domainWrite, domainFind, domainDelete and domainCount ............................................................................................. 42
Array of Values Contained in the Domain’s "FederationGroups" Property ........................................................................................... 54
Array of Values Contained in the Domain’s "CustomApp" Property ..................................................................................................... 54
Array of Objects Contained in the Domain’s "Product" Property .......................................................................................................... 54
domainnotificationsRead, domainnotificationsWrite ................................................................................................................................. 57
domainwplanguagesRead, domainwplanguagesWrite ............................................................................................................................... 58
gatewayRead, gatewayWrite, gatewayFind, gatewayDelete and gatewayCount ....................................................................................... 60
The Array of Values contained in the Gateway's "CustomApps" Property ............................................................................................ 68
gatewaywplanguagesRead, gatewaywplanguagesWrite ............................................................................................................................ 69
macaddressDisassoc ................................................................................................................................................................................... 71
macaddressRiassoc ..................................................................................................................................................................................... 72
mailValidate ................................................................................................................................................................................................ 73
managerCount ............................................................................................................................................................................................ 74
managercurrencyandpaymentsRead, managercurrencyandpaymentsWrite ............................................................................................. 75
managernotificationsRead, managernotificationsWrite............................................................................................................................. 79
managerRead, managerWrite, managerFind, managerDelete and managerCount ................................................................................... 81
managertypeRead, managertypeWrite, managertypeFind ........................................................................................................................ 86
managersystemuserRead, managersystemuserWrite, managersystemuserFind and managersystemuserDelete .................................... 88
printerRead, printerWrite, printerFind, printerDelete and printCount ...................................................................................................... 93
productRead, productWrite, productFind, productDelete and productCount ........................................................................................... 95
productpolicyRead, productpolicyWrite, productpolicyFind, productpolicyDelete and productpolicyCount ............................................ 99
Properties contained in the 'CustomRadiusGroupCheck' Property of the Product Policy................................................................... 104

Developer Manual III


Contents

Properties contained in the 'CustomRadiusGroupReply' Property of the Product Policy ................................................................... 104
resellercurrencyandpaymentsRead, resellercurrencyandpaymentsWrite ............................................................................................... 105
resellerexternalauthRead, resellerexternalauthWrite .............................................................................................................................. 109
resellernotificationsRead, resellernotificationsWrite ............................................................................................................................... 112
resellerRead, resellerWrite, resellerFind, resellerDelete and resellerCount ............................................................................................ 114
resellersystemuserRead, resellersystemuserWrite, resellersystemuserFind and resellersystemuserDelete ........................................... 120
saleRead, saleFind..................................................................................................................................................................................... 126
systemcurrencyandpaymentsRead, systemcurrencyandpaymentsWrite................................................................................................. 129
systemexternalauthRead, systemexternalauthWrite ............................................................................................................................... 133
systemnotificationsRead, systemnotificationsWrite ................................................................................................................................ 136
systemuserRead, systemuserWrite, systemuserFind and systemuserDelete ........................................................................................... 139
systemwplanguagesRead, systemwplanguagesWrite .............................................................................................................................. 146
taxratesRead, taxratesWrite, taxratesFind and taxratesDelete ................................................................................................................ 148
userconnectionRead, userconnectionFind, userconnectionCount ........................................................................................................... 150
usercredentialsEncode.............................................................................................................................................................................. 152
userDisconnect ......................................................................................................................................................................................... 153
userproductAdd ........................................................................................................................................................................................ 154
userRead, userWrite, userFind, userDelete and userCount ..................................................................................................................... 155
Properties contained in the 'CustomRadiusAttrCheck' Property for the User .................................................................................... 158
Properties contained in the 'CustomRadiusAttrReply' Property for the User ..................................................................................... 158
userMacaddress........................................................................................................................................................................................ 159
usersaleRead, usersaleFind....................................................................................................................................................................... 160
userStats ................................................................................................................................................................................................... 163
vaccesspointRead, vaccesspointWrite, vaccesspointFind, vaccesspointDelete and vaccesspointCount .................................................. 164
vgatewayRead, vgatewayWrite, vgatewayFind, vgatewayDelete and vgatewayCount ............................................................................ 166
voucherAdd .............................................................................................................................................................................................. 171
wpcustomappRead, wpcustomappWrite, wpcustomappFind and wpcustomappDelete ......................................................................... 172
wpcustomimageRead, wpcustomimageWrite, wpcustomimageFind and wpcustomimageDelete .......................................................... 174
wplockandbypassRead, wplockandbypassWrite, wplockandbypassFind and wplockandbypassDelete ................................................... 176
wpsurveyRead, wpsurveyWrite, wpsurveyFind and wpsurveyDelete ...................................................................................................... 178
Array of Objects contained in the “Questions” Property .................................................................................................................... 180
Array of Values contained in the “Users” Property of the “Questions” Property” .............................................................................. 181
Array of Objects contained in the “Answers” ...................................................................................................................................... 181
wptemplateRead, wptemplateWrite, wptemplateFind and wptemplateDelete ...................................................................................... 184
wpwalledgardenRead, wpwalledgardenWrite, wpwalledgardenFind and wpwalledgardenDelete ......................................................... 192
zoneRead, zoneWrite, zoneFind, zoneDelete and zoneCount .................................................................................................................. 194
Costs of APIs endpoints version 2 ............................................................................................................................................. 196
OTHER INTEGRATIONS WITH EXTERNAL PROCEDURES .............................................................................................................. 197
Sending SMS from External Procedures.................................................................................................................................... 197
Receiving SMS from External Procedures ................................................................................................................................. 197
Receiving GPS Coordinates from Devices or External Procedures ............................................................................................ 198
Displaying the Hotspot Map on External Page ......................................................................................................................... 199
Displaying the Gateway Location on External Page ................................................................................................................. 200
DISPLAYING THE VEHICLE LOCATION ON EXTERNAL PAGE ......................................................................................................................... 200
CUSTOM VALIDATION OF THE USER’S REGISTRATION DATA ........................................................................................................................ 201
PHP Example of an External Page that Processes a Validation. ............................................................................................... 203
CUSTOM PAYMENT SYSTEMS .................................................................................................................................................... 205
PAGE FOR PAYMENT ........................................................................................................................................................................... 206
PAGE TO VERIFY THE PAYMENT ............................................................................................................................................................. 208
INTEGRATIONS WITH ERP/PMS ........................................................................................................................................................... 212
Configuring the Domain ........................................................................................................................................................... 212
Username Creation Mode ........................................................................................................................................................ 212
Password Creation Mode ......................................................................................................................................................... 212
The Product Assigned to the User............................................................................................................................................. 212
IMPALA ............................................................................................................................................................................................ 213
PMSs supported byImpala ........................................................................................................................................................ 213
REQUESTING FOR ASSISTANCE FROM REMOTE ......................................................................................................................... 214
OPENING PORTS ON YOUR ROUTER/FIREWALL ......................................................................................................................... 214

Developer Manual IV
Introduction Styles

Introduction
Styles
This manual uses styles, fonts and symbols specific to the context in order to facilitate the reading and
then create a symbolic association with the capabilities of the product. The icons used are those present
on the pages and in the context dropdown menu of the configuration.
Means readers pay attention and take note of the helpful suggestions. In some places, notes have
this side note icon and this background to study or highlight some critical aspects.

Developer Manual 5
Introduction Glossary

Glossary
The table below shows on the left the abbreviations used in this manual and their meaning on the right.

Term Meaning
HSNM has an integrated RADIUS server that uses the AAA
concept (Authentication, Authorization, Accounting) to manage
network access and also supports federation. In particular:
• Authentication: user authentication with simple methods
(PAP, CHAP). Many types of NAS are supported (MikroTik,
Cisco Meraki, LigoWave, Ruckus, etc.) and many client-
operating systems, including Windows XP (SP1 and SP2) and
Vista, Linux, Mac OSX and many others.
• Authorization: both pre-authorization and post-
AAA
authorization are supported. The policies (time, traffic,
speed, timeout etc.) are defined on the database. IP
addresses are allocated as defined within the appliance.
• Accounting: all the most common methods are supported.
Data are stored in the internal database. Interm-update is
also supported.
• Federation (Proxy): any RADIUS request can be forwarded
to an external RADIUS server. All standard RADIUS realms
are supported (IPASS, @, %, etc.).
Application Program Interface. They allow a programmer to
interact and expand the functionality of HSNM. Examples: they
API
run an external procedure that creates a user in HSNM; read
data from HSNM; etc.
Applications. In the HSNM, applications may be developed to be
App displayed to the user by connecting to external sites or pages or
uploading the HTML code, CSS and JavaScript.
The bar that contains the applications in the user interface of
App bar
the HSNM.
Certification Authority. The Authority that issues the certificates
CA
for SSL connections.
It is a card, generated by a particular procedure of HSNM,
containing a username and a password to use to log in. To the
Card
user, it is also linked a product defined in the phase of
generation.
Content Injector Gateway. It is an additional product combined
with the HSNM to pop up contents to the users while surfing the
CO.IN. Gateway internet.
To manage content injected in the pages visited by the
users, you have to purchase a CO.IN. Gateway.
Certificate Signing Request. File generated by HSNM to be sent
CSR
to the CA to obtain a valid certificate for SSL connections.
Comma-Separated Values. It is a file format based on text file
CSV
used to export table data.
Click-Through Rate. It is the percentage derived from the ratio
CTR of the number of clicks and the number of views (Impressions)
of an advertising campaign.

Developer Manual 6
Introduction Glossary

Data rate Speed of data transmission.


DB Database.
Dynamic Host Configuration Protocol. It is a network protocol of
application layer that allows the devices or terminals of a
DHCP specific local network to receive dynamically at any request for
access to an IP network, the IP configuration required to
establish a connection.
Demilitarized Zone. It is an isolated LAN segment (a "subnet")
DMZ
accessible from both internal and external networks.
Expiration of Maintenance and
The expiration date of the Maintenance and Update Contract
Update
HGW Hotspot gateway installed at the manager’s site.
Globally Unique Identifier. The term used to: identify the license
GUID
of the HSNM; identify a product in a " Vouchers".
HA High Availability
It is a passive system of auto detection of the device position,
exploiting WiFi and Bluetooth signals, it allows:
• highlighting, on the map of the area or of the floor, the
Heatmap with hot and cold areas;
• counting the number of devices that are passed to a certain
Hound point;
• understanding how long they have stopped;
• measuring how many have entered;
• Etc.
It requires the use of Hound sensors.
It is a WiFi and Bluetooth sensor to use in a "Hound" system for
Hound Sensor
device positioning.
HSNM The HSNM.
Printer for the HSNM. It is a printer integrated with HSNM,
creating and printing " Cards" and " Vouchers".
HSNM Printer There are two printer models. Model 5000 (supplied until June
2018) allows LAN and WiFi connections, and model 6000 allows
WiFi and GPRS.
HW Hardware.
In advertising, it identifies the number of visualisations of a
Impression
campaign.
Network Address Translation. The technique consists of
NAT modifying the IP addresses of packets in transit on a router
within communication between two or more hosts.
PGW Gateway PPPoE.
Point-to-point Protocol over Ethernet. The tunnelling protocol
allows encapsulating the IP layer on a connection between two
PPPoE
Ethernet ports on which the IP packets are then transported. It
is widely used for xDSL Services.
Remote Authentication Dial-In User Service. It is a AAA protocol
RADIUS (authentication, authorisation, accounting) used in applications
to access networks.
It is defined as responsive a graphical interface that adapts to
Responsive
the device that hosts it, based on its resolution and orientation.

Developer Manual 7
Introduction Glossary

Round-Robin techniques indicate that operations are


Round Robin
performed alternately or in turn based on a circular order.
For the management: left sidebar that contains the tabs of
administration, research and data. For the Welcome Portal: you
Sidebar
can open the right sidebar by using the properties button in the
upper right corner.
Short message peer-to-peer protocol. They are used for sending
SMPP
and receiving SMS.
Standard App App provided and included in HSNM.
SW Software.
The chart control allows the user to switch from a group of
controls to another within the same area. E.g., the HSNM uses
Tab
the tabs in the sidebar to display the configuration options, the
structure of the data and research.
Virtual Local Area Network. It is a group of hosts that
VLAN communicate with each other as if they were connected to the
same cabling regardless of their physical location.
It's a prepaid token associated with a HSNM product that
contains a GUID. During registration or recharging, the users are
Voucher
asked for the GUID, at the payment by selecting voucher,
therefore avoiding the payment by credit card.
URL accessible by users of the HGW without logging in and
Walled Garden registering. In the HSNM, they can be defined for the entire
system, for each domain and for a specific HGW.
Wide Area Network. The network that connects devices and
WAN
computers placed over large geographic areas.
Identifies a software able to run inside a web browser like
Web based
Chrome, Internet Explorer, Firefox, etc.
Welcome Portal is the set of the interface presented to users. In
addition to the Login app, it can provide information content,
Welcome Portal or WP
weather forecast, places of interest, attractions, menus,
promotions and anything else that have been set.
Digital Subscriber Line is a family of technologies that provides
digital data transmission in the last mile. The various DSL
technologies differ among themselves according to the
xDSL symmetry/asymmetry of the bands appointed to the upload
and download and/or to the transmission speed offered to the
user in the two respective bands (ADSL, SHDSL, HDSL, WSDL,
etc.).
XLSX Extension of the file names for Microsoft Excel.

Developer Manual 8
Product Overview What is HSNM

Product Overview
What is HSNM
HSNM is a unique system, complete, self-contained and easy to configure/manage. It meets all
professional/enterprise requirements for the centralized management (user profile and creation,
authentication using even social networks, memorization of the user traffic logs, customized Apps,
advertising with proximity marketing, etc.) of hot spots, hot zones, internet points, PPPoE networks,
city/municipal networks, etc. In addition, unique in its kind, it also manages resale and technical
administrative processes with custom lists, discounts, summary of services sold/provided, etc.
HSNM is configurable and adaptable to all professional needs of ISP, WISP, telephone operators,
system integrators, managers, etc. and by using read/write API is also integrable with external
procedures such as management programs and pre-existent applications.

The system can be divided into two parts:


• The management of the networks (hotspots and PPPoE) and advertising;
• The user interface.

Purpose of this Manual


This manual aims to provide technical information needed for external applications developers to
interface with HSNM.
In addition to the information, explanatory examples are given to facilitate development.

Developer Manual 9
Use of RESTful APIs Purpose of this Manual

Use of RESTful APIs


HSNM is equipped with a RESTful API system that allows you to access, in an encrypted and secure way,
the information contained in the system so that you can read, write, save, search (Version 2only) and
delete (Version 2 only) data without using the graphical backend interface.

Version 7 of the HSNM has released APIs version 2, allowing easier access to a much larger set of
objects and properties.
APIs version 1 can still be used but are considered obsolete and will no longer be available with
version 8 of the HSNM.

Developer Manual 10
Use of RESTful APIs APIs Version 2

APIs Version 2
As with APIs version 1, APIs version 2 is based on a set of “endpoint”, and you can apply the same
considerations described in the paragraph “APIs version 1”. In addition, they contain a much larger set
of endpoints and properties that allows you to interact with the data of the objects to which they refer.

The endpoints nomenclature for APIs version 2 is defined by the object name followed by the command
to be executed. The basic commands can be “Read”, “Write”, “Find” and “Delete” but there may also be
special commands to perform particular and specific functions.
Example: $Endpoint = 'managerRead';

Security
For the security of the APIs version 2, you can apply the same consideration made for APIs version 1 in
the relative paragraph “Security”.

Examples of API Calls Version 2


Below, a PHP example of an API call to resellerRead endpoint of APIs version 2, which returns the
reseller’s data with ID 141.
$ApiKey = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$ApiSecret = "YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY";
$API = new RESTfulAPI("http://192.168.0.100", $ApiKey, $ApiSecret);

$Endpoint = 'resellerRead';
$Data = '{"id":"141"}';
$JSonRetVal = $API->APICall($Endpoint, $Data);
if (isset($RetVal["error"]) && $RetVal["error"] != "") {
echo "Error: " .$RetVal["error"];
}
else {
print_r($JSonRetVal);
}

Warning! To avoid problems with accented or special characters, save the page encoded (UTF-8
without digital signature)”.

Developer Manual 11
Use of RESTful APIs APIs Version 2

The RESTfulAPI class of APIs v2 in PHP


The example above uses the RESTfulAPI class to access the APIs that are listed below:

class RESTfulAPI {
function __construct($DomainOrIP, $Key, $Secret) {
$this->BaseUri = $DomainOrIP ."/api/v2/";
$this->ApiKey = $Key;
$this->ApiSecret = $Secret;

// Encription vector initialization


$this->SecretIV = substr(hash("SHA256", $this->ApiKey, true), 0, 16);
}

function base64Url_Encode($data) {
return rtrim(strtr(base64_encode($data), '+/', '-_'), '=');
}

// Encription for properties


function APIEncryptData($Data) {
$output = openssl_encrypt($Data, "AES-256-CBC", md5($this->ApiSecret),
OPENSSL_RAW_DATA, $this->SecretIV);

return $this->base64Url_Encode($output);
}

function APICall($Endpoint, $Data) {


try {
$Options = array('http'=>
array(
'method'=>'POST',
'header'=>'Content-type: application/x-www-form-urlencoded',
'content'=>'data=' .$this->APIEncryptData($data)
)
);
$context = stream_context_create($Options);
$RetVal = file_get_contents($this->BaseUri .$Endpoint
."/apikey=" .$this->ApiKey, false, $context);
}
Catch (Exception $e) {
$RetVal = '{"warning":"","error":"Generic error"}';
}

return $RetVal;
}
}

Developer Manual 12
Use of RESTful APIs APIs Version 2

Data Types of the Object Properties


The data types used
In the various tables that describe the properties available for the multiple objects, the type of data
processed is declared in the “Type” column. The types of data available are:
• tinyint (Integer that accepts values from -128 to +128)
• smallint (Integer that accepts values from -32767 to +32767)
• int (Integer that accepts values from -2147483648 to +2147483647)
• bigint (Integer that accepts values from -263-1 to +263-1)
• varchar (String with maximum length defined in round brackets)
• text (Text with a maximum length of 65535 characters)
• longtext (Text with a maximum length of 232- 4 characters)
• mediumblob (Binary data string with a maximum length of 231- 4 bytes)
• array (Contains a set of indexed properties or IDs)
• date (Date in the format yyyy-mm-dd)
• datetime (Date and time in the format yyyy-mm-dd hh:mm:ss)
• timestamp (Date and time in the format yyyy-mm-dd hh:mm:ss)

Timezone Type Properties


In TimeZone type properties, it is possible to define values contained on the “TZ database” also called
“tzdata”. To find the list of valid values, search on Google for “tz database time zones”.

Date time Type Properties


The data type properties accept and return values in the format “yyyy-mm-dd hh:mm:ss”.
In PHP format the value with this command: date("Y-m-d h:i:s", strtotime($DateValue))

Country Type Properties


The properties that define a country are in ISO 3166-1 alpha-2 format.

Currency Type Properties


The properties that define a currency code are in ISO 4217 format.

Properties with Multilingual Content


The values of the multilingual fields (identifiable with a specific note in the description of the tables that
describe the available properties) must be loaded in XML format, where the name of each element
declares the language code and the content of the text.
Below, an example of a multilingual property:
<en>Airport</en><es>Aeropuerto</es><fr>Aéroport</fr><de>Flughafen</de><it>Aereoporto</it><l1>Αερ
οδρόμιο</l1><l2>飞机场</l2><l3>аэропорт</l3>
In the elements “l1”, “l2” and “l3” the translations for the three additional languages are passed.

Developer Manual 13
Use of RESTful APIs APIs Version 2

Properties with Images


The properties that contain an image (their name, apart from a few cases, always ends with “Img” and
in any case with the note “Image type properties”) are passed or returned in hexadecimal format. In
practice, if you want to define an image, load the contents of the binary file and turn it into hexadecimal.
Example in PHP:
$Endpoint = 'resellerWrite';
$Data = '{
"id":"123",
"ManagerLogoImg":"' .bin2hex(file_get_contents("/tmp/MyCompanyLogo.png")) .'"
}';

Properties that define the Color


A color in the properties is specified using the hexadecimal form: #rrggbb. “rr” defines red, “gg” green
and “bb” blue. It is also possible to use colors with predefined standards names supported by all
browsers (red, aqua, blue, coral, dark orange, etc.).

Developer Manual 14
Use of RESTful APIs APIs Version 2

Properties Defining Permissions


The permissions values defined in the system users properties are expressed using the combination of
bits in a numeric field. Below, the table that describes the various values.
Bit Comment
1 Read
2 Write
3 Delete
4 Add
7 Admin

Some examples of permission combinations:


Value to be defined Comment
3 (1 + 2) Defines permission for read and write.
7 (1 + 2 + 4) Defines permission for read, write and delete.
15 (1 + 2 + 4 + 8) Defines permission for read, write, delete and add.
79 (1 + 2 + 4 + 8 + 64) Defines permission for read, write, delete, add and admin.

Consider the following logic:


• If you assign a permission in which “Admin” is active, the “Read”, “Write” and “Delete”
permissions must also be assigned.
• If you assign a permission in which “Delete” or “Add” are active, the “Read” and “Write”
permissions must also be assigned.

The permissions properties expressing a “Yes/No” Boolean value, use only the first bit. Below, the table
that describes the various possible values:
Value to be defined Comment
0 No
1 Yes

Developer Manual 15
Use of RESTful APIs APIs Version 2

Properties Returned by the Endpoints


All endpoints return properties in JSON format, which can contain information, warning, errors and data.
The following are the properties returned from the various types of commands

The Properties Returned in the “Read”-Type Calls


The following describes the properties returned by “Read”-type calls:
Name Comment Type
Property containing any information about reading data.
info varchar(255)
Optional property.
Property containing any messages that warn of potential
warning varchar(255)
problems.
Property containing any information with detected errors.
error varchar(255)
Optional property.
The rest of the names contain the set of properties of the
object and declared in each single endpoint.
Example of returned data: {"id":123, "CreationDate":"2019-11-29 08:21:39", "ManagerID":"456",
"DomainName":"Test", …}

The Properties Returned in the “Write”-Type Calls


The following describes the properties returned by “Write”-type calls:
Name Comment Type
Property containing any information about reading data.
info varchar(255)
Optional property.
Property containing any messages that warn of potential
warning problems. varchar(255)
Optional property.
Property containing any information with detected errors.
error varchar(255)
Optional property.
Property that contains the record ID added or updated.
The ID property is not available on endpoints that deal
id with general system information, such as int(11)
“systemcurrencyandpaymentsWrite”,
“systemexternalauthWrite”, “systemnotificationsWrite”
and “systemwplanguagesWrite”.
Example: {"info":"The data has been successfully saved","warning":"","error":"","id":123}

The Properties Returned in the “Find”-Type Calls


The following describes the properties returned by “Find”-type calls:
Name Comment Type
Property containing any information with detected errors.
error varchar(255)
Optional property.
Array that contains record IDs that match the search Array di
id
criteria. int(11)

Developer Manual 16
Use of RESTful APIs APIs Version 2

The maximum number of IDs returned is one thousand.


If you need to extract more values, it is necessary to
perform an extraction cycle considering the ID of the
last returned value, as explained below.
Example: {"error":"","id":[123,456,789]}

The Properties Returned in the “Delete”-Type Calls


The following describes the properties returned by “Delete”-type calls:
Name Comment Type
Property containing any information with detected errors.
error varchar(255)
Optional property.
ID of the deleted record.
id int(11)
If an error occurs, the returned ID is equal to zero.
Example: {"error":"","id":123}

Developer Manual 17
Use of RESTful APIs APIs Version 2

Read Commands
Read-type commands read the data of an object based on the ID or a set of IDs.
To read the data of a single object, simply pass the ID property of the data you need to read, while to
read the data of multiple objects, pass an array of IDs into the IDs property.

Example that reads data from a specific user:


$Endpoint = 'userRead';
$Data = '{"id":"123"}';

Example that reads data from multiple users:


$Endpoint = 'userRead';
$Data = '{"ids":["123", "456"]}';

Using the Where Property in Find and Count Commands


If you want to search data, to express the search context, you must use the property “Where” where you
can define all the conditions provided by the Sql language “=” equal, “<>” different, “>” greater, “<” less,
“<=” less or equal, “>=” greater or equal, etc. and with any operators AND, OR, LIKE, NOT, etc. to chain
conditions.
The name of the research object properties must be expressed with the syntax “object.ProprietyName”.

In the following example, all the IDs of the manager who have an ERP code are returned:
$Endpoint = 'managerFind';
$Data = '{"Where":"NOT manager.ERPCode=\"\""}';

The endpoint method explanation declares the dependency between the various objects involved with
this symbolism example:

user domain manager reseller

Given this dependence, the search can also be extended to all related objects. Basically, if you want to
extract the IDs of male users who depend on resellers residing in the US, you will need to make a call to
the userFind endpoint with a where in the user and reseller data. An example follows:
$Endpoint = 'userFind';
$Data = '{"Where":"user.Gender=\"M\" AND reseller.Country=\"us\""}';

Warning! The use of objects or property names that are incorrect, can generate an incorrect SQL
query. To verify the error and the syntax, please refeFr to the "System log".

Using Wildcard Characters


In the property values expressed on “Where”, you can use two wildchard characters to construct
patterns: percentage (%) and the underscore (_) characters. The (%) percentage wildcard matches any
string of zero or more characters. The (_) underscore wildcard matches any single character. The
returned data are also limited by the security criteria defined in the user associated with the API Key.
Example that returns all managers who have the ERP code beginning with "AX":
$Endpoint = 'managerFind';
$Data = ' {"Where":"manager.ERPCode LIKE \"AX%\""}';

Developer Manual 18
Use of RESTful APIs APIs Version 2

Proprierties Returned from “Find”


The maximum number of IDs returned from the "Find" command is one thousand. If you want to extract
multiple values, you need to run an extraction loop considering the ID of the last returned value.
Basically, a first call to the endpoint is made, the last ID returned is evaluated, and the command is
reconstructed to extract the next IDs ('"Where":"user.id > ' .$LastID).

The small PHP example that follows, extracts user IDs:


$ApiKey = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$ApiSecret = "YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY";
$API = new RESTfulAPI("http://192.168.0.100", $ApiKey, $ApiSecret);

$Endpoint = 'userFind';
$Command = '{"Where":"user.CreationDate >= \"2020-01-01 00:00:00\"",
"OrderBy":"user.UserName"}';
do {
$LastID = 0;
$JSonResult = $API->APICall($Endpoint, $Command);
$Result = json_decode($JSonResult, true);
$IDs = $Result["id"];
if (count($IDs) > 0) {
echo $JSonResult ."<br>";

$LastID = $IDs[count($IDs) - 1];


$Command = '{"Where":"user.id > ' .$LastID
.' AND user.CreationDate >= \"2020-01-01 00:00:00\""}';
}
} While ($LastID > 0);

Using the OrderBy Property in the Find Commands


If you want to sort the returned data IDs in searches, you need the OrderBy property, which allows you
to express a list of properties by which to sort the data, separated by a comma.
The default sort order is ascending, but you can define it by deferring the word “DESC” after the property
name.

The following is an example of the commands to use to extract user IDs created since the beginning of
2020 sorted descending by registration date.
$Endpoint = 'userFind';
$Command = '{"Where":"user.CreationDate >= \"2020-01-01 00:00:00\"",
"OrderBy":"user.CreationDate DESC"}';

Developer Manual 19
Use of RESTful APIs APIs Version 2

Available API Endpoints in APIs Version 2


Following is a detailed list of the various endpoints available with examples and with a complete list of
available properties. The various property tables list the property name and a comment. Unless
otherwise specified with a note in the row, read, write, and search operations are available for each
property.
In calls to endpoints, you do not need to pass all properties. In addition, you only need to define at
least the minimum “mandatory” properties indicated by a note in the row of the property tables
and only those to be modified when updating.

Developer Manual 20
Use of RESTful APIs APIs Version 2

accesspointRead, accesspointWrite, accesspointFind, accesspointDelete and


accesspointCount
The “accesspoint” object allows you to manage physical access point data.
When searching using the “Find” and “Count” commands, you can use various objects with the following
hierarchy:

accesspoint zone gateway domain manager reseller

Example of a call that reads data:


$Endpoint = 'accesspointRead';
$Data = '{"id":"123"}';

Example of a call that searches for data by access point name:


$Endpoint = 'accesspointFind';
$Data = '{"Where":"accesspoint.AccessPointName=\"MyAccessPoint\""}';

Example of a call that searches for data by ID:


$Endpoint = 'accesspointFind';
$Data = '{"Where":"accesspoint.id=123"}';

Example of a call that adds:


$Endpoint = 'accesspointWrite';
$Data = '{"id":"0", "AccessPointName":"MyAccessPoint", "ZoneID":"1"}';

Example of a call that modifies data:


$Endpoint = 'accesspointWrite';
$Data = '{"id":"123", "AccessPointName":"MyAccessPoint", "ZoneID":"1"}';

Example of a call that deletes data:


$Endpoint = 'accesspointDelete';
$Data = '{"id":"123"}';

Available proprieties:
Name Comment Type
Object ID.
id If you need to add, pass the value zero in this property. int(11)
Read-only property.
Date when the object was created. Automatically assigned
CreationDate when you add it. timestamp
Read-only property.
Zone ID.
ZoneID ID derived from the “zones” object. int(11)
Mandatory property.
Access point name.
AccessPointName varchar(100)
Mandatory property.
MAC-address of the access point.

MacAddress MAC-address of the access point used to recognize the varchar(255)


correct domain and gateway when redirecting to the
Welcome Portal with certain types of gateways.
ManifacturerWebAdmin URL or IP address to access the access point web
varchar(255)
Address management.
HardwareType Hardware type of the access point. Possible values are: int(11)

Developer Manual 21
Use of RESTful APIs APIs Version 2

• 1 = Mikrotik RB9xx, RB 2xxxx, hAP, hAP Lite, hAP lite TC,


etc. (without flash)
• 3 = Mikrotik wAP, hAP AC Lite, cAP Lite, etc. (with flash)
• 100 = Other
HardwareVersion Version of the access point software. varchar(20)
If enabled, it displays in the map or image, the circles that
ShowWiFiCoverage define the coverage area in green and in yellow the area of tinyint(1)
possible coverage.
WiFiCoverage Coverage radius of WiFi signal expressed in meters. float
Enable sending notifications for monitoring the access
EnableNotifications int(1)
point.
Notes Notes. text
SSID Defines the wifi network SSID. varchar(255)
Mp4Frequency band for WLAN1. Possible values are:
2ghz-b, 2ghz-b, 2ghz-b/g, 2ghz-b/g/n, 2ghz-onlyg, 2ghz-
Band varchar(32)
g/n, 2ghz-onlyn, 5ghz-a, 5ghz-a/n, 5ghz-a/n/ac, 5ghz-n/ac,
5ghz-onlyn, 5ghz-onlyac
With two radios. Enable only if the device is equipped with
a double radio.
TwoRadios int(3)
On Mikrotik, if you enable it and there is not a double
radio, errors will occur in the configuration script.
Frequency band for WLAN2. Possible values are:
2ghz-b, 2ghz-b, 2ghz-b/g, 2ghz-b/g/n, 2ghz-onlyg, 2ghz-
g/n, 2ghz-onlyn, 5ghz-a, 5ghz-a/n, 5ghz-a/n/ac, 5ghz-n/ac,
Band2 5ghz-onlyn, 5ghz-onlyac varchar(32)

Definable only if you have enabled the “TwoRadios”


checkbox.
UseVLAN Enables the use of a VLAN. tinyint(1)
VLANID ID for the VLAN. Numeric values allowed are from 2 to 4095. varchar(4)
UseDHCP Use DHCP client tinyint(1)
IPAddress IP address. varchar(15)
NetMask Network mask. varchar(15)
IP address of the gateway.
GatewayIP It usually matches with the IP Address of the hotspot varchar(15)
gateway.
DNSIPAddress IP addresses of DNS servers separated by commas. varchar(100)
Admin password of MikroTik RouterOS to access the AP
AdminPassword configuration and the APIs. varchar(30)
Definable only for MikroTik-type hardware.
Refresh interval in minutes. Access point automatically
UpdateMins checks every x minutes if there are configuration updates. int(11)
Definable only for MikroTik-type hardware.
Custom MikroTik script to add to standard configuration.
CustomCommands text
Definable only for MikroTik-type hardware.
Enables automatic update of access point configuration.
UpdatableConfig tinyint(1)
Definable only for MikroTik-type hardware.

Developer Manual 22
Use of RESTful APIs APIs Version 2

Latitude.

Latitude For custom zones, defines the distance in meters from varchar(20)
the zero point of the axes. The zero point is the upper
left corner.
Longitude.

Longitude For custom zones, defines the distance in meters from varchar(20)
the zero point of the axes. The zero point is the upper
left corner.

Developer Manual 23
Use of RESTful APIs APIs Version 2

advertiserRead, advertiserWrite, advertiserFind, advertiserDelete and advertiserCount


The “advertiser” object allows you to manage advertiser data.
When searching using the “Find” and “Count” commands, you can use various objects with the following
hierarchy:

advertiser reseller

Example of a call that reads data:


$Endpoint = 'advertiserRead';
$Data = '{"id":"123"}';

Example of a call that searches for data by company name:


$Endpoint = 'advertiserFind';
$Data = '{"Where":"advertiser.CompanyName=\"MyCompanyName\""}';

Example of a call that searches for data by ID:


$Endpoint = 'advertiserFind';
$Data = '{"Where":"advertiser.id=123"}';

Example of a call that searches for data by ERP code:


$Endpoint = 'advertiserFind';
$Data = '{"Where":"advertiser.ERPCode=\"XYZ\""}';

Example of a call that adds:


$Endpoint = 'advertiserWrite';
$Data = '{"id":"0", "CompanyName":"MyCompanyName"}';

Example of a call that modifies data:


$Endpoint = 'advertiserWrite';
$Data = '{"id":"123", "CompanyName":"MyCompanyName"}';

Example of a call that deletes data:


$Endpoint = 'advertiserDelete';
$Data = '{"id":"123"}';

Available properties:
Name Comment Type
Object ID.
id If you need to add, pass the value zero in this property. int(11)
Read-only property.
Date when the object was created. Automatically assigned
CreationDate when you add it. timestamp
Read-only property.
Reseller ID.
ResellerID ID derived from the “reseller” object. int(11)
Mandatory when adding.
Advertiser’s company name.
CompanyName varchar(100)
Mandatory when adding.
Address Advertiser’s adress. varchar(100)
Zip ZIP or postcode. varchar(10)
City Reseller’s city. varchar(100)
State Province or state. varchar(100)
Country Code of the country. varchar(100)

Developer Manual 24
Use of RESTful APIs APIs Version 2

Define the value in ISO 3166-1 alpha-2 format.


VAT Advertiser’s VAT-Id number. varchar(20)
Phone Advertiser’s phone number. varchar(20)
Fax Advertiser’s fax number. varchar(20)
Web Advertiser’s web address. varchar(50)
EmailAddress Email address. varchar(50)
FirstName First name of the contact person. varchar(100)
LastName Last name of the contact person. varchar(100)
Timezone of the manager.
TimeZone varchar(64)
Define a “tzdata”-type value.
CustomCSS Custom CSS applied to the advertiser backend. longtext
Maximum number of active campaigns.
MaxActiveCampaigns A value equal to zero indicates a limited number based int(11)
on the license.
If enabled, the advertiser campaigns are public and they will
PublicAdvCampaigns int(1)
be displayed on all gateways.
ERP/PMS external code.
ERPCode It is used to associate the manager with the registry of varchar(25)
an external ERP/PMS.
Notes Notes. text
Locked If enabled, it blocks all advertiser campaigns. tinyint(1)

Developer Manual 25
Use of RESTful APIs APIs Version 2

advertisersystemuserRead, advertisersystemuserWrite, advertisersystemuserFind e


advertisersystemuserDelete
The “advertisersystemuser” object allows you to manage the data of the advertiser’s system user
accessing the backend.
When searching using the “Find” command, you can use various objects with the following hierarchy,
depending on the usage context:

advertisersystemuser advertiser reseller

Example of a call that reads data:


$Endpoint = 'advertisersystemuserRead';
$Data = '{"id":"123"}';

Example of a call that searches for data by username:


$Endpoint = 'advertisersystemuserFind';
$Data = '{"Where":"advertisersystemuser.UserName =\"MyAdminUser\""}';

Example of a call that searches for data by ID:


$Endpoint = 'advertisersystemuserFind';
$Data = '{"Where":"advertisersystemuser.id=123"}';

Example of a call that adds:


$Endpoint = 'advertisersystemuserWrite';
$Data = '{"id":"0", "UserName":"MyAdminUser"}';

Example of a call that modifies data:


$Endpoint = 'advertisersystemuserWrite';
$Data = '{"id":"123", "UserName":"MyAdminUser"}';

Example of a call that deletes data:


$Endpoint = 'advertisersystemuserDelete';
$Data = '{"id":"123"}';

Available properties:
Name Comment Type
Object ID.
id If you need to add, pass the value zero in this property. int(11)
Read-only property.
Date when the object was created. Automatically assigned
CreationDate when you add it. timestamp
Read-only property.
Reseller ID.
AdvertiserID ID derived from the “advertiser” object. int(11)
Mandatory property.
Username for the login. It is recommended to enter your
UserName varchar(60)
mobile phone or email address.
Password for the user.

Password The password you enter must comply with the varchar(255)
“Password Complexity” defined in the “Backend
Security” of the “System Settings” session.
RetypePassword Repeated password to verify accuracy. varchar(255)

Developer Manual 26
Use of RESTful APIs APIs Version 2

Specify only whether the password should be defined or


changed.
FirstLastName User's first and last name. varchar(100)
Phone Landline phone number. varchar(20)
MobilePhone Mobile phone number. varchar(20)
Type of contact. Possible values:
ContactType • 0 = Technician int(11)
• 1 = Administrative
Defines the backend colors for the system user accessing the
backend. Possible values are:
• (Empty value) = Use default
BackendColors varchar(30)
• greygreen = Grey and Green
• darkblue = Dark and Blue
• darkorange = Dark and Orange
EmailAddress User's email address. varchar(100)
Defines permissions for managing system users (the data on
AuthSystemUsers this page). Admin enables the user to manage permissions. smallint(3)
Property expressing permissions.
Shows the amounts originated from sales. If the users do not
have the permissions, they will not be able to: display the
AuthShowSales sales summary, export the sales, see the amounts on the smallint(3)
dashboards.
Property expressing permissions.
Defines permissions for advertisers.
AuthAdvertisers smallint(3)
Property expressing permissions.
Enables changing the field in the advertisers that defines
AuthAdvertisersPublicA whether the campaigns are public or private. smallint(3)
dvCampaigns
Property expressing permissions.
Defines permissions for advertising campaigns.
AuthCampaigns smallint(3)
Property expressing permissions.
Defines sales transaction permissions for advertising.
AuthAdvTransactions smallint(3)
Property expressing permissions.
Enables or disables the usage of APIs.
AuthAPI smallint(3)
Property expressing permissions.
Allows limiting the usage of APIs version 1 on an hourly basis
by defining a maximum cost.
Valid only for APIs 1.0.
APILimitPerHour Many API endpoints have a cost of one, but some of int(11)
them, requiring more resources for processing, have a
much higher cost. Please refer to the Administrator
Manual for the fee of each endpoint. A value of zero
does not restrict the use of the APIs.
Allows limiting the usage of APIs version 1 on a daily basis by
APILimitPerDay int(11)
defining a maximum cost.

Developer Manual 27
Use of RESTful APIs APIs Version 2

Valid only for APIs 1.0.


Many API endpoints have a cost of one, but some of
them, requiring more resources for processing, have a
much higher cost. Please refer to the Administrator
Manual for the fee of each endpoint. A value of zero
does not restrict the use of the APIs.
Allows limiting the use of API version 2 by defining the
maximum cost in minutes of hourly processing of the
API2LimitPerHour endpoints. A value of zero does not restrict the use of the float
APIs.
Valid for APIs 2.0 only.
Allows limiting the use of API version 2 by defining the
maximum cost in minutes of daily processing of the
API2LimitPerDay endpoints. A value of zero does not restrict the use of the float
APIs.
Valid for APIs 2.0 only.
Defines the API access Key and must always be passed with
ApiKey calls. varchar(50)
A value is automatically proposed when adding.
Defines the API access security code used to encrypt
ApiSecret transmitted data. Do not disclose this data. varchar(50)
A value is automatically proposed when adding.
Date and time of the user's last login.
LastLoginDateTime datetime
Read-only property.
Acceptance of the License to Use the product.
LicenseAccepted int(1)
Read-only property.
Date and time when the License to Use the product was
LicenseAcceptedDateTi accepted. datetime
me
Read-only property.
TermsAndConditionsAcc Acceptance of the Terms & Conditions.
int(1)
epted Read-only property.
Date and time when the Terms & Conditions statement was
TermsAndConditionsAcc accepted.
datetime
eptedDate
Read-only property.
Version of the Terms & Conditions statement accepted by
TermsAndConditionsVer the user.
varchar(10)
sion
Read-only property.
The date on which the user accepted the Terms & Conditions
TermsAndConditionsDa statement
datetime
te
Read-only property.
Acceptance of the Privacy Policy.
PrivacyPolicyAccepted int(1)
Read-only property.

Developer Manual 28
Use of RESTful APIs APIs Version 2

Date and time when the Privacy policy statement was


PrivacyPolicyAcceptedD accepted.
datetime
ate
Read-only property.
Version of the Privacy Policy statement accepted by the
PrivacyPolicyVersion user. varchar(10)
Read-only property.
Date of privacy policy accepted by the user.
PrivacyPolicyDate datetime
Read-only property.

All properties whose name begins with "Auth" define the combination of permissions. Assign values
that are compatible with what is described in the "Properties that define permissions" paragraph.

Developer Manual 29
Use of RESTful APIs APIs Version 2

campaignRead, campaignWrite, campaignFind, campaignDelete and campaignCount


The “campaign” object allows you to manage the ad campaign data.
When searching using the “Find” and “Count” commands, you can use various objects with the following
hierarchy:
campaign manager reseller

campaign advertiser reseller

Example of a call that reads data:


$Endpoint = 'campaignRead';
$Data = '{"id":"123"}';

Example of a call that searches for data by campaign name:


$Endpoint = 'campaignFind';
$Data = '{"Where":"campaign.Description=\"MyCampaign\""}';

Example of a call that searches for data by ID:


$Endpoint = 'campaignFind';
$Data = '{"Where":"campaign.id=123"}';

Example of a call that adds:


$Endpoint = 'campaignWrite';
$Data = '{"id":"0", "Description":"MyCampaign"}';

Example of a call that modifies data:


$Endpoint = 'campaignWrite';
$Data = '{"id":"123", "Description":"MyCampaign"}';

Example of a call that deletes data:


$Endpoint = 'campaignDelete';
$Data = '{"id":"123"}';

Available properties:
Name Comment Type
Object ID.
Id If you need to add, pass the value zero in this property. int(11)
Read-only property.
Date when the object was created. Automatically assigned
CreationDate when you add it. timestamp
Read-only property.
Advertiser or manager ID.
Assign an ID derived from the “manager” object if you
AdvertiserID need to assign the campaign to a manager. int(11)
ID derived from the "advertiser" object if you need to
assign the campaign to an advertiser.
Mandatory property.
Description Description of the campaign.
Frequency. Possible values are:
• 1 = Very low
Frequency • 2 = Low int(5)
• 5 = Medium low
• 10 = Medium

Developer Manual 30
Use of RESTful APIs APIs Version 2

• 15 = Medium high
• 30 = High
• 50 = Very high
• 100 = Highest priority
Timezone of the campaign.
TimeZone varchar(64)
Define a “tzdata”-type value.
StartDate Start date of the campaign release. datetime
End date of the campaign release. If it is not defined, it will
last till the total allocated budget or the remaining founds
EndDate datetime
charged in the transactions for the campaigns by the
advertiser.
Timetable of the campaign.
The numeric value expresses the activation hours based on
Timetables the bits of the same from midnight. int(11)
1 activates midnight, 3 activates midnight and one, 7
activates midnight, one and two, etc.
The ID of the domain on which to run the campaign. If not
defined, the campaign will run across all domains.
Possible values are:
DomainID • -1 = Run the campaign across all domains. int(11)
domain.id = ID of the domain on which to run the campaign.
ID derived from the “domain” object.
The ID of the gateway on which to run the campaign. If not
defined, the campaign will run across all gateways.
Possible values are:
GatewayID • -1 = Run the campaign across all gateways. int(11)
gateway.id = ID of the gateway on which to run the
campaign.
ID derived from the “gateway” object.
The ID of the manager on which to run the campaign. If not
defined, the campaign will run across all managers.
Possible values are:
ManagerTypeID • -1 = Run the campaign across all managers. int(11)
• managertype.id = ID of the manager on which to run the
campaign.
ID derived from the “managertype” object.
URL Destination URL. varchar(512)
TotalBudget Total budget. double
DailyBudget Daily dudget. double
ClickPrice Cost charged to the campaign for every click of the users. double
Cost charged to the campaign for every impression of the
ImpressionPrice double
users.
Address Address to refer when calculating GPS coordinates. varchar(100)
City City to calculate GPS coordinates. varchar(100)
Country code to calculate GPS coordinates.
Country varchar(100)
Define the value in ISO 3166-1 alpha-2 format.
Longitude Longitude to refer for the campaing. varchar(20)

Developer Manual 31
Use of RESTful APIs APIs Version 2

Used to activate campaigns based on the distance from


the gateways.
Latitude to refer for the campaing.
Latitude Used to activate campaigns based on the distance from varchar(20)
the gateways.
RadiusInMeters Radius in meters from the gateways. float
When enabled, the campaign is also displayed to users who
ShowToAnonimousUsers have not been recognized via MAC address or have not int(1)
logged in yet.
Filters to profile users. The campaign is displayed only to
users who are recognized and who match the target defined
by the filters.
The available fields are:
• user.CreationDate
• user.City
• user.Country
• user.EMailAddress
• user.ERPCode
• user.Expiration (Field calculated based on the expiration
of the product assigned to the user)
• user.Expired (Field calculated based on the expiration of
TargetFilters the product assigned to the user) longtext
• user.Gender
• user.Locked
• user.AcceptMkt
• user.id
• user.ProductID
• user.State
• user.SubscribeNewsletters
• user.YearOfBirth
• user.Zip
Il filtro definisce i criteri di ricerca come per la proprietà
“where” nei comandi “find”.
Define Video Display Mode.
The possible values are:
VideoPlayMode • 0 = Autoplay and When Possible Unmuted int(1)
• 1 = Autoplay and Always Mute
• 2 = No Autoplay and Unmuted
Notes Notes. longtext
Locked If enabled, blocks the campaign. tinyint(1)
Defines the intro type of the Welcome Portal.
Possible values are:
• 0 = None
• 5= Image from file
PortalIntroType int(2)
• 10 = Static image
• 40 = Flickr image from photo set
• 60 = YouTube video
• 70 = External URL

Developer Manual 32
Use of RESTful APIs APIs Version 2

• 80 = MP4 external video


• 90 = MP4 video from file
PortalIntroImageFromFil Image type for the Intro, uploaded from file.
varchar(40)
eImgType Read-only property.
URL to redirect the users to when they click on the static
PortalIntroStaticImageU image of the intro.
varchar(255)
RL
Read-only property.
PortalIntroVideoFromFil Defines the type of video to show in the intro.
varchar(40)
eType Read-only property.
PortalIntroVideoFromFil Defines the video to show in the intro.
longblob
e Proprietà in sola lettura.
Defines the type of image to show as a poster when the
PortalIntroVideoPosterI video is not yet running.
varchar(40)
mgType
Read-only property.
PortalIntroFlickrPhotoSe Name of the Flickr photo set assigned to the set of images
varchar(255)
t to display.
List of YouTube video IDs, separated by commas.
PortalIntroYoutubeVideo
If you define multiple IDs, they will be displayed varchar(255)
ID
randomly.
External URL without the http:// prefix that contains the
PortalIntroExternalURL varchar(255)
page to display in the intro.
URL to direct the users to when they click on the intro
PortalIntroURL varchar(255)
videos.
PortalIntroVideoURL URL of the MP4 external video to display in the intro. varchar(255)
PortalIntroMinSeconds Seconds of visualization. int(4)
Display time of the banners expressed in seconds.
ImpressionTime int(11)
A value equal to zero defines an infinite time.
Type of banner image to display at the top.
TopBannerImgType varchar(40)
Read-only property.
URL to redirect the users to when when they click on the top
TopBannerImgLink varchar(255)
banner.
Type of banner image to display on the left.
LeftBannerImgType varchar(40)
Read-only property.
URL to redirect the users to when when they click on the left
LeftBannerImgLink varchar(255)
banner.
Type of banner image to display on the right.
RightBannerImgType varchar(40)
Read-only property.
URL to redirect the users to when when they click on the
RightBannerImgLink varchar(255)
right banner.
Type of injection. Possible values are:
• 0 = None
• 10 = Static image
COINType int(2)
• 40 = Flickr image from photo set
• 60 = YouTube video
• 70 = External URL

Developer Manual 33
Use of RESTful APIs APIs Version 2

• 80 = MP4 external video


Number of seconds to display before the skippiging button
COINSkipTime int(11)
appears in the injected objects.
List of YouTube video IDs to inject, separated by commas.

COINYoutubeVideoID If you define multiple IDs, they will be displayed varchar(255)


randomly.
Only available with COINType = 60
URL of the website to show or, for the video, the URL to
redirect the users to when they click on the info icon of the
COINExternalURLLink injectected contents. varchar(255)

Only available with COINType = 70


URL of the MP4 external video to be displayed in the
COINVideoURL injected content. varchar(255)
Only available with COINType = 80
Defines the image to display as a poster when the video is
COINVideoPosterImgTyp not yet running.
varchar(40)
e Only available with COINType = 80
Read-only property.
Position of the image one of the injection.
Possible values are:
• 0 = Bottom
COINImage1Position • 1 = Top int(2)
• 2 = Center
• 3 = Full screeen.
Only available with COINType = 10
Size of the image one of the injection. Possible values are:
• 0 = 200 x 200
• 1 = 250 x 250
• 2 = 320 x 75
• 3 = 320 x 100
COINImage1Size • 4 = 320 x 200 int(2)
• 5 = 320 x 450
• 6 = 720 x 200
• 7 = 720 x 300
• 8 = 720 x 450.
Only available with COINType = 10
URL to redirect the users to when they click on the image
COINImage1Link one. varchar(255)
Only available with COINType = 10
Image one displayed in the injection.
COINImage1Type Only available with COINType = 10 varchar(40)
Read-only property.
Position of the image two of the injection.
COINImage2Position Possible values are: int(2)
• 0 = Bottom

Developer Manual 34
Use of RESTful APIs APIs Version 2

• 1 = Top
• 2 = Center
• 3 = Full screeen.
Only available with COINType = 10
Size of the image two of the injection. Possible values are:
• 0 = 200 x 200
• 1 = 250 x 250
• 2 = 320 x 75
• 3 = 320 x 100
COINImage2Size • 4 = 320 x 200 int(2)
• 5 = 320 x 450
• 6 = 720 x 200
• 7 = 720 x 300
• 8 = 720 x 450.
Only available with COINType = 10
URL to redirect the users to when they click on the image
COINImage2Link two. varchar(255)
Only available with COINType = 10
Image two displayed in the injection.
COINImage2Type Only available with COINType = 10 varchar(40)
Read-only property.
Position of the image three of the injection.
Possible values are:
• 0 = Bottom
COINImage3Position • 1 = Top int(2)
• 2 = Center
• 3 = Full screeen.
Only available with COINType = 10
Size of the image three of the injection.
Possible values are:
• 0 = 200 x 200
• 1 = 250 x 250
• 2 = 320 x 75
• 3 = 320 x 100
COINImage3Size • 4 = 320 x 200 int(2)
• 5 = 320 x 450
• 6 = 720 x 200
• 7 = 720 x 300
• 8 = 720 x 450.
Only available with COINType = 10
URL to redirect the users to when they click on the image
COINImage3Link three. varchar(255)
Only available with COINType = 10
Image three displayed in the injection.
COINImage3Type varchar(40)
Only available with COINType = 10

Developer Manual 35
Use of RESTful APIs APIs Version 2

Read-only property.
Defines the position where to display the injection content
COINExternalURLPositio for the external URL.
int(2)
n
Only available with COINType = 70
Size of the rectangle that contains the content to be
displayed (Width x Height). Possible values are:
• 0 = 200 x 200
• 1 = 250 x 250
• 2 = 320 x 75
• 3 = 320 x 100
COINExternalURLSize • 4 = 320 x 200 int(2)
• 5 = 320 x 450
• 6 = 720 x 200
• 7 = 720 x 300
• 8 = 720 x 450.
Only available with COINType = 70
PortalIntroImageFromFil Image type for the Intro, uploaded from file.
mediumblob
eImg Read-only property.
Image displayed as a poster when the video is not yet
PortalIntroVideoPosterI running. mediumblob
mg
“Image”-type property.
Image displayed as a poster for the injection when the video
COINVideoPosterImg is not yet. mediumblob
“Image”-type property.
Banner image to displayed at the top.
TopBannerImg Recommended size 700 x 100 pixels. mediumblob
“Image”-type property.
Banner image to displayed on the left.
LeftBannerImg Recommended size 200 x 720 pixels. mediumblob
“Image”-type property.
Banner image to displayed on the right.
RightBannerImg Recommended size 200 x 720 pixels. mediumblob
“Image”-type property.
Image 1 for the injection.
COINImage1 mediumblob
“Image”-type property.
Image 2 for the injection.
COINImage2 mediumblob
“Image”-type property.
Image 3 for the injection.
COINImage3 mediumblob
“Image”-type property.

Developer Manual 36
Use of RESTful APIs APIs Version 2

cardAdd
The "cardAdd" endpoint allows you to create cards for a domain.

Example:
$Endpoint = 'cardAdd';
$Data = '{"DomainID":"123", "ProductID":"345", "SellPrice":"2.5", "Language":"en",
"Quantity":"10"}';

Proprietà:
Name Comment Type
Domain ID.
DomainID Mandatory. int(11)
ID derived from the “domain” object.
Product ID.
ProductID Mandatory int(11)
ID derived from the “product” object.
SellPrice Sale price. float
Language code for the users.
Language Define the value in ISO 3166-1 alpha-2 format. varchar(2)
Optional.
Number of cards to generate.
Quantity If not defined, the default is equal to one. int(11)
The maximum number is one thousand.

Properties returned:
Name Comment
UserID UserID array of the “user” object of the generated cards.

Developer Manual 37
Use of RESTful APIs APIs Version 2

certificateRead, certificateWrite, certificateFind e certificateDelete


The “certificate” object allows you to manage SSL certificate data.
When searching using the “Find” command, you can use various objects with the following hierarchy
depending on the usage context:
certificate manager reseller

certificate reseller

certificate

Example of a call that reads data:


$Endpoint = 'certificateRead';
$Data = '{"id":"123"}';

Example of a call that searches for data by certificate description:


$Endpoint = 'certificateFind';
$Data = '{"Where":"certificate.Description=\"MyCertificate\""}';

Example of a call that searches for data by ID:


$Endpoint = 'certificateFind';
$Data = '{"Where":"certificate.id=123"}';

Example of a call that adds:


$Endpoint = 'certificateWrite';
$Data = '{"id":"0", "Description":"MyCertificate"}';

Example of a call that modifies data:


$Endpoint = 'certificateWrite';
$Data = '{"id":"123", "Description":"MyCertificate"}';

Example of a call that deletes data:


$Endpoint = 'certificateDelete';
$Data = '{"id":"123"}';

Available properties:
Name Comment Type
Object ID.
id If you need to add, pass the value zero in this property. int(11)
Read-only property.
Date when the object was created. Automatically assigned
CreationDate when you add it. timestamp
Read-only property.
Reseller ID.

ResellerID ID derived from the “reseller” object. int(11)


Define it only if you are managing a reseller's
certificates.
Manager ID.

ManagerID ID derived from the “manager” object. int(11)


Define it only if you are managing a manager's
certificates.
Description Comment description of the certificate. varchar(128)

Developer Manual 38
Use of RESTful APIs APIs Version 2

Private certificate and not visible in sublevels.


Private For managers’ certificates, it is always equal to zero so int(1)
that they are visible in the gateway.
Domain associated with the uploaded certificate.
Domain varchar(128)
Read-only property.
Domain of the certification authority that issued the
certificate.
CADomain varchar(128)
Unsearchable using find.
Read-only property.
Effective start date of the certificate.
FromDate datetime
Read-only property.
Effective end date of the certificate.
ToDate datetime
Read-only property.
Certificate KEY file for SSL connections.
KeyData text
Può essere auto generato dal comando 'Genera CSR'.
Certificate CRT file for SSL connections. Upload the CA-
released CRT file.
This file is closely linked to the KEY file (private key) that
CrtData was self generated by the generation of the CSR or text
manually uploaded.
If the CRT file does not match with the CSR and the KEY
file, an error will occur.
intermediate certificate(s) Intermediate certificate(s) in CRT
format.
IntermediateData Define the certificate(s) of the intermediate certification text
authorities if the certificate has been issued by an
intermediate certification authority.

Developer Manual 39
Use of RESTful APIs APIs Version 2

domainfederationgroupRead, domainfederationgroupWrite, domainfederationgroupFind


e domainfederationgroupDelete
The “domainfederationgroup” object allows you to manage data of domain federation groups.
When searching using the “Find” command, depending on the use of the data, you can use various
objects with the following hierarchy:
domainfederationgroup manager reseller

domainfederationgroup reseller

domainfederationgroup

Example of a call that reads data:


$Endpoint = 'domainfederationgroupRead';
$Data = '{"id":"123"}';

Example of a call that searches for data by description:


$Endpoint = 'domainfederationgroupFind';
$Data = '{"Where":"domainfederationgroup.Description=\"MyFederation\""}';

Example of a call that searches for data by ID:


$Endpoint = 'domainfederationgroupFind';
$Data = '{"Where":"domainfederationgroup.id=123"}';

Example of a call that adds:


$Endpoint = 'domainfederationgroupWrite';
$Data = '{"id":"0", "Description":"MyFederation"}';

Example of a call that modifies data:


$Endpoint = 'domainfederationgroupWrite';
$Data = '{"id":"123", "Description":"MyFederation"}';

Example of a call that deletes data:


$Endpoint = 'domainfederationgroupDelete';
$Data = '{"id":"123"}';

Available properties:
Name Comment Type
Object ID.
id If you need to add, pass the value zero in this property. int(11)
Read-only property.
Date when the object was created. Automatically assigned
CreationDate when you add it. timestamp
Read-only property.
Reseller ID.

ResellerID ID derived from the “reseller” object. int(11)


Required if you are treating federation groups for a
reseller's domains.
Manager ID.

ManagerID ID derived from the “manager” object. int(11)


Required if you are treating federation groups for a
manager's domains.

Developer Manual 40
Use of RESTful APIs APIs Version 2

Description Description of the federation group for the domains. varchar(100)


Notes Notes. longtext

Developer Manual 41
Use of RESTful APIs APIs Version 2

domainRead, domainWrite, domainFind, domainDelete and domainCount


The “domain” object allows you to manage user domain data.
When searching using the “Find” and “Count” commands, you can use various objects with the following
hierarchy:

domain manager reseller

Example of a call that reads data:


$Endpoint = 'domainRead';
$Data = '{"id":"123"}';

Example of a call that searches for data by domain name:


$Endpoint = 'domainFind';
$Data = '{"Where":"domain.DomainName=\"MyDomainName\""}';

Example of a call that searches for data by ID:


$Endpoint = 'domainFind';
$Data = '{"Where":"domain.id=123"}';

Example of a call that adds:


$Endpoint = 'domainWrite';
$Data = '{"id":"0", "DomainName":"MyDomain","ManagerID=123}';

Example of a call that modifies data:


$Endpoint = 'domainWrite';
$Data = '{"id":"123", "DomainName":"MyDomain"}';

Example of a call that deletes data:


$Endpoint = 'domainDelete';
$Data = '{"id":"123"}';

Available properties:
Name Comment Type
Object ID.
id If you need to add, pass the value zero in this property. int(11)
Read-only property.
Date when the object was created. Automatically assigned
CreationDate when you add it. timestamp
Read-only property.
Manager ID.
ManagerID ID derived from the “manager” object. int(11)
Mandatory when adding.
Domain name.
DomainName varchar(50)
Mandatory when adding.
Authentication modes. Possible values are:
• 0 = Click & connect. No registration, no password
• 1 = Simple password. No registration
• 2 = With sending an SMS by the user
AuthenticationMode int(2)
• 3 = With registration by the user
• 4 = Con With operator registration
• 5 = PPPoE
• 6 = With registration by the user without password

Developer Manual 42
Use of RESTful APIs APIs Version 2

• 7 = With social registration by the user


• 8 = OTP (One Time Password) Sent via SMS
• 10 = QR Code & Connect. No registration, no password
Array with ID values of domain federations assigned to the
domain.
The values contained in each element of the array are
FederationGroups explained in the next paragraph “Array of Values array()
Contained in the Domain’s "FederationGroups"
Property”.
IDs derived from the “domainfederationgroup” object.
Access PIN for the gateways that need an authentication.
Pin varchar(200)
Similar to a WPA
Template ID. Possible values are:
• 0 = Use default
TemplateID • Other value = Template ID int(11)

ID derived from the “wptemplate” object.


UseTemplateColor Color scheme to use for the template. int(11)
Type of user interface. Possible values are:
UserInterfaceType • 10 = Welcome Portal (Lite) int(2)
• 20 = Welcome Portal
Advertising. Possible values are:
• 0 = Enable
Advertising smallint(2)
• 10 = Only for campaigns in this domain
• 20 = Disable
Surveys. Possible values are:
• 0 = Disable
Survey int(1)
• 1 = Enable, one at a time
• 2 = Enable, all those provided
ComplimentaryAccess Enable complimentary access. int(1)
Acceptance of the conditions for complimentary login.
ComplimentaryAccessAc Possible values are:
int(1)
ceptanceConditions • 0 = No
• 1 = Yes
ComplimentaryAccessPa
Complimentary password. varchar(50)
ssword
ComplimentaryAccessPr Product ID for the complimentary access.
int(1)
oductID ID derived from the “product” object.
ComplimentaryAccessRe Reassigns the product at the expiration or at the exhaustion
int(1)
assignProduct of time or of total traffic
Enable or disable the advertising injection.
Possible values are:
• 0 = Disable
Injection • 1 = Enable smallint(2)
It is also conditioned by the product assigned to the
user. If the product is disabled, this property is treated
as disabled.

Developer Manual 43
Use of RESTful APIs APIs Version 2

Number of seconds to elapse before performing the first


InjectionStartSeconds int(11)
injection of advertising contents.
InjectionFrequencySecon
Frequency of injection contents expressed in seconds. int(11)
ds
Declares whether to display the toolbar that allows the user
InjectionShowToolBar smallint(1)
to return to the Welcome Portal while browsing.
InjectionInWelcomePort
If enabled, injects content also in the Welcome Portal. smallint(2)
al
Array with IDs of the custom Apps to upload to the Welcome
Portal.

CustomApps The values contained in each element of the array are array()
explained in the next paragraph “Array of Values
Contained in the Domain’s "CustomApp" Property”.
IDs derived from the “wpcustomapp” object.
Defines how the username is generated or defined.
Possible values are:
• 0 = Auto generated
• 1 = Use the mobile number
• 2 = Use the mobile number. Auto generated with
registration by social login
• 3 = Entered by the user
RegistrationRequestUser
• 4 = Entered by the user. Auto generated with tinyint(2)
Name
registration by social network
• 5 = Use the email address
• 6 = Use the email address. Auto generated with
registration by social network
• 7 = Use the MAC address
• 8 = Use the room or pitch number (Only for integration
with ERP/PMS)
When registering, requests the mobile phone.
Possible values are:
• 0 = No
RegistrationRequestMob • 1 = Yes
tinyint(1)
ile • 2 = Yes but not with registration by social network
• 3 = Yes not mandatory
• 4 =Yes not mandatory but not with registration by social
network
When registering, the user can choose the password.
Possible values are:
• 0 = No
• 1 = Yes
• 2 = Yes but not with registration by social network
RegistrationRequestPass
• 3 = Yes not mandatory tinyint(1)
word
• 4 = Yes not mandatory but not with registration by social
network
• 7 = No. Use the MAC address
• 10 = No. Use the last name (Only for integration with
ERP/PMS)

Developer Manual 44
Use of RESTful APIs APIs Version 2

• 11 = No. Use the first name (Only for integration with


ERP/PMS)
• 12 = No. Use the mobile phone number (Only for
integration with ERP/PMS)
• 13 = No. Use the email address (Only for integration with
ERP/PMS)
When registering, requests the company name.
Possible values are:
• 0 = No
RegistrationRequestCom • 1 = Yes
tinyint(1)
panyName • 2 = Yes but not with registration by social network
• 3 = Yes not mandatory
• 4 =Yes not mandatory but not with registration by social
network
When registering, requests the gender. Possible values are:
• 0 = No
• 1 = Yes
RegistrationRequestGen
• 2 = Yes but not with registration by social network tinyint(1)
der
• 3 = Yes not mandatory
• 4 =Yes not mandatory but not with registration by social
network
When registering, requests the last name.
Possible values are:
• 0 = No
RegistrationRequestLast • 1 = Yes
tinyint(1)
Name • 2 = Yes but not with registration by social network
• 3 = Yes not mandatory
• 4 =Yes not mandatory but not with registration by social
network
When registering, requests the first name.
Possible values are:
• 0 = No
RegistrationRequestFirst • 1 = Yes
tinyint(1)
Name • 2 = Yes but not with registration by social network
• 3 = Yes not mandatory
• 4 =Yes not mandatory but not with registration by social
network
When registering, requests the address. Possible values are:
• 0 = No
• 1 = Yes
RegistrationRequestAddr
• 2 = Yes but not with registration by social network tinyint(1)
ess
• 3 = Yes not mandatory
• 4 =Yes not mandatory but not with registration by social
network
When registering, requests the postcode/ZIP.
Possible values are:
RegistrationRequestZip • 0 = No tinyint(1)
• 1 = Yes
• 2 = Yes but not with registration by social network

Developer Manual 45
Use of RESTful APIs APIs Version 2

• 3 = Yes not mandatory


• 4 =Yes not mandatory but not with registration by social
network
When registering, requests the city. Possible values are:
• 0 = No
• 1 = Yes
RegistrationRequestCity • 2 = Yes but not with registration by social network tinyint(1)
• 3 = Yes not mandatory
• 4 =Yes not mandatory but not with registration by social
network
When registering, requests the state. Possible values are:
• 0 = No
• 1 = Yes
RegistrationRequestStat
• 2 = Yes but not with registration by social network tinyint(1)
e
• 3 = Yes not mandatory
• 4 =Yes not mandatory but not with registration by social
network
When registering, requests the country.
Possible values are:
• 0 = No
RegistrationRequestCou • 1 = Yes
tinyint(1)
ntry • 2 = Yes but not with registration by social network
• 3 = Yes not mandatory
• 4 =Yes not mandatory but not with registration by social
network
When registering, requests the year of birth.
Possible values are:
• 0 = No
RegistrationRequestYear • 1 = Yes
tinyint(1)
OfBirth • 2 = Yes but not with registration by social network
• 3 = Yes not mandatory
• 4 =Yes not mandatory but not with registration by social
network
RegistrationRequestMini Defines the minimum age allowed for registration and use
int(11)
mumAge this service.
When registering, requests the fiscal code or VAT-Id
number. Possible values are:
• 0 = No
RegistrationRequestFisca • 1 = Yes
tinyint(1)
lCode • 2 = Yes but not with registration by social network
• 3 = Yes not mandatory
• 4 =Yes not mandatory but not with registration by social
network
When registering, requests the email. Possible values are:
• 0 = No
RegistrationRequestEMa
• 1 = Yes tinyint(1)
il
• 2 = Yes but not with registration by social network
• 3 = Yes not mandatory

Developer Manual 46
Use of RESTful APIs APIs Version 2

• 4 =Yes not mandatory but not with registration by social


network
When registering, requests the phone number.
Possible values are:
• 0 = No
RegistrationRequestPho • 1 = Yes
tinyint(1)
ne • 2 = Yes but not with registration by social network
• 3 = Yes not mandatory
• 4 =Yes not mandatory but not with registration by social
network
When registering, requests the fax number.
Possible values are:
• 0 = No
• 1 = Yes
RegistrationRequestFax tinyint(1)
• 2 = Yes but not with registration by social network
• 3 = Yes not mandatory
• 4 =Yes not mandatory but not with registration by social
network
When registering, requests the room or pitch number.
Possible values are:
• 0 = No
RegistrationRequestRoo • 1 = Yes
tinyint(2)
mOrSite • 2 = Yes but not with registration by social network
• 3 = Yes not mandatory
• 4 =Yes not mandatory but not with registration by social
network
When registering, requests the user to consent to marketing
activities. Possible values are:
• 0 = No
RegistrationRequestAcce • 1 = Yes
tinyint(1)
ptMkt • 2 = Yes but not with registration by social network
• 3 = Yes not mandatory
• 4 =Yes not mandatory but not with registration by social
network
When registering, requests the user to consent to the
newsletter sending. Possible values are:
• 0 = No
RegistrationRequestSubs • 1 = Yes
tinyint(2)
cribeNewsletters • 2 = Yes but not with registration by social network
• 3 = Yes not mandatory
• 4 =Yes not mandatory but not with registration by social
network
When registering, requests the CAPTCHA code validation.
Possible values are:
RegistrationRequestCapt • 0 = No
tinyint(1)
cha • 1 = Yes
• 2 = Yes but not with registration by social network
• 3 = Yes not mandatory

Developer Manual 47
Use of RESTful APIs APIs Version 2

• 4 =Yes not mandatory but not with registration by social


network
When registering, requests the user to consent to Terms of
Use. Possible values are:
• 0 = No
RegistrationRequestCon
• 1 = Yes tinyint(1)
ditions
• 5 = Yes, also at every sign in
• 6 = Yes (Use only if authentication modes are set without
registration with value equal to zero or one)
When registering, requests the user to consent to personal
RegistrationRequestAcce data process. Possible values are:
int(3)
ptPrivacyPolicy • 0 = No
• 1 = Yes
If users enter incorrect or non-existing credentials, they
AutoRegistration smallint(3)
automatically proceed to registration.
Enables to display the credentials for self-registered users.
Possible values are:
• 0 = No
RegistrationShowCreden • 1 = To all
int(2)
tials • 2 = Only to national calling codes
• 3 = Only to national or foreign calling codes accepted
• 4 = Only to foreign calling codes
• 5 = Only to foreign calling codes not accepted
ShowConfirmRegistratio At the end of the registration, a form appears with the
tinyint(1)
n successful registration message
If the requested data to the user are incomplete, request
the user to complete. Possible values are:
RegistrationRequestMiss
• 0 = No tinyint(1)
ingData
• 1 = Yes, only if mandatory fields are missed
• 2 = Yes
If you need to ask missing data to the user, this option
allows displaying also the already completed data.
RegistrationRequestMiss Possible values are:
tinyint(1)
ingDataShowFields • 0 = Only missing fields
• 1 = All the fields. Disable the completed ones
• 2 = All the fields. Completed fields can also be edited
At the end of the registration or of a recharge, it performs
AutoLoginAfterRegistrati
the self-login without asking the user to press the tinyint(1)
on
appropriate button.
At login, redirects the user to the URL requested by the
same user or to one of the URLs entered in the
“RegistrationCustomURLForDataValidation” field.
AutoSurfAfterLogin Possible values are: int(1)
• 0 = No
• 1 = Yes, in a new tab
• 2 = Si, in the current tab
Defines any the custom URL of the page that will have to
RegistrationCustomURLF
validate the user's registration data. The page will have to varchar(255)
orDataValidation
perform the appropriate verifications on the data entered

Developer Manual 48
Use of RESTful APIs APIs Version 2

by the user and will have to return any code and error
description.
Please, refer to the "Custom validation of user
registration data" paragraph for further details on how
the data are passed and returned.
Mask for generating usernames. It can include: X =
uppercase alphanumeric, x = lowercase alphanumeric, C
uppercase consonant, c lowercase consonant, V uppercase
vowel, v lowercase vowel, N or n numeric (no zero).
UsernameMask If you don’t specify it, it will use the properties defined varchar(20)
in the “System Settings”.
Define at least three valid characters.
Warning! A too restrictive form on a domain containing
many users, may cause registration problems.
Mask for generating passwords. It can include: X =
uppercase alphanumeric, x = lowercase alphanumeric, C
uppercase consonant, c lowercase consonant, V uppercase
PasswordMask vowel, v lowercase vowel, N or n numeric (no zero). varchar(20)

If you don’t specify it, it will use the properties defined


in the “System Settings”.
Defines the complexity that passwords must have for users.
Possible values are:
• 0 = Use default (Defined in the System Settings)
• 1 = None
• 2 = Very weak
PasswordComplexity int(1)
• 3 = Weak
• 4 = Reasonable
• 5 = Strong
• 6 = Very strong

To confirm the registration, the user has to send an SMS,


writing in the text the domain name.
Possible values are:
• 0 = No
SMSConfirmation • 1 = To all int(2)
• 2 = Only to national calling codes
• 3 = Only to national or foreign calling codes accepted
• 4 = Only to foreign calling codes
• 5 = Only to foreign calling codes not accepted
If a user attempts to perform a second registration with the
same mobile number, an SMS confirmation is required. It is
AuthCodeConfirmation also asked when an already registered user tries to login via tinyint(1)
social network using a device with a MAC address different
from that of the first registration
Allows the users who self-register by SMS to send the
PasswordByUserSMS tinyint(1)
password. They will send domain name space.
SendMaxSMS Maximum number of SMSs sendable to each user. int(11)
SendMaxSMSTimeLimit Time limit for calculating the number of SMSs sent. int(11)

Developer Manual 49
Use of RESTful APIs APIs Version 2

Possible values are:


• 0 = Total
• 1 = Every minute
• 2 = Every 2 minutes
• 3 = Every 3 minuti
• 4 = Every 4 minutes
• 5 = Every 5 minutes
• 10 = Every 10 minutes
• 15 = Every 15 minutes
• 30 = Every 30 minutes
• 60 = Every hour
• 120 = Every 2 hours
• 240 = Every 3 hours
• 360 = Every 3 hours
• 480 = Every 8 hours
• 720 = Every 12 hours
• 1440 = Every day
If enabled, upon the registration confirmation, an SMS
confirmation is sent to the user notifying the login
credentials.
Possible values are:
• 0 = No
SMSNotification int(2)
• 1 = To all
• 2 = Only to national calling codes
• 3 = Only to national or foreign calling codes accepted
• 4 = Only to foreign calling codes
• 5 = Only to foreign calling codes not accepted
SMS text notification to be sent to users with the login
credentials. It is possible to use the following variables:
%UserName%; %Password%; %FirstName%; %LastName%;
SMSNotificationText %Domain%; %SmsNumber%; %SmsNumber2%. longtext

Define a maximum of 160 characters.


Multi-language property.
UseIntPhonePrefixSelfUs For the user self activation of the domain, it considers
tinyint(1)
erActiv defined the country calling codes.
List of international calling codes, separated by comma,
IntPhonePrefixSelfUserA accepted for self-activation of users.
varchar(255)
ctiv
If you don’t declare them, all calling codes are valid.
EnableNoIntPhonePrefix Enable the redirection for users with unaccepted calling
tinyint(1)
Redirect codes.
IntPhonePrefixRedirectU Redirect URL for users with calling codes not accepted.
varchar(150)
ponRegistrationURL
IntPhonePrefixDefault Proposes the country calling code of the system. tinyint(1)
EnableFacebookLogin Enables users to sign in with their Facebook account tinyint(1)
Complete URL (without HTTP://) or the Facebook page ID
FacebookFanPageURL varchar(200)
where users can click 'I Like' on or 'Publish a post' to
FacebookPublishUponCo When the users registrer or login with Facebook, it has the
int(11)
nnection possibility to publish a post on their timeline.

Developer Manual 50
Use of RESTful APIs APIs Version 2

Possible values are:


• 0 = No
• 1 = Yes
EnableTwitterLogin Enables users to sign in with their Twitter account. tinyint(1)
Twitter username that users can follow (follower). When
TwitterFollowerUser varchar(50)
users log in, they may click 'follow' before surfing.
EnableGoogleLogin Enables users to sign in with their Google account. tinyint(1)
EnableLinkedinLogin Enables users to sign in with their LinkedIn account. tinyint(1)
EnableInstagramLogin Enables users to sign in with their Instagram account. tinyint(1)
EnableAmazonLogin Enables users to sign in with their Amazon account. tinyint(1)
EnableVKontakteLogin Enables users to sign in with their VKontakte account. tinyint(1)
EnableTurkishPublicIden Enables users to sign in with their Turkish Public
tinyint(1)
tificationLogin Identification account.
EnableCustomOAuth1Lo Enables users to sign in using “Custom OAuth1”
tinyint(1)
gin authentication.
EnableLDAPLogin Enables users to sign in using LDAP authentication. tinyint(1)
If enabled, at the registration it automatically performs a
check to verify if the email address, entered by the user,
exists by contacting the domain's MX server.
RegistrationVerifyEmail int(3)
Warning! In some cases, it is not possible to determine
the MX server and therefore the check cannot be
performed.
Upon registration confirmation, an email confirming the
EmailNotification tinyint(1)
login credentials will be sent to the user.
Upon registration confirmation, an email confirming the
login credentials will be sent to the user.
Possible values are:
• 0 = No
EmailNotificationManag
• 1 = Yes; it sends the email to the manager’s email tinyint(1)
er
address
• 2 = To specific addresses; it sends the email to the
address specified in the
“EmailNotificationManagerAddresses” property.
Indirizzi e-mail, separati dalla virgola, a cui inviare una mail
EmailNotificationManag
di conferma con le credenziali di accesso quando la varchar(255)
erAddresses
proprietà “EmailNotificationManager” è uguale a due.
Product ID assigned to users when email address is
EmailAddressValidationP validated.
int(11)
roductID
ID derived from the “product” object.
SendReceiptEmail Send mail with receipts. int(1)
Limits the registration for email domains specified,
RestrictsRegistrationForT
separated by comma. For example, if you need to limit the varchar(255)
heseEmailDomains
registration only to gmail users, enter gmail.com
A comma-separated list of URLs to use to redirect the users
when they press the 'Start browsing' button.
RedirectUponLogin text
In the URL, you can use the variables %UserName%,
%Password%, %EMailAddress%, etc.

Developer Manual 51
Use of RESTful APIs APIs Version 2

Example:
http://www.DomainName.com/ShowCredentials.php?User
name=%UserName%&Password=%Password%.
Redirect URL after the user registration process. In the URL,
you can use the variables %UserName%, %Password%,
RedirectUponRegistratio %EMailAddress%, etc.
varchar(150)
n Example:
http://www.DomainName.com/ShowCredentials.php?User
name=%UserName%&Password=%Password%.
Enables auto-login if the MAC address is recognized.
Possible values are:
• 0 = No
MACAddressAutoLogin tinyint(1)
• 1 = Yes, hide the username and password fields
• 2 = Yes, suggest and show the username and password
fields.
Expresses the expiration, in minutes, of the device
recognition with regard to the last session of the user.
MACAddressAutoLoginM
A value = 0 declares that there is no expiration. int(11)
axTime
A value less than zero, avoid proposing the last logged-
in username.
AutoRegistrationNotRec Switches automatically to registration the un recognized
int(1)
ognizedUsers devices/users.
AutoRechargeForRecogni Switches automatically to recharge ther devices/users who
int(1)
zedUsers are recognized and expired or have run out of time/traffic.
By activating this option, the user cannot register multiple
times from the same device. So, if a user logs in with a
Username and Password, he will no longer be able to make
further registrations using that device. In practice at the first
LimitSingleRegistrationB login, the system matches the user to the device and he
tinyint(1)
yMAC can't use any other user with different credentials. This
allows, for example, in the case of partially free domains, i.e.
with an initial free time, preventing various registrations
from the same device to take advantage n times of the free
time credit granted.
Array with the data of the domain-associated products.

Products The properties treated by each element of the array are array()
explained in the next paragraph “Array of Objects
Contained in the Domain’s "Product" Property”.
Assigns automatically the first free product when the users
AssignFreeProductUpon register the first time. Possible values are:
tinyint(1)
Registration • 0 = No
• 1 = Yes
Reassigns the free product when the users exhaust the
assigned product. Possible values are:
• 0 = Never
ReassignFreeProduct • 1 = At expiration or exhaustion tinyint(1)
• 2 = At expiration
• 3 = Al expiration or exhaustion with a charged product
• 4 = At expiration with a charged product

Developer Manual 52
Use of RESTful APIs APIs Version 2

Code type for vouchers. Possible values are:


• XXXX = A group of four alphanumeric characters
• XXXX-XXXX = Two groups of four alphanumeric
characters
• XXX-XXX-XXX = Three groups of three alphanumeric
characters
• XXXX-XXXX-XXXX = Three groups of four alphanumeric
characters
• XX-XX-XX-XX = Four groups of two alphanumeric
characters
• XXXX-XXXX-XXXX-XXXX = Four groups of four
VouchersCodeType varchar(50)
alphanumeric characters
• XXXXX-XXXX-XXXXX = Three groups of five
alphanumeric characters
• NNNN-NNNN = Two groups of four numbers
• NNN-NNN-NNN = Three groups of three numbers
• NNNN-NNNN-NNNN = Three groups of four numbers
• NN-NN-NN-NN = Four groups of two numbers
• NNN-NNN-NNN-NNN = Four groups of three numbers
• NNNN-NNNN-NNNN-NNNN = Four groups of four
numbers
• NNNNN-NNNN-NNNNN = Three groups of five numbers
Alternative language to display to users when the browser
language is not recognized or is not active.

DefaultLanguage Define the value in ISO 3166-1 alpha-2 format. varchar(2)


It will be used for the notifications sent to users by
SMS/email who register in domains using 'With sending
an SMS by the user' as registration mode.
LanguageEnableEn If enabled, allows users to view the login page in English. tinyint(1)
LanguageEnableEs If enabled, allows users to view the login page in Spanish. tinyint(1)
LanguageEnableFr If enabled, allows users to view the login page in French. tinyint(1)
LanguageEnableIt If enabled, allows users to view the login page in Italian. tinyint(1)
LanguageEnableDe If enabled, allows users to view the login page in German. tinyint(1)
If enabled, allows users to view the login page with the first
LanguageEnableL1 tinyint(1)
custom language.
If enabled, allows users to view the login page with the
LanguageEnableL2 tinyint(1)
second custom language.
If enabled, allows users to view the login page with the third
LanguageEnableL3 tinyint(1)
custom language.
To enable synchronization of the domain's users, enter the
MailchimpListID varchar(50)
MailChimp Audience.
Export type. Possible values are:
• 0 = Disabled
• 1 = Only users who consented to newsletter
MailchimpExportType • 2 = Only users who consented to marketing int(3)
• 3 = Only users who consented to newsletter and
marketing
• 10 = All users

Developer Manual 53
Use of RESTful APIs APIs Version 2

WiFi4EUNetworkIdentifi WiFi4EU Network Identifier. If defined it automatically


varchar(50)
er includes the requested snippet.
Enables the self-test mode. The self-test mode must be used
only for the autonomous validation of the portal. At the end
of the self-test, disable this value in order to return the
WiFi4EUSelftestModus int(3)
snippet to the normal operating mode and send the
monitoring data correctly to the Commission Abilita la
modalità di autotest.
considers automatically logged off users with a connection
active for more than the days you have defined.
Possible values are:
• 0 = Never
• 1 = 1 Day
• 2 = 2 Days
• 3 = 3 Days
ForceUserClosureDays smallint(3)
• 4 = 4 Days
• 5 = 5 Days
• 10 = 10 Days
• 15 = 15 Days
• 30 = 30 Days
• 60 = 60 Days
• 90 = 90 Days
Notes Notes text
Locked If enabled, blocks access to all users of the domain. tinyint(1)

Array of Values Contained in the Domain’s "FederationGroups" Property


The “FederationGroups” property of the “domain” class contains an array of values containing the IDs
of the Federation Groups assigned to the domain.

Example in "json" format with the IDs of two groups:


[21,27]

Array of Values Contained in the Domain’s "CustomApp" Property


The “CustomApp” property of the “domain” class contains an array of values containing the IDs of the
Custom Apps assigned to the domain.

Example in "json" format with the IDs of two Custom Apps:


[321,857]

Array of Objects Contained in the Domain’s "Product" Property


The “Product” property of the “domain” class contains an array of objects containing the properties of
the Products assigned to the domain.

The following properties are available for each array element:


Name Comment Type
Object ID.
id If you need to add, pass the value zero in this property. int(11)
Property is ignored if you are adding a new domain.

Developer Manual 54
Use of RESTful APIs APIs Version 2

Read-only property.
Product ID.
ProductID int(11)
ID derived from the “product” object.
Price of the product.
Price If the price is equal to zero, the product is to be float
considered free without the need for payment by users.
Usable with standard registration not with social networks.
Possible values are:
WhenStandard int(1)
• 0 = Not usable in standard registration
• 1 = Usable with standard registration
Usable when registering with social networks.
Possible values are:
WhenSocialLogin int(1)
• 0 = Not usable with social netwoks
• 1 = Usable with social netwoks
Usable when recharging. Possible values are:
WhenRecharge • 0 = Not usable when recharging int(1)
• 1 = Usable when recharging
Name of the product group displayed in the “HSNM
PrintableGroup varchar(32)
Printer”.
Printable on cards with the “HSNM Hotspot Manager
Printer”. Possible values are:
PrintableOnCard int(1)
• 0 = Non per la stampa delle card
• 1 = Utilizzabile per la stampa delle card
Printable on vouchers with the “HSNM Printer”.
Possible values are:
PrintableOnVoucher int(1)
• 0 = Non per la stampa dei voucher
• 1 = Utilizzabile per la stampa dei voucher
Display order on a zero basis.
Order int(11)
Progressive value to maintain the display order.

Example in "json" format with two products:


[
{
"id":781,
"ProductID":"54",
"Price":"0",
"WhenStandard":"1",
"WhenSocialLogin":"1",
"WhenRecharge":"1",
"PrintableGroup":"",
"PrintableOnCard":"1",
"PrintableOnVoucher":"0",
"Order":"0"},
{
"id":785,
"ProductID":"273",
"Price":"10",
"WhenStandard":"1",

Developer Manual 55
Use of RESTful APIs APIs Version 2

"WhenSocialLogin":"1",
"WhenRecharge":"1",
"PrintableGroup":"",
"PrintableOnCard":"1",
"PrintableOnVoucher":"0",
"Order":"1"}
]

Developer Manual 56
Use of RESTful APIs APIs Version 2

domainnotificationsRead, domainnotificationsWrite
The “domainnotifications” object allows you to manage the domain-configured notification data.

Example of a call that reads data:


$Endpoint = 'domainnotificationsRead';
$Data = '{}';

Example of a call that modifies data:


$Endpoint = 'domainnotificationsWrite';
$Data = '{"SmsNotificationText":"<en>Thanks for your subscription to hotspots %Domain%.
You can login as user %username% and Password %password%</en>"}';

Available properties:
Name Comment Type
Notification SMS text to send to users notifying the login longtext
credentials. You can use the following variables:
SmsNotificationText %UserName%; %Password%; %FirstName%; %LastName%;
%Domain%; %SmsNumber%; %SmsNumber2%.
Multilingual property.
Subject of the email to send to users notifying the login longtext
EmailNotificationSubject credentials.
Multilingual property.
Text of the email to send to users notifying the login longtext
EmailNotificationText credentials
Multilingual property.
Subject of the email to send to the manager notifying the longtext
EmailNotificationSubject login credentials.
Manager
Multilingual property.
EmailNotificationTextMa HTML of the email to send to the manager for registration. longtext
nager Multilingual property.
EmailFollowUpEnabled Enables follow-up email to be sent to users. int(1)
Defines after how many days upon the first connection, you int(3)
EmailFollowUpAfterDays
want to send the follow-up email to user.
Subject of the follow-up email to send to users. longtext
EmailFollowUpSubject
Multilingual property.
Text of the follow-up email to send to users. longtext
EmailFollowUpText
Multilingual property..

Developer Manual 57
Use of RESTful APIs APIs Version 2

domainwplanguagesRead, domainwplanguagesWrite
The “domainwplanguages” object allows you to manage the language data for the Welcome Portal
defined at domain level.

Example of a call that reads data:


$Endpoint = 'domainwplanguagesRead';
$Data = '{"id":"123"}';

Example of a call that modifies data:


$Endpoint = 'domainwplanguagesWrite';
$Data = '{"id":"123", "CustomLang1ImgText":"<en>MyLanguage</en>"}';

Available properties:
Name Comment Type
Object ID of “domain” type.
id int(11)
Read-only property.
Image type uploaded for the flag of the English language.
ENLangImgType varchar(40)
Read-only property.
Image displayed for the flag of the English language. It must
ENLangImg mediumblob
have a size of 24 x 18 pixels.
Image type uploaded for the flag of the Spanish language.
ESLangImgType varchar(40)
Read-only property.
Image displayed for the flag of the Spanish language. It must
ESLangImg mediumblob
have a size of 24 x 18 pixels.
Image type uploaded for the flag of the French language.
FRLangImgType varchar(40)
Read-only property.
Image displayed for the flag of the French language. It must
FRLangImg mediumblob
have a size of 24 x 18 pixels.
Image type uploaded for the flag of the Italian language.
ITLangImgType Varchar(40)
Read-only property.
Image displayed for the flag of the Italian language. It must
ITLangImg Mediumblob
have a size of 24 x 18 pixels.
Image type uploaded for the flag of the German language.
DELangImgType varchar(40)
Read-only property.
Image displayed for the flag of the German language. It must
DELangImg mediumblob
have a size of 24 x 18 pixels.
Country code for the first additional language.
CustomLang1 varchar(2)
Define the value in ISO 3166-1 alpha-2 format.
Image type uploaded for the flag of the first additional
CustomLang1ImgType language. varchar(40)
Read-only property.
Image displayed for the flag of the first additional language.
CustomLang1Img mediumblob
It must have a size of 24 x 18 pixels.
Text displayed to users if they point the mouse over the flag
of the first additional language.
CustomLang1ImgText varchar(255)
To display the language, you need to define it.
Multi-language property.

Developer Manual 58
Use of RESTful APIs APIs Version 2

Defines the text direction for the first additional language.


Possible values are:
CustomLang1ImgDir tinyint(1)
• 0 = Left to right
• 1 = Right to left
Country code for the second additional language.
CustomLang2 varchar(2)
Define the value in ISO 3166-1 alpha-2 format.
Image type uploaded for the flag of the second additional
CustomLang2ImgType language. varchar(40)
Read-only property.
Image displayed for the flag of the second additional
CustomLang2Img mediumblob
language. It must have a size of 24 x 18 pixels.
Text displayed to users if they point the mouse over the flag
of the second additional language.
CustomLang2ImgText varchar(255)
To display the language, you need to define it.
Multi-language property.
Defines the text direction for the second additional
language. Possible values are:
CustomLang2ImgDir tinyint(1)
• 0 = Left to right
• 1 = Right to left
Country code for the third additional language.
CustomLang3 varchar(2)
Define the value in ISO 3166-1 alpha-2 format.
Image type uploaded for the flag of the third additional
CustomLang3ImgType language. varchar(40)
Read-only property.
Image displayed for the flag of the third additional language.
CustomLang3Img mediumblob
It must have a size of 24 x 18 pixels.
Text displayed to users if they point the mouse over the flag
of the third additional language.
CustomLang3ImgText varchar(255)
To display the language, you need to define it.
Multi-language property.
Defines the text direction for the third additional language.
Possible values are:
CustomLang3ImgDir tinyint(1)
• 0 = Left to right
• 1 = Right to left

Developer Manual 59
Use of RESTful APIs APIs Version 2

gatewayRead, gatewayWrite, gatewayFind, gatewayDelete and gatewayCount


The “gateway” object allows you to manage the data of physical gateways.
When searching using the “Find” and “Count” commands, you can use various objects with the following
hierarchy:

gateway domain manager reseller

Example of a call that reads data:


$Endpoint = 'gatewayRead';
$Data = '{"id":"123"}';

Example of a call that searches for data by gateway name:


$Endpoint = 'gatewayFind';
$Data = '{"Where":"gateway.GatewayName=\"MyGateway\""}';

Example of a call that searches for data by ID:


$Endpoint = 'gatewayFind';
$Data = '{"Where":"gateway.id=123"}';

Example of a call that searches for data for ERP code:


$Endpoint = 'gatewayFind';
$Data = '{"Where":"gateway.GatewayName=\"MyGateway\""}';

Example of a call that adds:


$Endpoint = 'gatewayWrite';
$Data = '{"id":"0", "GatewayName":"MyGateway", "ManagerID":"1", "DomainID":"1"}';

Example of a call that modifies data:


$Endpoint = 'gatewayWrite';
$Data = '{"id":"123", "GatewayName ":"MyGateway"}';

Example of a call that delets data:


$Endpoint = 'gatewayDelete';
$Data = '{"id":"123"}';

Available properties:
Name Comment Type
Object ID.
id If you want to add, in this property pass the value zero. int(11)
Read-only property.
Object creation date. Automatically assigned when you add.
CreationDate timestamp
Read-only property.
Manager ID.
ManagerID ID derived from the "manager" object. int(11)
Mandatory property in addition.
Domain ID.
DomainID ID derived from the "domain" object. int(11)
Mandatory property in addition.
Gateway name.
GatewayName varchar(100)
Mandatory property.
MacAddress Gateway MAC-address. varchar(255)

Developer Manual 60
Use of RESTful APIs APIs Version 2

Used to recognize the correct domain and gateway


when redirecting to the Welcome Portal or logging in to
the radius.
If in the reidirecting URL you specify the gateway, with
the name assigned in the "Gateway Name" field, you
won’t need to define it.
If the gateway passes the "Calling Station ID" that
corresponds with the name of the gateway, you won’t
need to define it.
If the radius cannot recognize the gateway from which
the login request comes, the log shows an "info"
reporting the "Calling Station ID" passed. In this case,
define the name of the gateway with the value
corresponding to the "Calling Station ID" or assign the
value in this field.
Title for multiple logins with virtual gateways.
MultipleLoginTitle longtext
Multilingual property.
Address Address where the gateway was installed. varchar(100)
Zip Zip code. varchar(10)
City City where the gateway was installed. varchar(100)
Code of the country.
Country varchar(5)
Define the value in ISO 3166-1 alpha-2 format.
Phone Gateway-specific contact phone number. varchar(20)
MobilePhone Gateway-specific contact mobile phone number. varchar(20)
Log LOG maintenance tinyint(1)
Hotspot IP address.
IPAddress varchar(50)
Mandatory if you enable logging.
ManifacturerWebAdmin URL or IP address to access the gateway's web
varchar(255)
Address management.
Gateway hardware type. Possible values are:
• 0 = Mikrotik (RBx, CCR, hAP, hAP Lite)
• 2 = Ruckus access point
• 3 = Mikrotik with flash (hEX, hAP AC Lite, wAP LTE kit,
LtAP mini 4G Kit, LtAP mini, ecc.)
• 4 = Ruckus Zone Director
• 5 = CloudTrax 6.x
• 6 = Cisco Meraki MR series
• 8 = Ruckus VSCG
HardwareType int(11)
• 9 = Ruckus VSZ
• 10 = Cambium Network cnMaestro Cloud
• 11 = Cradlepoint
• 12 = Cisco WLC
• 13 = Teltonika
• 14 = Fortinet
• 15 = Cambium Network cnMaestro On Premises or
cnPilot Standalone
• 21 = TP-Link Omada

Developer Manual 61
Use of RESTful APIs APIs Version 2

• 25 = Alcatel-Lucent Enterprise Omniaccess Stellar


HardwareVersion Gateway software version. varchar(20)
Gateway UpTime
Uptime varchar(32)
Read-only property.
Maximum number of connected users.
MaxUsers int(11)
A value equal to zero expresses an infinite number.
Maximum number of Welcome Portal views per minute.
WPMaxView int(11)
A value equal to zero indicates an infinite number.
Template ID. Possible values are:
• 0 = Use Default
TemplateID • Other value = Template ID int(11)

ID derived from the "wptemplate" object.


UseTemplateColor Color schemes to use for the template. int(11)
Advertising. Possible values are:
• 0 = Enable
Advertising smallint(2)
• 10 = Only for campaigns on this domain
• 20 = Disable
Surveys. Possible values are:
• 0 = Disable
Survey int(1)
• 1 = Enable, one at a time
• 2 = Enable, all those provided
Longitude Longitude. varchar(20)
Latitude Latitude. varchar(20)
GPSTrackingEnabled GPS Traking Enabled int(1)
GPSTrackingKeepLogsFor GPS Traking Keep Logs For (Minutes) int(11)
Timezone of the gateway.
TimeZone varchar(64)
Define a value of type "tzdata".
Timetable of the gateway.
The numeric value expresses the activation hours based on
Timetables the bits of the same from midnight. int(11)
1 activates midnight, 3 activates midnight and one a.m., 7
activates midnight, one and two, etc.
Timetable of the days of the week.
The numeric value expresses the days of the activation week
DaysOfWeekTimetable based on the bits of the same starting from Monday. int(11)
1 activates Monday, 3 activates Monday and Tuesday, 7
activates Monday, Tuesday and Wednesday, etc.
Timetable of the month of the year.
The numeric value expresses the months of the activation
MonthsTimetable year based on the bits of the same starting from Monday. int(11)
1 activates January, 3 activates January and February, 7
activates January, February and March, etc.
Enables or disables advertising injection. Possible values
are:
Injection • 0 = Use domain settings smallint(2)
• 1 = Disable
• 2 = Enable

Developer Manual 62
Use of RESTful APIs APIs Version 2

It is also conditioned by the product assigned to the


user. If the product is disabled, this property is treated
as disabled.
The number of seconds to elapse before performing the first
InjectionStartSeconds int(11)
injection of contents.
InjectionFrequencySecon
The injection frequency of contents in seconds int(11)
ds
States whether to display the toolbar that allows the user to
InjectionShowToolBar smallint(1)
go back to the Welcome Portal while surfing.
InjectionInWelcomePort
If enabled, it injects contents even in the Welcome Portal. smallint(2)
al
COINGatewayGUID CO.IN. gateway GUID to enable for this gateway. varchar(40)
Wake On Lan for CO.IN.
If enabled, it will automatically turn the CO.IN. on if it
COINWOL has accidentally powered off or for example due to a smallint(3)
temporary power failure. This feature is available only if
the hardware of gateway is a MikroTik type.
Uses the CO.IN. DNS server to improve performances and
COINDns smallint(3)
obtain DNS usage statistics with the required domains.
Array of values with custom Apps IDs to upload into the
Welcome Portal.

CustomApps The values contained in each element of the array are array()
explained in the next paragraph "The array of values
contained in the gateway's 'CustomApps' property".
IDs derived from the "wpcustomapp" object.
Complete URL (without HTTP://) orFacebook page ID which
FacebookFanPageURL varchar(200)
users can click 'I Like' on or 'Publish a post' to
When the user performs the registration or login with
Facebook, it has the possibility to publish a post on its
FacebookPublishUponCo timeline. Possible values are:
int(11)
nnection • 0 = Use domain settings
• 1 = Yes
• 2 = Never
TwitterFollowerUser Username or Twitter ID to follow. varchar(50)
Disables the Apple mini-browser (captive network assistant)
that has several limitations.
DisableAppleCaptivePort If enabled, the user will have to manually open the tinyint(1)
al browser after connecting to the wifi. The option will be
active from the next Walled Garden update. This option
is automatically considered active if injection is enabled.
Disables the Android mini-browser (captive network
assistant) that has several limitations.
DisableAndroidCaptiveP If enabled, the user will have to manually open the tinyint(1)
ortal browser after connecting to the wifi. The option will be
active from the next Walled Garden update. This option
is automatically considered active if injection is enabled.

Developer Manual 63
Use of RESTful APIs APIs Version 2

Disables the Windows Phone mini-browser (captive


network assistant) that has several limitations.
DisableWindowsPhoneC If enabled, the user will have to manually open the tinyint(1)
aptivePortal browser after connecting to the wifi. The option will be
active from the next Walled Garden update. This option
is automatically considered active if injection is enabled.
Notes Notes. text
EnableNotifications Enables sending notifications for gateway monitoring. int(1)
Allows you to generate specific Walled Gardens for each
virtual gateway.
WalledGardensOwnForE
If disabled, the number of Walled Gardens generated int(1)
achGateway
will be much lower but will be shared with all virtual
gateways.
Enables verifying Internet connectivity upon users’ login.
CheckInternetConnectio
nAtLogin If not active, the login procedure is faster but users are tinyint(1)
not notified if the Internet connection is missing
Displays a notification in the dashboard inviting the user to
ShowWizardGateway tinyint(1)
run the gateway initial setup wizard.
Locked If enabled the gateway is locked. tinyint(1)
Authentication via Mac Address.
If you enable this option, you can create users with a
username and password equal to the mac-address of
AuthUsersByMACLogin the device, avoiding the welcome portal and the entire smallint(3)
registration and manual authentication phase. Enable
this option only if really necessary otherwise an
authentication request will be sent to the wifi
connection of any device.
Authenticate unnamed domain users.
Enables user authentication without the
AuthUsersWithoutRealm @DomainName suffix. In practice the Realm is smallint(3)
automatically added by the NAS PPPoE Mikrotik.
Available only for gateways on PPPoE domains.
EnableWireless Enables the wireless interface. tinyint(1)
SSID SSID of the Wi-Fi network. varchar(255)
If enabled, connections that have not received updates from
the gateway for twice the 'Interim Update' time defined in
RadiusForceDisconnect the product, are automatically closed. int(1)
It is recommended to activate this option for the
Ubiquiti UniFi Controller. Not necessary for MikroTik.
In addition to forcing disconnections, it also sends a radius
request to disconnect to the gateway. Some types of
gateways (e.g. Ubiquiti) may not stop the radius and
RadiusSendDisconnectRe consider the device always active. If enabled, the gateway
quests must be reachable for the indicated port with UDP protocol.
It is recommended to activate this option for the
Ubiquiti UniFi Controller. Not necessary for MikroTik.

Developer Manual 64
Use of RESTful APIs APIs Version 2

The port used by the gateway to accept logout requests. It


is usually 3799 but may vary depending on the type of
RadiusIncomingPort gateway. int(11)
It is recommended to activate this option for the
Ubiquiti UniFi Controller. Not necessary for MikroTik.
If the gateway does not support all the necessary radius
attributes and the appliance is able to send disconnect
requests, it periodically checks the consumption of the
VerifyUserLimits connected users and if the time/traffic limits are reached or int(1)
when the deadline is reached, disconnect the user.
It is recommended to activate this option for the
Ubiquiti UniFi Controller. Not necessary for MikroTik.
WAN Configuration Type.
Allows choosing how to configure the WAN. Using 'Enter
Parameters', you have to complete the parameters
displayed and then generate the configuration
automatically. Using 'Manual Configuration of the
WANConfigType int(3)
Gateway', it does not generate the configuration of the
WAN part, leaving complete autonomy on configuring
directly the gateway. Possible values are:
• 0 = Enter Parameters
• 1 = Manual Configuration of the Gateway
Hotspot networked with appliance.
HotspotInLAN Enables if the gateway is on the same network as the tinyint(1)
appliance.
Addressing Mode. Possible values are:
• 0 = Static IP or DHCP
NetworkAddressingMod
• 1 = PPPoE Client int(2)
e
• 2 = USB Modem
• 3 = LTE
WAN Interface. Possible values are:
• ether1-12 = Ethernet interface from 1 to 12. For Eth1
declare ether1, for Eth2 ether2, etc.
• wlan2 = Second wireless interface.
WanInterface varchar(20)
• sfp1-12 = Sfp interface from 1 to 12. For Sfp1 declare
sfp1, for Sfp2 sfp2, etc.
• sfp+1-12 = Sfp + interface from 1 to 12. For Sfp + 1
declare sfp + 1, for Sfp + 2 sfp + 2, etc.
UseVLAN Enables the use of VLAN. tinyint(1)
ID of the VLAN.
VLANID varchar(4)
Allowed numeric values are between 2 and 4095.
WANUseDHCP Uses DHCP client for the WAN interface. tinyint(1)
WANIPAddress WAN interface IP address. varchar(15)
WANNetMask WAN interface network mask. varchar(15)
The gateway IP address for the WAN interface.
WANGatewayIP It should correspond to the private IP address of the varchar(15)
router for internet connection.

Developer Manual 65
Use of RESTful APIs APIs Version 2

PPPoE Client User Name.


PPPoEClientUserName varchar(50)
Available if "NetworkAddressingMode" is equal to 1.
PPPoE Client Password.
PPPoEClientPassword varchar(50)
Available if "NetworkAddressingMode" is equal to 1.
If enabled, it connects to the PPPoE server only when traffic
PPPoEClientDialOnDema is generated.
int(1)
nd
Available if "NetworkAddressingMode" is equal to 1.
Defines the MTU of the PPPoE Client interface.
PPPoEClientMTU If disabled, it does not set the MTU. int(5)
Available if "NetworkAddressingMode" is equal to 1.
APN provided by SIM card operator.
USBModemAPN varchar(50)
Available if "NetworkAddressingMode" is equal to 2.
Enables LTE authentication.
LTEAuthentication int(1)
Available if "NetworkAddressingMode" is equal to 2.
Username for authentication with USB Modem or LTE.
USBModemUserName Available if "NetworkAddressingMode" is equal to 1 or 2 varchar(50)
and authentication is enabled.
Password for authentication with USB Modem or LTE.
USBModemPassword Available if "NetworkAddressingMode" is equal to 1 or 2 varchar(50)
and authentication is enabled.
USBModemInitATComm AT command in order to initialize the modem.
varchar(100)
and Available if "NetworkAddressingMode" is equal to 2.
USBModemDialATComm
and AT command to use for making the call. Generally ATDT. varchar(100)
Selects the USB port of the Mikrotik gateway where the USB
modem is connected. Possible values are:
USBModemUSBPort • 1 = USB Port 1 varchar(10)
• 2 = USB Port 2
Available if "NetworkAddressingMode" is equal to 2.
Phone number provided by the SIM card operator in order
USBModemPhoneNumb to dial out.
varchar(30)
er
Available if "NetworkAddressingMode" is equal to 2.
ID of the SSL certificate to be assigned to the gateway.
CertificateID The certificate must have been issued for the domain
defined on CertificateDomain.
CertificateDomain Certificate of the Domain. varchar(128)
EnableHotspotBridgeOnE
Adds Ether1 to Hotspot Bridge. tinyint(1)
th1
EnableHotspotBridgeOnE
Adds Ether2 to Hotspot Bridge. tinyint(1)
th2
EnableHotspotBridgeOnE
Adds Ether3 to Hotspot Bridge. tinyint(1)
th3

Developer Manual 66
Use of RESTful APIs APIs Version 2

EnableHotspotBridgeOnE
Adds Ether4 to Hotspot Bridge. tinyint(1)
th4
EnableHotspotBridgeOnE
Adds Ether5 to Hotspot Bridge. tinyint(1)
th5
EnableHotspotBridgeOnE
Adds Ether6 to Hotspot Bridge. tinyint(1)
th6
EnableHotspotBridgeOnE
Adds Ether7 to Hotspot Bridge. tinyint(1)
th7
EnableHotspotBridgeOnE
Adds Ether8 to Hotspot Bridge. tinyint(1)
th8
EnableHotspotBridgeOnE
Adds Ether9 to Hotspot Bridge. tinyint(1)
th9
EnableHotspotBridgeOnE
Adds Ether10 to Hotspot Bridge. tinyint(1)
th10
EnableHotspotBridgeOnE
Adds Ether11 to Hotspot Bridge. tinyint(1)
th11
EnableHotspotBridgeOnE
Adds Ether12 to Hotspot Bridge. tinyint(1)
th12
Defines the Keep-Alive timeout, in seconds, for the hotspot
service. Possible values are:
• 0 = Undefined
• 15 = 15 Seconds
• 30 = 30 Seconds
• 60 = 1 Minute
KeepAliveTimeout varchar(10)
• 120 = 2 Minutes
• 300 = 5 Minutes
• 600 = 10 Minutes
• 1800 = 30 Minutes
• From 3600 to 259200 = from one hour to seventy-two
hours.
IP address of the gateway hotspot interface (WLAN1 or
HotspotIPAddress varchar(15)
Ether2)
Network mask of the virtual gateway hotspot interface
HotspotNetMask varchar(15)
(Wlan1 or Ether2).
DNSIPAddress IP addresses of the DNS servers, separated by commas. varchar(100)
UsersPoolFromIP First IP address for the DHCP pool used by the gateway. varchar(15)
UsersPoolToIP Last IP address for the DHCP pool used by the gateway. varchar(15)
DHCP lease time, expressed in hours, for the IP address
UsersPoolLeaseTimeHou assignment of the connected devices. Possible values are:
varchar(3)
rs • 1 = An hour
• From 2 to 72 = Two to seventy-two hours.
Enables or disables using a VLAN for the bridge interface of
HotspotUseVLAN int(1)
the Hotspot.
HotspotVLANID ID of the VLAN. varchar(5)
PPTPEnabled Enables VPN configuration. tinyint(1)
PPTPServer PPTP server address. varchar(50)
PPTPUserName Username to connect to the PPTP server. varchar(50)
PPTPPassword Password to connect to the PPTP server. varchar(50)
GPSEnable Enables GPS. int(1)

Developer Manual 67
Use of RESTful APIs APIs Version 2

Activate only if the gateway supports GPS.


GPS Type. Possible values are:
GPSType • 0 = USB int(1)
• 2 = Integrated.
USB port for USB-type GPS. Possible values are:
GPSUSBPort • 1 = Port 1 int(1)
• 2 = Port 2.
Defines the interval of the auto update in minutes for the
WalledGardenUpdateMi Walled Garden (free URLs) and of the IPs or Mac addresses
int(11)
ns to bypass or block for the gateway. The minimum value is 5
minutes.
UpdateGatewayStatusMi Defines the interval (in minutes) for monitoring the status
int(11)
ns of the gateways and access points.
Admin password of Mikrotik RouterOS to access to the
AdminPassword varchar(30)
gateway configurations and to the APIs.
Saves the data rate of users, reading them from PPPoE
MikroTik NAS.
StoresUserDataRates int(3)
Can only be used if domain AuthenticationMode is
equal to 5 (PPPoE).
CustomCommands Custom Mikrotik script to add to standard configuration. text
UpdatableScripts Enable automatic updating of the gateway scripts. tinyint(1)
UpdatableConfig Enables automatic update of gateway configuration. tinyint(1)
ImportUMUsers Enables user import from Mikrotik's "User Manager". tinyint(1)

The Array of Values contained in the Gateway's "CustomApps" Property


The "CustomApps" property of the "gateway" class contains an array of values that contain the IDs of
Custom Apps assigned to the gateway.

Example in "json" format with the IDs of two Custom Apps:


[321,857]

Developer Manual 68
Use of RESTful APIs APIs Version 2

gatewaywplanguagesRead, gatewaywplanguagesWrite
The "gatewaywplanguages" object allows you to manage the language data for the Welcome Portal
defined at gateway level.

Example of a call that reads data:


$Endpoint = 'gaetwaywplanguagesRead';
$Data = '{"id":"123"}';

Example of a call that modifies data:


$Endpoint = 'gaetwaywplanguagesWrite';
$Data = '{"id":"123", "CustomLang1ImgText":"<en>MyLanguage</en>"}';

Available properties:
Name Comment Type
Object ID of "gateway".type.
id int(11)
Read-only property.
Type of image uploaded for the English language.
ENLangImgType varchar(40)
Read-only property.
Image displayed for the English language. It must have a size
ENLangImg mediumblob
of 24 x 18 pixels.
Type of image uploaded for the Spanish language.
ESLangImgType varchar(40)
Read-only property.
Image displayed for the Spanish language. It must have a
ESLangImg mediumblob
size of 24 x 18 pixels.
Type of image uploaded for the French language.
FRLangImgType varchar(40)
Read-only property.
Image displayed for the French language. It must have a size
FRLangImg mediumblob
of 24 x 18 pixels.
Type of image uploaded for the Italian language.
ITLangImgType varchar(40)
Read-only property.
Image displayed for the Italian language. It must have a size
ITLangImg mediumblob
of 24 x 18 pixels.
Type of image uploaded for the German language.
DELangImgType varchar(40)
Read-only property.
Image displayed for the German language. It must have a
DELangImg mediumblob
size of 24 x 18 pixels.
Country code for the first additional language.
CustomLang1 varchar(2)
Define the value in ISO 3166-1 alpha-2 format.
Type of image uploaded for the the first additional
CustomLang1ImgType language. varchar(40)
Read-only property.
Image displayed for the first additional language. It must
CustomLang1Img mediumblob
have a size of 24 x 18 pixels.
Text displayed to users for the first additional language.
CustomLang1ImgText To display the language, it must be defined. varchar(255)
Multilingual property.

Developer Manual 69
Use of RESTful APIs APIs Version 2

Defines the Text Direction for the First Additional Language.


Possible values are:
CustomLang1ImgDir tinyint(1)
• 0 = Left To Right
• 1 = Right To Left
Country code for the second additional language.
CustomLang2 varchar(2)
Define the value in ISO 3166-1 alpha-2 format.
Type of image uploaded for the the second additional
CustomLang2ImgType language. varchar(40)
Read-only property.
Image displayed for the second additional language. It must
CustomLang2Img mediumblob
have a size of 24 x 18 pixels.
Text displayed to users for the second additional language.
CustomLang2ImgText To display the language, it must be defined. varchar(255)
Multilingual property.
Defines the Text Direction for the Second Additional
Language. Possible values are:
CustomLang2ImgDir tinyint(1)
• 0 = Left To Right
• 1 = Right To Left
Country code for the third additional language.
CustomLang3 varchar(2)
Define the value in ISO 3166-1 alpha-2 format.
Type of image uploaded for the the third additional
CustomLang3ImgType language. varchar(40)
Read-only property.
Image displayed for the third additional language. It must
CustomLang3Img mediumblob
have a size of 24 x 18 pixels.
Text displayed to users for the third additional language.
CustomLang3ImgText To display the language, it must be defined. varchar(255)
Multilingual property.
Defines the Text Direction for the Third Additional
Language. Possible values are:
CustomLang3ImgDir tinyint(1)
• 0 = Left To Right
• 1 = Right To Left

Developer Manual 70
Use of RESTful APIs APIs Version 2

macaddressDisassoc
The "macaddressDisassoc" endpoint allows you to disassociate a MAC-Address from the connection log.

Example:
$Endpoint = 'macaddressDisassoc';
$Data = '{"DomainID":"123", "Mac":"03:03:03:03:03:03"}';

Available properties:
Name Comment Type
Domain ID.

DomainID ID derived from the "domain" object. int(11)


Define a value if you want to disassociate a MAC
Address only for a specific domain.
User ID.

UserID ID derived from the "user" object. int(11)


Define a value if you want to disassociate a MAC
Address only for a specific user.
MAC MAC Address to disassociate. varchar(50)

Returned properties:
Name Comment
Count Number of disassociated records.

Developer Manual 71
Use of RESTful APIs APIs Version 2

macaddressRiassoc
The "macaddressRiassoc" endpoint allows you to reassociate a MAC-Address to the connection log.

Example:
$Endpoint = 'macaddressRiassoc';
$Data = '{"DomainID":"123", "Mac":"03:03:03:03:03:03"}';

Available properties:
Name Comment Type
Domain ID.

DomainID ID derived from the "domain" object. int(11)


Define a value if you want to reassociate a MAC Address
only for a specific domain.
User ID.

UserID ID derived from the "user" object. int(11)


Define a value if you want to reassociate a MAC Address
only for a specific user.
MAC MAC Address to reassociate. varchar(50)

Returned properties:
Name Comment
Count Number of reassociated records.

Developer Manual 72
Use of RESTful APIs APIs Version 2

mailValidate
The "mailValidate" endpoint performs a validation of the e-mail address passed in the manner provided
by SMSS.

Example:
$Endpoint = 'mailValidate';
$Data = '{"Address":"[email protected]"}';

Properties:
Name Comment Type
Email address to be validated.
Address varchar(255)
Mandatory.

Returned properties:
Name Comment
Possible values:
• “” = The email address is correct and is active.
• “Wrong e-mail address” = The email address is not
Error
syntactically correct
• “The email address does not exist” The email address
does not exist on the destination mail server.

Developer Manual 73
Use of RESTful APIs APIs Version 2

managerCount
The "managerCount" method returns the total number of managers entered.

Example:
$Endpoint = 'managerCount';
$Data = '{"ResellerID":"123"}';

Properties:
Name Comment Type
Reseller ID.
ResellerID Optional. int(11)
ID derived from the "reseller" object.

Returned properties:
Name Comment
Count Number of resellers inserted.

Developer Manual 74
Use of RESTful APIs APIs Version 2

managercurrencyandpaymentsRead, managercurrencyandpaymentsWrite
The "managercurrencyandpayments" object allows you to manage the currency and payment system
data for the manager.

Example of a call that reads data:


$Endpoint = 'managercurrencyandpaymentsRead';
$Data = '{"id":"123"}';

Example of a call that modifies data:


$Endpoint = 'managercurrencyandpaymentsWrite';
$Data = '{"id":"123", "currency":"$"}';

Available properties:
Name Comment Type
Object ID of type "manager".
id int(11)
Read-only property.
Currency code. It is used for payments.
CurrencyCode varchar(3)
Define a value of type "ISO 4217".
Currency Currency symbol for prices. varchar(20)
Decimal Separator. Possible values are:
DecimalSeparator • 1 = Dot int(3)
• 2 = Comma
Thousands separator. Possible values are:
• 1 = Space
ThousandSeparator int(3)
• 2 = Dot
• 3 = Comma
Tax rate ID included in the selling prices to the users.
TaxRatesID int(11)
ID derived from the "taxrates" object.
TaxJurisdiction Fiscal jurisdiction for taxation. varchar(32)
AdministrativeEmailAddr
Administrative email address for payment notifications varchar(255)
ess
Company name to use for receipt header. Possible values
are:
ReceiptSeller • 0 = Manager smallint(3)
• 1 = Retailer
• 2 = System
Header image to print in receipts.
ReceiptSellerImg mediumblob
Property of type "image”.
Type of header image to print in receipts.
ReceiptSellerImgType varchar(40)
Read-only property.
Defines how to compose the venue name. Possible values
are:
• 0 = None
VenueNameType • 1 = Manager Company Name smallint(3)
• 2 = Retailer Company Name
• 3 = Reseller and Manager's Company Name
• 4 = Manager's Company Name and Domain Name
ReceiptIDPrefix Prefix for the receipt ID. varchar(32)
ReceiptNote Notes to print on receipt. longtext

Developer Manual 75
Use of RESTful APIs APIs Version 2

Multilingual property.
Enables prepaid payments for the manager. If enabled, the
EnablePrepaid manager can create vouchers, cards or users only if it has a tinyint(1)
prepaid credit.
When enabled, it uses the accounts released to test the
SandBox tinyint(1)
payment processes.
PaypalAccount Address of the PayPal account. varchar(50)
Mollie API key to enable payments through this gateway.
MollieApiKey varchar(50)
The currency must be in Euro.
Authorize.Net API ID to enable payments through this
AuthorizeNetApiID varchar(50)
gateway.
AuthorizeNetTransaction
Authorize.Net Transaction ID. varchar(50)
Key
PayFastApiID PayFast Merchant ID. varchar(50)
PayFastTransactionKey PayFast Merchant Key. varchar(50)
PayFastPassPhrase PassPhrase defined in the PayFast account. varchar(40)
PaymentExpressApiID Payment Express username. varchar(50)
PaymentExpressTransact
Payment Express Key varchar(64)
ionKey
PesapalApiID Pesapal Consumer Key. varchar(50)
PesapalTransactionKey Pesapal Consumer Secret. varchar(64)
PayUBizApiID PayU Biz Merchant Key. varchar(50)
PayUBizTransactionKey PayU Biz Merchant Salt. varchar(64)
EwayApiID eWay API Key. varchar(100)
EwayTransactionKey eWay password. varchar(50)
PaysafecardApiID Paysafe Card username (SOPG). varchar(50)
PaysafecardTransactionK
Paysafe Card password (SOPG). varchar(64)
ey
Version of 1Voucher-payment type.
Possible values are:
• 0 = 1ForYou
OneVoucherVersion int(1)
• 1 = 1Voucher
You can still use 1Voucher for old contract. For new
contract, select 1ForYou.
OneVoucherConsumerKe
1Voucher/1ForYou Consumer Key. varchar(40)
y
OneVoucherConsumerSe
1Voucher/1ForYou Consumer Secret. varchar(40)
cret
OneVoucherPurseAccou
1Voucher/1ForYou Purse Account Number. varchar(40)
ntNumber
OneVoucherUserName 1Voucher username. varchar(50)
OneVoucherPassword 1Voucher password. varchar(50)
TransactiumUserName Transactium username varchar(50)
TransactiumPassword Transactium password. varchar(50)
StripeAccount Stripe account ID. varchar(50)
StripeApiKey Stripe Live API Key. varchar(50)
StripePublishableApiKey Stripe live publishable API Key. varchar(50)
StripeTestApiKey Stripe test API Key. varchar(50)

Developer Manual 76
Use of RESTful APIs APIs Version 2

StripeTestPublishableApi
Stripe test publishable API Key. varchar(50)
Key
SafaricomMPesaTestPas
Safaricom MPesa test Pass Key. varchar(100)
sKey
SafaricomMPesaTestBusi
Safaricom MPesa test Business Code. varchar(10)
nessCode
SafaricomMPesaTestCon
Safaricom MPesa test Consumer Key. varchar(128)
sumerKey
SafaricomMPesaTestCon
Safaricom MPesa test Consumer Secret. varchar(128)
sumerSecret
SafaricomMPesaPassKey Safaricom MPesa live Pass Key. varchar(100)
SafaricomMPesaBusines
Safaricom MPesa live Business Code. varchar(10)
sCode
SafaricomMPesaConsum
Safaricom MPesa live Consumer Key. varchar(128)
erKey
SafaricomMPesaConsum
Safaricom MPesa live Consumer Secret. varchar(128)
erSecret
WAAFIPayTestAPIKey WAAFIPay test API Key. varchar(20)
WAAFIPayTestMerchant
WAAFIPay test Merchant UID. varchar(16)
UID
WAAFIPayTestAPIUserID WAAFIPay test API User ID. varchar(16)
WAAFIPayAPIKey WAAFIPay API Key. varchar(20)
WAAFIPayMerchantUID WAAFIPay Merchant UID. varchar(16)
WAAFIPayAPIUserID WAAFIPay API User ID. varchar(16)
The title to display in the Welcome Portal for the first
CustomPayment1Title custom payment. longtext
Multilingual property.
CustomPayment1URL The external URL to invoke for the first custom payment. varchar(255)
External URL to invoke to verify the first custom payment.
If not defined, payments will not be verified and will
CustomPayment1VerifyU always be accepted with possible security problems. The varchar(255
RL page must respond in JSON format with the 'Status'
variable which must contain 'paid' to accept the
payment or 'cancel' to decline it.
Image to display in the Welcome Portal for the first custom
CustomPayment1Img payment. Recommended size 172x120 pixels. mediumblob
“Image-type property.
Image type of image to display in the Welcome Portal for
CustomPayment1ImgTyp the first custom payment type.
varchar(40)
e
Read-only property.
Defines the target of the payment pages. If the gateway
security policies allow including the payment page, choose
CustomPayment1Redirec 'Welcome Portal', otherwise choose 'External Site'
int(3)
tTarget Possible values are:
• 0 = External site
• 1 = Welcome Portal
The title to display in the Welcome Portal for the second
CustomPayment2Title Longtext
custom payment.

Developer Manual 77
Use of RESTful APIs APIs Version 2

Multilingual property.
CustomPayment2URL The external URL to invoke for the second custom payment. varchar(255)
External URL to invoke to verify the second custom
payment.

CustomPayment2VerifyU If not defined, payments will not be verified and will


RL always be accepted with possible security problems. The varchar(255
page must respond in JSON format with the 'Status'
variable which must contain 'paid' to accept the
payment or 'cancel' to decline it.
Image to display in the Welcome Portal for the second
CustomPayment2Img custom payment. Recommended size 172x120 pixels. mediumblob
“Image-type property.
Image type of image to display in the Welcome Portal for
CustomPayment2ImgTyp the second custom payment type.
varchar(40)
e
Read-only property.
Defines the target of the payment pages. If the gateway
security policies allow including the payment page, choose
CustomPayment2Redirec 'Welcome Portal', otherwise choose 'External Site'
int(3)
tTarget Possible values are:
• 0 = External site
• 1 = Welcome Portal
EnablePayPal Enables payments through PayPal. tinyint(1)
EnableMollie Enables payments through Mollie. tinyint(1)
EnableAuthorizeNet Enables payments through Authorize.Net. tinyint(1)
EnablePayFast Enables payments through PayFast. tinyint(1)
EnablePaymentExpress Enables payments through Payment Express. tinyint(1)
EnablePesapal Enables payments through Pesapal. tinyint(1)
EnablePayUBiz Enables payments through PayUBiz. tinyint(1)
EnableEway Enables payments through Eway. tinyint(1)
EnablePaysafecard Enables payments through Paysafecard. tinyint(1)
Enable1Voucher Enables payments through 1Voucher/1ForYou. tinyint(1)
EnableSagePay Enables payments through SagePay. tinyint(1)
EnableCheckout Enables payments at checkout. tinyint(1)
EnableTransactium Enables payments through Transactium. tinyint(1)
EnableStripe Enables payments through Stripe. tinyint(1)
EnableSafaricomMPesa Enables payments through Safaricom M-Pesa. tinyint(1)
EnableWAAFIPay Enables payments through WAAFIPay. tinyint(1)
EnableCustomPayment1 Enables the first custom payment. tinyint(1)
EnableCustomPayment2 Enables the second custom payment. tinyint(1)

Developer Manual 78
Use of RESTful APIs APIs Version 2

managernotificationsRead, managernotificationsWrite
The "systemnotifications" object allows you to manage notification data configured at system level.

Example of a call that reads data:


$Endpoint = 'managernotificationsRead';
$Data = '{"id":"123"}';

Example of a call that modifies data:


$Endpoint = 'managernotificationsWrite';
$Data = '{"id":"123", "GatewaySendStatusEmail":"0"}';

Available properties:
Name Comment Type
Object ID of type "manager”. int(11)
id
Read-only property.
Subject of the email that is sent to users with the receipt of longtext
EmailReceiptSubject payment.
Multilingual property.
Text of the email that is sent to users with the receipt of longtext
EmailReceiptBody payment.
Multilingual property.
Enables sending an SMS with the new voucher code to users int(1)
who pay with 1Voucher/1ForYou.
Possible values are:
OneVoucherSendSMS
• 0 = Use Default
• 1 = No
• 2 = Yes
SMS text to send to users notifying the code of the new longtext
voucher. It is possible to use the variables: %UserName%;
OneVoucherSendSMSTe %Password%; %FirstName%; %LastName%; %Domain%;
xt %SmsNumber%; %SmsNumber2%; %NewPin%; %Credit%;
%Currency%.
Multilingual property.
Enables sending an email with the new voucher code to int(1)
users who pay with 1Voucher/1ForYou.
Possible values are:
OneVoucherSendEmail
• 0 = Use Default
• 1 = No
• 2 = Yes
Subject of the email to send to users notifying the code of longtext
the new voucher. It is possible to use the variables:
OneVoucherSendEmailS %UserName%; %Password%; %FirstName%; %LastName%;
ubject %Domain%; %SmsNumber%; %SmsNumber2%; %NewPin%;
%Credit%; %Currency%.
Multilingual property.
Text of the email with the code of the new voucher to send longtext
OneVoucherSendEmailT
to users who pay with 1Voucher/1ForYou. It is possible to
ext
use the variables: %UserName%; %Password%;

Developer Manual 79
Use of RESTful APIs APIs Version 2

%FirstName%; %LastName%; %Domain%; %SmsNumber%;


%SmsNumber2%; %NewPin%; %Credit%; %Currency%.
Multilingual property.
GatewaySendStatusEmai Enables sending email alerts for monitoring the status of smallint(1)
l gateways and access points.
Email addresses to send email alerts for the status of the varchar(255)
GatewaySendStatusEmai
gateways and access points. Multiple addresses must be
lAddresses
separated by comma.
Enables sending SMS alerts for monitoring the status of smallint(1)
GatewaySendStatusSMS
gateways and access points.
Phone number to send SMS alerts for the status of the varchar(255)
GatewaySendStatusSMS
gateways and access points. Multiple numbers must be
Numbers
separated by comma.

Developer Manual 80
Use of RESTful APIs APIs Version 2

managerRead, managerWrite, managerFind, managerDelete and managerCount


The “manager” object allows you to manage the data of the managers.
When searching using the “Find” and “Count” command , you can use various objects with the following
hierarchy:

manager reseller

Example of a call that reads data:


$Endpoint = 'managerRead';
$Data = '{"id":"123"}';

Example of a call that searches for data by company name:


$Endpoint = 'managerFind';
$Data = '{"Where":"manager.CompanyName=\"MyCompanyName\""}';

Example of a call that searches for data by ID:


$Endpoint = 'managerFind';
$Data = '{"Where":"manager.id=123"}';

Example of a call that searches for data for ERP code:


$Endpoint = ‘managerFind';
$Data = '{"Where":"manager.ERPCode=\"XYZ\""}';

Example of a call that adds:


$Endpoint = 'managerWrite';
$Data = '{"id":"0", "CompanyName":"MyCompanyName", "ResellerID":"123"}';

Example of a call that modifies data:


$Endpoint = 'managerWrite';
$Data = '{"id":"123", "CompanyName":"MyCompanyName"}';

Example of a call that delets data:


$Endpoint = 'managerDelete';
$Data = '{"id":"123"}';

Available properties:
Name Comment Type
Object ID.
id If you want to add, in this property pass the value zero. int(11)
Read-only property.
Date of creation of the object. Automatically assigned when
CreationDate you add. timestamp
Read-only property.
Manager ID.
ResellerID ID derived from the "reseller" object. int(11)
Mandatory in addition.
Manager type ID.
ManagerTypeID int(11)
ID derived from the "managertype" object”.
Manger’s company name.
CompanyName varchar(100)
Mandatory in addition.
Address Manager’s address. varchar(100)
Zip Postcode. varchar(10)

Developer Manual 81
Use of RESTful APIs APIs Version 2

City Manager’s city. varchar(100)


State Province or state. varchar(100)
Code of the country.
Country varchar(100)
Define the value in ISO 3166-1 alpha-2 format.
VAT Manager’s VAT-Id number. varchar(20)
Phone Manager’s phone number. varchar(20)
Fax Manager’s fax number. varchar(20)
Web Manager’s web address. varchar(50)
EmailAddress Email address. varchar(50)
FirstName Contact person's first name. varchar(100)
LastName Contact person's last name. varchar(100)
RegisterOfCompaniesIn Company registered at register of companies of. varchar(100)
ContractPlaceOfJurisdicti
Place of jurisdiction. varchar(255)
on
Discount percentage applied to product prices from reseller
Discount float
to manager.
Timezone of the manager.
TimeZone varchar(64)
Define a value of type "tzdata”.
Gateway type to use for sending and receiving SMS. Possible
values are:
SMSGatewayType • 0 = Default int(2)
• 1 = Mail Transport
• 2 = HTTP Request
SMSGatewayNumber Phone number associated with the gateway to receive SMS. varchar(50)
Sender's email address for the gateway with mail
SMSGatewayEmailFrom transportation.
varchar(100)
Addr
Define if "SmsGatewayType" is equal to 1.
Recipient's email address for the gateway with
transportation via mail. It is usually in the form
%Number%@GatewayDomainName.com or
%NumberNoIntPrefix%@GatewayDomainName.com,
SMSGatewayEmailToAdd where instead of %Number% is placed the number of
varchar(100)
r destination mobile number and instead of
%NumberNoIntPrefix% is placed the mobile number
without the international country calling code.
Define if "SmsGatewayType" is equal to 1.
Subject of the email to be sent to the gateway. The variables
SMSGatewayEmailSubje available are the same as defined in the recipient's address.
varchar(255)
ct
Define if "SmsGatewayType" is equal to 1.
Defines the type of request to execute for the specified URL.
SMSGatewayRequestTyp Possible values are:
int(2)
e • 0 = GET
• 1 = POST
URL address for gateway with HTTP requests. In the address,
you can use the variables %Number%, %NumberPlus%
SMSGatewayURL varchar(255)
(number with international calling code +),
%NumberNoIntPrefixZero% (number without zeros in the

Developer Manual 82
Use of RESTful APIs APIs Version 2

international calling code), %UserName%, %Password% and


%Message% representing the destination number, user
name, password and the text to send.
Define if "SmsGatewayType" is equal to 2.
User name of the gateway. It serves to assign a value to the
variable %UserName%. Usually gateways using HTTP
SMSGatewayUserName requests require the authentication. varchar(50)

Define if "SmsGatewayType" is equal to 2.


Password of the gateway. Used to assign a value to the
%Password% variable. Usually gateways which use HTTP
SMSGatewayPassword requests, require authentication. varchar(50)

Define if "SmsGatewayType" is equal to 2.


Defines the type of international country calling code
received by the SMS gateway. Possible values are:
• 0 = Auto
SMSGatewayReceiveIntP • 1 = With 00 (e.g. 001)
int(2)
refix • 2 = With + (e.g. +1)
• 3 = Without 00 nor + (e.g. 1)
Define if "SmsGatewayType" is equal to 2.
SMSUnitPrice Unit cost for SMS for the Manager. float
SMSAcquired Total number of purchased SMS. int(11)
Total number of SMS sent to users. Editable only by the
SMSSent int(11)
administrator.
Manager's Privacy Policy.
PrivacyPolicy longtext
Multiligual property.
PrivacyPolicyRefreeNam Last and first name of the contact person for the protection
varchar(255)
e of personal data, to display to the users in the privacy policy.
Version of the Privacy Policy.

PrivacyPolicyVersion If in the domain, it is provided the request to accept the varchar(10)


Privacy Policy, the version change requires the users to
re-accept it.
PrivacyPolicyDate Date when the last revision of Privacy Policy was made. date
Terms of Service.
ServiceContract longtext
Multiligual property.
Version of Terms of Service.

ServiceContractVersion If in the domain, it is provided the request to accept the varchar(10)


conditions, the version change requires the users to re-
accept them.
ServiceContractDate Date when the last revision of Terms of Service was made. date
PMSApiKey If required, API Key of the ERP or PMS to be integrated. varchar(150)
PMSApiSecret If required, API Secret of the ERP or PMS to be integrated. varchar(150)
If you want to synchronize the domain users, enter the
MailchimpApiKey MailChimp API Key. You have to enter the 'Audience ID' in varchar(150)
the domains you want to enable.

Developer Manual 83
Use of RESTful APIs APIs Version 2

In the domains to be enabled, the "Audience ID" must


also be defined.
CustomCSS Custom CSS applied to the backend for the manager. longtext
Maximum number of definable gateway.
MaxGateways A zero value states that the maximum number is limited int(5)
only by the license in use in the system.
Maximum number of concurrent users definable in the
gateways.

MaxUsers The sum of the maximum number of users defined in int(11)


each gateway cannot exceed the defined value.
A value of zero considers the maximum number of users
defined by the reseller.
Maximum number of concurrent users definable in each
gateway.
MaxUsersPerGateway int(11)
A value of zero considers the maximum number of users
defined by the reseller.
Maximum number of Welcome Portal views per minute.
WPMaxView If the value is equal to zero, it makes consider the value int(11)
defined in the reseller.
Reduces the Maximum Number of Users of the Gateways.
If you select a non-zero value in the disabled months of
the gateway, the service will work the same reducing
the maximum number of users to the indicated
percentage. For example, if in the gateway, in the
'Maximum Number of Users' field, you defined fifty
DisabledMonthsPartially users, in the field you select ten percent and the current
Enabled month is disabled by the values selected in the gateway int(11)
'Operating Months' field, the maximum number of users
will be reduced to five. If you select zero percent in the
disabled months, it will not be possible to use the
service and the message 'Sorry, the system is not active
in this month' will be displayed to users. If you select
'Default' it will be considered the percentage defined at
reseller level.
Maximum number of active campaigns.
MaxActiveCampaigns A value equal to zero indicates a limited number based int(11)
on the license.
Maximum size in Mega Bytes of custom images and media
MaxMediaSize int(11)
files of the map locations for the reseller.
Size in Mega Bytes of custom images and media files of the
MediaSize map locations inserted for the reseller. int(11)
Read-only properties.
If enabled, the manager's campaigns are public and will
PublicAdvCampaigns int(1)
appear on all gateways.
DeleteOlderInactiveUser Deletes users inactive. Possible values are:
int(11)
s • 0 = Default

Developer Manual 84
Use of RESTful APIs APIs Version 2

• 1 = Never
• 2 = One day
• 3 = One week
• 4 = Two weeks
• 5 = One month
• 6 = Three months
• 7 = Six months
• 8 = One year
• 9 = Eighteen months
• 10 = Two years
• 11 = Three years
Defines which products can be used on the domain and by
the manager system users. Possible values are:
• 0 = Of the system, reseller and manager
• 1 = Of the reseller and manager
ShowProducts int(3)
• 2 = Of the manager
• 3 = Of the reseller
• 4 = Of the system
• 5 = None
MaxManagerCard Maximum number of cards/vouchers. int(11)
ERP/PMS external code.
ERPCode It is used to associate the user with the registry of an varchar(25)
external ERP/PMS.
Notes Notes text
Locked If enabled, it blocks access to all users of the manager. tinyint(1)

Developer Manual 85
Use of RESTful APIs APIs Version 2

managertypeRead, managertypeWrite, managertypeFind


"managertypeRead" reads the data of a manager type based on the "ID" property, and
"managertypeFind" looks for a manager type based on the "Where" property.
When searching using the “Find” command , you can use various objects with the following hierarchy:

managertype

Example of a call that reads data:


$Endpoint = 'managertypeRead';
$Data = '{"id":"26"}';

Example of a call that searches for data by ID:


$Endpoint = 'managertypeFind';
$Data = '{"Where":"managertype.id=26"}';

Example of a call that searches for data by description:


$Endpoint = 'managertypeFind';
$Data = '{"Where":"managertype.Description LIKE \"%Airport%\""}';

Example of a call that retrieves all the ids:


$Endpoint = 'managertypeFind';
$Data = '{"Where":"managertype.Description LIKE \"%\""}';

Available properties:
Name Comment Type
Object ID.
id int(11)
Read-only property.
Multilingual description of the type of manager.
Description longtext
Multilingual property.

Possible values:
Description
Airport
Bar
Beach
Bus
Camping
Coffee Shop
Hospital
Hostel
Hotel
Library
Luxury Hotel
Luxury Resort
Motel
Other
Playground
Public Area
Railway Station
Resort
Restaurant

Developer Manual 86
Use of RESTful APIs APIs Version 2

School
Service Station
Shop
Square
Subway
Swimming Pool

Developer Manual 87
Use of RESTful APIs APIs Version 2

managersystemuserRead, managersystemuserWrite, managersystemuserFind and


managersystemuserDelete
The "managersystemuser" object allows you to manage the system user data of managers who access
the backend.
When searching using the “Find” command , you can use various objects with the following hierarchy
depending on the usage context:

managersystemuser manager reseller

Example of a call that reads data:


$Endpoint = 'managersystemuserRead';
$Data = '{"id":"123"}';

Example of a call that searches for data by user name:


$Endpoint = 'managersystemuserFind';
$Data = '{"Where":"managersystemuser.UserName =\"MyAdminUser\""}';

Example of a call that searches for data by ID:


$Endpoint = 'managersystemuserFind';
$Data = '{"Where":"managersystemuser.id=123"}';

Example of a call that adds:


$Endpoint = 'managersystemuserWrite';
$Data = '{"id":"0", "UserName":"MyAdminUser"}';

Example of a call that modifies data:


$Endpoint = 'managersystemuserWrite';
$Data = '{"id":"123", "UserName":"MyAdminUser"}';

Example of a call that delets data:


$Endpoint = 'managersystemuserDelete';
$Data = '{"id":"123"}';

Available properties:
Name Comment Type
Object ID.
id If you want to add, in this property pass the value zero. int(11)
Read-only property.
Date of creation of the object. Automatically assigned when
CreationDate you add. timestamp
Read-only property.
Manager ID.
ManagerID ID derived from the "manager" object. int(11)
Mandatory property.
Username for the login. It is recommended to enter your
UserName varchar(60)
mobile phone or email address.
Password for the user.

Password The password entered must comply with the "Password varchar(255)
Complexity" defined in the "Backend Security" of the
"System Settings".
RetypePassword Repeated password to verify accuracy. varchar(255)

Developer Manual 88
Use of RESTful APIs APIs Version 2

Define only if the password should be defined or


changed.
FirstLastName Last and first name of the user. varchar(100)
Phone Telephone number. varchar(20)
MobilePhone Mobile phone number. varchar(20)
Contact Type. Possible values are:
ContactType • 0 = Technician int(11)
• 1 = Administrative
Defines the color scheme to use for the backend for the
user. Possible values are:
• (Empty value) = Use Default
BackendColors varchar(30)
• greygreen = Grey and Green
• darkblue = Dark and Blue
• darkorange = Dark and Orange
EmailAddress Email address of the user. varchar(100)
Defines permissions to access data related to the internet
AuthGatewaysModule gateways. smallint(3)
Property expressing permissions.
Defines permissions to access the GPS tracking and fleet
AuthFleetModule telemetry data. smallint(3)
Property expressing permissions.
Defines permissions for the management of the system
users (the data of this page). Admin enables the user to
AuthSystemUsers manage permissions. smallint(3)

Property expressing permissions.


Defines permissions for the utility functions.
AuthUtilityFunctions smallint(3)
Property expressing permissions.
Defines permissions for SSL certificates.
AuthCertificates smallint(3)
Property expressing permissions.
Defines permissions for the currency and the management
of the payment systems. Admin enables the user to modify
AuthCurrencyAndPayme the prepayment in the manager and the test accounts for
smallint(3)
nts payments.
Property expressing permissions.
Defines permissions for the notifications.
AuthNotifications smallint(3)
Property expressing permissions.
Defines permissions for the tax rates.
AuthTaxRates smallint(3)
Property expressing permissions.
Defines permissions for the managers.
AuthManagers smallint(3)
Property expressing permissions.
Defines permissions for the domains.
AuthDomains smallint(3)
Property expressing permissions.
Defines permissions for the products of the domains. They
AuthDomainsProducts smallint(3)
are subjected to the domain permissions.

Developer Manual 89
Use of RESTful APIs APIs Version 2

Property expressing permissions.


Defines permissions for the gateways.
AuthGateways smallint(3)
Property expressing permissions.
Defines permissions for the Bypass or for locking the
AuthIPBinding IP/MAC addresses. smallint(3)
Property expressing permissions.
Defines permissions for the user traffic logs (Syslog) in the
gateways. If you enable Admin, the user will be able to
AuthSyslog activate or not the Syslog in the gateway data. smallint(3)

Property expressing permissions.


Defines permissions for the printers.
AuthPrinters smallint(3)
Property expressing permissions.
Defines permissions for the users.
AuthUsers smallint(3)
Property expressing permissions.
Defines permissions for users' passwords.
AuthUserPassword smallint(3)
Property expressing permissions.
Defines the permissions for sales to single user.
AuthTransactions smallint(3)
Property expressing permissions.
Displays the amounts originated from sales. If the users do
not have the permissions, they will not be able to: display
AuthShowSales the sales summary, export the sales, see the amounts on the smallint(3)
dashboards.
Property expressing permissions.
Defines permissions for the cards.
AuthCards smallint(3)
Property expressing permissions.
Defines permissions for the vouchers.
AuthVouchers smallint(3)
Property expressing permissions.
Defines permissions for the custom Apps.
AuthCustomApp smallint(3)
Property expressing permissions.
Defines permissions for the custom images.
AuthCustomImages smallint(3)
Property expressing permissions.
Defines permissions for the templates.
AuthTemplates smallint(3)
Property expressing permissions.
Defines permissions for the translations.
AuthTranslations smallint(3)
Property expressing permissions.
Defines permissions for the Walled Garden.
AuthWalledGarden smallint(3)
Property expressing permissions.
Defines permissions for the product policy.
AuthProductsPolicy smallint(3)
Property expressing permissions.
Defines permissions for the products. Admin enables the
AuthProducts smallint(3)
user to manage the product price.

Developer Manual 90
Use of RESTful APIs APIs Version 2

Property expressing permissions.


Enables the user to download the configuration files of the
AuthGatewayDownloadC gateways.
smallint(3)
onfig
Property expressing permissions.
Enables the User to Export Data.
AuthExportData smallint(3)
Property expressing permissions.
Defines permissions for the surveys.
AuthSurveys smallint(3)
Property expressing permissions.
Defines permissions for the advertising campaigns.
AuthCampaigns smallint(3)
Property expressing permissions.
Defines permissions for sales transactions for advertising.
AuthAdvTransactions smallint(3)
Property expressing permissions.
Defines permissions for the GPS tracking and fleet telemetry
AuthFleetOptions options. smallint(3)
Property expressing permissions.
Defines permissions for the vehicle drivers of GPS tracking
AuthFleetDrivers and fleet telemetry. smallint(3)
Property expressing permissions.
Defines permissions for the GPS tracking and fleet telemetry
AuthFleetVehicles means. smallint(3)
Property expressing permissions.
Defines permissions for the GPS tracking and fleet telemetry
AuthFleetTrips journeys. smallint(3)
Property expressing permissions.
Enables or disables the usage of APIs.
AuthAPI smallint(3)
Property expressing permissions.
Allows limiting the usage of APIs on an hourly basis by
defining a maximum cost.
Valid only for APIs 1.0.
APILimitPerHour Many API endpoints have a cost of one, but some of int(11)
them, requiring more resources for processing, have a
much higher cost. The administrative manual
summaries the fee of each endpoint. A value of zero
does not restrict the use of the APIs.
Allows limiting the usage of APIs on a daily basis by defining
a maximum cost.
Valid only for APIs 1.0.
APILimitPerDay Many API endpoints have a cost of one, but some of int(11)
them, requiring more resources for processing, have a
much higher cost. The administrative manual
summaries the fee of each endpoint. A value of zero
does not restrict the use of the APIs.

Developer Manual 91
Use of RESTful APIs APIs Version 2

Allows limiting the usage of APIs version 2 by defining the


maximum cost in minutes of hourly processing of the
API2LimitPerHour endpoints. Un valore uguale a zero non limita l'uso delle API. float
Valid for APIs 2.0 only.
Allows limiting the usage of APIs version 2 by defining the
maximum cost in minutes of daily processing of the
API2LimitPerDay endpoints. Un valore uguale a zero non limita l'uso delle API. float
Valid for APIs 2.0 only.
Defines the API access Key and must always be passed with
ApiKey calls. varchar(50)
When adding, a value is automatically proposed.
Defines the API access security code used to encrypt
ApiSecret transmitted data. Do not disclose this data. varchar(50)
When adding, a value is automatically proposed.
Date and time of the user’s last login.
LastLoginDateTime datetime
Read-only property.
Acceptance of the Licence to Use the Product.
LicenseAccepted int(1)
Read-only property.
Date and time when License to Use the product was
LicenseAcceptedDateTim accepted.
datetime
e
Read-only property.
TermsAndConditionsAcc Terms & Conditions acceptance.
int(1)
epted Read-only property.
Date and time when the Terms & Conditions statement was
TermsAndConditionsAcc accepted.
datetime
eptedDate
Read-only property.
Version of Terms & Conditions statement accepted by the
TermsAndConditionsVer user.
varchar(10)
sion
Read-only property.
Date of the Terms & Conditions statement accepted by the
TermsAndConditionsDat user.
datetime
e
Read-only property.
Privacy Policy acceptance.
PrivacyPolicyAccepted int(1)
Read-only property.
Date and time when the Privacy Policy statement was
PrivacyPolicyAcceptedDa accepted.
datetime
te
Read-only property.
Version of the Privacy Policy statement accepted by the
PrivacyPolicyVersion user. varchar(10)
Read-only property.
Date of the Privacy Policy statement accepted by the user.
PrivacyPolicyDate datetime
Read-only property.

Developer Manual 92
Use of RESTful APIs APIs Version 2

All properties whose name begins with "Auth" define the combination of permissions. Assign values
that are compatible with what is defined in the "Properties that define permissions" paragraph.
printerRead, printerWrite, printerFind, printerDelete and printCount
The "printer" object allows you to manage printer data.
When searching using the “Find” and “Count” commands, you can use various objects with the following
hierarchy:

printer gateway domain manager reseller

Example of a call that reads data:


$Endpoint = 'printerRead';
$Data = '{"id":"123"}';

Example of a call that searches for data by printer name:


$Endpoint = 'printerFind';
$Data = '{"Where":"printer.Description=\"MyPrinter\""}';

Example of a call that searches for data by ID:


$Endpoint = 'printerFind';
$Data = '{"Where":"printer.id=123"}';

Example of a call that adds:


$Endpoint = 'printerWrite';
$Data = '{"id":"0", "Description":"MyPrinter"}';

Example of a call that modifies data:


$Endpoint = 'printerWrite';
$Data = '{"id":"123", "Description":"MyPrinter"}';

Example of a call that delets data:


$Endpoint = 'printerDelete';
$Data = '{"id":"123"}';

Available properties:
Name Comment Type
Object ID.
id If you want to add, in this property pass the value zero. int(11)
Read-only property.
Date of creation of the object. Automatically assigned when
CreationDate you add. timestamp
Read-only property.
Gateway ID.
GatewayID ID derived from "gateway" or "vgateway" object. int(11)
Mandatory in addition.
Description Description or place where the printer has been installed. varchar(255)
Text displayed in the printer when it is disabled. It can serve
IdleText to display a logo, a reference phone number or to indicate varchar(64)
how to proceed for printing (Example: Press F1).
ShowProductPrice Enables or disables the display of the price in the printer. int(1)
PrintProductPrice Enables or disables the price printing. int(1)

Developer Manual 93
Use of RESTful APIs APIs Version 2

Enables or disables printing of the maximum number of


PrintMaxDevices tinyint(1)
devices.
Enables or disables printing of the maximum number of
PrintConcurrentLogin tinyint(1)
concurrent connections.
Enables or disables the printing of multilingual card. The
PrintMultilanguage int(1)
printer will ask the print language.
PrintCard Enables or disables the printing of card. int(1)
Enters the text that will be printed in the header of the
CardHeader cards. longtext
Multilingual property.
Enters the text that will be printed in the footer of the cards.
CardFooter longtext
Multilingual property.
PrintVoucher Enables or disables the printing of vouchers. int(1)
Enters the text that will be printed in the header of the
VoucherHeader vouchers. longtext
Multilingual property.
Enters the text that will be printed in the footer of the
VoucherFooter vouchers. longtext
Multilingual property.
Defines the number of copies to print. In order to take
Copies advantage of this feature, it is necessary to have a printer tinyint(2)
with the firmware version greater than or equal to 1.1.0.16.
SSID Wireless Network Name. varchar(64)
WiFiPassword Wireless Network Password. varchar(64)
Username used by the printer for calls to the backend in
UserName varchar(30)
order to create cards and vouchers.
Password used by the printer for calls to the backend in
Password varchar(30)
order to create cards and vouchers.
Notes Notes for the Printer. longtext
Locked Printer Locked. tinyint(1)

Developer Manual 94
Use of RESTful APIs APIs Version 2

productRead, productWrite, productFind, productDelete and productCount


The “product” object allows you to manage product data to be assigned or offered to users defined at
system, reseller, and manager level.
When searching using the “Find” and “Count” commands, you can use various objects with the following
hierarchy depending on the usage context:
product manager reseller

product reseller

product

Example of a call that reads data:


$Endpoint = 'productRead';
$Data = '{"id":"123"}';

Example of a call that searches for data by description:


$Endpoint = 'productFind';
$Data = '{"Where":"product.Description=\"MyProduct\""}';

Example of a call that searches for data by ID:


$Endpoint = 'productFind';
$Data = '{"Where":"product.id=123"}';

Example of a call that searches for data for ERP code:


$Endpoint = 'productFind';
$Data = '{"Where":"product.ERPCode=\"XYZ\""}';

Example of a call that adds:


$Endpoint = 'productWrite';
$Data = '{"id":"0", "Description":"MyProduct", "UserDescription":"MyProduct"}';

Example of a call that modifies data:


$Endpoint = 'productWrite';
$Data = '{"id":"123", "Description":"MyProduct", "UserDescription":"MyProduct"}';

Example of a call that delets data:


$Endpoint = 'productDelete';
$Data = '{"id":"123"}';

Available properties:
Name Comment Type
Object ID.
id If you want to add, in this property pass the value zero. int(11)
Read-only property.
Date of creation of the object. Automatically assigned when
CreationDate you add. timestamp
Read-only property.
Reseller ID.

ResellerID ID derived from the "reseller" object. int(11)


Defines it only if you are dealing with a reseller's
products.
ManagerID Manager ID. int(11)

Developer Manual 95
Use of RESTful APIs APIs Version 2

ID derived from the "manager" object.


Defines it only if you are dealing with a manager's
products.
Code Product code. longtext
Description of the Product.
Description longtext
Obsolete. Use the "Code" property.
Description to display to users.
UserDescription longtext
Multilingual property.
Product Policy ID.
ProductPolicyID int(11)
ID derived from the "productpolicy" object.
The reference price for resellers and managers.
CostPrice The manager can customize the sales price in the float
domain products.
Time in minutes assigned to the product.
A zero value defines an unlimited time.
CreditTime Not considered if the “free” users automatically int(20)
generated on domains with “Click & connect” and
“Simple password” authentication mode.
Maximum time, in minutes, of the daily connection.
A zero value defines an unlimited time.
Not considered if the “free” users automatically
DailyCreditTime generated on domains with “Click & connect” and int(20)
“Simple password” authentication mode.
If the policy used for this product, is a nonzero value,
the value entered in this field will not be considered.
Maximum time, in minutes, of the weekly connection.
A zero value indicates an infinite time.
Not considered for “free” users automatically generated
WeeklyCreditTime on domains with “Click & connect” and “Simple int(20)
password” authentication mode.
If the policy used for this value indicates a non-zero
value, the entered value in this field will not be
considered.
Maximum time, in minutes, of the monthly connection.
A zero value defines an unlimited time.
Not considered if the “free” users automatically
MonthlyCreditTime generated on domains with “Click & connect” and int(20)
“Simple password” authentication mode.
If the policy used for this product, is a nonzero value,
the value entered in this field will not be considered.
Megabytes of total data allowance assigned to the product.
A zero value defines unlimited data allowance.
CreditTraffic Not considered if the “free” users automatically int(20)
generated on domains with “Click & connect” and
“Simple password” authentication mode.

Developer Manual 96
Use of RESTful APIs APIs Version 2

Megabytes of daily data allowance assigned to the product.


A zero value defines unlimited data allowance.
Not considered if the “free” users automatically
DailyCreditTraffic generated on domains with “Click & connect” and int(20)
“Simple password” authentication mode.
If the policy used for this product is a nonzero value, the
value you enter in this field, will not be considered.
Megabytes of weekly data allowance assigned to the
product.
A zero value defines unlimited data allowance.
WeeklyCreditTraffic Not considered if the “free” users automatically int(20)
generated on domains with “Click & connect” and
“Simple password” authentication mode.
If the policy used for this product is a nonzero value, the
value you enter in this field, will not be considered.
Megabytes of monthly data allowance assigned to the
product.
A zero value defines unlimited data allowance.
MonthlyCreditTraffic Not considered if the “free” users automatically int(20)
generated on domains with “Click & connect” and
“Simple password” authentication mode.
If the policy used for this product is a nonzero value, the
value you enter in this field, will not be considered.
State what the first day of the week is.
Possible values are:
• 0 = Use default (defined in the product policy);
• 1 = Monday;
• 2 = Tuesday;
• 3 = Wednesday;
FirstDayOfweek • 4 = Thursday; int(1)
• 5 = Friday;
• 6 = Saturday;
• 7 = Sunday.
It is used to define the period of calculation of
consumption for the weekly limits.
At the recharge, it recovers residual of time and data
allowance of the previous product.
Possible values are:
RecoverResidualTimeAn
• 0 = No: it does not recover data; int(1)
dTraffic
• 1 = Yes: it always recovers residuals;
• 2 = Yes, unless the product has expired: it recovers
residuals only if the product has not expired.
Enables or disables advertising injection if the user has been
assigned the product.
Injection int(1)
If this property is not enabled, it overrides any
permissions defined in the domain or gateway.
ERPCode ERP/PMS external code. varchar(25)

Developer Manual 97
Use of RESTful APIs APIs Version 2

It is used to associate the user with the registry of an


external ERP/PMS.
Associates the product to a Mikrotik user manager profile.
It is used to automatically import the users and assign
MikrotikUMProfile the connected product. This feature is used for example varchar(50)
to create automatically the users generated by printers
or external tools compatible with Mikrotik.
If defined, it adds the users' IP address to the Mikrotik
Gateway's Address List.
MikrotikAddressList Useful if you have to add, on the Mikrotik Gateway, a varchar(30)
firewall rules for the 'Address List' (i.e. groups of IPs)
and/or to prioritize the traffic always via 'Address List'.
Type of expiration. Possible values are:
• 0 = Unlimited
• 1 = Days and Hours
• 2 = Days and Hours End-of-Month
ExpireValidityType int(1)
• 3 = Months
• 4 = Months and End-of-Month
• 5 = One login
• 6 = Days and Hours End-of-Day
Number of days of validity of the product.
ValidityDays The deadline is calculated starting from the date/time of int(11)
first login performed by the user.
Number of hours of validity of the product.
ValidityHours The deadline is calculated starting from the date/time of float
first login performed by the user.
Number of months of validity of the product.
ValidityMonths The deadline is calculated starting from the date/time of int(11)
first login performed by the user.
Enables the automatic sending of notification of upcoming
expiration to the users who have been assigned this
product.
NotifyExpirationToUser tinyint(1)
The number of days in advance and the message text
are defined in the 'General Options' by the system
administrator.

Developer Manual 98
Use of RESTful APIs APIs Version 2

productpolicyRead, productpolicyWrite, productpolicyFind, productpolicyDelete and


productpolicyCount
The “productpolicy” object allows you to manage product policy data to be assigned or offered to users
defined at system, reseller, and manager level.
When searching using the “Find” and “Count” commands, you can use various objects with the following
hierarchy depending on the usage context:
productpolicy manager reseller

productpolicy reseller

productpolicy

Example of a call that reads data:


$Endpoint = 'productpolicyRead';
$Data = '{"id":"123"}';

Example of a call that searches for data by description:


$Endpoint = 'productpolicyFind';
$Data = '{"Where":"productpolicy.Description=\"MyProductPolicy\""}';

Example of a call that searches for data by ID:


$Endpoint = 'productpolicyFind';
$Data = '{"Where":"productpolicy.id=123"}';

Example of a call that looks for data by code:


$Endpoint = 'productpolicyFind';
$Data = '{"Where":"productpolicy.Code=\"XYZ\""}';

Example of a call that adds:


$Endpoint = 'productpolicyWrite';
$Data = '{"id":"0", "Code":"MyProductPolicy"}';

Example of a call that modifies data:


$Endpoint = 'productpolicyWrite';
$Data = '{"id":"123", "Code":"MyProductPolicy"}';

Example of a call that delets data:


$Endpoint = 'productpolicyDelete';
$Data = '{"id":"123"}';

Available properties:
Name Comment Type
Object ID.
id If you want to add, in this property pass the value zero. int(11)
Read-only property.
Date of creation of the object. Automatically assigned when
CreationDate you add. timestamp
Read-only property.
Reseller ID.

ResellerID ID derived from the "reseller" object. int(11)


Defines it only if you are dealing with a reseller's
product policies.

Developer Manual 99
Use of RESTful APIs APIs Version 2

Manager ID.

ManagerID ID derived from the "manager" object. int(11)


Defines it only if you are dealing with a manager's
product policies.
Code of the policy.
Code Mandatory field. There must be no duplicates. varchar(64)
If not specified, a code will be assigned automatically.
Description Description of the policy. text
Indicates the number of concurrent connections that can be
made by the same user.
Normally it is equal to 1. It is useful to define the
number of concurrent connections that can be made in
SimultaneousUse free hotspots, so that for example you can make int(11)
different commercial offers to the managers.
Example: hotspot with up to 5 simultaneous
connections with a price, hotspot with up to 10
simultaneous connections with a different price, etc.
Maximum number of devices that can be connected with
MaxDevices the same credentials. int(11)
A zero value defines an unlimited number of devices.
SessionTimeout Auto logout time (in minutes). int(11)
IdleTimeout Inactivity logout time (in minutes). int(11)
MaxDown Peak bit rate fot the download. int(20)
MaxUp Peak bit rate for the upload. int(20)
Maximum time, in minutes, of the daily connection.
A zero value defines an unlimited time. If defined, it will
DailyCreditTime not consider the daily time defined in the product. int(20)
Not considered for “free” users automatically generated
on domains with “Click & connect” and “Simple
password” authentication mode.
Maximum time, in minutes, of the weekly connection.
A zero value indicates an infinite time.
WeeklyCreditTime Not considered for “free” users automatically generated int(20)
on domains with “Click & connect” and “Simple
password” authentication mode.
Maximum time, in minutes, of the monthly connection.
A zero value defines an unlimited time. If defined, it will
MonthlyCreditTime not consider the monthly time defined in the product. int(20)
Not considered for “free” users automatically generated
on domains with “Click & connect” and “Simple
password” authentication mode.
Megabytes of daily data allowance.

DailyCreditTraffic A zero value defines unlimited data allowance. If int(20)


defined, it will not consider the daily traffic defined in
the product.

Developer Manual 100


Use of RESTful APIs APIs Version 2

Not considered for “free” users automatically generated


on domains with “Click & connect” and “Simple
password” authentication mode.
Megabytes of weekly data allowance assigned to the
product.

WeeklyCreditTraffic A zero value defines unlimited data allowance.


Not considered if the “free” users automatically
generated on domains with “Click & connect” and
“Simple password” authentication mode.
Megabytes of monthly data allowance.
A zero value defines unlimited data allowance. If
defined, it will not consider the monthly traffic defined
MonthlyCreditTraffic in the product. int(20)
Not considered for “free” users automatically generated
on domains with “Click & connect” and “Simple
password” authentication mode.
State what the first day of the week is.
Possible values are:
• 0 = Use default (defined in the product policy);
• 1 = Monday;
• 2 = Tuesday;
• 3 = Wednesday;
FirstDayOfWeek • 4 = Thursday; int(1)
• 5 = Friday;
• 6 = Saturday;
• 7 = Sunday.
It is used to define the period of calculation of
consumption for the weekly limits.
Time, in seconds, that defines the interval for the automatic
updating of the connection information (session duration,
bytes sent/received, etc.).
It is important to use this value if, with the same user,
multiple devices can connect and to make sure that the
AcctInterimInterval system can determine disconnected users even if the int(11)
gateway has not sent the disconnection (STOP packet).
The minimum definable time is 300 seconds. Lower
values will be automatically converted to 300. If zero,
this feature is disabled. This attribute is not supported
by all types of gateways.
Mikrotik Address List.
If defined, it adds the users’IP address to the Mikrotik
MikrotikAddressList Gateway’s Address List. Useful if you have to add, on varchar(30)
the Mikrotik Gateway, a firewall rules for the ‘Address
List’ (i.e. groups of IPs) and/or to prioritize the traffic
always via ‘Address list’.
DownBurstLimit Maximum burst data rate reachable in download. int(20)
UpBurstLimit Maximum burst data rate reachable in upload. int(20)

Developer Manual 101


Use of RESTful APIs APIs Version 2

Download average date rate in the burst time.


DownBurstThreshold If average over the time period is less than the specified int(20)
value, burst will be active.
Upload average data rate in the burst time.
UpBurstThreshold If average over the time period is less than the specified int(20)
value, burst will be active.
Defines the time period in seconds to calculate the average
DownBurstTime int(11)
(threshold) of download traffic.
Defines the time period in seconds to calculate the average
UpBurstTime int(11)
(threshold) of upload traffic.
Enables data rate modulation. Possible values are:
• 0 = Disabled
• 1 = Very low degradation
TrafficBandwidthModula • 2 = Low degradation
int(11)
tion • 3 = Linear degradation
• 4 = Medium degradation
• 5 = High degradation
• 6 = Minimum data rate at max traffic
TrafficBandwidthModula Activates the data rate degradation from this time of the
int(11)
tionFromTime day.
TrafficBandwidthModula
Deactivates the data degradation at this time of day. int(11)
tionToTime
Type of period considered for the calculation. Possible
TrafficBandwidthModula values are:
int(2)
tionPeriod • 0 = Hours
• 10 = Current Month
TrafficBandwidthModula Period of time expressed in hours to be considered for the
int(20)
tionHours analysis of traffic carried out for speed modulation.
Defines the type of traffic to be considered for the data rate
modulation. Possible values are:
• 0 = Total download + upload
TrafficBandwidthType int(2)
• 1 = Separated download and upload
• 2 = Only Download
• 3 = Only Upload
Megabytes of maximum download traffic in the period of
calculating degradation. Once it is reached, the minimum
data rate will be set to the user The expressed value
depends on the "TrafficBandwidthType" property and
TrafficBandwidthModula considers the traffic developed in download or download +
int(20)
tionTrafficDown upload as follows:
• If it is equal to zero = Expresses the limit traffic by adding
the download and the upload
• If it is equal to one or two = Express the limit traffic
considering only the download
Megabytes of maximum upload traffic in the period of
TrafficBandwidthModula
calculating degradation. Once it is reached, the minimum int(20)
tionTrafficUp
data rate will be set to the user.

Developer Manual 102


Use of RESTful APIs APIs Version 2

Minimum download data rate in bits defined for the user


BandwidthMinDown once it reaches the maximum traffic in the period of int(20)
calculating degradation.
Minimum upload data rate in bits defined for the user once
BandwidthMinUp it reaches the maximum traffic in the period of calculating int(20)
degradation.
IgnoreTrafficWhenModu Ignores the bandwidth usage when the modulation is not
tinyint(1)
lationIsDisabled active.
Object containing the names and values of custom radius
attributes to use during "check".
CustomRadiusGroupChe The treated properties are explained in the next object
ck paragraph “Properties contained in the
'CustomRadiusGroupCheck' Property of the Product
Policy”.
Object containing the names and values of custom radius
attributes to use during the "reply” phase.
CustomRadiusGroupRepl The treated properties are explained in the next object
y paragraph “Properties contained in the
'CustomRadiusGroupCheck' Property of the Product
Policy”.

Developer Manual 103


Use of RESTful APIs APIs Version 2

Properties contained in the 'CustomRadiusGroupCheck' Property of the Product Policy


The "CustomRadiusGroupCheck' property of the "productpolicy" class contains an object with properties
that express the attribute name in the name and the attribute value in the value.

Example in "json" format with two example attributes:


{
"AttributeName1":"xxx",
" AttributeName2":"yyy"
}
Properties contained in the 'CustomRadiusGroupReply' Property of the Product Policy
The "CustomRadiusGroupReply' property of the "productpolicy" class contains an object with properties
that express the attribute name in the name and the attribute value in the value.

Example in "json" format with two example attributes:


{
"AttributeName1":"xxx",
" AttributeName2":"yyy"
}

Developer Manual 104


Use of RESTful APIs APIs Version 2

resellercurrencyandpaymentsRead, resellercurrencyandpaymentsWrite
The "resellercurrencyandpayments" object allows you to manage the reseller's currency and payment
systems data.

Example of a call that reads data:


$Endpoint = 'resellercurrencyandpaymentsRead';
$Data = '{"id":"123"}';

Example of a call that modifies data:


$Endpoint = 'resellercurrencyandpaymentsWrite';
$Data = '{"id":"123", "currency":"$"}';

Available properties:
Name Comment Type
Object ID of type "reseller”.
id int(11)
Read-only property.
Currency code. It is used for payments.
CurrencyCode varchar(3)
Define a value of type "ISO 4217".
Currency Currency simbol for prices. varchar(20)
Decimal separator. Possible values are:
DecimalSeparator • 1 = Dot int(3)
• 2 = Comma
Thousands separator. Possible values are:
• 1 = Space
ThousandSeparator int(3)
• 2 = Dot
• 3 = Comma
Tax rate included in the selling prices to the users ID.
TaxRatesID
ID derived from the "taxrates" object.
TaxJurisdiction Fiscal jurisdiction for taxation. varchar(32)
AdministrativeEmailAddr Administrative email address to send notifications of users’
varchar(255)
ess payments
Receipt header image.
ReceiptSellerImg mediumblob
Property of type "image".
Receipt header image type.
ReceiptSellerImgType varchar(40)
Read-only property.
ReceiptIDPrefix Prefix of the receipt ID varchar(32)
Notes to print on the receipt.
ReceiptNote longtext
Multilingual property.
PaypalAccount Address of the PayPal account. varchar(50)
Mollie API Key to enable payments through this gateway.
MollieApiKey varchar(50)
The currency must be in Euro.
Authorize.Net API ID to enable payments through this
AuthorizeNetApiID varchar(50)
gateway.
AuthorizeNetTransaction
Authorize.Net transaction ID. varchar(50)
Key
PayFastApiID PayFast Merchant ID. varchar(50)
PayFastTransactionKey PayFast Merchant Key. varchar(50)
PayFastPassPhrase PassPhrase defined in the PayFast account. varchar(40)
PaymentExpressApiID Payment Express username. varchar(50)

Developer Manual 105


Use of RESTful APIs APIs Version 2

PaymentExpressTransact
Payment Express Key. varchar(64)
ionKey
PesapalApiID Pesapal Consumer Key. varchar(50)
PesapalTransactionKey Pesapal Consumer Secret. varchar(64)
PayUBizApiID PayU Biz Merchant Key. varchar(50)
PayUBizTransactionKey PayU Biz Merchant Salt. varchar(64)
EwayApiID eWay API Key. varchar(100)
EwayTransactionKey eWay password. varchar(50)
PaysafecardApiID Paysafe Card username (SOPG). varchar(50)
PaysafecardTransactionK
Paysafe Card password (SOPG). varchar(64)
ey
Version of 1Voucher-payment type.
Possible values are:
• 0 = 1ForYou
OneVoucherVersion int(1)
• 1 = 1Voucher
You can still use 1Voucher for old contract. For new
contract, select 1ForYou.
OneVoucherConsumerKe varchar(40)
1Voucher/1ForYou Consumer Key.
y
OneVoucherConsumerSe varchar(40)
1Voucher/1ForYou Consumer Secret.
cret
OneVoucherPurseAccou varchar(40)
1Voucher/1ForYou Purse Account Number.
ntNumber
OneVoucherUserName 1Voucher username. varchar(50)
OneVoucherPassword 1Voucher password. varchar(50)
TransactiumUserName Transactium username varchar(50)
TransactiumPassword Transactium password. varchar(50)
StripeAccount Stripe account ID. varchar(50)
StripeApiKey Stripe Live API Key. varchar(50)
StripePublishableApiKey Stripe live publishable API Key. varchar(50)
StripeTestApiKey Stripe test API Key. varchar(50)
StripeTestPublishableApi
Stripe test publishable API Key. varchar(50)
Key
SafaricomMPesaTestPass
Safaricom MPesa test Pass Key. varchar(100)
Key
SafaricomMPesaTestBusi
Safaricom MPesa test Business Code. varchar(10)
nessCode
SafaricomMPesaTestCon
Safaricom MPesa test Consumer Key. varchar(128)
sumerKey
SafaricomMPesaTestCon
Safaricom MPesa test Consumer Secret. varchar(128)
sumerSecret
SafaricomMPesaPassKey Safaricom MPesa live Pass Key”. varchar(100)
SafaricomMPesaBusines
Safaricom MPesa live Business Code. varchar(10)
sCode
SafaricomMPesaConsum
Safaricom MPesa live Consumer Key. varchar(128)
erKey
SafaricomMPesaConsum
Safaricom MPesa live Consumer Secret. varchar(128)
erSecret
WAAFIPayTestAPIKey WAAFIPay test API Key. varchar(20)

Developer Manual 106


Use of RESTful APIs APIs Version 2

WAAFIPayTestMerchant
WAAFIPay test Merchant ID. varchar(16)
UID
WAAFIPayTestAPIUserID WAAFIPay test API User UID. varchar(16)
WAAFIPayAPIKey WAAFIPay API Key. varchar(20)
WAAFIPayMerchantUID WAAFIPay Merchant UID. varchar(16)
WAAFIPayAPIUserID WAAFIPay API User ID. varchar(16)
The title to display in the Welcome Portal for the first
CustomPayment1Title custom payment. longtext
Multilingual property.
CustomPayment1URL The external URL to invoke for the first custom payment. varchar(255)
The external URL to invoke to verify the first custom
payment.

CustomPayment1VerifyU If not defined, payments will not be verified and will


RL always be accepted with possible security problems. The varchar(255
page must respond in JSON format with the 'Status'
variable, which must contain 'paid' to accept the
payment or 'cancel' to decline it.
The image to show in the Welcome Portal for the first
CustomPayment1Img custom payment. Recommended size 172x120 pixels. mediumblob
“Image-type property.
The image type of image to display in the Welcome Portal
CustomPayment1ImgTyp for the first custom payment type.
varchar(40)
e
Read-only property.
Defines the target of the payment pages. If the gateway
security policies allow including the payment page, choose
CustomPayment1Redirec 'Welcome Portal', otherwise choose 'External Site'
int(3)
tTarget Possible values are:
• 0 = External site
• 1 = Welcome Portal
The title to show in the Welcome Portal for the second
CustomPayment2Title custom payment. Longtext
Multilingual property.
CustomPayment2URL The external URL to invoke for the second custom payment. varchar(255)
External URL to invoke to verify the second custom
payment.

CustomPayment2VerifyU If not defined, payments will not be verified and will


RL always be accepted with possible security problems. The varchar(255
page must respond in JSON format with the 'Status'
variable, which must contain 'paid' to accept the
payment or 'cancel' to decline it.
Image to display in the Welcome Portal for the second
CustomPayment2Img custom payment. Recommended size 172x120 pixels. mediumblob
“Image-type property.
Image type of image to display in the Welcome Portal for
CustomPayment2ImgTyp the second custom payment type.
varchar(40)
e
Read-only property.

Developer Manual 107


Use of RESTful APIs APIs Version 2

Defines the target of the payment pages. If the gateway


security policies allow including the payment page, choose
CustomPayment2Redirec 'Welcome Portal', otherwise choose 'External Site'
int(3)
tTarget Possible values are:
• 0 = External site
• 1 = Welcome Portal

Developer Manual 108


Use of RESTful APIs APIs Version 2

resellerexternalauthRead, resellerexternalauthWrite
The "resellerexternalauth" object allows you to manage data from external authentication systems
configured at reseller level.
Available only for enterprise edition.

Example of a call that reads data:


$Endpoint = 'resellerexternalauthRead';
$Data = '{"id":"123"}';

Example of a call that modifies data:


$Endpoint = 'resellerexternalauthWrite';
$Data = '{"id":"123", "FacebookAppID":"xxxxxxxxxxxx"}';

Available properties:
Name Comment Type
Object ID of type "reseller”.
id int(11)
Read-only property.
FacebookAppID App ID of Facebook app. varchar(100)
TwitterConsumerKey API Key of Twitter application. varchar(100)
GoogleClientID Client ID of Google app. varchar(100)
Allows defining the Google API Key in order to get Google
GoogleApiKey services privately. Please, refer to the manual to understand varchar(50)
the types of services that you should activate.
LinkedinClientID Client ID of LinkedIn. varchar(100)
FlickrAPIKey API Key of Flick app. varchar(100)
InstagramAPIKey Client ID of Instagram app. varchar(100)
AmazonClientID Client ID of Amazon application. varchar(100)
VKontakteAppID App ID of VKontakte application. varchar(100)
Short title of the OAuth application displayed to user.
CustomOAuth1Title varchar(250)
Multilingual property.
CustomOAuth1ClientID Client ID for the custom OAuth authentication. varchar(100)
Version of OAuth. Possible values are:
• 1.0 = 1.0
CustomOAuth1Version varchar(10)
• 1.0a = 1.0a
• 2.0 = 2.0
URL of the OAuth server to redirect the user for the
CustomOAuth1DialogUR authentication request. In the URL , you can use the
varchar(255)
L following variables: {REDIRECT_URI}; {CLIENT_ID}; {SCOPE};
{STATE}; {API_KEY}.
CustomOAuth1InitialTok URL of the OAuth server to require the initial token for
varchar(255)
enURL OAuth servers 1.0 and 1.0a.
CustomOAuth1AccessTo URL of the OAuth server that returns the URL of the access
varchar(255)
kenURL toke. In the URL, you can use the variable {SCOPE}.
CustomOAuth1AccessTo Type of access token to take when the OAuth server does
varchar(50)
kenType not specify it.
CustomOAuth1URLPara Enables this check if the API call requires that the
int(1)
meters parameters be passed via URL.
Sets this variable on POST if the OAuth server does not
CustomOAuth1TokenRe
support the token request using the HTTP GET method. varchar(4)
questMethod
Possible values are:

Developer Manual 109


Use of RESTful APIs APIs Version 2

• GET = GET
• POST = POST
Sets the method with which the access token is returned.
Define 'HASH' if it is returned in GET with a hashtag. Possible
CustomOAuth1TokenRes
values are: varchar(4)
ponseMethod
• GET = GET
• HASH = HASH
CustomOAuth1HashField Field name returned in the HASH that contains the access
varchar(50)
Name token.
The OAuth server requires that the OAuth parameters be
CustomOAuth1Authoriza
passed using HTTP authorization instead of the URI int(1)
tionHeader
parameters of the request.
Based on the documentation of the OAuth server, define
CustomOAuth1Scope the identifiers of the authorizations (Scope) that the user varchar(255)
must grant. More identifiers must be separated by commas.
Based on the documentation of the OAuth server, define
CustomOAuth1UserInfo
the URL, complete with the endpoint, with the API that varchar(255)
APIURL
allows obtaining the users' data.
Indicate the name of the variable, contained in the data
CustomOAuth1UserNam returned by the OAuth authentication, which contains the
varchar(100)
eFieldName username. Multiple field names can be passed, separated
by commas. The first available name will be uploaded.
Indicate, if available, the variable name, contained in the
CustomOAuth1FirstNam
data returned by the OAuth authentication, which contains varchar(100)
eFieldName
the user's first name.
Indicate, if available, the variable name, contained in the
CustomOAuth1LastName
data returned by the OAuth authentication, which contains varchar(100)
FieldName
the user's last name.
Indicate, if available, the variable name, contained in the
CustomOAuth1EmailFiel
data returned by the OAuth authentication, which contains varchar(100)
dName
the user's email address.
CustomOAuth1Backgrou
Background color displayed in the login App. varchar(30)
ndColor
CustomOAuth1Foregrou
Text color displayed in the login App. varchar(30)
ndColor
Type of image to display in the Welcome Portal.
CustomOAuth1ImgType Recommended dimensions are 32x32 pixels. varchar(40)
Read-only property.
Image to display in the Welcome Portal. Recommended
CustomOAuth1Img mediumblob
dimensions are 32x32 pixels.
LDAPServer Address of the LDAP server. varchar(100)
LDAPDomainName Name of the LDAP domain. varchar(100)
Name of the Organizational Units, separated by commas,
LDAPUserGroup varchar(255)
containing the LDAP users that can authenticate.
Short title of the LDAP application displayed to user.
LDAPTitle varchar(250)
Multilingual property.
LDAPBackgroundColor Background color displayed in the login App. varchar(30)
LDAPForegroundColor Text color displayed in the login App. varchar(30)

Developer Manual 110


Use of RESTful APIs APIs Version 2

Type of image to display in the Welcome Portal.


LDAPImgType Recommended dimensions are 32x32 pixels. varchar(40)
Read-only property.
Image to display in the Welcome Portal. Recommended
LDAPImg mediumblob
dimensions are 32x32 pixels.
FacebookAppSecret App secret of Facebook app. varchar(100)
GoogleSecret Secret of Google app. varchar(100)
LinkedinSecret LinkedIn application secret. varchar(100)
TwitterConsumerSecret API Secret of Twitter application. varchar(100)
InstagramAPISecret Secret of Instagram application. varchar(100)
AmazonClientSecret Client Secret of Amazon application. varchar(100)
VKontakteAppSecret App Secret of VKontakte application. varchar(100)
CustomOAuth1ClientSec
Client Secret for the custom OAuth authentication. varchar(100)
ret

Developer Manual 111


Use of RESTful APIs APIs Version 2

resellernotificationsRead, resellernotificationsWrite
The "systemnotifications" object allows you to manage notification data configured at system level.

Example of a call that reads data:


$Endpoint = 'resellernotificationsRead';
$Data = '{"id":"123"}';

Example of a call that modifies data:


$Endpoint = 'resellernotificationsWrite';
$Data = '{"id":"123", "SmsNotificationText":"<en>Thanks for your subscription to hotspots
%Domain%. You can login as user %username% and Password %password%</en>"}';

Available properties:
Name Comment Type
Object ID of type "reseller”. int(11)
id
Read-only property.
Subject of the email that is sent to users with the receipt of longtext
EmailReceiptSubject payment.
Multilingual property.
Text of the email that is sent to users with the receipt of longtext
EmailReceiptBody payment.
Multilingual property.
Enables sending an SMS to send to users who pay with int(1)
1Voucher/1ForYou, notifying the code of the new voucher.
Possible values are:
OneVoucherSendSMS
• 0 = Use default
• 1 = No
• 2 = Yes
SMS text to send to users who pay with 1Voucher/1ForYou, longtext
notifying the code of the new voucher. It is possible to use
OneVoucherSendSMSTe the variables: %UserName%, %Password%, %FirstName%,
xt %LastName%, %Domain%, %SmsNumber%,
%SmsNumber2%, %NewPin%, %Credit%, %Currency%.
Multilingual property.
Enable sending an email to send to users who pay with int(1)
1Voucher/1ForYou, notifying the code of the new voucher.
Possible values are:
OneVoucherSendEmail
• 0 = Use default
• 1 = No
• 2 = Yes
Subject of the email to send to users who pay with longtext
1Voucher/1ForYou, notifying the code of the new voucher.
It is possible to use the variables: %UserName%,
OneVoucherSendEmailS %Password%, %FirstName%, %LastName%, %Domain%,
ubject %SmsNumber%, %SmsNumber2%, %NewPin%, %Credit%,
%Currency%.
Multilingual property.
OneVoucherSendEmailT Body of the email to send to users who pay with longtext
ext 1Voucher/1ForYou, notifying the code of the new voucher.

Developer Manual 112


Use of RESTful APIs APIs Version 2

It is possible to use the variables: %UserName%;


%Password%; %FirstName%; %LastName%; %Domain%;
%SmsNumber%; %SmsNumber2%; %NewPin%; %Credit%;
%Currency%.
Multilingual property.
GatewaySendStatusEmai Enables sending email alerts for monitoring the status of smallint(1)
l gateways and access points.
Email addresses to send email alerts for the status of the varchar(255)
GatewaySendStatusEmai
gateways and access points. Multiple addresses must be
lAddresses
separated by comma.
Enables sending SMS alerts for monitoring the status of smallint(1)
GatewaySendStatusSMS
gateways and access points.
Phone number to send SMS alerts for the status of the varchar(255)
GatewaySendStatusSMS
gateways and access points. Multiple numbers must be
Numbers
separated by comma.

Developer Manual 113


Use of RESTful APIs APIs Version 2

resellerRead, resellerWrite, resellerFind, resellerDelete and resellerCount


The “reseller” object allows you to manage reseller data.
When searching using the “Find” and “Count” commands, you can use various objects with the following
hierarchy:

reseller

Example of a call that reads data:


$Endpoint = 'resellerRead';
$Data = '{"id":"123"}';

Example of a call that searches for data by company name:


$Endpoint = 'resellerFind';
$Data = '{"Where":"reseller.CompanyName=\"MyCompanyName\""}';

Example of a call that searches for data by ERP code:


$Endpoint = 'resellerFind';
$Data = '{"Where":"reseller.ERPCode=\"XYZ\""}';

Example of a call that adds:


$Endpoint = 'resellerWrite';
$Data = '{"id":"0", "CompanyName":"MyCompanyName"}';

Example of a call that modifies data:


$Endpoint = 'resellerWrite';
$Data = '{"id":"123", "CompanyName":"MyCompanyName"}';

Example of a call that deletes data:


$Endpoint = 'resellerDelete';
$Data = '{"id":"123"}';

Available properties:
Name Comment Type
Object ID.
id If you need to add, pass the value zero in this property. int(11)
Read-only property.
Date when the object was created. Automatically assigned
CreationDate when you add it. timestamp
Read-only property.
Reseller’s Company Name.
CompanyName varchar(100)
Mandatory when adding.
Address Reseller’s address. varchar(100)
City Reseller’s city. varchar(100)
State Province or state. varchar(100)
Code of the country.
Country
Define the value in ISO 3166-1 alpha-2 format.
Vat Reseller’s VAT-I number. varchar(20)
Phone Reseller’s phone number. varchar(20)
Fax Reseller’s fax number. varchar(20)
Web Reseller’s web address. varchar(50)
EmailAddress Email address. varchar(50)
RegisterOfCompaniesIn Registered at register of companies of. varchar(100)

Developer Manual 114


Use of RESTful APIs APIs Version 2

Percentage of commission for advertising sold by the


AdvPercentageFee double
reseller.
Discount percentage on the price list of the products sold by
Discount float
the reseller.
Timezone of the reseller.
TimeZone varchar(64)
Define a “tzdata”-type value.
Custom domain name assigned to the reseller.
Mandatory if the "CertificateID" property is passed.

RoundRobinDomain0 Unsearchable with "Find". varchar(255)


The domain name must be resolvable by the DNS
defined in the HSNM.
Enterprise version only.
Round robin domain 1.
Unsearchable with "Find".
The domain name must be resolvable by the DNS
RoundRobinDomain1 defined in the HSNM. varchar(255)
Visible only in the enterprise version and if "IP of the
first alternative host" has been defined in the "System
settings".
Enterprise version only.
Round robin domain 2.
Unsearchable with "Find".
The domain name must be resolvable by the DNS
RoundRobinDomain2 defined in the HSNM. varchar(255)
Visible only in the enterprise version and if "IP of the
first alternative host" has been defined in the "System
settings".
Enterprise version only.
ID of the SSL certificate to be assigned.
Unsearchable with "Find".
CertificateID The certificate must have been issued for the domain int(11)
defined on RoundRobinDomain0.
Enterprise version only.
Image displayed on the backend login page when the URL
matches the certificate defined on the
LoginImg "RoundRobinDomain0" property. mediumblob

“Image”-type property.
Type of image loaded to use for the backend login page.
LoginImgType varchar(40)
Read-only property.
Logo displayed in the top-left corner of the backend when
LogoImg you log in as a reseller. mediumblob
“Image”-type property.
Type of image loaded for the logo displayed in the top-left
LogoImgType corner of the backend when you log in as a reseller. varchar(40)
Read-only property.

Developer Manual 115


Use of RESTful APIs APIs Version 2

Brand name to be assigned to the system. It is used, for


example, to customize the Powered By of the Welcome
BrandName Portal, the product name within the Wiki, etc. varchar(30)

Only available in the Enterprise edition.


URL to open when you click on Powered By.
BrandUrl If not defined, the one for the system will be used. varchar(255)
Only available in the Enterprise edition.
Allows choosing the type of CSS to apply. With 'System' it
uses system-level custom CSS and with 'Custom' it allows
CustomCSSType defining custom CSS. Possible values are: int(1)
• 0 = System
• 1 = Customized
Custom CSS. They allow to customize the admin area
CustomCSS appearance. These settings are also definable at manager longtext
level.
SMS gateway type to use for sending and receiving SMS.
Possible values are:
SMSGatewayType • 0 = Default int(2)
• 1 = Mail Transport
• 2 = http Request
Defines the phone number associated with the gateway to
SMSGatewayNumber varchar(50)
receive SMS.
Sender's email address for the gateway with mail
SMSGatewayEmailFrom transportation. varchar(100)
Addr
Define if "SmsGatewayType" is equal to 1.
Recipient's email address for the gateway with
transportation via mail. It is usually in the form
%Number%@GatewayDomainName.com or
%NumberNoIntPrefix%@GatewayDomainName.com,
SMSGatewayEmailToAdd where instead of %Number% is placed the number of
varchar(100)
r destination mobile number and instead of
%NumberNoIntPrefix% is placed the mobile number
without the international country calling code.
Define if "SmsGatewayType" is equal to 1.
Subject of the email to be sent to the gateway. The variables
SMSGatewayEmailSubje available are the same as defined in the recipient's address.
varchar(255)
ct
Define if "SmsGatewayType" is equal to 1.
Type of request to execute for the specified URL. Possible
SMSGatewayRequestTyp values are:
int(2)
e • 0 = GET
• 1 = POST
URL address for gateway with HTTP requests. In the address,
you can use the variables %Number%, %NumberPlus%
SMSGatewayURL (number with international calling code +), varchar(255)
%NumberNoIntPrefixZero% (number without zeros in the
international calling code), %UserName%, %Password% and

Developer Manual 116


Use of RESTful APIs APIs Version 2

%Message% representing the destination number, user


name, password and the text to send.
Define if "SmsGatewayType" is equal to 2.
User name of the gateway. It serves to assign a value to the
variable %UserName%. Usually gateways using HTTP
SMSGatewayUserName requests require the authentication. varchar(50)

Define if "SmsGatewayType" is equal to 2.


Gateway password. Used to assign a value to the
%Password% variable. Usually gateways which use HTTP
SMSGatewayPassword requests, require authentication. varchar(50)

Define if "SmsGatewayType" is equal to 2.


Defines the type of international country calling code
received by the SMS gateway. Possible values are:
• 0 = Auto
SMSGatewayReceiveIntP • 1 = With 00 (e.g. 001)
int(2)
refix • 2 = With + (e.g. +1)
• 3 = Without 00 nor + (e.g. 1)
Define if "SmsGatewayType" is equal to 2.
SMSUnitPrice Unit price per SMS for the reseller. float
Maximum number of definable gateway.
MaxGateways A zero value states that the maximum number is limited int(5)
only by the license in use in the system.
Maximum number of concurrent users definable in the
gateways.
MaxUsers The sum of the maximum number of users defined in int(11)
each gateway cannot exceed the defined value. A value
equal to zero indicates an infinite number.
Maximum number of concurrent users definable in each
MaxUsersPerGateway gateway. int(11)
A value equal to zero expresses an infinite number.
Maximum number of Welcome Portal views per minute.
WPMaxView int(11)
A value equal to zero indicates an infinite number.
Reduce the maximum number of users of the gateways to.
If you select a non-zero value in the disabled months of
the gateway, the service will work the same reducing
the maximum number of users to the indicated
percentage. For example, if in the gateway, in the
DisabledMonthsReduce 'Maximum Number of Users' field, you defined fifty
MaxUsers users, in the field you select ten percent and the current int(11)
month is disabled by the values selected in the gateway
'Operating Months' field, the maximum number of users
will be reduced to five. If you select zero percent in the
disabled months, it will not be possible to use the
service and the message 'Sorry, the system is not active
in this month' will be displayed to users. If you select

Developer Manual 117


Use of RESTful APIs APIs Version 2

'Default' it will be considered the percentage defined at


reseller level.
Maximum number of active campaigns.
MaxCampaignsOfReselle
r A value equal to zero indicates a limited number based int(11)
on the license.
Maximum size in Mega Bytes of custom images and media
MaxMediaSize int(11)
files of the map locations for the manager.
Size in Mega Bytes of custom images and media files of the
MediaSize map locations inserted for the manager. int(11)
Read-only properties.
Terms & Conditions.
TermsAndConditions longtext
Multilingual field.
TermsAndConditionsVer
Version of the Terms & Conditions statement. varchar(10)
sion
TermsAndConditionsDat
Last revision date of the Terms & Conditions statement. datetime
e
Privacy Policy.
PrivacyPolicy longtext
Multilingual field.
Last and first and name of the contact person for the
PrivacyPolicyRefreeNam
protection of personal data to be displayed in the Privacy varchar(50)
e
Policy statement.
PrivacyPolicyVersion Version of the Privacy Policy statement. varchar(10)
PrivacyPolicyDate Last revision date of the Privacy Policy statement. datetime
Delete users inactive since.
Possible values are:
• 0 = Default
• 1 = Never
• 2 = One day
• 3 = One week
DeleteOlderInactiveUser • 4 = Two weeks
int(11)
s • 5 = One month
• 6 = Three months
• 7 = Six months
• 8 = One year
• 9 = Eighteen months
• 10 = Two years
• 11 = Three years
Logo displayed in the top-left corner of the backend when
ManagerLogoImg you log in as a manager. mediumblob
“Image”-type property.
Type of image loaded for the logo displayed in the top-left
ManagerLogoImgType corner of the backend when you log in as a manager. varchar(40)
Read-only property.
ERP/PMS external code.
ERPCode It is used to associate the reseller with the registry of an varchar(25)
external ERP/PMS

Developer Manual 118


Use of RESTful APIs APIs Version 2

Notes Notes. text


If equal to one, it blocks the access to all users of the
Locked tinyint(1)
reseller.

Developer Manual 119


Use of RESTful APIs APIs Version 2

resellersystemuserRead, resellersystemuserWrite, resellersystemuserFind and


resellersystemuserDelete
The "resellersystemuser" object allows you to manage the data of the system users of the resellers who
access the backend.
When searching using the “Find” command, you can use various objects with the following hierarchy
depending on the usage context:

resellersystemuser reseller

Example of a call that reads data:


$Endpoint = 'resellersystemuserRead';
$Data = '{"id":"123"}';

Example of a call that searches for data by username:


$Endpoint = 'resellersystemuserFind';
$Data = '{"Where":"resellersystemuser.UserName =\"MyAdminUser\""}';

Example of a call that searches for data by ID:


$Endpoint = 'resellersystemuserFind';
$Data = '{"Where":"resellersystemuser.id=123"}';

Example of a call that adds:


$Endpoint = 'resellersystemuserWrite';
$Data = '{"id":"0", "UserName":"MyAdminUser"}';

Example of a call that modifies data:


$Endpoint = 'resellersystemuserWrite';
$Data = '{"id":"123", "UserName":"MyAdminUser"}';

Example of a call that deletes data:


$Endpoint = 'resellersystemuserDelete';
$Data = '{"id":"123"}';

Available properties:
Name Comment Type
Object ID.
id If you need to add, pass the value zero in this property. int(11)
Read-only property.
Date when the object was created. Automatically assigned
CreationDate when you add it. timestamp
Read-only property.
Reseller ID.
ResellerID ID derived from the “reseller” object. int(11)
Mandatory property.
Username for the login. It is recommended to enter your
UserName varchar(60)
mobile phone or email address.
Password for the user.

Password The password entered must comply with the "Password varchar(255)
Complexity" defined in the "Backend Security" of the
"System Settings".
RetypePassword Repeated password to verify accuracy. varchar(255)

Developer Manual 120


Use of RESTful APIs APIs Version 2

Specify only whether the password should be defined or


changed.
FirstLastName Last and first name of the user. varchar(100)
Phone Landline phone number. varchar(20)
MobilePhone Mobile phone number. varchar(20)
Type of contact. Possible values:
ContactType • 0 = Technician int(11)
• 1 = Administrative
Defines the backend colors for the system user accessing
the backend. Possible values are:
• (Empty value) = Use default
BackendColors varchar(30)
• greygreen = Grey and Green
• darkblue = Dark and Blue
• darkorange = Dark and Orange
EmailAddress User’s email address. varchar(100)
Defines permissions to access the data related to the
AuthGatewaysModule internet gateways. smallint(3)
Property expressing permissions.
Defines permissions to access GPS tracking and fleet
AuthFleetModule telemetry data. smallint(3)
Property expressing permissions.
Defines permissions for the management of the system
users (the data of this page). Admin enables the user to
AuthSystemUsers manage permissions. smallint(3)

Property expressing permissions.


Defines permissions for the utility functions.
AuthUtilityFunctions smallint(3)
Property expressing permissions.
Defines permissions for the SSL certificates.
AuthCertificates smallint(3)
Property expressing permissions.
Defines permissions for the currency and the management
of the payment systems. Admin enables the user to modify
AuthCurrencyAndPayme the prepayment in the manager and the test accounts for
smallint(3)
nts payments.
Property expressing permissions.
Defines permissions for the notifications.
AuthNotifications smallint(3)
Property expressing permissions.
Defines permissions for the tax rates.
AuthTaxRates smallint(3)
Property expressing permissions.
Defines permissions for the social networks.
AuthAdminSocialNetwor
Available only with "Enterprise" edition. smallint(3)
ks
Property expressing permissions.
Defines permissions for the resellers.
AuthResellers smallint(3)
Property expressing permissions.
AuthManagers Defines permissions for the managers. smallint(3)

Developer Manual 121


Use of RESTful APIs APIs Version 2

Property expressing permissions.


Defines permissions for the domains.
AuthDomains smallint(3)
Property expressing permissions.
Defines permissions for the products of the domains. They
AuthDomainsProducts are subjected to the domain permissions. smallint(3)
Property expressing permissions.
Defines permissions for the gateways.
AuthGateways smallint(3)
Property expressing permissions.
Defines permissions for the Bypass or for locking the
AuthIPBinding IP/MAC addresses. smallint(3)
Property expressing permissions.
Defines permissions for the user traffic logs (Syslog) in the
gateways. If you enable Admin, the user will be able to
AuthSyslog activate or not the Syslog in the gateway data. smallint(3)

Property expressing permissions.


Defines permissions for the printers.
AuthPrinters smallint(3)
Property expressing permissions.
Defines permissions for the users.
AuthUsers smallint(3)
Property expressing permissions.
Defines permissions for users' passwords.
AuthUserPassword smallint(3)
Property expressing permissions.
Defines the permissions for sales to users.
AuthTransactions smallint(3)
Property expressing permissions.
Displays the amounts originated from sales. If the users do
not have the permissions, they will not be able to: display
AuthShowSales the sales summary, export the sales, see the amounts on the smallint(3)
dashboards.
Property expressing permissions.
Defines permissions for the cards.
AuthCards smallint(3)
Property expressing permissions.
Defines permissions for the vouchers.
AuthVouchers smallint(3)
Property expressing permissions.
Defines permissions for the custom Apps.
AuthCustomApp smallint(3)
Property expressing permissions.
Defines permissions for the custom images.
AuthCustomImages smallint(3)
Property expressing permissions.
Defines permissions for the templates.
AuthTemplates smallint(3)
Property expressing permissions.
Defines permissions for the translations.
AuthTranslations smallint(3)
Property expressing permissions.
AuthWalledGarden Defines permissions for the Walled Garden. smallint(3)

Developer Manual 122


Use of RESTful APIs APIs Version 2

Property expressing permissions.


Defines permissions for the product policy.
AuthProductsPolicy smallint(3)
Property expressing permissions.
Defines permissions for the products. Admin enables the
AuthProducts user to manage the product price. smallint(3)
Property expressing permissions.
Enables the user to download the configuration files of the
AuthGatewayDownloadC gateways.
smallint(3)
onfig
Property expressing permissions.
Enables the user to Export Data.
AuthExportData smallint(3)
Property expressing permissions.
Defines permissions for the surveys.
AuthSurveys smallint(3)
Property expressing permissions.
Defines permissions for the advertisers.
AuthAdvertisers smallint(3)
Property expressing permissions.
Enables changing the field in the advertisers that defines
AuthAdvertisersPublicAd whether the campaigns are public or private.
smallint(3)
vCampaigns
Property expressing permissions.
Defines permissions for the advertising campaigns.
AuthCampaigns smallint(3)
Property expressing permissions.
Defines permissions for sales transactions for advertising.
AuthAdvTransactions smallint(3)
Property expressing permissions.
Defines permissions for the GPS tracking and fleet telemetry
AuthFleetOptions options. smallint(3)
Property expressing permissions.
Defines permissions for the vehicle drivers of GPS tracking
AuthFleetDrivers and fleet telemetry. smallint(3)
Property expressing permissions.
Defines permissions for the GPS tracking and fleet telemetry
AuthFleetVehicles means. smallint(3)
Property expressing permissions.
Defines permissions for the GPS tracking and fleet telemetry
AuthFleetTrips journeys. smallint(3)
Property expressing permissions.
Enables or disables the usage of APIs.
AuthAPI smallint(3)
Property expressing permissions.
Allows limiting the usage of APIs version 1 on an hourly basis
by defining a maximum cost.
APILimitPerHour Valid only for APIs 1.0. int(11)
Many API endpoints have a cost of one, but some of
them, requiring more resources for processing, have a

Developer Manual 123


Use of RESTful APIs APIs Version 2

much higher cost. The administrative manual


summaries the fee of each endpoint. A value of zero
does not restrict the use of the APIs.
Allows limiting the usage of APIs version 1 on a daily basis
by defining a maximum cost.
Valid only for APIs 1.0.
APILimitPerDay Many API endpoints have a cost of one, but some of int(11)
them, requiring more resources for processing, have a
much higher cost. The administrative manual
summaries the fee of each endpoint. A value of zero
does not restrict the use of the APIs.
Allows limiting the use of API version 2 by defining the
maximum cost in minutes of hourly processing of the
API2LimitPerHour endpoints. A value of zero does not restrict the use of the float
APIs.
Valid for APIs 2.0 only.
Allows limiting the use of API version 2 by defining the
maximum cost in minutes of daily processing of the
API2LimitPerDay endpoints. A value of zero does not restrict the use of the float
APIs.
Valid for APIs 2.0 only.
Defines the API access Key and must always be passed with
ApiKey calls. varchar(50)
A value is automatically proposed when adding.
Defines the API access security code used to encrypt
ApiSecret transmitted data. Do not disclose this data. varchar(50)
A value is automatically proposed when adding.
Date and time of user’s last login.
LastLoginDateTime datetime
Read-only property.
Acceptance of the Licence to Use the Product.
LicenseAccepted int(1)
Read-only property.
Date and time when License to Use the product was
LicenseAcceptedDateTim accepted.
datetime
e
Read-only property.
TermsAndConditionsAcc Terms & Conditions acceptance.
int(1)
epted Read-only property.
Date and time when the Terms & Conditions statement was
TermsAndConditionsAcc accepted.
datetime
eptedDate
Read-only property.
Version of Terms & Conditions statement accepted by the
TermsAndConditionsVer user.
varchar(10)
sion
Read-only property.
TermsAndConditionsDat Date of the Terms & Conditions statement accepted by the
datetime
e user.

Developer Manual 124


Use of RESTful APIs APIs Version 2

Read-only property.
Privacy Policy acceptance.
PrivacyPolicyAccepted int(1)
Read-only property.
Date and time when the Privacy Policy statement was
PrivacyPolicyAcceptedDa accepted.
datetime
te
Read-only property.
Version of the Privacy Policy statement accepted by the
PrivacyPolicyVersion user. varchar(10)
Read-only property.
Date of the Privacy Policy statement accepted by the user.
PrivacyPolicyDate datetime
Read-only property.

All properties whose name begins with "Auth" define the combination of permissions. Assign values
that are compatible with what is defined in the "Properties that define permissions" paragraph.

Developer Manual 125


Use of RESTful APIs APIs Version 2

saleRead, saleFind
The "sale" object allows you to read and search sales data for users.
When searching using the “Find” command, you can use various objects with the following hierarchy:

user domain manager reseller


sale
gateway domainSale managerSale resellerSale

Example of a call that reads data:


$Endpoint = 'saleRead';
$Data = '{"id":"123"}';

Example of a call that searches for data by user ID:


$Endpoint = 'saleFind';
$Data = '{"Where":"sale.UserID=123"}';

Example of a call that gets the IDs of all sales made on a federated domain and where the city of
the reseller making the sale is equal to "New York":
$Endpoint = 'saleFind';
$Data = '{"Where":"sale.DomainID = 85 AND sale.SaleResellerID > 0 AND sale.SaleResellerID
<> sale.ResellerID AND resellerSale.City = \"New York\""}';

Example of a call that derives the IDs of all sales made from 2020-01-01 onwards:
$Endpoint = 'saleFind';
$Data = '{"Where":"sale.CreationDate >= \"2020-01-01 00:00:00\""}';

Available properties:
Name Comment Type
Object ID. int(11)
id If you need to add, pass the value zero in this property.
Mandatory property for "saleRead”.
Date when the object was created. Automatically assigned timestamp
CreationDate when you add it.
Read-only property.
Reseller ID. int(11)
ResellerID
ID derived from the “reseller” object.
ID of the reseller that made the sale. It can be different from int(11)
ResellerID if the sale was made in a federated domain.
To search on this property, use the "SaleReseller" object.
SaleResellerID
ID derived from the “reseller” object.
If you want to search on this "reseller" object, use the
"resellerSale” class.
Manager ID. int(11)
ManagerID
ID derived from the “manager” object.
ID of the manager that made the sale. It can be different int(11)
from ManagerID if the sale was made in a federated
domain.
SaleManagerID
ID derived from the “manager” object.
If you want to search on this "manager" object, use the
"managerSale” class.

Developer Manual 126


Use of RESTful APIs APIs Version 2

Domain ID. int(11)


DomainID
ID derived from the “domain” object.
ID of the domain that made the sale. It can be different from int(11)
DomainID if the sale was made in a federated domain.
SaleDomainID ID derived from the “domain” object.
If you want to search on this "domain" object, use the
"domainSale" object.
Gateway ID. int(11)
GatewayID
ID derived from the “gateway” object.
User ID. int(11)
UserID
ID derived from the “user” object.
Product ID. int(11)
ProductID
ID derived from the “product” object.
TransactionType Transaction type. Possible values are: int(11)
• 0 = Free Authentication Mode
• 1 = PayPal
• 3 = Reassign Free Product
• 4 = Update users
• 5 = Mollie
• 6 = Users Import
• 7 = AuthorizeNet
• 8 = SagePay
• 9 = PayFast
• 10 = Eway
• 11 = PaymentExpress
• 12 = Pesapal
• 13 = Checkout
• 14 = PayUBiz
• 15 = PaysafeCard
• 18 = SagePay
• 19 = 1Voucher
• 20 = 1ForYou
• 50 = Mail Validation
• 51 = API Call
• 52 = Printer Card
• 53 = Complimentary
• 54 = Backend Operator
• 55 = Frontend Free Product
• 56 = SMS activation
• 57 = PMS
• 100 = Voucher Activation
• 101 = Backend Card
TransactionDescr Description of the transaction based on TransactionType. varchar(25)
PaymentGatewayID Payment ID in the payment gateway (PayPal, Mollie, varchar(100)
AuthorizeNet, etc.).
Currency Currency code for SellPrice and SellFee. varchar(3)

Developer Manual 127


Use of RESTful APIs APIs Version 2

CostCurrency Currency code for ProductCost, ResellerCost. varchar(3)


ProductCost Cost of the product. float
ResellerCost Cost of the product to the reseller. float
ManagerCost Cost of the product to the manager. float
SellPrice Selling price. float
SellFee Costo di vendita assegnato dal gateway di pagamento. float
Tax Sales tax. float
TaxRate Tax rate. float
TaxJurisdiction Fiscal Jurisdiction. varchar(32)
Expiration Expiry of the product. Datetime
Expired Expired product. Possible values are: int(1)
• 0 = Product not expired
• 1 = Expired product
ReassignExpirationUpon Indicates whether the deadline should still be assigned. tinyint(1)
Login Possible values are:
• 0 = Deadline already assigned
• 1 = Deadline still to be assigned

Developer Manual 128


Use of RESTful APIs APIs Version 2

systemcurrencyandpaymentsRead, systemcurrencyandpaymentsWrite
The "systemcurrencyandpayments" object allows you to manage currency and system payment system
data.

Example of a call that reads data:


$Endpoint = 'systemcurrencyandpaymentsRead';
$Data = '{}';

Example of a call that modifies data:


$Endpoint = 'systemcurrencyandpaymentsWrite';
$Data = '{"currency":"$"}';

Available properties:
Name Comment Type
Currency code. It is used for payments. varchar(3)
CurrencyCode
Define a value of type "ISO 4217".
Currency Price currency symbol. varchar(20)
Decimal separator. Possible values are: int(3)
DecimalSeparator • 1 = Dot
• 2 = Comma
Thousands separator. Possible values are: int(3)
• 1 = Space
ThousandSeparator
• 2 = Dot
• 3 = Comma
Tax rate included in the selling prices to the users. Int(11)
TaxRatesID
ID derived from the “taxrates” object.
TaxJurisdiction Fiscal jurisdiction for taxation. varchar(32)
AdministrativeEmailAddr Administrative email address to send notifications of users' varchar(50)
ess payments.
Receipt header image. mediumblob
ReceiptSellerImg
“Image”-type property.
Receipt header image type. varchar(40)
ReceiptSellerImgType
Read-only property.
ReceiptIDPrefix Prefix of the receipt ID. varchar(32)
Notes to print on the receipt. longtext
ReceiptNote
Multilingual property.
PaypalAccount Indirizzo del conto Paypal. varchar(50)
Enter the Mollie API key to enable payments through this varchar(50)
MollieApiKey
gateway. The currency must be in Euro.
Authorize.Net API ID to enable payments through this varchar(50)
AuthorizeNetApiID
gateway.
AuthorizeNetTransaction varchar(50)
Authorize.Net Transaction ID.
Key
PayFastApiID PayFast Merchant ID. varchar(50)
PayFastTransactionKey PayFast Merchant Key. varchar(50)
PayFastPassPhrase PassPhrase defined in the PayFast account. varchar(40)
PaymentExpressApiID Payment Express username. varchar(50)
PaymentExpressTransact varchar(64)
Payment Express Key.
ionKey

Developer Manual 129


Use of RESTful APIs APIs Version 2

PesapalApiID Pesapal Consumer Key. varchar(50)


PesapalTransactionKey Pesapal Consumer Secret. varchar(64)
PayUBizApiID PayU Biz Merchant Key. varchar(50)
PayUBizTransactionKey PayU Biz Merchant Salt. varchar(64)
EwayApiID eWay API Key. varchar(100)
EwayTransactionKey eWay Password. varchar(50)
PaysafecardApiID Paysafe Card username (SOPG). varchar(50)
PaysafecardTransactionK varchar(64)
Paysafe Card password (SOPG).
ey
Version of 1Voucher-payment type.
Possible values are:
• 0 = 1ForYou
OneVoucherVersion int(1)
• 1 = 1Voucher
You can still use 1Voucher for old contract. For new
contract, select 1ForYou.
OneVoucherConsumerKe varchar(40)
1Voucher/1ForYou Consumer Key.
y
OneVoucherConsumerSe varchar(40)
1Voucher/1ForYou Consumer Secret.
cret
OneVoucherPurseAccou varchar(40)
1Voucher/1ForYou Purse Account Number.
ntNumber
OneVoucherUserName 1Voucher username. varchar(50)
OneVoucherPassword 1Voucher password. varchar(50)
TransactiumUserName Transactium username varchar(50)
TransactiumPassword Transactium password. varchar(50)
StripeAccount Stripe account ID. varchar(50)
StripeApiKey Stripe Live API Key. varchar(50)
StripePublishableApiKey Stripe live publishable API Key. varchar(50)
StripeTestApiKey Stripe test API Key. varchar(50)
StripeTestPublishableApi
Stripe test publishable API Key. varchar(50)
Key
SafaricomMPesaTestPas
Safaricom MPesa test Pass Key. varchar(100)
sKey
SafaricomMPesaTestBusi
Safaricom MPesa test Business Code. varchar(10)
nessCode
SafaricomMPesaTestCon
Safaricom MPesa test Consumer Key. varchar(128)
sumerKey
SafaricomMPesaTestCon
Safaricom MPesa test Consumer Secret. varchar(128)
sumerSecret
SafaricomMPesaPassKey Safaricom MPesa live Pass Key. varchar(100)
SafaricomMPesaBusines
Safaricom MPesa live Business Code. varchar(10)
sCode
SafaricomMPesaConsum
Safaricom MPesa live Consumer Key. varchar(128)
erKey
SafaricomMPesaConsum
Safaricom MPesa live Consumer Secret. varchar(128)
erSecret
WAAFIPayTestAPIKey WAAFIPay test API Key. varchar(20)
WAAFIPayTestMerchant
WAAFIPay test Merchant ID”. varchar(16)
UID

Developer Manual 130


Use of RESTful APIs APIs Version 2

WAAFIPayTestAPIUserID WAAFIPay test API User ID. varchar(16)


WAAFIPayAPIKey WAAFIPay API Key. varchar(20)
WAAFIPayMerchantUID WAAFIPay Merchant ID. varchar(16)
WAAFIPayAPIUserID WAAFIPay API User ID. varchar(16)
The title to display in the Welcome Portal for the first
CustomPayment1Title custom payment. longtext
Multilingual property.
CustomPayment1URL The external URL to invoke for the first custom payment. varchar(255)
External URL to invoke to verify the first custom payment.
If not defined, payments will not be verified and will
CustomPayment1VerifyU always be accepted with possible security problems. The varchar(255
RL page must respond in JSON format with the 'Status'
variable which must contain 'paid' to accept the
payment or 'cancel' to decline it.
Image to display in the Welcome Portal for the first custom
CustomPayment1Img payment. Recommended size 172x120 pixels. mediumblob
“Image-type property.
Image type of image to display in the Welcome Portal for
CustomPayment1ImgTyp the first custom payment type.
varchar(40)
e
Read-only property.
Defines the target of the payment pages. If the gateway
security policies allow including the payment page, choose
CustomPayment1Redirec 'Welcome Portal', otherwise choose 'External Site'
int(3)
tTarget Possible values are:
• 0 = External site
• 1 = Welcome Portal
The title to display in the Welcome Portal for the second
CustomPayment2Title custom payment. Longtext
Multilingual property.
CustomPayment2URL The external URL to invoke for the second custom payment. varchar(255)
External URL to invoke to verify the second custom
payment.

CustomPayment2VerifyU If not defined, payments will not be verified and will


RL always be accepted with possible security problems. The varchar(255
page must respond in JSON format with the 'Status'
variable which must contain 'paid' to accept the
payment or 'cancel' to decline it.
Image to display in the Welcome Portal for the second
CustomPayment2Img custom payment. Recommended size 172x120 pixels. mediumblob
“Image-type property.
Image type of image to display in the Welcome Portal for
CustomPayment2ImgTyp the second custom payment type.
varchar(40)
e
Read-only property.
Defines the target of the payment pages. If the gateway
CustomPayment2Redirec
security policies allow including the payment page, choose int(3)
tTarget
'Welcome Portal', otherwise choose 'External Site'

Developer Manual 131


Use of RESTful APIs APIs Version 2

Possible values are:


• 0 = External site
• 1 = Welcome Portal

Developer Manual 132


Use of RESTful APIs APIs Version 2

systemexternalauthRead, systemexternalauthWrite
The "systemexternalauth" object allows you to manage data from external authentication systems
configured at system level.

Example of a call that reads data:


$Endpoint = 'systemexternalauthRead';
$Data = '{}';

Example of a call that modifies data:


$Endpoint = 'systemexternalauthWrite';
$Data = '{"currency":"$"}';

Available properties:
Name Comment Type
FacebookAppID App ID of Facebook application. varchar(20)
TwitterConsumerKey API Key of Twitter application. varchar(30)
GoogleClientID Client ID of Google application. varchar(100)
Allows defining the Google API Key in order to get Google varchar(50)
GoogleApiKey services privately. Please, refer to the manual to understand
the types of services that you should activate.
OAuth Version of LinkedIn. Possible values: int(1)
LinkedinOAuthVersion • 1 = 1.0a
• 2 = 2.0
LinkedinClientID Client ID of LinkedIn application. varchar(30)
FlickrAPIKey API Key of Flick application. varchar(50)
InstagramAPIKey Client ID of Instagram application. varchar(50)
AmazonClientID Client ID of Amazon application. varchar(100)
VKontakteAppID App ID of VKontakte application. varchar(100)
Short title of the OAuth application displayed to user. varchar(250)
CustomOAuth1Title
Multilingual property.
CustomOAuth1ClientID Client ID for the custom OAuth authentication. varchar(100)
Version of OAuth. Possible values: varchar(10)
• 1.0 = 1.0
CustomOAuth1Version
• 1.0a = 1.0a
• 2.0 = 2.0
URL of the OAuth server to redirect the user for the varchar(255)
CustomOAuth1DialogUR authentication request. In the URL , you can use the
L following variables: {REDIRECT_URI}; {CLIENT_ID}; {SCOPE};
{STATE}; {API_KEY}.
CustomOAuth1InitialTok URL of the OAuth server to require the initial token for varchar(255)
enURL OAuth servers 1.0 and 1.0a.
CustomOAuth1AccessTo URL of the OAuth server that returns the URL of the access varchar(255)
kenURL token. In the URL, you can use the variable {SCOPE}
CustomOAuth1AccessTo Type of access token to take when the OAuth server does varchar(50)
kenType not specify it.
CustomOAuth1URLPara Enable this check if the API call requires that the parameters int(1)
meters be passed via URL.
Set this variable on POST if the OAuth server does not varchar(4)
CustomOAuth1TokenRe support the token request using the HTTP GET method.
questMethod Possible values:
• GET = GET

Developer Manual 133


Use of RESTful APIs APIs Version 2

• POST = POST
Set the method with which the access token is returned. varchar(4)
Define 'HASH' if it is returned in GET with a hashtag. Possible
CustomOAuth1TokenRes
values:
ponseMethod
• GET = GET
• HASH = HASH
CustomOAuth1HashField Field name returned in the HASH that contains the access varchar(50)
Name token.
The OAuth server requires that the OAuth parameters be int(1)
CustomOAuth1Authoriza
passed using HTTP authorization instead of the URI
tionHeader
parameters of the request.
Based on the documentation of the OAuth server, define varchar(255)
CustomOAuth1Scope the identifiers of the authorizations (Scope) that the user
must grant. More identifiers must be separated by commas.
Based on the documentation of the OAuth server, define varchar(255)
CustomOAuth1UserInfo
the URL, complete with the endpoint, with the API that
APIURL
allows obtaining the users' data.
Indicate the name of the variable, contained in the data varchar(100)
CustomOAuth1UserNam returned by the OAuth authentication, which contains the
eFieldName username. Multiple field names can be passed, separated
by commas. The first available name will be uploaded.
Indicate, if available, the variable name, contained in the varchar(100)
CustomOAuth1FirstNam
data returned by the OAuth authentication, which contains
eFieldName
the user's first name.
Indicate, if available, the variable name, contained in the varchar(100)
CustomOAuth1LastName
data returned by the OAuth authentication, which contains
FieldName
the user's last name.
Indicate, if available, the variable name, contained in the varchar(100)
CustomOAuth1EmailFiel
data returned by the OAuth authentication, which contains
dName
the user's email address.
CustomOAuth1Backgrou varchar(30)
Background color displayed in the login app.
ndColor
CustomOAuth1Foregrou varchar(30)
Text color displayed in the login app.
ndColor
Type of image to display in the Welcome Portal. varchar(40)
CustomOAuth1ImgType Recommended dimensions are 32x32 pixels.
Read-only property.
Image to display in the Welcome Portal. Recommended mediumblob
CustomOAuth1Img
dimensions are 32x32 pixels.
LDAPServer Address of the LDAP server. varchar(100)
LDAPDomainName Name of the LDAP domain. varchar(100)
Name of the Organizational Units, separated by commas, varchar(255)
LDAPUserGroup
containing the LDAP users that can authenticate.
Short title of the LDAP application displayed to user. varchar(250)
LDAPTitle
Multilingual property.
LDAPBackgroundColor Background color displayed in the login app. varchar(30)
LDAPForegroundColor Text color displayed in the login app. varchar(30)
Type of image to display in the Welcome Portal. varchar(40)
LDAPImgType
Recommended dimensions are 32x32 pixels.

Developer Manual 134


Use of RESTful APIs APIs Version 2

Read-only property.
Image to display in the Welcome Portal. Recommended mediumblob
LDAPImg
dimensions are 32x32 pixels.
FacebookAppSecret Secret of Facebook application. varchar(40)
GoogleSecret Secret of Google application. varchar(100)
LinkedinSecret Secret of LinkedIn application. varchar(30)
TwitterConsumerSecret API secret of Twitter application. varchar(50)
InstagramAPISecret Secret of Instagram application. varchar(50)
AmazonClientSecret Client secret of Amazon application. varchar(100)
VKontakteAppSecret Secret of VKontakte application. varchar(100)
CustomOAuth1ClientSec varchar(100)
Client secret for the custom OAuth authentication.
ret

Developer Manual 135


Use of RESTful APIs APIs Version 2

systemnotificationsRead, systemnotificationsWrite
The "systemnotifications" object allows you to manage notification data configured at system level.

Example of a call that reads data:


$Endpoint = 'systemnotificationsRead';
$Data = '{}';

Example of a call that modifies data:


$Endpoint = 'systemnotificationsWrite';
$Data = '{"SmsNotificationText":"<en>Thanks for your subscription to hotspots %Domain%.
You can login as user %username% and Password %password%</en>"}';

Available properties:
Name Comment Type
SMS text notification to be sent to users notifying the login longtext
credentials. It is possible to use the variables: %UserName%,
SmsNotificationText %Password%, %FirstName%, %Surname%, %Domain%,
%SmsNumber%, %SmsNumber2%.
Multi-language property.
Subject of the email that is sent to users notifying the login longtext
EmailNotificationSubject credentials.
Multi-language property.
Body of the email that is sent to the users notifying the login longtext
EmailNotificationText credentials.
Multi-language property.
Subject of the email to send to the manager notifying the
EmailNotificationSubject login credentials.
longtext
Manager
Multilingual property.
EmailNotificationTextMa HTML of the email to send to the manager for registration.
longtext
nager Multilingual property.
Subject of the email that is sent to users with the receipt of longtext
EmailReceiptSubject payment.
Multi-language property.
Body of the email that is sent to users with the receipt of longtext
EmailReceiptBody payment.
Multi-language property.
Enables sending an SMS to send to users who pay with int(1)
1Voucher/1ForYou, notifying the code of the new voucher.
Possible values are:
OneVoucherSendSMS
• 0 = Use default
• 1 = No
• 2 = Yes
SMS text to send to users who pay with 1Voucher/1ForYou, longtext
notifying the code of the new voucher. It is possible to use
OneVoucherSendSMSTe the variables: %UserName%; %Password%; %FirstName%;
xt %LastName%; %Domain%; %SmsNumber%;
%SmsNumber2%; %NewPin%; %Credit%; %Currency%.
Multi-language property.

Developer Manual 136


Use of RESTful APIs APIs Version 2

Enables sending an email to send to users who pay with int(1)


1Voucher/1ForYou, notifying the code of the new voucher.
Possible values are:
OneVoucherSendEmail
• 0 = Use default
• 1 = No
• 2 = Yes
Subject of the email to send to users who pay with longtext
1Voucher/1ForYou, notifying the code of the new voucher.
It is possible to use the variables: %UserName%;
OneVoucherSendEmailS %Password%; %FirstName%; %LastName%; %Domain%;
ubject %SmsNumber%; %SmsNumber2%; %NewPin%; %Credit%;
%Currency%.
Multi-language property.
Body of the email to send to users who pay with longtext
1Voucher/1ForYou, notifying the code of the new voucher.
It is possible to use the variables: %UserName%;
OneVoucherSendEmailT %Password%; %FirstName%; %LastName%; %Domain%;
ext %SmsNumber%; %SmsNumber2%; %NewPin%; %Credit%;
%Currency%.
Multi-language property.
Subject of the thank you email sent to users for the filling of longtext
SurveysSendUserMailSu the the survey, quiz or test.
bject
Multi-language property.
Mail for the thank you email sent to users for the filling of longtext
SurveysSendUserMailTex the survey.
t
Multi-language property.
Days in advance for notification 1 (number of days int(11)
ExpiryNotifyDays1 preceding the sending deadline of the first notification).
With a value of zero, it does not send notification 1.
Days in advance for notification 2 (number of days int(11)
ExpiryNotifyDays2 preceding the sending deadline of the second notification).
With a value of zero, it does not send notification 2.
Subject of the email that is sent to users to remember the longtext
upcoming expiration of the product purchased or in
contract. In the body of the mail, you can use the variables:
%UserName% (login username), %FirstName% (user's login
first name), %Surname% (user's login last name),
MailExpiryNotifySubject %Domain% (manager's domain name), %CompanyName%
(manager's company name), %ExpirationDate% (expiration
date of the product), %SellPrice% (selling price of the
product).
Multi-language property.
Body of the email that is sent to users to remember the longtext
upcoming expiration of the product purchased or in
MailExpiryNotifyText contract. In the body of the mail, you can use the variables:
%UserName% (login username), %FirstName% (user's login
first name), %Surname% (user's login last name),

Developer Manual 137


Use of RESTful APIs APIs Version 2

%Domain% (manager's domain name), %CompanyName%


(manager's company name), %ExpirationDate% (expiration
date of the product), %SellPrice% (selling price of the
product).
Multi-language property.
GatewaySendStatusEmai Enables sending email alerts for monitoring the status of smallint(1)
l gateways and access points.
Email addresses to send email alerts for the status of the varchar(255)
GatewaySendStatusEmai
gateways and access points. Multiple addresses must be
lAddresses
separated by comma.
Enables sending SMS alerts for monitoring the status of smallint(1)
GatewaySendStatusSMS
gateways and access points.
Phone number to send SMS alerts for the status of the varchar(255)
GatewaySendStatusSMS
gateways and access points. Multiple numbers must be
Numbers
separated by comma.
Enables sending email alerts for monitoring the status of smallint(1)
ReplicaSendStatusMail
data replication.
Email addresses to send email alerts for the status of data varchar(255)
ReplicaSendStatusMailA
replication. Multiple addresses must be separated by
ddresses
comma.
Enable sending SMS alerts for monitoring the status of data smallint(1)
ReplicaSendStatusSMS
replication.
Phone number to send SMS alerts for the status of data varchar(255)
ReplicaSendStatusSMSN
replication. Multiple numbers must be separated by
umbers
comma.

Developer Manual 138


Use of RESTful APIs APIs Version 2

systemuserRead, systemuserWrite, systemuserFind and systemuserDelete


The "systemuser" object allows you to manage the data of system users accessing the backend.

Example of a call that reads data:


$Endpoint = 'systemuserRead';
$Data = '{"id":"123"}';

Example of a call that searches for data by username:


$Endpoint = 'systemuserFind';
$Data = '{"Where":"systemuser.UserName =\"MyAdminUser\""}';

Example of a call that searches for data by ID:


$Endpoint = 'systemuserFind';
$Data = '{"Where":"systemuser.id=123"}';

Example of a call that adds:


$Endpoint = 'systemuserWrite';
$Data = '{"id":"0", "UserName":"MyAdminUser"}';

Example of a call that modifies data:


$Endpoint = 'systemuserWrite';
$Data = '{"id":"123", "UserName":"MyAdminUser"}';

Example of a call that deletes data:


$Endpoint = 'systemuserDelete';
$Data = '{"id":"123"}';

Available properties:
Name Comment Type
Object ID.
id If you need to add, pass the value zero in this property. int(11)
Read-only property.
Date when the object was created. Automatically assigned
CreationDate when you add it. timestamp
Read-only property.
Username for the login. It is recommended to enter your
UserName varchar(60)
mobile phone or email address.
Password for the user.

Password The password entered must comply with the "Password varchar(255)
Complexity" defined in the "Backend Security" of the
"System Settings".
ConfirmPassword User confirmation password. varchar(255)
FirstLastName Last and first name of the user. varchar(100)
Phone Landline phone number. varchar(20)
MobilePhone Mobile phone number. varchar(20)
Type of contact. Possible values:
ContactType • 0 = Technician int(11)
• 1 = Administrative
Define the backend colors for the system user accessing the
backend. Possible values are:
• (Empty value) = Use default
BackendColors varchar(30)
• greygreen = Grey and Green
• darkblue = Dark and Blue
• darkorange = Dark and Orange

Developer Manual 139


Use of RESTful APIs APIs Version 2

EmailAddress User’s email address. varchar(100)


Forces the password change at the specified expiration
PasswordExpiration datetime
date.
Defines permissions to access the data related to the
AuthGatewaysModule internet gateways. smallint(3)
Property expressing permissions.
Defines permissions to access the GPS tracking and fleet
AuthFleetModule telemetry data. smallint(3)
Property expressing permissions.
Defines permissions for the management of the system
users (the data of this page). Admin enables the user to
AuthSystemUsers manage permissions. smallint(3)

Property expressing permissions.


Define permissions for the system info.
AuthSystemInfo smallint(3)
Property expressing permissions.
Defines permissions for the utility functions.
AuthUtilityFunctions smallint(3)
Property expressing permissions.
Defines permissions for powering off and restarting the
AuthShutdownAndRebo device.
smallint(3)
ot
Property expressing permissions.
Define permissions for the general options.
AuthGeneralOptions smallint(3)
Property expressing permissions.
Defines permissions for the system settings. Admin enables
AuthSystemSettings the user to view the GUID. smallint(3)
Property expressing permissions.
Defines permissions for the SSL certificates.
AuthCertificates smallint(3)
Property expressing permissions.
Defines permissions for the currency and the management
of the payment systems. Admin enables the user to modify
AuthCurrencyAndPayme the prepayment in the manager and the test accounts for
smallint(3)
nts payments.
Property expressing permissions.
Defines permissions for the notifications.
AuthNotifications smallint(3)
Property expressing permissions.
Defines permissions for the tax rates.
AuthTaxRates smallint(3)
Property expressing permissions.
Defines permissions for the social networks.
AuthAdminSocialNetwor
Available only with "Enterprise" edition. smallint(3)
ks
Property expressing permissions.
Defines permissions for the static routes.
AuthStaticRoutes smallint(3)
Property expressing permissions.
AuthFederation Defines permissions for the radius federation (In & Out). smallint(3)

Developer Manual 140


Use of RESTful APIs APIs Version 2

Property expressing permissions.


Defines permissions for the system log.
AuthSystemLog smallint(3)
Property expressing permissions.

AuthRemoteSystems Defines permissions for the remote systems data. smallint(3)


Property expressing permissions.
AuthAdminDocumentati Defines permissions for the documentation.
smallint(3)
on Property expressing permissions.
Defines permissions for the WiKi.
AuthWiKi smallint(3)
Property expressing permissions.
Defines permissions for the updates.
AuthUpdates smallint(3)
Property expressing permissions.
Defines permissions for the resellers.
AuthResellers smallint(3)
Property expressing permissions.
Defines permissions for the managers.
AuthManagers smallint(3)
Property expressing permissions.
Defines permissions for the domains.
AuthDomains smallint(3)
Property expressing permissions.
Defines permissions for the products of the domains. They
AuthDomainsProducts are subjected to the domain permissions. smallint(3)
Property expressing permissions.
Defines permissions for the gateways.
AuthGateways smallint(3)
Property expressing permissions.
Defines permissions for the maps, zones, or floors.
AuthZones smallint(3)
Property expressing permissions.
Defines permissions for the access points.
AuthAccessPoints smallint(3)
Property expressing permissions.
Defines permissions for the Bypass or for locking the
AuthIPBinding IP/MAC addresses. smallint(3)
Property expressing permissions.
Defines permissions for the user traffic logs (Syslog) in the
gateways. If you enable Admin, the user will be able to
AuthSyslog activate or not the Syslog in the gateway data. smallint(3)
Not available for the advertisers.
Property expressing permissions.
Defines permissions for the printers.
AuthPrinters smallint(3)
Property expressing permissions.
Defines permissions for the users.
AuthUsers smallint(3)
Property expressing permissions.
Defines permissions for users' passwords.
AuthUserPassword smallint(3)
Property expressing permissions.

Developer Manual 141


Use of RESTful APIs APIs Version 2

Defines permissions for users' passwords.


AuthTransactions smallint(3)
Property expressing permissions.
Defines permissions for the user traffic logs (Syslog) of all
AuthAdminUserTrafficLo gateways.
smallint(3)
g
Property expressing permissions.
Displays the amounts originated from sales. If the users do
not have the permissions, they will not be able to: display
AuthShowSales the sales summary, export the sales, see the amounts on the smallint(3)
dashboards.
Property expressing permissions.
Defines permissions for the cards.
AuthCards smallint(3)
Property expressing permissions.
Defines permissions for the vouchers.
AuthVouchers smallint(3)
Property expressing permissions.
Defines permissions for the custom Apps.
AuthCustomApp smallint(3)
Property expressing permissions.
Defines permissions for the custom images.
AuthCustomImages smallint(3)
Property expressing permissions.
Defines permissions for the templates.
AuthTemplates smallint(3)
Property expressing permissions.
Defines permissions for the translations.
AuthTranslations smallint(3)
Property expressing permissions.
Defines permissions for the Walled Garden.
AuthWalledGarden smallint(3)
Property expressing permissions.
Defines permissions for the product policy.
AuthProductsPolicy smallint(3)
Property expressing permissions.
Defines permissions for the products. Admin enables the
AuthProducts user to manage the product price. smallint(3)
Property expressing permissions.
Enables the user to download the configuration files of the
AuthGatewayDownloadC gateways.
smallint(3)
onfig
Property expressing permissions.
Enables the user to Export Data.
AuthExportData smallint(3)
Property expressing permissions.
Defines permissions for the surveys.
AuthSurveys smallint(3)
Property expressing permissions.
Defines permissions for the advertisers.
AuthAdvertisers smallint(3)
Property expressing permissions.
Enables changing the field in the advertisers that defines
AuthAdvertisersPublicAd whether the campaigns are public or private.
smallint(3)
vCampaigns
Property expressing permissions.

Developer Manual 142


Use of RESTful APIs APIs Version 2

Defines permissions for the advertising campaigns.


AuthCampaigns smallint(3)
Property expressing permissions.
Defines permissions for sales transactions for advertising.
AuthAdvTransactions smallint(3)
Property expressing permissions.
Defines permissions for the GPS tracking and fleet telemetry
AuthFleetOptions options. smallint(3)
Property expressing permissions.
Defines permissions for the vehicle drivers of GPS tracking
AuthFleetDrivers and fleet telemetry. smallint(3)
Property expressing permissions.
Defines permissions for the GPS tracking and fleet telemetry
AuthFleetVehicles means. smallint(3)
Property expressing permissions.
Defines permissions for the GPS tracking and fleet telemetry
AuthFleetTrips journeys. smallint(3)
Property expressing permissions.
Enables or disables the usage of APIs.
AuthAPI smallint(3)
Property expressing permissions.
Allows limiting the usage of APIs version 1 on an hourly basis
by defining a maximum cost.
Valid only for APIs 1.0.
APILimitPerHour Many API endpoints have a cost of one, but some of int(11)
them, requiring more resources for processing, have a
much higher cost. The administrative manual
summaries the fee of each endpoint. A value of zero
does not restrict the use of the APIs.
Allows limiting the usage of APIs version 1 on a daily basis
by defining a maximum cost.
Valid only for APIs 1.0.
APILimitPerDay Many API endpoints have a cost of one, but some of int(11)
them, requiring more resources for processing, have a
much higher cost. The administrative manual
summaries the fee of each endpoint. A value of zero
does not restrict the use of the APIs.
Allows limiting the use of API version 2 by defining the
maximum cost in minutes of hourly processing of the
API2LimitPerHour endpoints. A value of zero does not restrict the use of the float
APIs.
Valid for APIs 2.0 only.
Allows limiting the use of API version 2 by defining the
maximum cost in minutes of daily processing of the
API2LimitPerDay endpoints. A value of zero does not restrict the use of the float
APIs.
Valid for APIs 2.0 only.

Developer Manual 143


Use of RESTful APIs APIs Version 2

Defines the API access Key and must always be passed with
ApiKey calls. varchar(50)
A value is automatically proposed when adding.
Defines the API access security code used to encrypt
ApiSecret transmitted data. Do not disclose this data. varchar(50)
A value is automatically proposed when adding.
Defines whether the user has enabled two-factor
authentication and how to send security codes.
TwoFactorAuthType int(3)
Only users with admin rights over system user data can
change this value.
Deactivation code of two-factor authentication sent via
email to the user.
With this code the user can disable the two-factor
TwoFactorAuthDeactivat authentication.
varchar(24)
ionCode Read-only field.
If the user disable and then enable the two-factor
authentication, the deactivation code change and an
updated code will be sent via email to the user.
Date and time of user’s last login.
LastLoginDateTime datetime
Read-only property.
Acceptance of the Licence to Use the Product.
LicenseAccepted int(1)
Read-only property.
Date and time when License to Use the product was
LicenseAcceptedDateTim accepted
datetime
e
Read-only property.
TermsAndConditionsAcc Terms & Conditions acceptance.
int(1)
epted Read-only property.
Date and time when the Terms & Conditions statement was
TermsAndConditionsAcc accepted.
datetime
eptedDate
Read-only property.
Version of Terms & Conditions statement accepted by the
TermsAndConditionsVer user.
varchar(10)
sion
Read-only property.
Date of the Terms & Conditions statement accepted by the
TermsAndConditionsDat user.
datetime
e
Read-only property.
Privacy Policy acceptance.
PrivacyPolicyAccepted int(1)
Read-only property.
Date and time when the Privacy Policy statement was
PrivacyPolicyAcceptedDa accepted.
datetime
te
Read-only property.
Version of Privacy Policy statement accepted by the user.
PrivacyPolicyVersion varchar(10)
.

Developer Manual 144


Use of RESTful APIs APIs Version 2

Read-only property.
Date of the Privacy Policy statement accepted by the user.
PrivacyPolicyDate datetime
Read-only property.

All properties whose name begins with "Auth" define the combination of permissions. Assign values
that are compatible with what is defined in the "Properties that define permissions" paragraph.

Developer Manual 145


Use of RESTful APIs APIs Version 2

systemwplanguagesRead, systemwplanguagesWrite
The "systemwplanguages" object allows you to manage the language data for the Welcome Portal
defined at system level.

Example of a call that reads data:


$Endpoint = 'systemwplanguagesRead';
$Data = '{}';

Example of a call that modifies data:


$Endpoint = 'systemwplanguagesWrite';
$Data = '{"CustomLang1ImgText":"<en>MyLanguage</en>"}';

Available properties:
Name Comment Type
Image type uploaded for the flag of the English language.
ENLangImgType varchar(40)
Read-only property.
Image displayed for the flag of the English language. It must
ENLangImg mediumblob
have a size of 24 x 18 pixels.
Image type uploaded for the flag of the Spanish language.
ESLangImgType varchar(40)
Read-only property.
Image displayed for the flag of the Spanish language. It must
ESLangImg mediumblob
have a size of 24 x 18 pixels.
Image type uploaded for the flag of the French language.
FRLangImgType varchar(40)
Read-only property.
Image displayed for the flag of the French language. It must
FRLangImg mediumblob
have a size of 24 x 18 pixels.
Image type uploaded for the flag of the Italian language.
ITLangImgType varchar(40)
Read-only property.
Image displayed for the flag of the Italian language. It must
ITLangImg mediumblob
have a size of 24 x 18 pixels.
Image type uploaded for the flag of the German language.
DELangImgType varchar(40)
Read-only property.
Image displayed for the flag of the German language. It must
DELangImg mediumblob
have a size of 24 x 18 pixels.
Country code for the first additional language.
CustomLang1 varchar(2)
Define the value in ISO 3166-1 alpha-2 format.
Image type uploaded for the flag of the first additional
CustomLang1ImgType language. varchar(40)
Read-only property.
Image displayed for the flag of the first additional language.
CustomLang1Img mediumblob
It must have a size of 24 x 18 pixels.
Text displayed to users if they point the mouse over the flag
of the first additional language.
CustomLang1ImgText varchar(255)
To display the language, you need to define it.
Multi-language property.
Defines the text direction for the first additional language.
CustomLang1ImgDir tinyint(1)
Possible values are:

Developer Manual 146


Use of RESTful APIs APIs Version 2

• 0 = Left To Right
• 1 = Right To Left
Country code for the second additional language.
CustomLang2 varchar(2)
Define the value in ISO 3166-1 alpha-2 format.
Image type uploaded for the flag of the second additional
CustomLang2ImgType language. varchar(40)
Read-only property.
Image displayed for the flag of the second additional
CustomLang2Img mediumblob
language. It must have a size of 24 x 18 pixels.
Text displayed to users if they point the mouse over the flag
of the second additional language.
CustomLang2ImgText varchar(255)
To display the language, you need to define it.
Multi-language property.
Defines the text direction for the second additional
language. Possible values are:
CustomLang2ImgDir tinyint(1)
• 0 = Left To Right
• 1 = Right To Left
Country code for the third additional language.
CustomLang3 varchar(2)
Define the value in ISO 3166-1 alpha-2 format.
Image type uploaded for the flag of the third additional
CustomLang3ImgType language. varchar(40)
Read-only property.
Image displayed for the flag of the third additional language.
CustomLang3Img mediumblob
It must have a size of 24 x 18 pixels.
Text displayed to users if they point the mouse over the flag
of the third additional language.
CustomLang3ImgText varchar(255)
To display the language, you need to define it.
Multi-language property.
Defines the text direction for the third additional language.
Possible values are:
CustomLang3ImgDir tinyint(1)
• 0 = Left To Right
• 1 = Right To Left

Developer Manual 147


Use of RESTful APIs APIs Version 2

taxratesRead, taxratesWrite, taxratesFind and taxratesDelete


The "taxrates" object allows you to manage taxes at system, reseller, and manager level.
When searching using the “Find” command, you can use various objects with the following hierarchy
depending on the usage context:
taxrates manager reseller

taxrates reseller

taxrates

Example of a call that reads data:


$Endpoint = 'taxratesRead';
$Data = '{"id":"123"}';

Example of a call that searches for data by tax rate:


$Endpoint = 'taxratesFind';
$Data = '{"Where":"taxrates.TaxRate = 20"}';

Example of a call that searches for data by ID:


$Endpoint = 'taxratesFind';
$Data = '{"Where":"taxrates.id=123"}';

Example of a call that adds:


$Endpoint = 'taxratesWrite';
$Data = '{"id":"0", "TaxRate":"20", "Decimals":"2"}';

Example of a call that modifies data:


$Endpoint = 'taxratesWrite';
$Data = '{"id":"123", "TaxRate":"21"}';

Example of a call that deletes data:


$Endpoint = 'taxratesDelete';
$Data = '{"id":"123"}';

Available properties:
Name Comment Type
Object ID.
id If you need to add, pass the value zero in this property. int(11)
Read-only property.
Date when the object was created. Automatically assigned
CreationDate when you add it. timestamp
Read-only property.
Reseller ID.
ResellerID ID derived from the “reseller” object. int(11)
Defines it only if you are dealing with a reseller’s users.
ID del gestore o dell’inserzionista.

ManagerID ID derived from the “manager” or “advertiser” object. int(11)


Defines it only if you are dealing with users of a
manager or advertiser.
TaxRate Tax Rate. float
Decimals Rounding decimals of tax. int(3)

Developer Manual 148


Use of RESTful APIs APIs Version 2

Rounding to be made when calculating the tax. Possible


values are:
RoundType • 0 = Default int(1)
• 1 = Upwards
• 2 = Round up to five decimals.
Description Description of comment. varchar(64)

Developer Manual 149


Use of RESTful APIs APIs Version 2

userconnectionRead, userconnectionFind, userconnectionCount


The “userconnection” object allows you to read and search for data of the users’ connection.
When searching using the “Find” and “Count” commands, you can use various objects with the following
hierarchy:

domain manager reseller

connection user

gateway

Example of a call that reads data:


$Endpoint = 'userconnectionRead';
$Data = '{"id":"123"}';

Example of a call that searches for data by Mac-Address:


$Endpoint = 'userconnectionFind';
$Data = '{"Where":"userconnection.Mac=\"03:03:03:03:03:03\""}';

Example of a call that counts the number of connections a user:


$Endpoint = 'userconnectionCount';
$Data = '{"Where":"userconnection.UserID=123"}';

Example of a call that counts the number of "connected" devices for the Reseller 123:
$Endpoint = 'userconnectionCount';
$Data = '{"Where":"reseller.id = 123 AND userconnection.TerminateCause=\"\""}';

Example of a call that checks if a user is logged on:


$Endpoint = 'userconnectionCount';
$Data = '{"Where":"user.id = 123 AND userconnection.TerminateCause=\"\""}';

Available properties:
Name Comment Type
Object ID.
id If you need to add, pass the value zero in this property. int(11)
Mandatory property for “userconnectionRead”.
Domain ID.
DomainID int(11)
ID derived from the “domain” object.
Gateway ID.
GatewayID int(11)
ID derived from the “gateway” object.
User ID.
UserID int(11)
ID derived from the “user” object.
UserName Username. varchar(128)
StartTime Connection start date and time. datetime
EndTime Connection end date and time. datetime
SessionTime Duration of the connection. int(12)
DownloadBytes Bytes downloaded. bigint(20)
UploadBytes Bytes uploaded. bigint(20)
IPAddress IP address assigned. varchar(15)

Developer Manual 150


Use of RESTful APIs APIs Version 2

Mac MAc-Adderss of the device. varchar(50)


TerminateCause Description of the disconnection cause. varchar(255)
BrowserName Name of the browser used. varchar(50)
OS Operating system used. varchar(30)

If the TerminateCause property does not contain a value then it means that the record represents an
active connection.

Developer Manual 151


Use of RESTful APIs APIs Version 2

usercredentialsEncode
The "userEncode" endpoint encodes the username or password in the form that is compatible with the
radius.

Example:
$Endpoint = 'usercredentialsEncode';
$Data = '{"Data":"你好@MyDomain"}';

The example above returns the following value: {"Data":"?u4f60?u597d@MyDomain"}

Available properties:
Name Comment Type
Data Username or password encoded. varchar(255)

Properties returned:
Name Comment
Data Username or password encoded.

Developer Manual 152


Use of RESTful APIs APIs Version 2

userDisconnect
The “userDisconnect” endpoint can disconnect all the devices of a user or a specific device always of a
user.
To disconnect all the device of a user, pass the UserID property with the user ID, and in the MacAddress
property, pass in an empty value.
To disconnect only a user's device, pass the UserID property with the user ID, and in the Mac property,
pass the MAC-address of the device to disconnect.

The disconnection can only be performed for MikroTik-type hotspot gateways and when HSNM can
reach the gateway.

Example:
$Endpoint = 'userDisconnect';
$Data = '{"UserID":"123", "Mac":"01:02:03:04:05:06"}';

Property:
Name Comment Type
UserID ID of the user to disconnect. int(11)
Mac MAC-address of the device to disconnect. int(11)
IP address of the MikroTik gateway. If not specified, it
GatewayIPAddress varchar(255)
automatically uploads the one defined in the gateway.
Username to access the MikroTik gateway. If not specified,
GatewayUserName varchar(255)
it uses the "Admin" user.
Password to access the MikroTik gateway. If not specified, it
GatewayPassword varchar(255)
automatically uploads the one defined in the gateway.

Properties returned:
Name Comment
Returns the status value. Possible values are:
0 = The command was successfully executed.
• 1 = “Invalid IP address”.
Status • 2 = “Invalid UserID”.
• 3 = “Connection error”.
• 4 = “User not found”.
• 5 = “Mac-address not found”.
Returns any error. Possible values are:
• “Invalid IP address”: you have not defined the Gateway IP address.
• “Invalid UserID”: the user ID is not valid.
Error
• “Connection error”: HSNM cannot connect to the gateway.
• “User not found”: the user was not found.
• “Mac-address not found”: the MAC-address was not found.

Developer Manual 153


Use of RESTful APIs APIs Version 2

userproductAdd
The "userAddProduct" endpoint assigns a new product to the user.

Example:
$Endpoint = 'userproductAdd';
$Data = '{"id":"123", "ProductID":"456","SellPrice":"10","Expiration":"2025-12-31
10:00:00"}';

Properties:
Name Comment Type
id ID of the user to whom you want to assign a new product. int(11)
Gateway ID.
GatewayID ID derived from the "gateway" object. int(11)
This property is not mandatory.
ID of the product to be assigned to the user obtained from
ProductID the “product” object. int(11)
Read-only property.
SellPrice Selling price of the product. float
Expiration Expiration of the product. datetime

Properties returned:
Name Comment
id Returns the transaction ID.

Developer Manual 154


Use of RESTful APIs APIs Version 2

userRead, userWrite, userFind, userDelete and userCount


The "user" object allows you to manage users.
When searching using the “Find” and “Count” commands, you can use various objects with the following
hierarchy:

user domain manager reseller

Example of a call that reads data:


$Endpoint = 'userRead';
$Data = '{"id":"123"}';

Example of a call that searches for data by username:


$Endpoint = 'userFind';
$Data = '{"Where":"user.UserName LIKE \"JohnDoe@%\""}';

Example of a call that searches for data by ID:


$Endpoint = 'userFind';
$Data = '{"Where":"user.id=123"}';

Example of a call that adds:


$Endpoint = 'userWrite';
$Data = '{"id":"0", "UserName":"JohnDoe123@MyDomain", "ProductID":"123"}';

Example of a call that modifies data:


$Endpoint = 'userWrite';
$Data = '{"id":"123", "FirstName":"John"}';

Example of a call that deletes data:


$Endpoint = 'userDelete';
$Data = '{"id":"123"}';

Example of a call that counts users of a domain:


$Endpoint = 'userCount';
$Data = '{"Where":"domain.id=123"}';

Available properties:
Name Comment Type
Object ID.
id If you need to add, pass the value zero in this property. int(11)
Read-only property.
Date when the object was created. Automatically assigned
CreationDate when you add it. timestamp
Read-only property.
Domain ID.
DomainID int(11)
ID derived from the “domain” object.
UserName Username. varchar(128)
Password Password of the user. varchar(64)
ConfirmPassword User confirmation password. varchar(64)
PasswordExpiration Force the password change at the specified expiration date. Datetime
CompanyName Company Name. varchar(100)
Gender. Possible values are:
Gender • M = Male varchar(1)
• F = Female

Developer Manual 155


Use of RESTful APIs APIs Version 2

FirstName User's first name. varchar(100)


LastName User's last name. varchar(100)
Address Address. varchar(100)
ZIP Postcode. varchar(10)
City City. varchar(100)
State Province or state. varchar(100)
Country code.
Country varchar(100)
Define the value in ISO 3166-1 alpha-2 format.
GPS coordinates of the users' residence address.
Longitude varchar(20)
Field used for proximity marketing.
GPS coordinates of the users' residence address.
Latitude varchar(20)
Field used for proximity marketing.
Phone Landline phone number. varchar(20)
Fax Fax number. varchar(20)
MobilePhone Mobile phone number. varchar(20)
EmailAddress Email address. varchar(50)
EmailAddressValidated Mobile phone number. int(1)
YearOfBirth Year of birth. varchar(4)
FiscalCode Fiscal code or VAT identification number. varchar(50)
RoomOrSite Room or pitch number. varchar(30)
Language for the user.
Define the value in ISO 3166-1 alpha-2 format.
Language Any messages and notifications will be sent in the varchar(2)
language defined in this field. The program
automatically fills in the autonomous registrations by
users according to the selected language.
AcceptMkt The user consents to marketing activities. tinyint(1)
SubscribeNewsletters The user gives consent to sending the newsletter. int(1)
Use profile image type.
FaceImgType varchar(40)
Read-only property.
FaceImg User profile image. mediumblob
If active, it indicates that the user has authorized the
AcceptPrivacyPolicy smallint(1)
processing of personal data.
PrivacyPolicyVersion Version of the Privacy Policy accepted by the user. varchar(10)
PrivacyPolicyDate Revision date accepted by the user. date
If active, it indicates that the conditions of use have been
Terms tinyint(1)
accepted by the user.
TermsVersion Version of the Conditions accepted by the user. varchar(10)
TermsDate Revision date accepted by the user. date
ID of the last product to assign to the user.
ProductID Read-only property. If you define "AddProduct": 1 then int(11)
it allows you specify the product ID to add to the user.
If equal to 1, it allows you to add the product "ProductID" to
AddProduct int(1)
the user.
SMSConfirmed Sent SMS confirmation. tinyint(1)

Developer Manual 156


Use of RESTful APIs APIs Version 2

If a confirmation of the user's data via SMS is requested,


this check must be activated otherwise user cannot
login until he confirms his data via SMS including the
domain name in the text
SMSSent Number of SMS sent to the user. int(11)
Type of external authentications or social networks.
Possible values are:
• 0 = None
• 1 = Facebook
• 2 = Twitter
• 3 = Google
ExternalAuthType • 4 = Linkedin smallint(3)
• 5 = Instagram
• 6 = Amazon
• 7 = VKontakte
• 8 = Turkish Public Identification Login
• 9 = LDAP
• 100 = OAuth
ExternalAuthUserName Username of external authentications or social networks. varchar(128)
ExternalAuthUserID User ID of external authentications or social networks. varchar(30)
Object containing the names and values of custom radius
attributes to use during "check".
CustomRadiusAttrCheck The treated properties are explained in the next object
paragraph "Properties contained on
'CustomRadiusAttrCheck' for the user”.
Object containing the names and values of custom radius
attributes to use during the "reply” phase.
CustomRadiusAttrReply The treated properties are explained in the next object
paragraph "Properties contained on
'CustomRadiusAttrReply' for the user".
Static IP address assigned to the user's router through
PPPoE. If not specified, it will be considered dynamic and
PPPoEIPAddress must be assigned by the PPPoE server. varchar(50)

Only for domains with PPPoE authentication type.


Network Mask assigned to the user's router through PPPoE.
If not specified, it will be considered dynamic and must be
PPPoENetmask assigned by the PPPoE server. varchar(15)

Only for domains with PPPoE authentication type.


Define a class of additional IP addresses (in the
PPPoEAdditionalSubnet IPAddress/Subnet form) to associate with the connection. varchar(30)
Only for domains with PPPoE authentication type.
Declare the possible IP address of the Wi-Fi appliance at the
client side.
If the customer is provided, in addition to the router, with a
IPAddress varchar(50)
Wi-Fi antenna for connecting to internet, it is used to update
the Mikrotik RouterOS device through the 'Utility functions'.
It is not compulsory for the normal working of the PPPoE.

Developer Manual 157


Use of RESTful APIs APIs Version 2

Only for domains with PPPoE authentication type.


Declares the hardware type of the device to bring the
internet connection via Wi-Fi supplied to the user. Possible
values are:
HardwareType • 0 = none or generic int(11)
• 1 = Mikrotik
Only for domains with PPPoE authentication type.
RouterOS version of the device to bring the internet
HardwareVersion connection via Wi-Fi supplied to the user. varchar(20)
Only for domains with PPPoE authentication type.
ERP/PMS external code. It is used to associate the user with
ERPCode varchar(25)
the registry of an external ERP/PMS.
Notes Notes. text
Locked User locked. tinyint(1)

Properties contained in the 'CustomRadiusAttrCheck' Property for the User


The "CustomRadiusAttrCheck" property of the "user" class contains an object with properties that
express the attribute name in the name and the attribute value in the attribute.

Example in "json" format with two example attributes:


{
"AttributeName1":"xxx",
" AttributeName2":"yyy"
}

Properties contained in the 'CustomRadiusAttrReply' Property for the User


The "CustomRadiusAttrCheck" property of the "user" class contains an object with properties that
express the attribute name in the name and the attribute value in the attribute.

Example in "json" format with two example attributes:


{
"AttributeName1":"xxx",
" AttributeName2":"yyy"
}

Developer Manual 158


Use of RESTful APIs APIs Version 2

userMacaddress
The “userDevice” endpoint returns an array containing the MAC-addresses of a user's devices that have
made connections.

Example:
$Endpoint = 'userMacaddress';
$Data = '{"id":"123"}';

Properties:
Name Comment Type
User ID.
ID Optional. int(11)
ID derived from the “user” object.

Returned properties:
Name Comment
array Array containing the MAC-addresses of the devices used by a user.

Developer Manual 159


Use of RESTful APIs APIs Version 2

usersaleRead, usersaleFind
The “usersale” object allows you to read and search for sales data to users.
When searching using the “Find” command, you can use various objects with the following hierarchy:

user domain manager reseller


usersale
gateway domainSale managerSale resellerSale

Example of a call that reads data:


$Endpoint = 'usersaleRead';
$Data = '{"id":"123"}';

Example of a call that searches for data by user ID:


$Endpoint = 'usersaleFind';
$Data = '{"Where":"usersale.UserID=123"}';

Example of a call that gets the IDs of all sales made on a federated domain and where the city of
the reseller making the sale is equal to "New York":
$Endpoint = 'usersaleFind';
$Data = '{"Where":"usersale.DomainID = 85 AND usersale.SaleResellerID > 0 AND
usersale.SaleResellerID <> usersale.ResellerID AND resellerSale.City = \"New York\""}';

Example of a call that derives the IDs of all sales made from 2020-01-01 onwards:
$Endpoint = 'usersaleFind';
$Data = '{"Where":"usersale.CreationDate >= \"2020-01-01 00:00:00\""}';

Available properties:
Name Comment Type
Object ID. int(11)
id
If you need to add, pass the value zero in this property.
Date when the object was created. Automatically assigned timestamp
CreationDate when you add it.
Read-only property.
Reseller ID. int(11)
ResellerID
ID derived from the “reseller” object”.
ID of the reseller who made the sale. It can differ from the int(11)
ResellerID if the sale was made in a federated domain.
To search for this property, use the “SaleReseller” object.
SaleResellerID
ID derived from the “reseller” object.
If you need to search for this “reseller” object, use the
“resellerSale” class.
Manager ID. int(11)
ManagerID
ID derived from the “manager” object.
ID of the manager who made the sale. It can differ from the int(11)
ManagerID if the sale was made in a federated domain.
SaleManagerID ID derived from the “manager” object.
If you need to search for this “manager” object, use the
“managerSale” class.
DomainID Domain ID. int(11)

Developer Manual 160


Use of RESTful APIs APIs Version 2

ID derived from the “domain” object.


ID of the domain who made the sale. It can differ from the int(11)
DomainID if the sale was made in a federated domain.
SaleDomainID ID derived from the “domain” object.
If you need to search for this “domain” object, use the
“domainSale” class.
Gateway ID. int(11)
GatewayID
ID derived from the “gateway” object.
User ID. int(11)
UserID
ID derived from the “user” object.
Product ID. int(11)
ProductID
ID derived from the “prdoduct” object.
TransactionType Transaction type. Possible values are: int(11)
• 0 = Free Authentication Mode
• 1 = PayPal
• 3 = Reassign Free Product
• 4 = Update users
• 5 = Mollie
• 6 = Users Import
• 7 = AuthorizeNet
• 8 = SagePay
• 9 = PayFast
• 10 = Eway
• 11 = PaymentExpress
• 12 = Pesapal
• 13 = Checkout
• 14 = PayUBiz
• 15 = PaysafeCard
• 18 = SagePay
• 19 = 1Voucher
• 20 = 1ForYou
• 50 = Mail Validation
• 51 = API Call
• 52 = Printer Card
• 53 = Complimentary
• 54 = Backend Operator
• 55 = Frontend Free Product
• 56 = SMS activation
• 57 = PMS
• 100 = Voucher Activation
• 101 = Backend Card
TransactionDescr Description of the transaction based on TransactionType. varchar(25)
PaymentGatewayID Payment ID in the gateway for payments (PayPal, Mollie, varchar(100)
AuthorizeNet, etc.).
Currency Currency code for SellPrice and SellFee. varchar(3)
CostCurrency Currency code for ProductCost, ResellerCost. varchar(3)

Developer Manual 161


Use of RESTful APIs APIs Version 2

ProductCost Product cost. float


ResellerCost Cost of the product to the reseller. float
ManagerCost Cost of the product to the manager. float
SellPrice Sales price. float
SellFee Sales cost assigned by the payment gateway. float
Tax Sales taxes. float
TaxRate Tax rate. float
TaxJurisdiction Tax jurisdiction. varchar(32)
Expiration Product expiration. Datetime
Expired Expired product. Possible values are: int(1)
• 0 = Product not expired
• 1 = Prodoct expired
ReassignExpirationUpon Indicates whether the expiration should still be assigned. tinyint(1)
Login Possible values are:
• 0 = Expiration already assigend
• 1 = Expiration yet to be assigned

Developer Manual 162


Use of RESTful APIs APIs Version 2

userStats
The "userStats" endpoint returns a set of properties with statistics for the user.

Example:
$Endpoint = 'userStats';
$Data = '{"id":"123"}';

Properties:
Name Comment Type
ID of the user whose statistics are desired.
id Mandatory property. Int(11)
ID derived from the “user” object.

Returned properties:
Name Comment
UserName Username.
ConnectionsNumber Number of connections.
BytesSent Bytes sent.
BytesReceived Bytes received.
TodayConnectionsNumb
Number of connections today.
er
TodayBytesSent Bytes sent today.
TodayBytesReceived Bytes received today.
MonthConnectionsCount Number of connections in the current month.
MonthBytesSent Bytes sent in the current month.
MonthBytesReceived Bytes received in the current month.
CreditMinutes Credit in minutes.
DailyCreditMinutes Daily residual credit in minutes.
MonthlyCreditMinutes Monthly residual credit in minutes.
CreditBytes Traffic credit in Bytes.
DailyCreditBytes Daily traffic credit in Bytes.
MonthlyCreditBytes Monthly traffic credit in Bytes.
UserRevenue Total revenues from users.
UserExpiration User expiration.

Developer Manual 163


Use of RESTful APIs APIs Version 2

vaccesspointRead, vaccesspointWrite, vaccesspointFind, vaccesspointDelete and


vaccesspointCount
The "vaccesspoint" object allows you to manage virtual access point data.
When searching using the “Find” and “Count” commands, you can use various objects with the following
hierarchy:

vaccesspo accesspoi
zone gateway domain manager reseller
int nt

Example of a call that reads data:


$Endpoint = 'vaccesspointRead';
$Data = '{"id":"123"}';

Example of a call that searches for data by virtual access point name:
$Endpoint = 'vaccesspointFind';
$Data = '{"Where":"vaccesspoint.AccessPointName=\"MyAccessPoint\""}';

Example of a call that searches for data by ID:


$Endpoint = 'vaccesspointFind';
$Data = '{"Where":"vaccesspoint.id=123"}';

Example of a call that adds:


$Endpoint = 'vaccesspointWrite';
$Data = '{"id":"0", "AccessPointName":"MyAccessPoint", "VGatewayID":"1", "ZoneID":"1"}';

Example of a call that modifies data:


$Endpoint = 'vaccesspointWrite';
$Data = '{"id":"123", "AccessPointName":"MyAccessPoint", "VGatewayID":"1",
"ZoneID":"1"}';

Example of a call that deletes data:


$Endpoint = 'vaccesspointDelete';
$Data = '{"id":"123"}';

Available properties:
Name Comment Type
Object ID.
id If you need to add, pass the value zero in this property. int(11)
Read-only property.
Date when the object was created. Automatically assigned
CreationDate when you add it. timestamp
Read-only property.
Zone ID.
ZoneID ID derived from the “zone” object. int(11)
Mandatory property.
ID of the physical access point of reference.
MainAccessPointID ID derived from the “accesspoint” object. int(11)
Mandatory property.
Access point name.
AccessPointName varchar(100)
Mandatory property.
ID of the reference virtual gateway to associate with the
VGatewayID access point. int(11)
ID derived from the “vgateway” object.

Developer Manual 164


Use of RESTful APIs APIs Version 2

Mandatory property.
Notes Notes. text
SSID SSID of the Wi-Fi network. varchar(255)
ID for the VLAN.
VLANID varchar(4)
The numeric values allowed are from 2 to 4095.
IP Address Assignment. Possible values are:
• 0 = No
AssignIPAddress tinyint(1)
• 1 = Use DHCP
• 2 = Static IP
IP address.
IPAddress varchar(15)
Define only if "AssignIPAddress" is equal to 2.
Network mask.
NetMask varchar(15)
Define only if "AssignIPAddress" is equal to 2.
IP address of the gateway.
GatewayIP It is usually the IP Address of the hotspot gateway. varchar(15)
Define only if "AssignIPAddress" is equal to 2.
IP addresses of DNS servers separated by commas.
DNSIPAddress varchar(100)
Define only if "AssignIPAddress" is equal to 2

Developer Manual 165


Use of RESTful APIs APIs Version 2

vgatewayRead, vgatewayWrite, vgatewayFind, vgatewayDelete and vgatewayCount


The "vgateway" object allows you to manage virtual gateway data.
When searching using the “Find” and “Count” commands, you can use various objects with the following
hierarchy:

vgateway gateway domain manager reseller

Example of a call that reads data:


$Endpoint = 'vgatewayRead';
$Data = '{"id":"123"}';

Example of a call that searches for data by virtual gateway name:


$Endpoint = 'vgatewayFind';
$Data = '{"Where":"vgateway.GatewayName=\"MyGateway\""}';

Example of a call that searches for data by ID:


$Endpoint = 'vgatewayFind';
$Data = '{"Where":"vgateway.id=123"}';

Example of a call that adds:


$Endpoint = 'vgatewayWrite';
$Data = '{"id":"0", "GatewayName":"MyGateway", "ManagerID":"1", "MainGatewayID":"1"}';

Example of a call that modifies data:


$Endpoint = 'vgatewayWrite';
$Data = '{"id":"123", "GatewayName":"MyGateway"}';

Example of a call that deletes data:


$Endpoint = 'vgatewayDelete';
$Data = '{"id":"123"}';

Available properties:
Name Comment Type
Object ID.
id If you need to add, pass the value zero in this property. int(11)
Read-only property.
Date when the object was created. Automatically assigned
CreationDate when you add it. timestamp
Read-only property.
Manager ID.
ManagerID ID derived from the “manager” object. int(11)
Mandatory property in addition.
ID of the physical gateway of reference.
MainGatewayID ID derived from the “gateway” object. int(11)
Mandatory property in addition.
Name of virtual gateway.
GatewayName varchar(100)
Mandatory property.
Gateway MAC-address.
MacAddress Used to recognize the correct domain and gateway varchar(255)
when redirecting to the Welcome Portal.

Developer Manual 166


Use of RESTful APIs APIs Version 2

If in the reidirecting URL you specify the gateway parameter,


with the name assigned in the "Gateway Name" field, you
won’t need to define it.
Type of virtual gateway. Possible values are:
Virtual • 1 = With multiple authentication methods int(1)
• 2 = With additional Hotspot (SSID) service
Title for multiple logins.
MultipleLoginTitle longtext
Multi-language property.
ID of the reference domain.
DomainID ID derived from the “domain” object. int(11)
Mandatory property in addition.
Maximum number of connected users.
MaxUsers int(11)
A value equal to zero expresses an infinite number.
Maximum number of Welcome Portal views per minute.
WPMaxView int(11)
A value equal to zero expresses an infinite number.
Template ID. Possible values are:
• 0 = Use default
TemplateID • Other value = Template ID int(11)

ID derived from the “wptemplate” object.


UseTemplateColor Color schemes to use for the template. int(11)
Advertising. Possible values are:
• 0 = Enable
Advertising smallint(2)
• 10 = Only for campaigns on this domain
• 20 = Disable
Survey. Possible values are:
• 0 = Disable
Survey int(1)
• 1 = Enable, one at a time
• 2 = Enable, all those provided
Timezone of the gateway.
TimeZone varchar(64)
Define a “tzdata”-type value.
Timetable of the gateway.
The numeric value expresses the activation hours based
Timetables on the bits of the same from midnight. 1 activates int(11)
midnight, 3 activates midnight and one a.m., 7 activates
midnight, one and two, etc.
Timetable of the days of the week.
The numeric value expresses the days of the activation
DaysOfWeekTimetable week based on the bits of the same starting from int(11)
Monday. 1 activates Monday, 3 activates Monday and
Tuesday, 7 activates Monday, Tuesday and Wednesday,
etc.
Timetable of the month of the year.

MonthsTimetable The numeric value expresses the months of the int(11)


activation year based on the bits of the same starting
from Monday. 1 activates January, 3 activates January

Developer Manual 167


Use of RESTful APIs APIs Version 2

and February, 7 activates January, February and March,


etc.
Array with IDs of the custom Apps to upload to the Welcome
Portal.

CustomApps The values contained in each element of the array are array()
explained in the paragraph "The array of values
contained in the gateway's 'CustomApps' property".
IDs derived from the “wpcustomapp” object.
The complete URL (without HTTP://) or the Facebook page
FacebookFanPageURL varchar(200)
ID which users can click 'I Like' on or 'Publish a post' to.
When the user performs the registration or login with
Facebook, it has the possibility to publish a post on its
FacebookPublishUponCo timeline. Possible values are:
int(11)
nnection • 0 = Use domain settings
• 1 = Yes
• 2 = Never
TwitterFollowerUser Username or Twitter ID to follow. varchar(50)
Disables the Apple mini-browser (captive network assistant)
that has several limitations.
DisableAppleCaptivePort If enabled, the user will have to manually open the tinyint(1)
al browser after connecting to the wifi. The option will be
active from the next Walled Garden update. This option
is automatically considered active if injection is enabled.
Disables the Android mini-browser (captive network
assistant) that has several limitations.
DisableAndroidCaptiveP If enabled, the user will have to manually open the tinyint(1)
ortal browser after connecting to the wifi. The option will be
active from the next Walled Garden update. This option
is automatically considered active if injection is enabled.
Disables the Windows Phone mini-browser (captive
network assistant) that has several limitations.
DisableWindowsPhoneC If enabled, the user will have to manually open the tinyint(1)
aptivePortal browser after connecting to the wifi. The option will be
active from the next Walled Garden update. This option
is automatically considered active if injection is enabled.
Notes Notes. text
Locked If active the gateway is blocked. tinyint(1)
Authentication via MAC Address.
If you enable this option, you can create users with a
username and password equal to the mac-address of
AuthUsersByMACLogin the device, avoiding the welcome portal and the entire smallint(3)
registration and manual authentication phase. Enable
this option only if really necessary otherwise an
authentication request will be sent to the wifi
connection of any device.
AuthUsersWithoutRealm Authenticate users without domain name. smallint(3)

Developer Manual 168


Use of RESTful APIs APIs Version 2

Enables user authentication without the


@DomainName suffix. In practice the Realm is
automatically added by the NAS PPPoE Mikrotik.
Available only for gateways on PPPoE domains.
EnableWireless Enables the wireless interface. tinyint(1)
SSID SSID of the Wi-Fi network. varchar(255)
EnableHotspotBridgeOnE
Adds Ether1 to Hotspot Bridge. tinyint(1)
th1
EnableHotspotBridgeOnE
Adds Ether2 to Hotspot Bridge. tinyint(1)
th2
EnableHotspotBridgeOnE
Adds Ether3 to Hotspot Bridge. tinyint(1)
th3
EnableHotspotBridgeOnE
Adds Ether4 to Hotspot Bridge. tinyint(1)
th4
EnableHotspotBridgeOnE
Adds Ether5 to Hotspot Bridge. tinyint(1)
th5
EnableHotspotBridgeOnE
Adds Ether6 to Hotspot Bridge. tinyint(1)
th6
EnableHotspotBridgeOnE
Adds Ether7 to Hotspot Bridge. tinyint(1)
th7
EnableHotspotBridgeOnE
Adds Ether8 to Hotspot Bridge. tinyint(1)
th8
EnableHotspotBridgeOnE
Adds Ether9 to Hotspot Bridge. tinyint(1)
th9
EnableHotspotBridgeOnE
Adds Ether10 to Hotspot Bridge. tinyint(1)
th10
EnableHotspotBridgeOnE
Adds Ether11 to Hotspot Bridge. tinyint(1)
th11
EnableHotspotBridgeOnE
Adds Ether12 to Hotspot Bridge. tinyint(1)
th12
Defines the Keep-Alive timeout, in seconds, for the hotspot
service. Possible values are:
• 0 = Undefined
• 15 = 15 Seconds
• 30 = 30 Seconds
• 60 = 1 Minute
KeepAliveTimeout varchar(10)
• 120 = 2 Minutes
• 300 = 5 Minutes
• 600 = 10 Minutes
• 1800 = 30 Minutes
• From 3600 to 259200 = from one hour to seventy-two
hours.
IP address of the gateway hotspot interface (WLAN1 or
HotspotIPAddress varchar(15)
Ether2).
Network mask of the virtual gateway hotspot interface
HotspotNetMask varchar(15)
(Wlan1 or Ether2).
DNSIPAddress IP addresses of the DNS servers, separated by commas. varchar(100)
First IP address for the DHCP pool used by the virtual
UsersPoolFromIP varchar(15)
gateway.

Developer Manual 169


Use of RESTful APIs APIs Version 2

Last IP address for the DHCP pool used by the virtual


UsersPoolToIP varchar(15)
gateway.
DHCP lease time, expressed in hours, for the IP address
UsersPoolLeaseTimeHou assignment of the connected devices. Possible values are:
varchar(3)
rs • 1 = An hour
• From 2 to 72 = Two to seventy-two hours.
Enables or disables using a VLAN for the bridge interface of
HotspotUseVLAN the Hotspot. int(1)
The value of the property is fixed at 1.
HotspotVLANID ID of the VLAN. varchar(5)

Developer Manual 170


Use of RESTful APIs APIs Version 2

voucherAdd
The "voucherAdd" endpoint allows you to create Vouchers for a domain.

Example:
$Endpoint = 'voucherAdd';
$Data = '{"DomainID":"123", "ProductID":"345", "SellPrice":"2.5", "Language":"en",
"Quantity":"10"}';

Properties:
Name Comment Type
Domain ID.
DomainID Mandatory. int(11)
ID derived from the “domain” object.
Product ID.
ProductID Mandatory. int(11)
ID derived from the “product” object.
SellPrice Sale price. float
Language code for the users.
Language Define the value in ISO 3166-1 alpha-2 format. varchar(2)
Optional.
Number of vouchers to create.
Quantity If not defined the default is equal to one. float
The maximum number is one thousand.

Returned properties:
Name Comment
Code Array containing the voucer codes created.

Developer Manual 171


Use of RESTful APIs APIs Version 2

wpcustomappRead, wpcustomappWrite, wpcustomappFind and wpcustomappDelete


The "wpcustomapp" object allows you to manage custom App data for the Welcome Portal defined at
system, domain, and gateway level.
When searching using the “Find” command, you can use various objects with the following hierarchy
depending on the usage context:

wpcustomapp gateway domain manager reseller

wpcustomapp domain manager reseller

wpcustomapp

Example of a call that reads data:


$Endpoint = 'wpcustomappRead';
$Data = '{"id":"123"}';

Example of a call that searches for data by code:


$Endpoint = 'wpcustomappFind';
$Data = '{"Where":"wpcustomapp.Code=\"MyCustomApp\""}';

Example of a call that searches for data by ID:


$Endpoint = 'wpcustomappFind';
$Data = '{"Where":"wpcustomapp.id=123"}';

Example of a call that adds:


$Endpoint = 'wpcustomappWrite';
$Data = '{"id":"0", "Code":"MyCustomApp"}';

Example of a call that modifies data:


$Endpoint = 'wpcustomappWrite';
$Data = '{"id":"123", "Code":"MyCustomApp"}';

Example of a call that deletes data:


$Endpoint = 'wpcustomappDelete';
$Data = '{"id":"123"}';

Available properties:
Name Comment Type
Object ID.
id If you need to add, pass the value zero in this property. int(11)
Read-only property.
Date when the object was created. Automatically assigned
CreationDate when you add it. timestamp
Read-only property.
Domain ID.

DomainID ID derived from the “domain” object. int(11)


Required when treating with custom Apps of a domain
or gateway.
Gateway ID.
GatewayID ID derived from the “gateway” object. int(11)
Required when treating custom Apps of a gateway.
Code Custom App code. varchar(255)

Developer Manual 172


Use of RESTful APIs APIs Version 2

Application title displayed below the image icon in the App


AppTitle bar of the Welcome Portal. Do not exceed 20 characters. longtext
Multi-language property.
App type. Possible values:
• 0 = External (URL on external web server)
Type int(2)
• 10 = Internal (you need to specify the HTML, CSS and
JavaScript code)
URL of the external application. Also specify whether
URL varchar(255)
'http://' or 'https://'.
Type of image displayed in the Welcome Portal for the App.
ImgType varchar(40)
Read-only property.
Image with the icon displayed in the Welcome Portal for the
App.
Img mediumblob
Recommended size: 128 x 128 pixel.
Recommended image format: SVG or PNG
Defines when to display the App. Possible values are:
• 0 = Always
Visible int(2)
• 10 = When users are connected
• 20 = When users are disconnected
Defines how to display the App to users. Possible values are:
• 0 = Standard
ShowType tinyint(1)
• 1 = Maximised
• 2 = New tab
The App is visible only for the defined Browser type.
Possible values are:
• 0 = All
• 10 = Chrome
Browser1Type • 20 = Internet Explorer int(2)
• 30 = Safari
• 40 = Opera
• 50 = Mozilla
• 60 = Netscape
The App is visible only for the browser defined in
Browser1Version Browser1Type with version greater than or equal to the varchar(10)
value specified in this field.
Disable Desables the App. int(1)
Notes Notes. longtext
HTML head for ther App.
Head longtext
Define if Type = 10.
HTML code for the App.
HTML longtext
Define if Type = 10.
CSS code for the App.
CSS longtext
Define if Type = 10.
JavaScript code for the App.
JavaScript longtext
Define if Type = 10.

Developer Manual 173


Use of RESTful APIs APIs Version 2

wpcustomimageRead, wpcustomimageWrite, wpcustomimageFind and


wpcustomimageDelete
The "wpcustomimage" object allows you to manage custom image data for the Welcome Portal defined
at system, domain, and gateway level.
When searching using the “Find” command, you can use various objects with the following hierarchy
depending on the usage context:

wpcustomimage gateway domain manager reseller

wpcustomimage domain manager reseller

wpcustomimage

Example of a call that reads data:


$Endpoint = 'wpcustomimageRead';
$Data = '{"id":"123"}';

Example of a call that searches for data by code:


$Endpoint = 'wpcustomimageFind';
$Data = '{"Where":"wpcustomimage.ImgID=\"P7T3VP111GL34L9G\""}';

Example of a call that searches for data by ID:


$Endpoint = 'wpcustomimageFind';
$Data = '{"Where":"wpcustomimage.id=123"}';

Example of a call that adds:


$Endpoint = 'wpcustomimageWrite';
$Data = '{"id":"0", "Title":"<en>MyCustomImage</en>"}';

Example of a call that modifies data:


$Endpoint = 'wpcustomimageWrite';
$Data = '{"id":"123", "Code":"MyCustomImage"}';

Example of a call that deletes data:


$Endpoint = 'wpcustomimageDelete';
$Data = '{"id":"123"}';

Available properties:
Name Comment Type
Object ID.
id If you need to add, pass the value zero in this property. int(11)
Read-only property.
Date when the object was created. Automatically assigned
CreationDate when you add it. timestamp
Read-only property.
Domain ID.

DomainID ID derived from the “domain” object. int(11)


Required if you are treating custom images of a domain
or gateway.
Gateway ID.

GatewayID ID derived from the “gateway” object. int(11)


Required if you are treating custom images of a
gateway.

Developer Manual 174


Use of RESTful APIs APIs Version 2

ImgID Alphanumeric identifier assigned to the image. varchar(30)


Title for the image.
Title longtext
Multi-language property.
Url URL for the image.
Type of image uploaded.
ImgType varchar(40)
Read-only property.
Img Image. longblob

Developer Manual 175


Use of RESTful APIs APIs Version 2

wplockandbypassRead, wplockandbypassWrite, wplockandbypassFind and


wplockandbypassDelete
The "wplockandbypass" object allows you to manage bypasses or locks for IP, Mac address, or subnets
defined at system, reseller, manager, domain, and gateway level.
When searching using the “Find” command, you can use various objects with the following hierarchy
depending on the usage context:
wplockandbypass gateway domain manager reseller

wplockandbypass domain manager reseller

wplockandbypass manager reseller

wplockandbypass reseller

wplockandbypass

Example of a call that reads data:


$Endpoint = 'wplockandbypassRead';
$Data = '{"id":"123"}';

Example of a call that searches for data by comment:


$Endpoint = 'wplockandbypassFind';
$Data = '{"Where":"wplockandbypass.Comment=\"MyBypass\""}';

Example of a call that searches for data by ID:


$Endpoint = 'wplockandbypassFind';
$Data = '{"Where":"wplockandbypass.id=123"}';

Example of a call that adds:


$Endpoint = 'wplockandbypassWrite';
$Data = '{"id":"0", "Comment":"MyBypass"}';

Example of a call that modifies data:


$Endpoint = 'wplockandbypassWrite';
$Data = '{"id":"123", "Description":"MyBypass"}';

Example of a call that deletes data:


$Endpoint = 'wplockandbypassDelete';
$Data = '{"id":"123"}';

Available properties:
Name Comment Type
Object ID. int(11)

id If you need to add, pass the value zero in this


property.
Read-only property.
Date when the object was created. Automatically timestamp
CreationDate assigned when you add it.
Read-only property.
Reseller ID. int(11)
ResellerID
ID derived from the “reseller” object.

Developer Manual 176


Use of RESTful APIs APIs Version 2

Required if you are treating lock and bypass of a


reseller.
Manager ID. int(11)

ManagerID ID derived from the “manager” object.


Required if you are treating a manager’s lock and
bypass.
Domain ID. int(11)

DomainID ID derived from the “domain” object.


Required if you are treating a domain’s lock and
bypass.
Gateway ID. int(11)

GatewayID ID derived from the “gateway” object.


Required if you are treating a gateway’s lock and
bypass.
Short comment describing the device to which the bypass varchar(128)
Comment
or the lock refers to.
Defines the bypass or block type. Possible values are: smallint(1)
• 0 = Bypass by MAC-address
• 1 = Bypass by IP address
Type • 2 = Block by MAC-address
• 3 = Block by IP address
• 4 = Bypass by subnet
• 5 = Block by subnet
MACAddress MAC Address to bypass or block. varchar(40)
IPAddress IP address to bypass o block. varchar(40)
Subnet in CIDR format to bypass or block. varchar(40)
Subnet
Example: 192.168.0.0/24.
Expiration Expiration of the lock or bypass. datetime

Developer Manual 177


Use of RESTful APIs APIs Version 2

wpsurveyRead, wpsurveyWrite, wpsurveyFind and wpsurveyDelete


The “wpsurvey” object allows you to manage surveys, quizzes, or tests defined at system, reseller,
manager, domain, and gateway level.
When searching using the “Find” command, you can use various objects with the following hierarchy
depending on the usage context:
wptemplate gateway domain manager reseller

wptemplate domain manager reseller

wptemplate manager reseller

wptemplate reseller

wptemplate

Example of a call that reads data:


$Endpoint = ‘wpsurveyRead’;
$Data = ‘{“id”:”123”}’;

Example of a call that searches for data by template name:


$Endpoint = ‘wpsurveyFind’;
$Data = ‘{“Where”:”wpsurvey.Title LIKE \”%MySurvey%\””}’;

Example of a call that searches for data by ID:


$Endpoint = ‘wpsurveyFind’;
$Data = ‘{“Where”:”wpsurvey.id=123”}’;

Example of a call that adds:


$Endpoint = ‘wpsurveyWrite’;
$Data = ‘{“id”:”0”, “Title”:”<en>MySurvey</en>”}’;

Example of a call that modifies data:


$Endpoint = ‘wpsurveyWrite’;
$Data = ‘{“id”:”123”, “Title”:”<en>MySurvey</en>”}’;

Example of a call that deletes data:


$Endpoint = ‘wpsurveyDelete’;
$Data = ‘{“id”:”123”}’;

Available properties:
Name Comment Type
Object ID.
id If you need to add, pass the value zero in this property. Int(11)
Read-only property.
Date when the object was created. Automatically assigned
CreationDate when you add it. Timestamp
Read-only property.
Reseller ID.
ResellerID ID derived from the “reseller” object. Int(11)
Required if you are dealing with a reseller’s surveys.
Manager ID.
ManagerID Int(11)
ID derived from the “manager” object.

Developer Manual 178


Use of RESTful APIs APIs Version 2

Required if you are dealing with a manager’s surveys.


Domain ID.
DomainID ID derived from the “domain” object. Int(11)
Required if you are dealing with a domain’s surveys.
Gateway ID.
GatewayID ID derived from the “gateway” object. Int(11)
Required if you are dealing with a gateway’s surveys.
Title.
Title Longtext
Multi-language property.
Subtitle.
Subtitle Longtext
Multi-language property.
Defines the event in which to display the survey. Possible
values are:
Event • 0 = App in the Welcome Portal int(2)
• 10 = After the intro
• 20 = At login
StartDate Start date to display the survey, quiz or test to users. Datetime
EndDate End date to display the survey, quiz or test to the users. Datetime
Frequency of requesting the survey, quiz or test. Possible
values are:
Frequency • 0 = One time int(3)
• 10 = Always
• 20 = Recurring
Frequency type of requesting the survey, quiz or test.
Possible values are:
FrequencyType • 0 = After X days int(2)
• 10 = X days before expirting date
• 20 = Aftern X logins
FrequencyTypeValue Frequency value for requesting the survey, quiz or test. Int(11)
Sends an email notifying that a survey, quiz, or test has been
ShowThanksMessage tinyint(1)
filled in.
Thank you messsage.
ThanksMessage Longtext
Multi-language property.
Skip Define whether to display the skip button to skip the survey. Int(1)
AnonymousUsers If active, it does not save the users who fill in the survey. Smallint(3)
Send an email notification at the filling of a survey, quiz or
test. Possible values are:
• 0 = Never
SendMail int(1)
• 1 = With a score less than or equal to
• 2 = Always
• 3 = With a score greater than or equal to
Defines the score value of surveys, quizzes or tests that
SendMailMinScore Float
affects the sending of the email.
Email addresses, separated by comma, to send
notifications. If not specified, the notifications will be sent
SendMailAddresses Varchar(255)
to the email address defined in the manager or in the
reseller or in the system.

Developer Manual 179


Use of RESTful APIs APIs Version 2

Sends a thank you email to the users who have filled in the
survey, quiz or test. The sending is subject to the email
address requested during the user registration.
Possible values are:
SendUserMail • 0 = Never int(1)
• 1 = Yes
• 2 = Yes, delayed
• 3 = Yes, with a score greater than or equal to
• 4 = Yes, delayed with a score greater than or equal to
Sends emails just for the surveys, quizzes or tests whose
SendUserMailMinScore Float
score is greater than or equal to the entered value.
SendUserMailPostponed Defines the number of days that must elapse before the
Float
Days system sends the thank you email for filling in the survey.
Subject of the thank you email sent to users for filling in the
survey, quiz or test. If it is not entered, it will use the default
SendUserMailSubject Longtext
subject defined in the General Options
Multi-language property.
Email for filling in the survey. If not entered, it will use the
SendUserMailText default email defined in the General Options. Longtext
Multi-language property.
Header image type of the survey.
HeaderImgType Varchar(40)
Read-only property.
Header image of the survey. Image size must be 600px X
HeaderImg mediumblob
200px
Background image type of the survey.
BackgroundImgType Varchar(40)
Read-only property.
BackgroundImg Background image of the survey. Mediumblob
Array with the data of the questions related to the survey,
quiz, or test.
Questions The properties treated by each element of the array are Array()
explained in the following paragraph “Array of Objects
contained in the “Questions” Property.
Maximum score calculated from survey, quiz, or test.
AnswersMaxValue Float
Read-only property.
Notes Notes for the survey. Longtext
Locked If enabled, it suspends the survey. Tinyint(1)

Array of Objects contained in the “Questions” Property


The “Questions” property of the “wpsurvey” class contains an array of objects that contain the
properties of the questions assigned to the surveys, quiz, or test.

Available properties for each array element:


Name Comment Tipo
Object ID.
id Int(11)
If you need to add, pass the value zero in this property.

Developer Manual 180


Use of RESTful APIs APIs Version 2

Property is ignored if you are adding a new survey, quiz,


or test.
Read-only property.
Question text.
Text Longtext
Multi-language property.
Question description.
Description Longtext
Multi-language property.
Mandatory Defines whether the answer is required by the user.
Question type. Possible values are:
• Multiple = Multiple choice answer
• Note = Multi-line note
Type • Number = Number int(11)
• Option = Multiple option with single choice
• Rating = Rating on a scale of one to five stars
• Text = Single line text
Array of values with IDs of user enabled to fill in the survey
question.
Usable only for domain-level surveys, quizzes, or test.
Users The values contained in each element of the array are Array()
explained in the following paragraph “Array of Values
contained in the “Users” Property of the “Questions”
Property”.
IDs derived from the “user” object.
Progressive demand order.
Order
Read-only property.
Array with answer data associated with survey question,
quiz, or test.
Answers The values contained in each element of the array are Array()
explained in the following paragraph “Array of Objects
contained in the “Answers”.

Array of Values contained in the “Users” Property of the “Questions” Property”


The “Users” property of the “Questions” class contains an array of values that contain the IDs of the
users who can fill out the surveys-specific question.

Array of Objects contained in the “Answers”


The “Answers” property of the “Questions” class contains an array of objects that contain the properties
of the answers associated with surveys, quiz, or test.

Available properties for each array element:


Name Comment Type
Object ID.
If you need to add, pass the value zero in this property.
id Property is ignored if you are adding a new survey, quiz, Int(11)
or test.
Read-only property.

Developer Manual 181


Use of RESTful APIs APIs Version 2

Response text selectable by the user.


Text
Multi-language property.
Answer value. It is used to calculate the total score of the
Value
survey, quiz or test.
Progressive answer order.
Order
Read-only property.

Example in “json” format with one question and two answers:


[
{
“id”:781,
“ProductID”:”54”,
“Price”:”0”,
“WhenStandard”:”1”,
“WhenSocialLogin”:”1”,
“WhenRecharge”:”1”,
“PrintableGroup”:””,
“PrintableOnCard”:”1”,
“PrintableOnVoucher”:”0”,
“Order”:”0”},
{
“id”:785,
“ProductID”:”273”,
“Price”:”10”,
“WhenStandard”:”1”,
“WhenSocialLogin”:”1”,
“WhenRecharge”:”1”,
“PrintableGroup”:””,
“PrintableOnCard”:”1”,
“PrintableOnVoucher”:”0”,
“Order”:”1”}
]
[
{
“id”:”737”,
“Type”:”Option”,
“Min”:”0”,
“Max”:”0”,
“Text”:{“en”:”MyQuestion Title”,”es”:””,”fr”:””,”de”:””,”it”:””,”l1”:””,”l2”:””,”l3”:””},
“Description”:{“en”:”MyQuestion
Description”,”es”:””,”fr”:””,”de”:””,”it”:””,”l1”:””,”l2”:””,”l3”:””},
“Mandatory”:”0”,
“Order”:”0”,
“Answers”:[
{
“id”:”761”,
“Text”:{“en”:”Option1”,”es”:””,”fr”:””,”de”:””,”it”:””,”l1”:””,”l2”:””,”l3”:””},
“Value”:”1”,
“Order”:”0”

Developer Manual 182


Use of RESTful APIs APIs Version 2

},
{
“id”:”765”,
“Text”:{“en”:”Option2”,”es”:””,”fr”:””,”de”:””,”it”:””,”l1”:””,”l2”:””,”l3”:””},
“Value”:”2”,
“Order”:”1”
}
]
}
]

Developer Manual 183


Use of RESTful APIs APIs Version 2

wptemplateRead, wptemplateWrite, wptemplateFind and wptemplateDelete


The “wptemplate” object allows you to manage the Template Data for the Welcome Portal defined at
system, domain, and gateway level.
When searching using the “Find” command, you can use various objects with the following hierarchy
depending on the usage context:

wptemplate gateway domain manager reseller

wptemplate domain manager reseller

wptemplate

Example of a call that reads data:


$Endpoint = ‘wptemplateRead’;
$Data = ‘{“id”:”123”}’;

Example of a call that searches for data by template name:


$Endpoint = ‘wptemplateFind’;
$Data = ‘{“Where”:”wptemplate.Code=\”MyTemplate\””}’;

Example of a call that searches for data by ID:


$Endpoint = ‘wptemplateFind’;
$Data = ‘{“Where”:”wptemplate.id=123”}’;

Example of a call that adds:


$Endpoint = ‘wptemplateWrite’;
$Data = ‘{“id”:”0”, “Code”:”MyTemplate”}’;

Example of a call that modifies data:


$Endpoint = ‘wptemplateWrite’;
$Data = ‘{“id”:”123”, “Code”:”MyTemplate”}’;

Example of a call that deletes data:


$Endpoint = ‘wptemplateDelete’;
$Data = ‘{“id”:”123”}’;

Available properties:
Name Comment Type
Object ID.
id If you need to add, pass the value zero in this property. Int(11)
Read-only property.
Date when the object was created. Automatically assigned
CreationDate when you add it. Timestamp
Read-only property.
Domain ID.

DomainID ID derived from the “domain” object. Int(11)


Required if you are dealing with templates of a domain
or a a gateway.
Gateway ID.

GatewayID ID derived from the “gateway” object. Int(11)


Required if you are dealing with template di un
gateway.
Code Template code. Varchar(255)

Developer Manual 184


Use of RESTful APIs APIs Version 2

UseDefaults Enables the use of default values for the of domain/general tinyint(1)
Notes Notes for the templete. Longtext
Portal title.
PortalTitle Text
Multi-language property.
Portal subtitle.
PortalSubTitle Text
Multi-language property.
Welcome Portal theme. Possible values are:
PortalTheme • 0 = Default int(4)
• 10 = Light
Main image.
PortalMainImg Mediumblob
“Image”-type property.
Main image type.
PortalMainImgType Varchar(40)
Read-only property.
ShowAppsBar Show App bar. Int(1)
ShowSideBarButton Show the SideBar Button int(1)
ShowAppsInSidebar Show the list of Apps in the sidebar int(1)
EnableWPCustomization Enable the Welcome Portal HSTML customization int(1)
Define Video Display Mode.
The possible values are:
VideoPlayMode • 0 = Autoplay and When Possible Unmuted
• 1 = Autoplay and Always Mute
• 2 = No Autoplay and Unmuted
Help for the user.
WPCustomHelp Longtext
Multi-language property.
Defines the Welcome Portal intro type. Possible values are:
• 0 = None
• 5 = Image from file
• 10 = Static image
• 11 = WiFi4EU Banner
• 20 = Hotspot location image
PortalIntroType int(2)
• 40 = Flickr image from photo set
• 50 = Image based on weather forecast
• 60 = YouTube video
• 70 = External URL
• 80 = MP4 external video
• 90 = MP4 video from file
PortalIntroImageFromFil Image type for the Intro, uploaded from a file.
Int(2)
eImgType Read-only property.
PortalIntroStaticImageU URL or variable for the intro static image of the Welcome
Varchar(255)
RL Portal.
PortalIntroVideoFromFil Defines the type of video to show in the intro.
varchar(40)
eType Read-only property.
PortalIntroVideoFromFil Defines the video to show in the intro.
longblob
e Read-only property.

Developer Manual 185


Use of RESTful APIs APIs Version 2

Type of image displayed as a poster in the intro when the


PortalIntroVideoPosterI video is not yet running. varchar(40)
mgType
Read-only property.
PortalIntroFlickrPhotoSe Name of the Flickr photo set assigned to the set of images
varchar(255)
t to display.
List of YouTube video IDs, separated by commas.
PortalIntroYoutubeVideo
If you define multiple IDs, they will be displayed varchar(30)
ID
randomly.
External URL without the http:// prefix that contains the
PortalIntroExternalURL varchar(255)
page to display in the intro.
URL to direct the users to when they click on the intro
PortalIntroURL varchar(255)
videos.
PortalIntroVideoURL URL of the MP4 external video to display in the intro. varchar(255)
PortalIntroMinSeconds Seconds of visualization. int(4)
Defines the background type of the Welcome Portal.
Possible values are:
• 0 = None
• 5 = Image from file
PortalBackgroundType int(2)
• 10 = Static image
• 20 = Hotspot location image
• 40 = Flickr image from photo set
• 50 = Image based on weather forecast
Image type for the Welcome Portal background, uploaded
PortalBackgroundImageF from file.
varchar(40)
romFileImgType
Read-only property.
PortalBackgroundStaticI URL or variable for the background static image of the
varchar(255)
mageURL Welcome Portal.
PortalBackgroundFlickrP
Gallery Flickr for the Welcome Portal background image. varchar(255)
hotoSet
Default App. Possible values are:
• 0 = Default
• -10 = Info
• -20 = Login
DefaultApp int(4)
• -30 = Weather
• -40 = Around me
• -70 = Route
• -1000 = Custom App
Default custom App. Possible values are:
• 0 = None
DefaultCustomAppID • wpcustomapp.id = Custom App ID. int(11)

ID derived from the “wpcustomapp” object.


If enabled, the Info App is not displayed.
InfoAppHide It is not considered if the template is used on a domain int(1)
where you have selected the Welcome Portal Lite.
LoginAppHide If enabled, the Login App is not displayed. int(1)

Developer Manual 186


Use of RESTful APIs APIs Version 2

It is not considered if the template is used on a domain


where you have selected the Welcome Portal Lite.
SurfAppHide If enabled, the Surf App is not displayed. tinyint(1)
If enabled, the User Profile App is not displayed.
ProfileAppHide It is not considered if the template is used on a domain int(1)
where you have selected the Welcome Portal Lite.
If enabled, the Weather App is not displayed.
WeatherAppHide It is not considered if the template is used on a domain int(1)
where you have selected the Welcome Portal Lite.
If enabled, the Around Me App is not displayed.
AroundMeAppHide It is not considered if the template is used on a domain int(1)
where you have selected the Welcome Portal Lite.
If enabled, the Route App is not displayed.
RouteAppHide It is not considered if the template is used on a domain int(1)
where you have selected the Welcome Portal Lite.
Default App after login. Possible values are:
• 0 = Default
• -1 = None
• -10 = Info
• -30 = Weather
DefaultAppAfterLogin int(4)
• -40 = Around me
• -50 = Coonection status
• -60 = User profile
• -70 = Route
• -1000 = Custom App
Default custom App to upload. Possible values are:
• 0 = None
DefaultAppAfterLoginCu • wpcustomapp.id = Custom App ID
int(11)
stomAppID
ID derived from the “wpcustomapp” object.
Definibile se DefaultAppAfterLogin è uguale a -1000.
Style of the App buttons. Possible values are:
• 0 = Default
• 1 = Rounded corners
• 2 = Squares
• 3 = Circles
AppButtonsStyle • 4 = Rounded corners right-top left-bottom int(3)
• 5 = Rounded corners left-top right-bottom
• 6 = Rounded corners left-top right-top
• 7 =Rounded corners left-bottom right-bottom
• 8 = Elliptical left
• 9 = Elliptical right
Icon type for the button of the Info App displayed in the App
AppBarInfoImgType Bar of the Welcome Portal. varchar(40)
Read-only property.
Icon type for the button of the Login App displayed in the
AppBarLoginImgType varchar(40)
App Bar of the Welcome Portal.

Developer Manual 187


Use of RESTful APIs APIs Version 2

Read-only property.
Icon type for the button of the Surf App displayed in the App
AppBarSurfImgType Bar of the Welcome Portal. varchar(40)
Read-only property.
Icon type for the button of the Connection Status App
AppBarConnStatusImgTy displayed in the App Bar of the Welcome Portal.
varchar(40)
pe
Read-only property.
Icon type for the button of the Around Me App displayed in
AppBarAroundMeImgTy the App Bar of the Welcome Portal.
varchar(40)
pe
Read-only property.
Icon type for the button of the Weather App displayed in
AppBarWeatherImgType the App Bar of the Welcome Portal. varchar(40)
Read-only property.
Icon type for the button of the User Profile App displayed in
AppBarUserProfileImgTy the App Bar of the Welcome Portal.
varchar(40)
pe
Read-only property.
Icon type for the button of the Route App displayed in the
AppBarRouteImgType App Bar of the Welcome Portal. varchar(40)
Read-only property.
Icon type for the button of the Survey App displayed in the
AppBarSurveyImgType App Bar of the Welcome Portal. varchar(40)
Read-only property.
Icon type for the button of the Custom App displayed in the
AppBarCustomImgType App Bar of the Welcome Portal. varchar(40)
Read-only property.
Type of color scheme to use. Possible values are:
WelcomePortalColorTyp
• 0 = Default int(3)
e
• 100 = Custom
WelcomePortalBackgrou Background color for the Welcome Portal displayed when a
varchar(30)
ndColor picture is not uploaded.
HeaderBackgroundColor Background color for the header bar. varchar(30)
HeaderForegroundColor Text color for the header bar. varchar(30)
AppsBarBackgroundColo Background color for the App bar
varchar(30)
r
AppsBarForegroundColo Text color for the App bar.
varchar(30)
r
SidebarBackgroundColor Background color for the sidebar. varchar(30)
SidebarForegroundColor Text color for the sidebar. varchar(30)
SidebarTitleBackgroundC Background color for the sidebar.
varchar(30)
olor
SidebarTitleForegroundC Defines the color of the texts for the sidebar.
varchar(30)
olor
WPCustomHead Custom head HTML for the Welcome Portal. longtext
WPCustomCSS Custom CSS for the Welcome Portal.
WPCustomJavascript Custom JavaScript for the Welcome Portal. longtext

Developer Manual 188


Use of RESTful APIs APIs Version 2

WPCustomHTML Custom HTML for the Welcome Portal. longtext


EnableGoogleTagManag Enables Google Tag Manager.
int(1)
er
Google Tag Manager ID related to the container created in
GoogleTagManagerID the workspace. varchar(40)
Example: GTM-XXXXXXX.
EnableGoogleAnalytics Enables the Google Analytics service. int(1)
EnableHotJar Enables the HotJar service. int(1)
MaximizeInfoApp Shows the Info App in maximized mode. int(1)
Custom header HTML for the Info App.
InfoCustomHeader longtext
Multi-language property.
Header image type for the Info App.
InfoHeaderImgType varchar(40)
Read-only property.
InfoHeaderImgLink Redirecting URL for the header image of the Info App. varchar(255)
Image type to display at the bottom for the Info App.
InfoFooterImgType varchar(40)
Read-only property.
Redirecting URL for the image displayed at the bottom of
InfoFooterImgLink varchar(255)
the Info App.
Welcome text for the Info App.
InfoAppWelcomeText longtext
Multi-language property.
Text that appears at the bottom of the Info App.
InfoAppFooterText longtext
Multi-language property.
InfoAppCustomCSS Custom CSS for the Info App. longtext
Custom header HTML for the Login App.
LoginCustomHeader longtext
Multi-language property.
Header image type for the Login App.
LoginHeaderImgType varchar(40)
Read-only property.
LoginHeaderImgLink Redirecting URL for the header image of the Login App. varchar(255)
Welcome text for the Login App.
LoginWelcomeText longtext
Multi-language property.
Text displayed in the body of the Login App to request an
LoginSMSRequestText SMS. longtext
Multi-language property.
Text that appears at the bottom of the Login App.
LoginFooterText longtext
Multi-language property.
Text displayed when prompted for password for gateways
with authenticathion mode set on “Without registration but
PinRequestText with password request”. longtext

Multi-language property.
Messagge displayed to users requesting consent to process
RegistrationRequestAcce data for marketing purposes.
longtext
ptMktTxt
Multi-language property.

Developer Manual 189


Use of RESTful APIs APIs Version 2

Message displayed to users upon registration informing


IntPhonePrefixSelfUserA how to activate the login account if the international
country calling code is not among the ones provided. longtext
ctivMsg
Multi-language property.
LoginAppCustomCSS Custom CSS for the Login App. longtext
LoginAppCustomJavascri
Custom JavaScript for the Login App. longtext
pt
ProfileAppEnableChange
Enables changing the profile. int(1)
Profile
ProfileAppEnableChange
Enables changing the password. int(1)
Password
ProfileAppEnableUserDis
Enables disconnecting devices. int(1)
connection
ProfileAppEnableDownlo
Enables sending receipts. int(1)
adReceipt
ConnectionStatusCustom
Custom CSS for the Connection Status App. longtext
CSS
Main image.
PortalMainImg mediumblob
“Image”-type property.
PortalIntroImageFromFil Image type for the Intro, uploaded from file.
mediumblob
eImg Image”-type property.
Image displayed as a poster in the intro when the video is
PortalIntroVideoPosterI not yet running. mediumblob
mg
“Image”-type property.
Header image for the Info App.
InfoHeaderImg mediumblob
“Image”-type property.
Image type for the Welcome Portal backgroud, uploaded
PortalBackgroundImageF from file.
mediumblob
romFileImg
“Image”-type property.
Image to display at the bottom for the info app.
InfoFooterImg mediumblob
“Image”-type property.
Image to display at the bottom for the Login App.
LoginHeaderImg mediumblob
“Image”-type property.
Icon for the button of the Info App displayed in the App Bar
AppBarInfoImg of the Welcome Portal. mediumblob
“Image”-type property.
Icon for the button of the Login App displayed in the App
AppBarLoginImg Bar of the Welcome Portal. mediumblob
“Image”-type property.
Icon for the button of the Surf App displayed in the App Bar
AppBarSurfImg of the Welcome Portal. mediumblob
“Image”-type property.
Icon for the button of the Connection Status App displayed
AppBarConnStatusImg mediumblob
in the App Bar of the Welcome Portal.

Developer Manual 190


Use of RESTful APIs APIs Version 2

“Image”-type property.
Icon for the button of the Around Me App displayed in the
AppBarAroundMeImg App Bar of the Welcome Portal. mediumblob
“Image”-type property.
Icon for the button of the Weather App displayed in the App
AppBarWeatherImg Bar of the Welcome Portal. mediumblob
“Image”-type property.
Icon for the button of the User Profile App displayed in the
AppBarUserProfileImg App Bar of the Welcome Portal. mediumblob
“Image”-type property.
Icon for the button of the Route App displayed in the App
AppBarRouteImg Bar of the Welcome Portal. mediumblob
“Image”-type property.
Icon for the button of the Survey App displayed in the App
AppBarSurveyImg Bar of the Welcome Portal. mediumblob
“Image”-type property.
Icon for the button of the Custom App displayed in the App
AppBarCustomImg Bar of the Welcome Portal. mediumblob
“Image”-type property.

Developer Manual 191


Use of RESTful APIs APIs Version 2

wpwalledgardenRead, wpwalledgardenWrite, wpwalledgardenFind and


wpwalledgardenDelete
The "wpwalledgarden" object allows you to manage custom Walled Garden data for the Welcome Portal
defined at system, domain, and gateway level.
When searching using the “Find” command, you can use various objects with the following hierarchy
depending on the usage context:

wpwalledgarden gateway domain manager reseller

wpwalledgarden domain manager reseller

wpwalledgarden

Example of a call that reads data:


$Endpoint = 'wpwalledgardenRead';
$Data = '{"id":"123"}';

Example of a call that searches for data by host name:


$Endpoint = 'wpwalledgardenFind';
$Data = '{"Where":"wpwalledgarden. DestHost=\"www.mydomain.com\""}';

Example of a call that searches for data by ID:


$Endpoint = 'wpwalledgardenFind';
$Data = '{"Where":"wpwalledgarden.id=123"}';

Example of a call that adds:


$Endpoint = 'wpwalledgardenWrite';
$Data = '{"id":"0", "DestHost":"www.mydomain.com","Allow":1}';

Example of a call that modifies data:


$Endpoint = 'wpwalledgardenWrite';
$Data = '{"id":"123", "Code":"MyCustomImage"}';

Example of a call that deletes data:


$Endpoint = 'wpwalledgardenDelete';
$Data = '{"id":"123"}';

Available properties:
Name Comment Type
Object ID.

id If you need to add, pass the value zero in this int(11)


property.
Read-only property.
Date when the object was created. Automatically
CreationDate assigned when you add it. timestamp
Read-only property.
Domain ID.

DomainID ID derived from the “domain” object. int(11)


Required if you are dealing with the Walled Garden
of a domain or a gateway.
Gateway ID.
GatewayID int(11)
ID derived from the “gateway” object.

Developer Manual 192


Use of RESTful APIs APIs Version 2

Required if you are dealing with the Walled Garden


of a gateway.
Destination Host. Host to be considered free.
DestHost varchar(128)
Typically edited in the form *.DomainName.com.
DestHostPort Destination port. int(11)
Enables or disabeles the host.
Allow smallint(1)
1 enables the host while 0 blocks the host.

Developer Manual 193


Use of RESTful APIs APIs Version 2

zoneRead, zoneWrite, zoneFind, zoneDelete and zoneCount


The “zone” object allows you to manage zone data.
When searching using the “Find” and “Count” commands, you can use various objects with the following
hierarchy:

zone gateway domain manager reseller

Example of a call that reads data:


$Endpoint = 'zoneRead';
$Data = '{"id":"123"}';

Example of a call that searches for data by zone name:


$Endpoint = 'zoneFind';
$Data = '{"Where":"zone.Title=\"MyZone\""}';

Example of a call that searches for data by ID:


$Endpoint = 'zoneFind';
$Data = '{"Where":"zone.id=123"}';

Example of a call that adds:


$Endpoint = 'zoneWrite';
$Data = '{"id":"0", "Title":"MyZone", "GatewayID":"1"}';

Example of a call that modifies data:


$Endpoint = 'zoneWrite';
$Data = '{"id":"123", "Title":"MyZone", "GatewayID":"1"}';

Example of a call that deletes data:


$Endpoint = 'zoneDelete';
$Data = '{"id":"123"}';

Available properties:
Name Comment Type
Object ID.
id If you need to add, pass the value zero in this property. int(11)
Read-only property.
Date when the object was created. Automatically assigned
CreationDate when you add it. timestamp
Read-only property.
Gateway ID.
GatewayID ID derived from the “gateway” object. int(11)
Mandatory property.
Zone title.
Title varchar(255)
Multi-language property.
Map type. Possible values are:
ZoneType • 0 = Immagine personalizzata smallint(1)
• 1 = Mappa
Image type uploaded for the zone.
ZoneMapImgType varchar(40)
Read-only property.
Custom image for the zone.
ZoneMapImg mediumblob
“Image”-type property.

Developer Manual 194


Use of RESTful APIs APIs Version 2

Custom image width expressed in meters including any


ImageWidthMeters float
borders.
WelcomePortalShowApp Displays an App specific for this map, zone, or floor. int(1)
Title of the App to display in the App bar.
WelcomePortalAppTitle varchar(255)
Multilingual property.
WelcomePortalAppImgTy Image type of the icon for the Welcome Portal App.
varchar(40)
pe Read-only property.
Icon displayed in Welcome Portal for the application.
Recommended size is: 128 x 128 pixel. Recommended
WelcomePortalAppImg format is: SVG o PNG. mediumblob

“Image”-type property.
WelcomePortalDisplayRo
Displays the routes in the App. int(1)
utes
WelcomePortalDisplayAc
Displays the access points in the App. int(1)
cessPoints
Requires users to enable GPS in the device so to detect
WelcomePortalEnableGP their location.
int(1)
S
Warning! GPS tracking doesn't work with CNA.
WelcomePortalEnableZoo Enables zooming on the map. If disabled, users cannot
int(1)
m zoom in.
WelcomePortalDefaultZo ID of the default location displayed automatically when
int(11)
neRouteID opening the App.
Default custom CSS for all places displayed in the Welcome
PlacesCustomCSS longtext
Portal.
GPSReferencePointLat Absolute latitude of the reference GPS point. double
GPSReferencePointLon Absolute longitude of the reference GPS point. double
GPSReferencePointRelati
Relative latitude of the reference GPS point. double
veLat
GPSReferencePointRelati
Relative longitude of the reference GPS point. double
veLon
Notes Notes. longtext

Developer Manual 195


Use of RESTful APIs APIs Version 2

Costs of APIs endpoints version 2


The calculated costs for API version 2 enpoints, unlike the previous version that defined fixed costs per
endpoint, are based on the processing time required to complete commands. Therefore, the fee
depends on the complexity of the endpoint, its parameters, and the system's performance.
In a high-performance system, the cost will be lower, while it will be higher if it is very congested. In
this way, however, the charge is proportionate based on overall performance.

Developer Manual 196


Other Integrations with External Procedures APIs Version 2

Other Integrations with External Procedures


This chapter describes other types of integrations developed with the HSNM that do not use APIs.

Sending SMS from External Procedures


It is possible to send SMS from external procedures by making an HTTP call to the URL:
http://DomainName/ sms-send?number=PhoneNumber&text=text&
managerid=ManagerID&password=PasswordDefinedOnSystemSettings.
The SMS is sent from the linked modem or from the gateway defined in " System Settings".
Using this option, the appliance can act as an SMS gateway.

Receiving SMS from External Procedures


To simulate the receiving of an SMS, it is enough to run an HTTP call to the URL: http://DomainName/
sms-receive?number=PhoneNumber&text=MessageText.
This procedure can be invoked by an external SMS gateway when receiving an SMS.

Developer Manual 197


Other Integrations with External Procedures APIs Version 2

Receiving GPS Coordinates from Devices or External Procedures


To simulate receiving GPS coordinates from external systems, you have to make a http call (In GET o
POST) to the URL: http://HSNMDomainName/ gatewaygps?
h=%GatewayName%&data=%Latitude%,%Longitude%,%Altitude%,%Speed%,%Satellites%,%DateTime
%.
The variables to be replaced in the URL are as follows:
• HSNMDomainName: internet domain name of the HSNM;
• %g%: name of the gateway;
• %Longitude%: longitude detected by the GPS system;
• %Latitude%: latitude detected by the GPS system;
• %Speed%: speed detected by the GPS system. The value is optional and if specified it must
have a minimum value of 1;
• %Altitude%: altitude detected by the GPS system. The value is optional;
• %Satellites%: number of satellites used by the GPS system. The value is optional and if specified
it must have a minimum value of 5;

• %DateTime%: date and time. The value is optional and if specified it cannot be fixed but it must
be updated with the date detection of the coordinates.

It is possible to send more coordinates with one request, dividing the data groups with semicolons, in
the form:
http://HSNMDomainName/ gatewaygps?
h=%GatewayName%&data=%Latitude%,%Longitude%,%Altitude%,%Speed%,%Satellites%,%DateTime
%;%Latitude%,%Longitude%,%Altitude%,%Speed%,%Satellites%,%DateTime%

Example: http://MyDomainName /gatewaygps? h=MyGateway&data=E 11 51 53.712,N 45 46


56.988,0,10,6, jan/15/2022 11:27:43

If you do not wish to define an optional parameter, you have to omit also all the subsequent optional
parameters.
Example: http://MyDomainName/gatewaygps?h=MyGateway&data=E 11 51 53.712,N 45 46 56.988

Coordinates can also be passed in decimal format.

Developer Manual 198


Other Integrations with External Procedures APIs Version 2

Displaying the Hotspot Map on External Page


It is possible to view the map of hotspots, including an iframe on the target page.
The source address must be: http://DomainName/
map?ResellerID=%RID%&ManagerID=%MID%&DomainID=%DID%&GatewayID=%GID%

Parameters are the followings:


Name Description
%RID% ID of the reseller.
%MID% ID of the manager
%GID% ID of the hotspot.
%DID% ID of the domain.

In parameters you can define also a single value.


These variables will be replaced with the appropriate values and are not mandatory. It is enough to
specify the variables necessary to reroute the desired map.
By using for example the following URL http://DomainName/map, where DomainName is the “Domain
Name” set in the " System Settings", it will display a complete map with all the inserted domains.

Developer Manual 199


Other Integrations with External Procedures APIs Version 2

Displaying the Gateway Location on External Page


It is possible to view the location of gateways, including an iframe on the target page.
The source address must be: http://DomainName/gatewaysmap?
ResellerID=%RID%&ManagerID=%MID%&DomainID=%DID%&GatewayID=%GID%

Parameters are the following:


Name Description
%RID% ID of the reseller
%MID% ID of the manager
%DID% ID of the domain
%GID% ID of the gateway.

In parameters you can define also a single value.

Displaying the Vehicle Location on External Page


It is possible to view the location of vehicles including an iframe on the target page. The source address
must be: http://DomainName/vehiclesmap?
ResellerID=%RID%&ManagerID=%MID%&DomainID=%DID%&GatewayID=%GID%

Parameters are the following:


Name Description
%RID% ID of the reseller
%MID% ID of the manager
%DID% ID of the domain
%GID% ID of the gateway.

In parameters you can define also a single value.

Developer Manual 200


Other Integrations with External Procedures Custom Validation of the User’s Registration Data

Custom Validation of the User’s Registration Data


HSNM has its own internal system of validation of the data entered by users that can fit in most cases.
However, there are circumstances where you are requested a verification/validation system, even
complex where the standard system is not enough. For example, in some countries it is necessary to
validate the passport by connecting a government web service. Using custom validation, it is possible to
perform this, and the procedure can be summarised as follows:
• The Login App passes data (In GET) to the defined page in the configuration of the domain in the “Custom
URL for Data Validation” field:
• The external page loads, checks, and processes the passed information, it returns any data that may have
been modified with error code and description;
• The Login App receives data and displays any error or uses the data for user registration.

Another case in which you can use custom validation is when you need to store users’ data in your own
database to perform customized searches, statistics, exports to external systems, etc.

The data passed to the called page are the following:


Parameter Description
Language code selected by the user.
lang
If you select a custom language, it will pass “l1”, “l2” o “l3”.
If equal to zero, it means that user is processing a standard
registration.
rechargeprocess
If it is different from zero, it means that user is processing a
recharge, and additional data are requested.
domain Domain name defined in the HSNM.
socialtype Description of the type of social network used for registration.
username Username assigned or defined by the user.
password Password assigned or defined by the user.
mobileprefix Foreign country calling code.
mobilephone Mobile phone number.
lastname Last name.
firstname First name.
address Address.
zip Postcode/ZIP code
city City.
state State.
country Country.
email Email address.
phone Landline phone number
fax Fax number
yearofbirth Year of birth
taxcode Fiscal code or VAT-Id number.
gender Gender.
roomorsite Room or pitch number
acceptmkt Accepted marketing conditions.
newsletter Newsletter consent.
contractconditions Accepted general contract conditions.
captcha Entered Captcha code.

Developer Manual 201


Other Integrations with External Procedures Custom Validation of the User’s Registration Data

The parameters listed above may also be subject to changes from the external procedure that will return
them in JSON format.

Developer Manual 202


Other Integrations with External Procedures Custom Validation of the User’s Registration Data

PHP Example of an External Page that Processes a Validation.


<?php
// Error codes table
// 1 - Invalid Mobile Phone
// 2 - Invalid First Name
// 3 - Invalid Last Name
// 4 - Invalid Address
// 5 - Invalid Zip
// 6 - Invalid City
// 7 - Invalid State
// 8 - Invalid Country
// 9 - Invalid EMail
// 10 - Invalid Phone
// 11 - Invalid Year Of Birth
// 12 - Invalid Accept Conditions
// 13 - Invalid Password
// 14 - Invalid Accept Marketing
// 15 - Invalid International Mobile Phone Prefix
// 16 - Invalid Captcha
// 17 - Invalid Gender
// 18 - Invalid Fax
// 19 - Invalid Tax Code
// 20 - Invalid Room or Site
// 21 - Invalid User Name
// 22 - Invalid Accept Newsletter

set_time_limit(30);
error_reporting(E_ERROR);
session_write_close();

// Read parameters
if (isset($_GET["lang"])) {$lang = trim($_GET["lang"]);}
if (isset($_GET["rechargeprocess"])) {$rechargeprocess = trim($_GET["rechargeprocess"]);}
if (isset($_GET["domain"])) {$domain = trim($_GET["domain"]);}
if (isset($_GET["socialtype"])) {$socialtype = trim($_GET["socialtype"]);}
if (isset($_GET["username"])) {$username = trim($_GET["username"]);}
if (isset($_GET["mobileprefix"])) {$mobileprefix = trim($_GET["mobileprefix"]);}
if (isset($_GET["mobilephone"])) {$mobilephone = trim($_GET["mobilephone"]);}
if (isset($_GET["password"])) {$password = trim($_GET["password"]);}
if (isset($_GET["lastname"])) {$lastname = trim($_GET["lastname"]);}
if (isset($_GET["firstname"])) {$firstname = trim($_GET["firstname"]);}
if (isset($_GET["address"])) {$address = trim($_GET["address"]);}
if (isset($_GET["city"])) {$city = trim($_GET["city"]);}
if (isset($_GET["state"])) {$state = trim($_GET["state"]);}
if (isset($_GET["country"])) {$country = trim($_GET["country"]);}
if (isset($_GET["email"])) {$email = trim($_GET["email"]);}
if (isset($_GET["phone"])) {$phone = trim($_GET["phone"]);}
if (isset($_GET["fax"])) {$fax = trim($_GET["fax"]);}
if (isset($_GET["yearofbirth"])) {$yearofbirth = trim($_GET["yearofbirth"]);}
if (isset($_GET["taxcode"])) {$taxcode = trim($_GET["taxcode"]);}
if (isset($_GET["gender"])) {$gender = trim($_GET["gender"]);}
if (isset($_GET["roomorsite"])) {$roomorsite = trim($_GET["roomorsite"]);}
if (isset($_GET["acceptmkt"])) {$acceptmkt = trim($_GET["acceptmkt"]);}
if (isset($_GET["captcha"])) {$captcha = trim($_GET["captcha"]);}
if (isset($_GET["contractconditions"])) {$contractconditions = trim($_GET["contractconditions"]);}

$ErrorCode = 0;
$ErrorMessage = "";
if (strlen($username) < 6) {
$ErrorCode = 21;
if ($lang == "en") {
$ErrorMessage = "Invalid User name";
}
elseif ($lang == "it") {
$ErrorMessage = "Nome utente non valido";
}
}

// TaxCode custom validator...do something


$taxcode = "xyz12345"

// Return changed data, error code and description


Echo json_encode(array("error"=>$ErrorCode, "errormessage"=>$ErrorMessage, "taxcode"=>$taxcode));

The following is the table with the error codes that the external procedure may return:
Error Code Description
1 Invalid Mobile Phone
2 Invalid First Name
3 Invalid Last Name
4 Invalid Address
5 Invalid Zip

Developer Manual 203


Other Integrations with External Procedures Custom Validation of the User’s Registration Data

6 Invalid City
7 Invalid State
8 Invalid Country
9 Invalid EMail
10 Invalid Phone
11 Invalid Year Of Birth
12 Invalid Accept Contract Conditions
13 Invalid Password
14 Invalid Accept Marketing Conditions
15 Invalid International Mobile Phone Prefix
16 Invalid CAPTCHA
17 Invalid Gender
18 Invalid Fax
19 Invalid Tax Code
20 Invalid Room or Site
21 Invalid User Name

Developer Manual 204


Custom Payment Systems Custom Validation of the User’s Registration Data

Custom Payment Systems


You can define parameters to enable up to two custom payment systems in the options available in
"Currency and Payment Systems" section at system, reseller and manager level. If you want to enable a
custom payment system common to all your reseller’s managers, you need to define the payment
system at the reseller level. If you need to enable a custom payment system for all resellers and
subsequently for all managers, define the parameters at system level.
Custom payment systems allow developers to integrate and then add a payment gateway not provided
by the basic HSNM features by developing integration on external pages, hosted on a customer's web
server, and invoked based on the URLs declared in the configuration.
The following diagram can represent the operation scheme with verification via IPN (Instant Payment
Notification):

There are two external pages that can be defined and allow you to make payments and their verification.
If the payment gateway does not support IPN, add the "&Status=complete" parameter to the "Return
URL". This will indicate to the system that payment verification will be performed when users are
redirected to the Welcome Portal.
If the payment gateway supports the IPN, in the "Return URL" add the "&Status=redirect" parameter to
immediately redirect users to the Welcome Portal and wait for the payment to be confirmed via IPN.
Payment gateways often allow you to enter a URL called when the users cancel the payment. If it is
definable, pass the ReturnURL and add the "&Status=cancel" parameter.

Developer Manual 205


Custom Payment Systems Page for Payment

Page for Payment


Declared in the "External URL" parameter, it allows you to define all the logic for the payment system
and then the user to make the payment by directly entering the data or redirecting to the gateway.

The following parameters are passed to the page:


Name Comment Type
UseSandBox If non-zero, uses accounts issued to test payment processes. int(1)
GatewayID ID of the hotspot gateway to which the users are paying. int(11)
UsersID ID of the user who is making the payment. int(11)
PaymentID ID of the transaction. varchar(100)
Type of payment. It can assume the values
PaymentType "CustomPayment1" and "CustomPayment2" depending on varchar(20)
the type of payment chosen by the user.
PaymentTypeDescr Title of the payment type defined in the configuration. varchar(255)
The type of transaction. Fixed value of 2 indicates a
TransactionType int(1)
purchase by the user.
Host URL of the HSNM Hotspot Manager. varchar(255)
The URL to invoke to reopen the Welcome Portal when the
ReturnURL varchar(255)
payment is complete by the users.
Instant Payment Notification URL to invoke or pass to the
IPNUrl varchar(255)
payment gateway to notify the users have paid.
Text to display or pass to the payment gateway to return to
BackToWPText varchar(255)
the Welcome Portal and cancel the payment.
Code of the Welcome Portal language and selected by the
Lang varchar(2)
user.
If equal to 1, it indicates that the payment in progress is for
Recharge int(1)
a recharge.
ProductID ID of the product the user is purchasing. int(11)
ProductDescr Description of the product that users are purchasing. varchar(255)
Currency code. It is used for payments. varchar(3)
Currency
Define a "ISO 4217"-type value.
Amount Amount of product including taxes. float
Tax VAT or taxes. float
Quantity Quantity. Fixed value to 1. int(11)
FirstName Nome dell'untente finale. varchar(100)
LastName Enduser last name. varchar(100)
Address Address. varchar(100)
Zip ZIP. varchar(10)
City City. varchar(100)
State Provinc or state. varchar(100)
County code.
Country varchar(100)
Define a value in ISO 3166-1 alpha-2 format.
Email Email address. varchar(50)
Phone Phone number. varchar(20)

Warning! In your custom Walled Garden, you need to enter all external domains and IP addresses
involved in the payment

Developer Manual 206


Custom Payment Systems Page for Payment

Example of a PHP page that makes payments through PayPal:


<?php
error_reporting(E_ERROR | E_PARSE);
session_start();
?>
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-
scalable=no"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="mobile-web-app-capable" content="yes">
<script src=”MyWebServerURL/js/jquery-1.12.4.min.js"></script>
</head>
<body>
<div>
Redirecting to PayPal. Please wait...
</div>
<script>
var PaypalAccount = "MyPayPalAccount";

// Load POST parameters


var Params = <?php echo json_encode($_POST);?>;

// Do PayPal payment
var Action = 'https://www.paypal.com/cgi-bin/webscr';
if (Params.UseSandBox != 0) {
Action = 'https://www.sandbox.paypal.com/cgi-bin/webscr';
}

var NewForm = $("<form method='post' target='_parent' action='" + Action + "' style='display:none'>");


NewForm.append($("<input name='charset' value='utf-8'/>"));
NewForm.append($("<input name='cmd' value='_ext-enter'/>"));
NewForm.append($("<input name='redirect_cmd' value='_xclick'/>"));
NewForm.append($("<input name='lc' value='" + Params.Lang + "'/>"));
NewForm.append($("<input name='business' value='" + PaypalAccount + "'/>"));
NewForm.append($("<input name='item_name' value='" + Params.ProductDescr + "'/>"));
NewForm.append($("<input name='item_number' value=''/>"));
NewForm.append($("<input name='amount' value='" + Params.Amount + "'/>"));
NewForm.append($("<input name='tax' value='" + Params.Tax + "'/>"));
NewForm.append($("<input name='currency_code' value='" + Params.Currency + "'/>"));
NewForm.append($("<input name='quantity' value='" + Params.Quantity + "'/>"));
NewForm.append($("<input name='return' value='" + Params.ReturnURL + "&action=redirect" + "'/>"));
NewForm.append($("<input name='cancel_return' value='" + Params.ReturnURL + "&action=cancel" + "'/>"));
NewForm.append($("<input name='notify_url' value='" + Params.IPNUrl + "'/>"));
NewForm.append($("<input name='first_name' value='" + Params.FirstName + "'/>"));
NewForm.append($("<input name='last_name' value='" + Params.LastName + "'/>"));
NewForm.append($("<input name='address1' value='" + Params.Address + "'/>"));
NewForm.append($("<input name='city' value='" + Params.City + "'/>"));
NewForm.append($("<input name='state' value='" + Params.State + "'/>"));
NewForm.append($("<input name='country' value='" + Params.Country + "'/>"));
NewForm.append($("<input name='zip' value='" + Params.Zip + "'/>"));
NewForm.append($("<input name='email' value='" + Params.Email + "'/>"));
NewForm.append($("<input name='phone' value='" + Params.Phone + "'/>"));
NewForm.append($("<input name='cbt' value='" + Params.BackToWPText + "'/>"));
NewForm.append($("<input name='no_shipping' value='1'/>"));
NewForm.append($("<input name='no_note' value='1'/>"));

$("body").append(NewForm);
setTimeout(function () {
NewForm.submit().remove();
}, 300);
</script>
</body>
</html>

Developer Manual 207


Custom Payment Systems Page to Verify the Payment

Page to Verify the Payment


Declared in the "External Verification URL" parameter, it allows you to define the external URL to invoke
for payment verification. If not specified, payments will not be verified and will always be accepted with
possible security problems. The page must respond in JSON format with the 'Status' variable, which must
contain 'paid' to get the payment or 'cancel' to decline it.
In the reply, if the payment gateway independently sets the transaction ID (e.g. PayPal) in the return
parameters, you can define "SetGatewayID" with the transaction ID.

Another method to verify and then register the payment is to create your own page that is not declared
in the "External Verification URL", invoked directly from the payment gateway, and which saves the
transaction to the HSNM through the "userproductAdd" API endpoint.
In this case, it is crucial to passing the correct parameters corresponding respectively to the product and
the payment ID to the endpoint, in the "ProductID" and "GatewayID" properties.

Example of a PHP page that verifies the payment of PayPal:


<?php
error_reporting(E_ERROR | E_PARSE);
session_start();

// Read POST data


$PostParams = json_decode(file_get_contents('php://input'), true);

$verified = false;
$Error = "";
$listener = new IpnListener();
If ((integer)$PostParams["UseSandBox"] == 0) {
$listener->use_sandbox = false;
}
Else {
$listener->use_sandbox = true;
}

// Verify whether the method is a POST. If not, it generates an error and exits
try {
$listener->requirePostMethod();
} catch (Exception $e) {
$Error = "Instant Payment Notification Error: no POST parameters";
}

if ($Error == "") {
$TryConnectionsCount = 0;
$listener->use_curl = false;
$listener->use_ssl = true;
$listener->force_ssl_v3 = false;
do {
try {
$Error = "";
$TryConnectionsCount += 1;
$verified = $listener->processIpn($PostParams);
} catch (Exception $e) {
$Error = "Check Payment error. Retry attempt " .$TryConnectionsCount;
If ($TryConnectionsCount >= 7) {
break;
}
usleep(500000);
If ($TryConnectionsCount > 2) {
// Third attempt: disable SSL
$listener->use_ssl = false;
}
If ($TryConnectionsCount > 4) {
// Fifth attempt: enable CURL
$listener->use_curl = true;
}
}
} While ($Error != "");
}

// In the JSON data:


// In "Status", you can define:
// paid: Payment accepted and approved
// complete: Payment completed but not yet verified
// cancel: Transaction was declined
// In the "SetGatewayID" field, you can define the effective transaction ID assigned by the
// payment gateway. If not defined, it will use the system-generated default value
if ($verified) {
Echo json_encode(array("Error"=>"", "Status"=>"paid", "SetGatewayID"=>$PostParams["txn_id"]));
}
else {
Echo json_encode(array("Error"=>$Error, "Status"=>"cancel"));
}

Developer Manual 208


Custom Payment Systems Page to Verify the Payment

// ***********************************************************************************************
// IpnListener
class IpnListener {
public $use_curl = true;
public $follow_location = false;
public $use_sandbox = false;
public $timeout = 30;
public $verify_ssl = true;

private $_errors = array();


private $post_data;
private $rawPostData;
private $post_uri = '';
private $response_status = '';
private $response = '';

const PAYPAL_HOST = 'www.paypal.com';


const SANDBOX_HOST = 'www.sandbox.paypal.com';

protected function curlPost($encoded_data) {


$uri = 'https://'.$this->getPaypalHost().'/cgi-bin/webscr';
$this->post_uri = $uri;

$ch = curl_init();

if ($this->verify_ssl) {
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_CAINFO, dirname(dirname(__FILE__)) . '/cert/api_cert_chain.crt');
}

curl_setopt($ch, CURLOPT_URL, $uri);


curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $encoded_data);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, $this->follow_location);
curl_setopt($ch, CURLOPT_TIMEOUT, $this->timeout);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, true);

$this->response = curl_exec($ch);
$this->response_status = strval(curl_getinfo($ch, CURLINFO_HTTP_CODE));

if ($this->response === false || $this->response_status == '0') {


$errno = curl_errno($ch);
$errstr = curl_error($ch);
throw new Exception("cURL error: [$errno] $errstr");
}

return $this->response;
}

protected function fsockPost($encoded_data) {


$uri = 'ssl://'.$this->getPaypalHost();
$port = '443';
$this->post_uri = $uri.'/cgi-bin/webscr';

$fp = fsockopen($uri, $port, $errno, $errstr, $this->timeout);

if (!$fp) {
throw new Exception("fsockopen error: [$errno] $errstr");
}

$header = "POST /cgi-bin/webscr HTTP/1.1\r\n";


$header .= "Host: ".$this->getPaypalHost()."\r\n";
$header .= "Content-Type: application/x-www-form-urlencoded\r\n";
$header .= "Content-Length: ".strlen($encoded_data)."\r\n";
$header .= "Connection: Close\r\n\r\n";

fputs($fp, $header.$encoded_data."\r\n\r\n");

while(!feof($fp)) {
if (empty($this->response)) {
// extract HTTP status from first line
$this->response .= $status = fgets($fp, 1024);
$this->response_status = trim(substr($status, 9, 4));
} else {
$this->response .= fgets($fp, 1024);
}
}

fclose($fp);
return $this->response;
}

private function getPaypalHost() {


return ($this->use_sandbox) ? self::SANDBOX_HOST : self::PAYPAL_HOST;
}

public function getErrors() {


return $this->_errors;
}

Developer Manual 209


Custom Payment Systems Page to Verify the Payment
private function addError($error) {
$this->_errors[] .= $error;
}

public function getPostData() {


return $this->post_data;
}

public function getRawPostData() {


return $this->rawPostData;
}

public function getPostUri() {


return $this->post_uri;
}

public function getResponse() {


return $this->response;
}

public function getResponseStatus() {


return $this->response_status;
}

public function getTextReport() {

$r = '';

// date and POST url


for ($i=0; $i<80; $i++) { $r .= '-'; }
$r .= "\n[".date('m/d/Y g:i A').'] - '.$this->getPostUri();
if ($this->use_curl) {
$r .= " (curl)\n";
} else {
$r .= " (fsockopen)\n";
}

// HTTP Response
for ($i=0; $i<80; $i++) { $r .= '-'; }
$r .= "\n{$this->getResponse()}\n";

// POST vars
for ($i=0; $i<80; $i++) { $r .= '-'; }
$r .= "\n";

if (!empty($this->post_data)) {
foreach ($this->post_data as $key => $value) {
$r .= str_pad($key, 25)."$value\n";
}
}
$r .= "\n\n";

return $r;
}

public function processIpn($post_data = null) {


try {
$this->requirePostMethod();

// Read POST data


// reading posted data directly from $_POST causes serialization
// issues with array data in POST. Reading raw POST data from input stream instead.
if ($post_data === null) {
$raw_post_data = file_get_contents('php://input');
} else {
$raw_post_data = $post_data;
}
$this->rawPostData = $raw_post_data;

// if post_data is php input stream, make it an array.


$myPost = array();
if (!is_array($raw_post_data)) {
$raw_post_array = explode('&', $raw_post_data);
$this->post_data = $raw_post_array;

if (isset($raw_post_array)) {
foreach ($raw_post_array as $keyval) {
$keyval = explode('=', $keyval);
if (count($keyval) == 2) {
$myPost[$keyval[0]] = urldecode($keyval[1]);
}
}
}
} else {
$this->post_data = $raw_post_data;
$myPost = $this->post_data;
}

// Read the post from PayPal system and add 'cmd'


$req = 'cmd=_notify-validate';

foreach ($myPost as $key => $value) {


if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc() == 1) {

Developer Manual 210


Custom Payment Systems Page to Verify the Payment
$value = urlencode(stripslashes($value));
} else {
$value = urlencode($value);
}
$req .= "&$key=$value";
}

if ($this->use_curl) {
$res = $this->curlPost($req);
} else {
$res = $this->fsockPost($req);
}

if (strpos($res, '200') === false) {


throw new Exception("Invalid response status: " . $res);
}

// Split response headers and payload, a better way for strcmp


$tokens = explode("\r\n\r\n", trim($res));
$res = trim(end($tokens));
if (strcmp ($res, "VERIFIED") == 0) {
return true;
} else if (strcmp ($res, "INVALID") == 0) {
return false;
} else {
throw new Exception("Unexpected response from PayPal.");
}
} catch (Exception $e) {
$this->addError($e->getMessage());
return false;
}
}

public function requirePostMethod() {


// Require POST requests
if ($_SERVER['REQUEST_METHOD'] && $_SERVER['REQUEST_METHOD'] != 'POST') {
header('Allow: POST', true, 405);
throw new Exception("Invalid HTTP request method (" . $_SERVER['REQUEST_METHOD'] . ") from " . $_SERVER['REMOTE_ADDR'] . " - " .
$_SERVER['HTTP_USER_AGENT'] . ")");
}
}

}
// ***********************************************************************************************
?>

Developer Manual 211


Custom Payment Systems Integrations with ERP/PMS

Integrations with ERP/PMS


In some cases, venues (hotels, villages, campsites, etc.) require to create users’ access to the internet
directly from the ERP or PMS software in use in the property to facilitate registration operations. To
meet these needs, the HSNM proposes an integrated solution (Impala) that can dialogue natively,
without developing connectors from scratch, with different PMS widespread worldwide. However, it is
possible, on request, to create integrations with other systems as long as they can make HTTP calls based
on events (check-in and check-out) to a specific “endpoint” with the users’ data, the area/room/pitch
etc.

Configuring the Domain


Usually, an integration creates or updates users at check-in with the methods and products defined in
the domain, and it disables them at check-out.

You can select one of the following “Authentication Methods” when you activate an integration:
• User self-service registration. At the login, users self-register by entering the “Username” and
the “Password”, fields based on what you have defined on " Request the Username" and
"Request the password" in the "Data to Customize Users Registration" panel.
• User self-service registration. No password. At the login, users self-register by entering only
the “Username”, field based on what you have defined on "Request the Username" in the
"Data to Customize Users Registration" panel.
• Rregistration by the operator. In this case users are not able to self register but the PMS cretes
them or the operator manually enters them.

Username Creation Mode


For ease of use and also to communicate credentials to the guests, in the “Request the Username” field,
also depending on the availability of the passed data to integrate, we suggest you use one of the
following modes:
• Use the mobile number.
• Request the email address.
• Use the room or pitch number. In this case, the username will be given from the room or pitch
number. Be careful because in this way, you lose the "history" of the individual guests’
connections, complicating and almost making it impossible to reconstruct the connections or
the traffic performed. You will also lose some statistics of the dashboard.

Password Creation Mode


As for the username, to simplify the use and also to communicatof credentials to the guests, in the
“Request the Password”, depending also on the availability of the passed data to integrate, we suggest
you to use one of the following modes:
• Yes. In this case, the PMS does not assign the password, users connect with the username
provided without a password, and therefore they are asked to enter a password at their choice.
• No, use the last name. The password will be the guest’s last name.
• No, use the first name. The password will be the guest’s first name.
• No, use the mobile phone. The password will be the guest’s mobile number.
• No, use the email address. The password will be the guest’s email address.

The Product Assigned to the User


The product that will be assigned to the user is the first free product of the domain.

Developer Manual 212


Custom Payment Systems Impala

Warning! You need to enable the “Assign the free product” option.

Impala
As described above, HSNM includes an interface for Impala (https://getimpala.com), a web connector
that allows simply communicating with different PMSs.

To use the services offered by Impala, you need to enter in the manager, in the “API Key” and “API
Secret” fields, respectively the Impala "API Secret Key" and "Webhook Secret" that you will obtain after
registering on the service.

PMSs supported byImpala


Impala supports the following PMS systems:
• Oracle Hospitality.
• Oracle Hospitality Suite8.
• Protel.
• Infor HMS.
• Guestline.
• Mews Systems.
• Clock PMS.
• Inquest.
• Host PMS.

However, they are currently running pilots or started working on other PMS. Please, refer to the Impala
website for updates.

Developer Manual 213


Requesting for Assistance from Remote Impala

Requesting for Assistance from Remote


When necessary and upon request, it is possible to perform remote assistance by a technician certified
in HSNM systems.
To enable this task, the appliance must be connected to the internet through a static IP or allow the port
forwarding to the address 192.168.10.10 or the one assigned to the device for port 5900 (VNC) and 22
(SSH).

For any technical support request relating to the HSNM, you can email our technical team at
[email protected]

Opening Ports on your Router/Firewall


If HSNM is connected to a network protected by a firewall (for example, on a DMZ), the following ports
must be opened. In case HSNM has been installed on a private network LAN “natted” through a router,
you will have to perform a port forwarding for the following ports:

Port N° Protocol Direction Description

80 TCP and UDP IN and OUT Necessary to achieve the administration console via web.
Necessary, for example, for PayPal to complete the
443 TCP IN and OUT
payments.

Developer Manual 214

You might also like