2011-Q2: SIMPLer API
The SIMPLer API has been implemented in two technologies:
SOAP - has been used to provide a well known, standardised environment, that should be easy to deploy regardless of the programming platform used. An overview of SOAP technology can be find here: http://en.wikipedia.org/wiki/SOAP
REST/JSON - this is a de-facto industry standard for small integrations
Setup
To interface with SIMPLer operator has to:test
Provide Azotel Technologies Ltd with a Public IP address the API will be interfaced from. Also let know which version of API (SOAP or REST/JSON) will be used
Configure their API client script with the details below that will be send back as an acknowledgement of the IP address:
API URL
API credentials: username & password
Examples
Do refer to below examples while developing your API client.
SOAP - An example of SIMPLer SOAP API client written in Perl and PHP language can be found here:
REST/JSON
General
The SOAP Client should interface with a proxy URL constructed appropriately to his server name. I.e if the IP address of the wib server operator uses is 84.203.220.111 that the URL would look following:
http://84.203.220.111/API/operatorapi.pl
The URI should point at OperatorAPI context
http://84.203.220.111/OperatorAPI
In perl language it would look like the following (using the SOAP::Lite module)
my $result = SOAP::Lite
-> uri('http://84.203.220.111/OperatorAPI')
-> proxy('http://84.203.220.111/API/operatorapi.pl
')
REST/JSON - do please review attached CURL based examples - these explain everything on how to invoke each command - there are two invoke each command:
one that follows the original API concept - these are available under /API folder. i.e.
POST server.azotel.com/API/modifyCustomer
second that follows REST a bit more closely - these are available under / folder. In this case POST, PUT and DELETE functions would be used for data manipulation i.e.
PUT server.azotel.com/customer
The API runs on port 8080 and it uses same authentication procedure as original API i.e. it will check against the Access List for username, ip and password - before enabling any API functions are executed.
The SSL version of API is deployed under following URL:
https://server.azotel.com/restapi/
Functions
pingAPI - this function is used to verify that the SIMPLer API is reachable
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple databases
Result - the SOAP reply will either:
'OK' - to confirm successful processing
error message
addCustomer - this function is used to add a new customer account to SIMPLer system.
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple databases
name => TEXT (required)
nickname => TEXT (required): SIMPLer will make it unique by adding a serial number postfix if the nickname already exists in the database
invoicingid => TEXT (required): SIMPLer will make it unique by adding a serial number postfix if the invoicingid already exists in the database
init_date => DATE: Initial Contact date in MM/DD/YYYY format
startdate => DATE: Start Date in MM/DD/YYYY format
customerstatus => TEXT: current, etc..
reason => TEXT: (optional) a reason / substatus of customerstatus field. Note that it must be defined for particular customer status in SIMPLer otherwise will be ignored
customer_tracking => TEXT
installdate => DATE: Installation Date in MM/DD/YYYY format
frequency => INTEGER: billing frequency in months
invoicing_status => BOOLEAN: 1 billing on, 0 billing off
voip => BOOLEAN: 1 account voip enabled, 0 account voip disabled
reportedby = > TEXT:(OPTIONAL) this will define the name of the reportedby auto open maintenance tickets, if left blank api userid will be used
address => TEXT: Address in add1:::add2:::add3:::add4:::add5:::add6:::add7 format, where:
add1: Street 1
add2: Street 2
add3: Town
add4: County
add5: Post Code
add6: State
add7: UPRN
iaddress => TEXT: format is same as for address attribute
country => TEXT
eup_username => TEXT: End User Portal username (if not used customer invoicing ID will be used as EUP login)
password => TEXT: End User Portal password
type => TEXT: Customer account type from following list: customer business, customer home, reseller, partner, supplier, competitor gov,
marketingcode => TEXT
marketingemails => BOOLEAN: 1 marketing emails on, 0 marketing emails off
installation_area => TEXT
community_code => TEXT
reference => TEXT or INTEGER - if using historical Referencing system, this field is to be populated with any text representing the referee, otherwise populate with referee customer ID number
referral_fee_status => TEXT: no fee, due, pre-paid, paid
referral_fee_amount => FLOAT
note => TEXT
privatenote => TEXT
importance => INTEGER: from 1 to 5
phone_list_main => TEXT
fax => TEXT
email => EMAIL ADDRESS
accounts_email => TEXT
support_email => TEXT
website => TEXT
contacts_list => TEXT: The contact list in following format - name1:::phone1:::position1:::email1///name2:::phone2:::position2:::email2
vat_exemption => TEXT: vat exemption details in following format - Yes:::1:::29/12/2012
payment_method => TEXT: cash, cheque, credit card, debit card, direct debit, online transfer, standing order
send_method => TEXT: mail, pdf, both, none
where:
- mail - Email To Customer
- pdf - Only to Operator
- both - Both email customer and send to operator
- none - do not send invoice
credit => INTEGER: number of credit days assigned do the customer
setup_fees => FLOAT
folder => TEXT
order_number => TEXT
gwid => INTEGER: ID number of the gateway we want to assign to customer account
bucketid => INTEGER: ID number of the bucket we want to assign to customer account
monitor => TEXT: monitor, no monitor, monitor+sms, monitor no alert
tcp => TEXT
udp => TEXT
p2p => TEXT: true, false
sites =>
ip_type => TEXT: public, private
ip_number => INTEGER
connLimit => INTEGER
rssi => BOOLEAN: 1 equipment graphs on, 0 equipment graphs off
nat => BOOLEAN: 1 auto provision nat on, 0 auto provision nat off
auto_prov_radius_credentials => BOOLEAN: auto-provision 'Generate RADIUS Accounts'
auto_prov_activatecpe => BOOLEAN: auto-provision 'Activate IP Address'
auto_prov_radius_dynamic_ip => BOOLEAN: auto-provision 'Generate Customer IP Address'
auto_prov_pppoe => BOOLEAN: auto-provision 'Set PPPoE on WAN interface'
sand_invoice_status => TEXT: must be on of the following: override, default, off, deferred
sand_invoice_email_from => EMAIL ADDRESS
sand_invoice_email_to => EMAIL ADDRESS
sand_invoice_email_bcc => EMAIL ADDRESS
sand_invoice_billing_issue_date => TEXT: example: 15 days
sand_invoice_email_date_1 => TEXT: example: 20 days
sand_invoice_email_date_2 => TEXT: example: 25 days
sand_invoice_disconnection_date => TEXT: example: 30 days
sand_invoice_throttling_date => TEXT: example: 28 days
sand_invoice_deferred_to => DATE: correct format: DD/MM/YYYY
lodgement_failure_email_2 => TEXT: example: 5 days
lodgement_failure_email_3 => TEXT: example: 10 days
lodgement_failure_disconnection => TEXT: example: 15 days
sand_traffic_limit => INTEGER: traffic limit [GB]: example: 10
sand_traffic_status => TEXT: must be on of the following: override, default, off, deferred
sand_traffic_email_from => EMAIL ADDRESS
sand_traffic_email_to => EMAIL ADDRESS
sand_traffic_email_bcc => EMAIL ADDRESS,
sand_traffic_email_treshold_1 => INTEGER: percentage usage threshold [%]: example: 60
sand_traffic_email_treshold_2 => INTEGER: percentage usage threshold [%]: example: 80
sand_traffic_disconnection_treshold => INTEGER: percentage usage threshold [%]: example: 100
sand_traffic_overage_treshold => INTEGER: percentage usage threshold [%]: example: 90
sand_traffic_do_not_prorate => must be one of the following:
default : leave the field empty
Prorate the CAP in the first month : -1
Do NOT prorate the CAP in the first month : 1
sand_traffic_do_not_carry_overage_over => must be one of the following:
default : leave the field empty
Carry over overage Top-Ups to the next period : -1
Do NOT carry over overage Top-Ups to the next period : 1
sand_traffic_deferred_to => DATE: correct format: DD/MM/YYYY
tax_zone => INTEGER: default tax zone ID
tax_mode => TEXT: default, fixed, multi
tax_rate => FLOAT: default tax rate
overage => FLOAT
formula => TEXT
overageid => INTEGER
free_service => BOOLEAN: 1 free service on, 0 free service off
invoicing_day => INTEGER
gpsx => FLOAT
gpsy => FLOAT
value_added_reseller => INTEGER: VAR ID
master_agent => INTEGER: MA ID
regional_sales_manager => INTEGER: RSM ID
salesman => INTEGER: Salesman ID
group => INTEGER/INTEGER LIST: ID of the group to which the customer should be assigned, or comma separated list of group ID (e.g. '1,2,5')
custom_field_* => TEXT Note: see custom_tag_* for an alternative way to index.
custom_tag_* => TEXT Note: that TAG needs to defined in the Custom Fields Table. This is an alternative to using custom_field_*
cp_terms => BOOLEAN: 't' or 'f'
send_receipt => BOOLEAN: 1 or 0
sendCCPassword => BOOLEAN: 1 or 0 - a customer_portal_login email will be send if name, sageid and password are specified
form477_techcode => INTEGER
use_invoicing_id_auto_generation_from_wisp_settings => BOOLEAN: 1 or 0
generate_nickname_based_on_invoicing_id => BOOLEAN: 1 or 0
Note: For custom fields replace the * in custom_field_* with the ID of the custom field defined under settings->Custom Fields.
Result - the SOAP reply will either:
start with 'OK:' token followed by customerid of the new account - for successful processing
contain an error message
modifyCustomer - this function is used to modify an existing customer account in SIMPLer system.
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple databases
customerid => TEXT (required)
name => TEXT (optional)
nickname => TEXT (optional)
invoicingid => TEXT (optional)
init_date => DATE: Initial Contact date in MM/DD/YYYY format
startdate => DATE: Start Date in MM/DD/YYYY format
customerstatus => TEXT: current, etc..
reason => TEXT: (optional) a reason / substatus of customerstatus field. Note that it must be defined for particular customer status in SIMPLer otherwise will be ignored
customer_tracking => TEXT
installdate => DATE: Installation Date in MM/DD/YYYY format
frequency => INTEGER: billing frequency in months
invoicing_status => BOOLEAN: 1 billing on, 0 billing off
voip => BOOLEAN: 1 account voip enabled, 0 account voip disabled
address => TEXT: Address in add1:::add2:::add3:::add4:::add5:::add6:::add7 format, where:
add1: Street 1
add2: Street 2
add3: Town
add4: County
add5: Post Code
add6: State
add7: UPRN
iaddress => TEXT: format is same as for address attribute
country => TEXT
password => TEXT: End User Portal password
type => TEXT: Customer account type from following list: customer business, customer home, reseller, partner, supplier, competitor gov,
marketingcode => TEXT
marketingemails => BOOLEAN: 1 marketing emails on, 0 marketing emails off
installation_area => TEXT
community_code => TEXT
reference => TEXT or INTEGER - if using historical Referencing system, this field is to be populated with any text representing the referee, otherwise populate with referee customer ID number
referral_fee_status => TEXT: no fee, due, pre-paid, paid
referral_fee_amount => FLOAT
note => TEXT
privatenote => TEXT
importance => INTEGER: from 1 to 5
phone_list_main => TEXT
fax => TEXT
email => EMAIL ADDRESS
accounts_email => TEXT
support_email => TEXT
website => TEXT
contacts_list => TEXT: The contact list in following format - name1:::phone1:::position1:::email1///name2:::phone2:::position2:::email2
vat_exemption => TEXT: vat exemption details in following format - Yes:::1:::29/12/2012
payment_method => TEXT: cash, cheque, credit card, debit card, direct debit, online transfer, standing order
send_method => TEXT: mail, pdf
credit => INTEGER: number of credit days assigned do the customer
setup_fees => FLOAT
folder => TEXT
order_number => TEXT
gwid => INTEGER: ID number of the gateway we want to assign to customer account
bucketid => INTEGER: ID number of the bucket we want to assign to customer account
monitor => TEXT: monitor, no monitor, monitor+sms, monitor no alert
tcp => TEXT
udp => TEXT
p2p => TEXT: true, false
sites =>
ip_type => TEXT: public, private
ip_number => INTEGER
connLimit => INTEGER
rssi => BOOLEAN: 1 equipment graphs on, 0 equipment graphs off
nat => BOOLEAN: 1 auto provision nat on, 0 auto provision nat off
auto_prov_radius_credentials => BOOLEAN: auto-provision 'Generate RADIUS Accounts'
auto_prov_activatecpe => BOOLEAN: auto-provision 'Activate IP Address'
auto_prov_radius_dynamic_ip => BOOLEAN: auto-provision 'Generate Customer IP Address'
auto_prov_pppoe => BOOLEAN: auto-provision 'Set PPPoE on WAN interface'
sand => TEXT
tax_zone => INTEGER: default tax zone ID
tax_mode => TEXT: default, fixed, multi
tax_rate => FLOAT: default tax rate
overage => FLOAT
formula => TEXT
overageid => INTEGER
free_service => BOOLEAN: 1 free service on, 0 free service off
invoicing_day => INTEGER
gpsx => FLOAT
gpsy => FLOAT
value_added_reseller => INTEGER: VAR ID
master_agent => INTEGER: MA ID
regional_sales_manager => INTEGER: RSM ID
salesman => INTEGER: Salesman ID
group => INTEGER/INTEGER LIST: ID of the group to which the customer should be assigned, or comma separated list of group ID (e.g. '1,2,5')
send_receipt => BOOLEAN: 1 or 0
custom_field_* => TEXT Note: see custom_tag_* for an alternative way to index.
Note: For custom fields replace the * in custom_field_* with the ID of the custom field defined under settings->Custom Fields
custom_tag_* => TEXT Note: that TAG needs to defined in the Custom Fields Table. This is an alternative to using custom_field_*
form477_techcode => INTEGER
Result - the SOAP reply will either:
'OK'
contain an error message
deleteCustomer - this function is used to delete an existing customer account in SIMPLer system.
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple databases
customerid => TEXT (required)
deleteMaintenance => boolean (optional)
deleteSubscription => boolean (optional)
Result - the SOAP reply will either:
'OK'
contain an error message
Note - SIMPLer will allow to delete only accounts that meet following conditions:
customer must be in a status different than 'current'
no subscriptions should be attached to a customer account
no IP addresses should be set under a customer account
no invoices should be generated for a customer account
no sales issues should be attached to a customer account
no maintenance tickets should be attached to a customer account
no billing issues should be attached to a customer account
no VoIP accounts should be set under a customer account
no email accounts should be set under a customer account
no FTP accounts should be attached to a customer account
no CPE/Equipment details should be added to a customer account
no Credit Cards should be added to a customer account
no Bank Accounts / EFT Accounts should be added to a customer account
no Attachments should be linked to a customer account
Once above conditions are met - SIMPLer will delete the customer account along with all other setup (i.e. RADIUS account) associated with the particular customer account
addSubscription - this function is used to add a new subscription to a customer account in SIMPLer system.
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple databases
customerid => INTEGER (required)
productid => INTEGER
or either productid or productcode must be provided
productCode => TEXT
quantity => INTEGER - NOTE: Defaults to 1
discount => FLOAT
round => TEXT: default, up, down, arithmetic
premium => FLOAT
type => TEXT: Recurring, Overage, Reconnection
valid_to => DATE in MM/DD/YYYY format
valid_from => DATE in MM/DD/YYYY format
cycles => INTEGER
frequency => INTEGER
price => FLOAT
description => TEXT
tax_zone => INTEGER: default tax zone ID
tax_mode => TEXT: default, fixed, multi
tax_rate => FLOAT: default tax rate
overage => FLOAT
formula => TEXT
overageid => INTEGER
free_service => BOOLEAN: 1 free service on, 0 free service off
price_changed => BOOLEAN: 1 price overridden,
priority => TEXT,
description_changed=> BOOLEAN: 1 description overridden
revert_customer => BOOLEAN: 1 Function to revert customer to normal status
Result - the SOAP reply will either:
'OK' - to confirm successful processing
error message
addPackageToCustomer- this function is used to add a new packacge to a customer account in SIMPLer system.
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple databases
customerid => INTEGER (required)
packageid => INTEGER
or either packageid or code must be provided
code => TEXT
Result - the SOAP reply will either:
'OK' - to confirm successful processing
error message
modifySubscription - this function is used to modify a subscription assigned to a customer account in the SIMPLer system.
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple databases
customerid => INTEGER (required with productid)
productid => INTEGER (required with customerid)
subscriptionid => INTEGER (required if not using customerid and productid)
quantity => INTEGER
discount => FLOAT
round => TEXT: default, up, down, arithmetic
premium => FLOAT
type => TEXT: Recurring, Overage, Reconnection
valid_to => DATE in MM/DD/YYYY format
valid_from => DATE in MM/DD/YYYY format
cycles => INTEGER
frequency => INTEGER
price => FLOAT
description => TEXT
tax_zone => INTEGER: default tax zone ID
tax_mode => TEXT: default, fixed, multi
tax_rate => FLOAT: default tax rate
overage => FLOAT
formula => TEXT
overageid => INTEGER
free_service => BOOLEAN: 1 free service on, 0 free service off
Result - the SOAP reply will either:
'OK' - to confirm successful processing
error message
Note: if you use productid and customerid and a customer has two of that productid assigned you will be updating both of the subscriptions, using subscription id will let you update only one specific subscription, you can get a list of subscription ids with the function getActiveSubscriptionData
updateSubscriptionCustomFields - this function is used to modify a subscription custom fields assigned to a subscription in the SIMPLer system.
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
subscriptionid => INTEGER (required)
custom_field_* => TEXT - where * is the ID of custom field to be updated. Note: see custom_tag_* for an alternative way to index.
custom_tag_* => TEXT Note: that TAG needs to defined in the Custom Fields Table. This is an alternative to using custom_field_*
Result - the SOAP reply will either:
'OK' - to confirm successful processing
error message
addCampaignSubscription - this function is used to add a new campaign subscription to a customer account in SIMPLer system.
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple databases
customerid => INTEGER (required)
campaignid => INTEGER (required)
quantity => INTEGER
round => TEXT: default, up, down, arithmetic
valid_to => DATE in MM/DD/YYYY format
valid_from => DATE in MM/DD/YYYY format
cycles => INTEGER
benefit => FLOAT - define only if default campaign benefit is to be overridden
description => TEXT - define only if default campaign description is to be overridden
tax_zone => INTEGER: default tax zone ID
tax_mode => TEXT: default, fixed, multi
tax_rate => FLOAT: default tax rate
tax_flat_rate => FLOAT: default tax flat rate
Result - the SOAP reply will either:
'OK' - to confirm successful processing
error message
REST Format Example request
curl -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"operator":"OPERATOR","api_username":"USERNAME","api_password":"PASSWORD","customerid":"27827","campaignid":"5","quantity":"1"}' http://localhost/restapi/addCampaignSubscription
REST JSON formatted response example. Note that there are essentially two sets of data returned
{
"ip" : "78.133.203.161",
"result" : OK
}
deleteCampaignSubscription - this function is used to delete an existing Campaign Subscription entry.
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple databases
campaign_subscription_id => INTEGER: ID of subscription that is to be deleted
or
customerid => INTEGER: ID of customer for whom all campaign subscription shall be deleted
deleteCampaigns => 1
Result - the SOAP reply will either:
OK' - to confirm successful processing, OR
error message
REST Format Example request
curl -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"operator":"testss","api_username":"maciej","api_password":"devel","campaign_subscription_id":"22"}' http://localhost/restapi/deleteCampaignSubscription
or
curl -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"operator":"testss","api_username":"maciej","api_password":"devel","customerid":"27827","deleteCampaigns":"1"}' http://localhost/restapi/deleteCampaignSubscription
REST JSON formatted response example. Note that there are essentially two sets of data returned
{
"ip" : "78.133.203.161",
"result" : OK
}
addIP - this function is used to add a new IP to a customer account in SIMPLer system.
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple databases
customerid => INTEGER (required)
ip => INET
mac => MAC
macrestrict => BOOLEAN: 1 mac restriction on, 0 mac restriction off
label => TEXT
type => BOOLEAN: 1 - Public IP, 0 - Private IP
dhcpoptions => TEXT
radius_username => TEXT
gatewayid => INTEGER
updateMAConEUPLogin => BOOLEAN: 1 - Allow to auto - update MAC on EUP login ON, 0 - Allow to auto - update MAC on EUP login OFF
Result - the SOAP reply will either:
'OK' - to confirm successful processing
error message
removeIP - this function is used to remove an IP from a customer account in SIMPLer system.
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple databases
customerid => INTEGER (required)
ip => INET (optional - either ip or ipid must be specified)
ipid => INTEGER (optional - either ip or ipid must be specified)
listCustomTableEntries - this function is used to manipulate list customer Custom Tables
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
customerid => TEXT (optional)
value => TEXT (optional)
columnid => TEXT (optional)
Result - the JSON reply will either:
Error message
Generation Result
REST Format Example request
curl -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"api_username":"username","api_password":"password","operator":"operator","customerid":"2"}' http://server.azotel.com/restapi/API/listCustomTableEntries
or
curl -H "Accept: application/json" -H "Content-type: application/json" -X GET -d '{"api_username":"username","api_password":"password","operator":"operator","customerid":"2"}' http://server.azotel.com/restapi/customTableEntries
REST JSON formatted response example. Note that there are essentially two sets of data returned:
columns - this set of data will be returned always. It contains definitions of the Custom Table Columns.
rows_per_customerid - is there are any results - these will be returned indexed by customerid -> rowid -> columnid
{
"ip" : "78.133.203.161",
"result" : {
"voip" : {
"rows_per_customerid" : {
"2" : {
"1" : {
"39" : "VoIPUsername1",
"40" : "VoIPPassword1",
"41" : "VoIPNumber1"
},
"3" : {
"39" : "VoIPUsername2",
"40" : "VoIPPassword2",
"41" : "VoIPNumber2"
},
"2" : {
"39" : "VoIPUsername3",
"40" : "VoIPPassword3",
"41" : "VoIPNumber3"
}
}
},
"columns" : {
"39" : {
"locked" : "0",
"options" : "",
"note" : "",
"availability" : "customer custom table",
"length" : "",
"default_value" : "",
"mandatory" : "0",
"label" : "VoIP Username",
"type" : "textfield",
"id" : "39"
},
"40" : {
"locked" : "0",
"options" : "",
"note" : "",
"availability" : "customer custom table",
"length" : "",
"default_value" : "",
"id" : "40",
"type" : "textfield",
"label" : "VoIP Password",
"mandatory" : "0"
},
"41" : {
"locked" : "0",
"options" : "",
"note" : "",
"availability" : "customer custom table",
"length" : "",
"default_value" : "",
"id" : "41",
"type" : "textfield",
"label" : "VoIP Number",
"mandatory" : "0"
}
}
}
}
}
addCustomTableEntries - this function is used to manipulate list customer Custom Tables
Attributes - any set constructed from below can be used as long as the required set is provided (Note: if you are inserting a date use the following format: 2018-09-22)
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
customerid => TEXT (required)
columnid1 => TEXT (required)
columnid2 => TEXT (required)
...
columnid3 => TEXT (required)
Result - the JSON reply will either:
Error message
Generation Result
REST Format Example request
curl -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"api_username":"username","api_password":"password","operator":"operator","customerid":"2","tablename":"voip","39":"VoIPUsername","40":"VoIPPassword","41":"VoIPNumber"}' http://server.azotel.com/restapi/API/addCustomTableEntries
or
curl -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"api_username":"username","api_password":"password","operator":"operator","customerid":"2","tablename":"voip","39":"VoIPUsername","40":"VoIPPassword","41":"VoIPNumber"}' http://server.azotel.com/restapi/customTableEntries
REST JSON formatted response example. It returns the OK: followed by the added row ID.
{
"ip" : "78.133.203.161",
"result" : "OK: 3"
}
modifyCustomTableEntries - this function is used to manipulate list customer Custom Tables
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
customerid => TEXT (required)
columnid1 => TEXT (required)
columnid2 => TEXT (optional)
...
columnid3 => TEXT (optional)
Result - the JSON reply will either:
Error message
Generation Result
REST Format Example request
curl -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"api_username":"username","api_password":"password","operator":"operator","customerid":"2","tablename":"voip","rowid":"1","41":"VoIPNumberModified"}' http://server.azotel.com/restapi/API/modifyCustomTableEntries
or
curl -H "Accept: application/json" -H "Content-type: application/json" -X PUT -d '{"api_username":"username","api_password":"password","operator":"operator","customerid":"2","tablename":"voip","rowid":"1","41":"VoIPNumberModified"}' http://server.azotel.com/restapi/customTableEntries
REST JSON formatted response example.
{
"ip" : "78.133.203.161",
"result" : "OK"
}
deleteCustomTableEntries - this function is used to manipulate list customer Custom Tables
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
customerid => TEXT (required)
columnid1 => TEXT (required)
columnid2 => TEXT (optional)
...
columnid3 => TEXT (optional)
Result - the JSON reply will either:
Error message
Generation Result
REST Format Example request
curl -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"api_username":"username","api_password":"password","operator":"operator","customerid":"2","rowid":"1"}' http://server.azotel.com/restapi/API/deleteCustomTableEntries
or
curl -H "Accept: application/json" -H "Content-type: application/json" -X DELETE -d '{"api_username":"username","api_password":"password","operator":"operator","customerid":"2","rowid":"1"}' http://server.azotel.com/restapi/customTableEntries
REST JSON formatted response example.
{
"ip" : "78.133.203.161",
"result" : "OK"
}
listValueAddedReseller - this function is used to manipulate list customer Value Added Reseller
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
Result - the SOAP / JSON reply will either:
Error message
Generation Result
REST Format Example request
curl -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"api_username":"username","api_password":"password","operator":"operator"}' http://server.azotel.com/restapi/API/listValueAddedReseller
or
curl -H "Accept: application/json" -H "Content-type: application/json" -X GET -d '{"api_username":"username","api_password":"password","operator":"operator"}' http://server.azotel.com/restapi/listValueAddedReseller
listMasterAgent - this function is used to manipulate list customer Master Agent
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
Result - the SOAP / JSON reply will either:
Error message
Generation Result
REST Format Example request
curl -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"api_username":"username","api_password":"password","operator":"operator"}' http://server.azotel.com/restapi/API/listMasterAgent
or
curl -H "Accept: application/json" -H "Content-type: application/json" -X GET -d '{"api_username":"username","api_password":"password","operator":"operator"}' http://server.azotel.com/restapi/listMasterAgent
listRegionalSalesManager - this function is used to manipulate list customer Regional Sales Manager
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
Result - the SOAP / JSON reply will either:
Error message
Generation Result
REST Format Example request
curl -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"api_username":"username","api_password":"password","operator":"operator"}' http://server.azotel.com/restapi/API/listRegionalSalesManager
or
curl -H "Accept: application/json" -H "Content-type: application/json" -X GET -d '{"api_username":"username","api_password":"password","operator":"operator"}' http://server.azotel.com/restapi/listRegionalSalesManager
addSite - this function is used to add a new Site to the SIMPLer system.
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple databases
sitename => TEXT (required)
wibid => INTEGER: ID of WIB
contactname => TEXT
accessinfo => TEXT
gpsx => NUMERIC
gpsy => NUMERIC
phone => TEXT
email => TEXT
accesshours => TEXT
interval => INTEGER: 0 - none, 1 - Quarterly, 2 - Semi-Annually, 3 - Annually
status => INTEGER: 1 -Potential, 2 - Production, 3 - Decommissioned, 4 - Cancelled
sitetype => TEXT: Network, Warehouse, Installer
maintenanceOption => INTEGER: 0 - Disabled, 1 - Enabled
frequency => NUMERIC
height => NUMERIC
min_stock_level => TEXT
common => TEXT
owner => TEXT
reference => TEXT
mlduration => TEXT
towertype => TEXT: Building, Grain, Guided Tower, Lattice, Monopole, Pole, Water Tower
substatus => TEXT
ponumber => TEXT
compliancenumber => TEXT
heightallocation => TEXT
accessgpsx => NUMERIC
accessgpsy => NUMERIC
nextmaintenancedate=> DATE: format: YYYY-MM-DD
state => TEXT: must be a valid non abbreviated US state
street1 => TEXT
street2 => TEXT
city => TEXT
county => TEXT
zip => TEXT
country => TEXT: must be a valid full name country
custom_field_* => TEXT Note: see custom_tag_* for an alternative way to index.
custom_tag_* => TEXT Note: that TAG needs to defined in the Custom Fields Table. This is an alternative to using custom_field_*
Result - the SOAP reply will either:
'OK:<siteid>' - to confirm successful processing
error message
modifySite - this function is used to modify a site in SIMPLer system.
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple databases
siteid => INTEGER (required)
sitename => TEXT
wibid => INTEGER: ID of WIB
contactname => TEXT
accessinfo => TEXT
gpsx => NUMERIC
gpsy => NUMERIC
phone => TEXT
email => TEXT
accesshours => TEXT
interval => INTEGER: 0 - none, 1 - Quarterly, 2 - Semi-Annually, 3 - Annually
status => INTEGER: 1 -Potential, 2 - Production, 3 - Decommissioned, 4 - Cancelled
sitetype => TEXT: Network, Warehouse, Installer
maintenanceOption => INTEGER: 0 - Disabled, 1 - Enabled
frequency => NUMERIC
height => NUMERIC
min_stock_level => TEXT
common => TEXT
owner => TEXT
reference => TEXT
mlduration => TEXT
towertype => TEXT: Building, Grain, Guided Tower, Lattice, Monopole, Pole, Water Tower
substatus => TEXT
ponumber => TEXT
compliancenumber => TEXT
heightallocation => TEXT
accessgpsx => NUMERIC
accessgpsy => NUMERIC
nextmaintenancedate=> DATE: format: YYYY-MM-DD
state => TEXT: must be a valid non abbreviated US state
street1 => TEXT
street2 => TEXT
city => TEXT
county => TEXT
zip => TEXT
country => TEXT: must be a valid full name country
custom_field_* => TEXT Note: see custom_tag_* for an alternative way to index.
custom_tag_* => TEXT Note: that TAG needs to defined in the Custom Fields Table. This is an alternative to using custom_field_*
Result - the SOAP reply will either:
'OK:<siteid>' - to confirm successful processing
error message
deleteSite - this function is used to delete an existing Site entry.
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple databases
siteid => INTEGER (required)
Result - the SOAP reply will either:
OK' - to confirm successful processing, OR
error message
addCreditCardToken - this function is used to add a new Credit Card Details with TOKEN to a customer account in SIMPLer system.
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple databases
customerid => INTEGER (required)
cc_last4 => INTEGER (required) - 4 digits allowed
module_id => INTEGER (required)
cc_token => TEXT (required)
cc_month => INTEGER - number between 1 and 12
cc_year => INTEGER - number bigger or equal than current year
cc_type => TEXT: visa, mastercard, american express, discover, other
cc_auto_payment => BOOLEAN: 't' or 'f'
cc_preferred => BOOLEAN: 't' or 'f'
street1 => TEXT
street2 => TEXT
city => TEXT
county => TEXT
zip => TEXT
firstname => TEXT
lastname => TEXT
cc_holder => TEXT
state => TEXT: 'Alabama','Alaska','Arizona','Arkansas','California','Colorado','Connecticut','Delaware','District of Columbia','Florida','Georgia','Hawaii','Idaho','Illinois','Indiana','Iowa','Kansas','Kentucky','Louisiana','Maine','Maryland','Massachusetts','Michigan','Minnesota','Mississippi','Missouri','Montana','Nebraska','Nevada','New Hampshire','New Jersey','New Mexico','New York','North Carolina','North Dakota','Ohio','Oklahoma','Oregon','Pennsylvania','Puerto Rico','Rhode Island','South Carolina','South Dakota','Tennessee','Texas','Utah','Vermont','Virginia','Washington','West Virginia','Wisconsin','Wyoming'
country => TEXT: "Afghanistan","Albania","Algeria","Andorra","Angola","Antigua and Barbuda","Argentina","Armenia","Australia","Austria","Azerbaijan","Bahamas","Bahrain","Bangladesh","Barbados","Belarus","Belgium", "Belize","Benin","Bermuda","Bhutan","Bolivia","Bosnia and Herzegovina","Botswana","Brazil","Brunei","Bulgaria","Burkina Faso","Burundi","Cambodia","Cameroon","Canada","Cape Verde","Central African Republic", "Chad","Chile","China","Colombia","Comoros","Congo","Costa Rica","Côte d'Ivoire","Croatia","Cuba","Cyprus","Czech Republic","Denmark","Djibouti","Dominica","Dominican Republic","East Timor","Ecuador", "Egypt","El Salvador","Equatorial Guinea","Eritrea","Estonia","Ethiopia","Fiji","Finland","France","Gabon","Gambia","Georgia","Germany","Ghana","Greece","Grenada","Guatemala","Guinea","Guinea-Bissau","Guyana","Haiti","Honduras","Hong Kong","Hungary","Iceland","India","Indonesia","Iran","Iraq","Ireland","Israel","Italy","Jamaica","Japan","Jordan","Kazakhstan","Kenya","Kiribati","North Korea","South Korea","Kuwait","Kyrgyzstan","Laos","Latvia","Lebanon","Lesotho","Liberia","Libya","Liechtenstein","Lithuania","Luxembourg","Macedonia","Madagascar","Malawi","Malaysia","Maldives","Mali","Malta","Marshall Islands","Mauritania","Mauritius","Mexico","Micronesia","Moldova","Monaco","Mongolia","Montenegro","Morocco","Mozambique","Myanmar","Namibia","Nauru","Nepal","Netherlands","New Zealand","Nicaragua","Niger","Nigeria","Norway","Oman","Pakistan","Palau","Palestine","Panama","Papua New Guinea","Paraguay","Peru","Philippines","Poland","Portugal","Puerto Rico","Qatar","Romania","Russia","Rwanda","Saint Kitts and Nevis","Saint Lucia","Saint Vincent and the Grenadines","Samoa","San Marino","Sao Tome and Principe","Saudi Arabia","Senegal","Serbia and Montenegro","Seychelles","Sierra Leone","Singapore","Slovakia","Slovenia","Solomon Islands","Somalia","South Africa","Spain","Sri Lanka","Sudan","Suriname","Swaziland","Sweden","Switzerland","Syria","Taiwan","Tajikistan","Tanzania","Thailand","Togo","Tonga","Trinidad and Tobago","Tunisia","Turkey","Turkmenistan","Tuvalu","Uganda","Ukraine","United Arab Emirates","United Kingdom","United States","Uruguay","Uzbekistan","Vanuatu","Vatican City","Venezuela","Vietnam","Yemen","Zambia","Zimbabwe"
Result - the SOAP reply will either:
'OK: [creditcard ID]' - to confirm successful processing
error message
addEFTToken- this function is used to add a new EFT Details with TOKEN to a customer account in SIMPLer system.
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple databases
customerid => INTEGER (required)
eft_last4 => INTEGER (required) - 2 or 4 digits allowed
eft_token => TEXT(required)
eft_banksortcode => INTEGER(optional)
eft_bankonlineref => TEXT(required)
eft_bankaccountname=> TEXT(required)
eft_bankaccounttype=> TEXT(required) - 'checking' or 'savings'
eft_auto_payment => BOOLEAN - 't' or 'f'
eft_preferred => BOOLEAN - 't' or 'f'
module_id => INTEGER (required) - send email to support@azotel.com if you do not know the module ID
Result - the SOAP reply will either:
'OK: [EFT ID]' - to confirm successful processing
error message
addMaintenance - this function is used to add a new Maintenance Ticket to SIMPLer system.
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple databases
customerid => INTEGER
dateReported => DATE in YYYY-MM-DD format
reportedby => TEXT
type => support, administration, installation, network, support, relocate, remove, repair, azotel, azotel-feature, disti, accounts, sales, management, suspend, internal tracking, connection review, general outage, point to point link required, RF interference, Engineering, router, survey, Upgrade, voip
subtype => must be a valid subtype that belongs to a given maintenance type
description => TEXT
resolution => TEXT
priority => INTEGER
status => open, closed, waiting for customer
dateClosed => DATE in YYYY-MM-DD format
closedby => TEXT
title => TEXT (required)
hours_spent => INTEGER
siteId => INTEGER
equipmentId => INTEGER
email_recipients => TEXT
email_notification => 1 (if this paramater is in your call, it will send the email notifications to the ticket recepients)
emailcustomer => 1 (if this paramater is in your call, it will enable sending the customer an email, the field customeremail_body is required when using this)
customeremail_body => TEXT (This field is required if you are using the paramater emailcustomer)
customeremail_to => TEXT (if not defined it will automatically use the customers email on their account)
customeremail_subject => TEXT (if not defined it will use the maintenance ticket title as the subject)
customeremail_filedata => (Allows you to add file data to attach a file to the email paramater customeremail_filename is required when using this)
customeremail_filename => (customeremail_filedata required when using this)
Result - the SOAP reply will either:
'OK:[new maintenance issue id]' - to confirm successful processing, the id
error message
modifyMaintenance - this function is used to modify an existing Maintenance Ticket in the SIMPLer system.
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple databases
id => INTEGER (required) - id of the maintenance ticket
customerid => INTEGER
dateReported => DATE in YYYY-MM-DD format
reportedby => TEXT
type => support, administration, installation, network, support, relocate, remove, repair, azotel, azotel-feature, disti, accounts, sales, management, suspend, internal tracking, connection review, general outage, point to point link required, RF interference, Engineering, router, survey, Upgrade, voip
subtype => must be a valid subtype that belongs to a given maintenance type
description => TEXT
resolution => TEXT
updateresolution => INTEGER - 1 = append resolution rather than replacing
priority => INTEGER
status => open, closed, waiting for customer
dateClosed => DATE in YYYY-MM-DD format
closedby => TEXT
title => TEXT
hours_spent => INTEGER
siteId => INTEGER
equipmentId => INTEGER
updatedby => TEXT
email_recipients => TEXT
email_notification => 1 (if this paramater is in your call, it will send the email notifications to the ticket recepients)
emailcustomer => 1 (if this paramater is in your call, it will enable sending the customer an email, the field customeremail_body is required when using this)
customeremail_body => TEXT (This field is required if you are using the paramater emailcustomer)
customeremail_to => TEXT (if not defined it will automatically use the customers email on their account)
customeremail_subject => TEXT (if not defined it will use the maintenance ticket title as the subject)
customeremail_filedata => (Allows you to add file data to attach a file to the email paramater customeremail_filename is required when using this)
customeremail_filename => (customeremail_filedata required when using this)
Result - the SOAP reply will either:
'OK' - to confirm successful processing
error message
addMaintenance - this function is used to add a new Maintenance Ticket to SIMPLer system.
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple databases
customerid => INTEGER (required)
maintenance_type => TEXT (required) - existing maintenance type
Result - the SOAP reply will either:
'OK'
error message
addBillingIssue - this function is used to add a new Maintenance Ticket to SIMPLer system.
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple databases
customerid => INTEGER (required)
title => TEXT (required)
dateReported => DATE in YYYY-MM-DD format
reportedby => TEXT
type => TEXT - as defined in SIMPLer->Settings->Billing Issues Type
description => TEXT
resolution => TEXT
priority => INTEGER
status => open, closed, waiting for customer
dateClosed => DATE in YYYY-MM-DD format
Result - the SOAP reply will either:
'OK:[new billing issue id]' - to confirm successful processing, the id
error message
modifyBillingIssue - this function is used to modify an existing Billing Issue in the SIMPLer system.
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple databases
id => INTEGER (required) - id of the maintenance ticket
customerid => INTEGER
dateReported => DATE in YYYY-MM-DD format
reportedby => TEXT
type => TEXT - as defined in SIMPLer->Settings->Billing Issues Type
description => TEXT
resolution => TEXT
updateresolution => INTEGER: 1 = append resolution rather than replacing
priority => INTEGER
status => open, closed, waiting for customer
dateClosed => DATE in YYYY-MM-DD format
title => TEXT
email_recipients => TEXT
Result - the SOAP reply will either:
'OK' - to confirm successful processing
error message
addInstaller - this function is used to add a new Installer entry.
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple databases
name => TEXT (required)
nickname => TEXT (required)
phone => TEXT (optional)
email => TEXT (optional)
username => TEXT (optional): SIMPLer username
googleCal => TEXT (optional): Google Calendar ID
defaultSite => INTEGER (optional): Default Site ID for App
Result - the SOAP reply will either:
'[new installer id]OK' - to confirm successful processing, OR
error message
modifyInstaller - this function is used to modify an existing Installer entry.
Attributes - any set constructed from below can be used as long as the required set is provided. Either installerID or nickname must be provided. Any attributes not supplied will be unchanged.
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple databases
installerId => INTEGER (optional): either installerId or nickname must be supplied
nickname => TEXT (optional): either installerId or nickname must be supplied
name => TEXT (optional)
phone => TEXT (optional)
email => TEXT (optional)
username => TEXT (optional): SIMPLer username
googleCal => TEXT (optional): Google Calendar ID
defaultSite => INTEGER (optional): Default Site ID for App
Result - the SOAP reply will either:
'[installer tracking id]OK' - to confirm successful processing, OR
error message
deleteInstaller - this function is used to modify an existing Installer entry.
Attributes - any set constructed from below can be used as long as the required set is provided. Either installerID or nickname must be provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple databases
installerId => INTEGER (optional): either installerId or nickname must be supplied
nickname => TEXT (optional): either installerId or nickname must be supplied
Result - the SOAP reply will either:
'[installer tracking id]OK' - to confirm successful processing, OR
error message
addInstallerTracking - this function is used to add a new Installer Tracking entry.
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple databases
maintenanceId => INTEGER (required)
dateOpened => DATE in YYYY-MM-DD format
dateClosed => DATE in YYY-MM-DD format
status => open, paid
installerFee => FLOAT
installerId => INTEGER
note => TEXT
dueDate => DATE in YYYY-MM-DD format
dueHour => INTEGER
dueMinute => INTEGER
Result - the SOAP reply will either:
'[new installer tracking id]OK' - to confirm successful processing, OR
error message
modifyInstallerTracking - this function is used to modify an existing Installer Tracking entry.
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple databases
installerTrackingId => INTEGER (required)
dateOpened => DATE in YYYY-MM-DD format
dateClosed => DATE in YYY-MM-DD format
status => open, paid
installerFee => FLOAT
maintenanceId => INTEGER
installerId => INTEGER
note => TEXT
dueDate => DATE in YYYY-MM-DD format
dueHour => INTEGER
dueMinute => INTEGER
Result - the SOAP reply will either:
'[installer tracking id]OK' - to confirm successful processing, OR
error message
deleteInstallerTracking - this function is used to modify an existing Installer Tracking entry.
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple databases
installerTrackingId => INTEGER (required)
Result - the SOAP reply will either:
'[installer tracking id]OK' - to confirm successful processing, OR
error message
listEquipment - this function is used to perform simple queries on equipment table in SIMPLer.
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
id => TEXT (optional): use this field to fetch a single equipment record with a particular ID (if exists)
type => TEXT (optional): use this field to narrow down searches to a particular equipment type
ipaddress => TEXT (optional): use this field to fetch a single equipment record with a particular IP address (if exists)
nickname => TEXT (optional): use this field to narrow down searches to equipment with nicknames that match the given string
macaddress => TEXT (optional): use this field to narrow down searches to equipment with MAC Addresses that match the given string
customEquipFields => Boolean (optional): set to 1 if you want to get the equipment custom fields
Result - the JSON reply will either:
Error message
Generation Result
SOAP Format Example
<Equipment>
<1>
<id>1</id>
<date_added>2016-08-10 05:49:50.297976</date_added>
<description>description</description>
<imsi></imsi>
<ipaddress>10.10.10.17</ipaddress>
<ki></ki>
<macaddress></macaddress>
<msisdn></msisdn>
<nickname>A5</nickname>
<opcode></opcode>
<serialnumber>GMB999998765</serialnumber>
<sqn></sqn>
<status>use</status>
<type>telradltecpe</type>
<parent>100</parent>
</1>
<100>
<id>100</id>
<date_added>2016-08-10 05:49:50.297976</date_added>
<description>Irasburg NAS/Router</description>
<imsi></imsi>
<ipaddress>10.254.254.29</ipaddress>
<ki></ki>
<macaddress></macaddress>
<msisdn></msisdn>
<nickname>PPPoE-Irasburg-NAS</nickname>
<opcode></opcode>
<serialnumber>Router</serialnumber>
<sqn></sqn>
<status>use</status>
<type></type>
<parent></parent>
</100>
</Equipment>
REST Format Example
{
"ip" : "127.0.0.1",
"result" : {
"equipment" : [
{
"ki" : "",
"nickname" : "NS2",
"status" : "stock",
"imsi" : "",
"description" : "3.2.3-rc",
"opcode" : "",
"msisdn" : "",
"macaddress" : "00:15:6D:B7:FA:4E",
"date_added" : "2016-08-10 05:49:50.297976",
"serialnumber" : "",
"sqn" : "",
"id" : "32",
"type" : "nanostationsm",
"ipaddress" : "172.16.9.202"
"parent" : "127"
},
{
"ki" : "",
"nickname" : "PPPoE-Stowe_Hollow_NAS_and_DSL",
"status" : "use",
"imsi" : "",
"description" : "Stowe Hollow NAS",
"opcode" : "",
"macaddress" : "",
"msisdn" : "",
"date_added" : "2016-08-10 05:49:50.297976",
"serialnumber" : "Router",
"sqn" : "",
"id" : "127",
"type" : "",
"ipaddress" : "64.222.83.40"
"parent" : "",
},
}
]
}
}
addEquipment - this function is used to add a new equipment table entry in SIMPLer.
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple databases
nickname => TEXT (required) - nickname for equipment. Must be unique
ipaddress => TEXT - must be a valid ip address
description => TEXT
serialnumber => TEXT
mac => TEXT - must be a valid mac address
status => TEXT - valid values: stock, use
invDetails => TEXT
parent => INTEGER - equipment ID of parent device
type => TEXT - valid values: AirOSBH, AirOSBH1, alvarionap, alvarionsm, bridge, bridgeSNMP, canopyap, canopybh, canopycmm, canopyofdm, canopyOFDMv2, canopyPTP800,
canopysm, genericAP, genericAPSNMP, genericAPSNMPv1, genericBH,
genericBHSNMP, genericBHSNMPv1, genericSM, genericSMSNMP, genericSMSNMPv1,
mikrotikap, mikrotikrouter, mikrotiksm, nanostationap, nanostationsm, other,
otherSNMP, pbx, remotevoipphone, router, routerSNMP, switch, switchSNMP,
canopy320sm, canopy320ap
snmp_community => TEXT
value => TEXT - equipment costs
assigned_site => INTEGER - site ID of parent site
maintemail => TEXT - email address to override default maintenance email address
dhcpoptions => TEXT
equipmentdata => TEXT - not used by SIMPLer. For operator to store any information relating to the equipment
supplier => TEXT
supplier_orderno => TEXT
receive_by => TEXT
receive_date => TEXT
internal_groupno => TEXT
port => TEXT
equipnote => TEXT
typeLabel => TEXT
assigned_site_name => TEXT
parentNickname => TEXT
imsi => TEXT
ki => TEXT
opcode => TEXT
msisdn => TEXT
sqn => TEXT
pin1 => TEXT
pin2 => TEXT
puk1 => TEXT
adm1 => TEXT
iccid => TEXT
ssid => TEXT
custom_field_* => TEXT Note: see custom_tag_* for an alternative way to index.
Note: For custom fields replace the * in custom_field_* with the ID of the custom field defined under settings->Custom Fields.
custom_tag_* => TEXT Note: that TAG needs to defined in the Custom Fields Table. This is an alternative to using custom_field_*
Result - the SOAP reply will either:
'OK: [new equipment id]' - to confirm successful processing, the id of the newly added equipment is returned.
error message
modifyEquipment - this function is used to modify an existing equipment table entry in SIMPLer.
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple databases
equipid => INTEGER (required)
nickname => TEXT - nickname for equipment. Must be unique
ipaddress => TEXT
description => TEXT
serialnumber => TEXT
mac => TEXT
status => TEXT - valid values: stock, use, fault, decommissioned. Defaults to "stock" if not specified
invDetails => TEXT
parent => INTEGER - equipment ID of parent device. Use 0 for "no parent"
type => TEXT - valid values: AirOSBH, AirOSBH1, alvarionap, alvarionsm, bridge, bridgeSNMP, canopyap, canopybh, canopycmm, canopyofdm, canopyOFDMv2, canopyPTP800,
canopysm, genericAP, genericAPSNMP, genericAPSNMPv1, genericBH, genericBHSNMP,
genericBHSNMPv1,genericSM, genericSMSNMP, genericSMSNMPv1, mikrotikap,
mikrotikrouter,mikrotiksm,nanostationap, nanostationsm, other, otherSNMP,
pbx, remotevoipphone, router, routerSNMP, switch, switchSNMP, canopy320sm, canopy320ap. Defaults to "other" if not specified.
snmp_community => TEXT
value => TEXT - equipment costs
assigned_site => INTEGER - site ID of parent site
maintemail => TEXT - email address to override default maintenance email address
dhcpoptions => TEXT
equipmentdata => TEXT - not used by SIMPLer. For operator to store any information relating to the equipment
supplier => TEXT
supplier_orderno => TEXT
receive_by => TEXT
receive_date => TEXT
internal_groupno => TEXT
port => TEXT
imsi => TEXT
ki => TEXT
opcode => TEXT
msisdn => TEXT
sqn => TEXT
pin1 => TEXT
pin2 => TEXT
puk1 => TEXT
adm1 => TEXT
iccid => TEXT
ssid => TEXT
equipnote => TEXT
typeLabel => TEXT
assigned_site_name => TEXT
parentNickname => TEXT
custom_field_* => TEXT Note: see custom_tag_* for an alternative way to index.
Note: For custom fields replace the * in custom_field_* with the ID of the custom field defined under settings->Custom Fields.
custom_tag_* => TEXT Note: that TAG needs to defined in the Custom Fields Table. This is an alternative to using custom_field_*
assigned_site_null => TEXT - if this par is defined the assigned_site will be set to null
Result - the SOAP reply will either:
'OK - to confirm successful processing
error message
deleteEquipment - this function is used to delete an existing equipment table entry in SIMPLer. Note the equipment must be unused (i.e. not assigned to a customer or basestation) before it can be deleted.
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple databases
equipid => INTEGER (required)
Result - the SOAP reply will either:
'OK - to confirm successful processing
error message
listEquipmentTypes - this function will display a list of available equipmentTypes, handy if you want to populate a dropdown to select an equipment type
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
Result - the SOAP / JSON reply will either:
Error message
Generation Result
REST Format Example request
curl -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"api_username":"username","api_password":"password","operator":"operator"}' http://server.azotel.com/restapi/API/listEquipmentTypes
or
curl -H "Accept: application/json" -H "Content-type: application/json" -X GET -d '{"api_username":"username","api_password":"password","operator":"operator"}' http://server.azotel.com/restapi/listEquipmentTypes
listSiteData- this function will display a list of all site data
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
siteid => TEXT (optional) if set it will only display the specified site id
customSiteFields => BOOL(optional): if set to 1 it will display site custom fields
Result - the SOAP / JSON reply will either:
Error message
Generation Result
REST Format Example request
curl -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"api_username":"username","api_password":"password","operator":"operator"}' http://server.azotel.com/restapi/API/listSiteData
or
curl -H "Accept: application/json" -H "Content-type: application/json" -X GET -d '{"api_username":"username","api_password":"password","operator":"operator"}' http://server.azotel.com/restapi/listSiteData
addEquipmentLoginDetails - this function is used to add a new equipment login details to the equipment entry in SIMPLer.
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple databases
equipid => TEXT (required) - equipid for equipment.
username => TEXT (required) - login username
password => TEXT
notes => TEXT
Result - the SOAP reply will either:
'OK' - to confirm successful processing
error message
getCustomSiteFields - this function is used to get the site custom fields
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple databases
siteid => INTEGER (required) - site id.
Result - the SOAP reply will either:
'OK' - to confirm successful processing
error message
getCustomEquipFields - this function is used to get the site custom fields
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple databases
equipid => INTEGER (required) - equip id.
Result - the SOAP reply will either:
'OK' - to confirm successful processing
error message
deleteEquipmentLoginDetails - this function is used to delete equipment login details from the equipment entry in SIMPLer.
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple databases
equipid => TEXT (required) - equipid for equipment.
username => TEXT (required) - login username
Result - the SOAP reply will either:
'OK' to confirm successful processing
error message
updateWibFiles - this function is used to update the WIB files
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple databases
wibnumber => INTEGER (required)
force => BOOLEAN: 1 - Force Mode (i.e.required for QoS rate changes), 0 - Standard Mode
Result - the SOAP reply will either:
'OK' - to confirm successful processing
error message
updateGPSdetails - this function is used to calculate the missing GPS details based on addresses
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple databases
Result - the SOAP reply will either:
'OK' - to confirm successful processing
error message
generateInvoices - this function is used to start up the invoicing process
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple databases
type => TEXT: new, recurring (defaults to recurring)
customerid => INTEGER
Result - the SOAP reply will either:
'OK' - to confirm successful processing
error message
addEFT - this function is used to add customer EFT details (bank account)
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
customerid => INTEGER
bankaccountnumber => TEXT (required)
banksortcode => TEXT
bankonlineref => TEXT
bankaccountname => TEXT
bankdetailschanged => BOOLEAN
bankaccounttype => TEXT: checking, savings, DEFAULT
autopayment => BOOLEAN
preferred => BOOLEAN
eft_sepa_sequencetype => TEXT: SEPA Sequence Type
'FRST','RCUR','OOFF','FNAL','NA', where:
'FRST' => 'First Time Debits',
'RCUR' => 'Recurring Debits',
'OOFF' => 'Once Off Debits',
'FNAL' => 'Final Debits',
'NA' => 'Not Available / Used Up'
eft_sepa_bic => INTEGER: SEPA BIC / SWIFT
eft_sepa_iban => TEXT: SEPA IBAN
eft_sepa_debtorname => TEXT: SEPA Debtor Name
eft_sepa_country => TEXT: SEPA Debtor Country
eft_sepa_debtorremittancedata => TEXT: SEPA Remittance Data
eft_sepa_signaturedate => DATE (format: YYYY-MM-DD): SEPA Signature Date
channel => allowed at the moment: web or voice
Result - the SOAP reply will either:
'OK' - to confirm successful processing
error message
addCPE - this function is used to add customer CPE details (customer premises equipment)
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
equipid => INTEGER (required)
customerid => INTEGER (required)
gpsx => FLOAT
gpsy => FLOAT
distance => FLOAT
colour => TEXT
frequency => TEXT
installedby => TEXT
dishinstalled => BOOLEAN
groundingcompleted => BOOLEAN
additionalinfo => TEXT ARRAY
primarycpe => BOOLEAN
Result - the SOAP reply will either:
'OK :[new cpe id]' - to confirm successful processing, the id
error message
modifyCPE - this function is used to modify customer CPE details (customer premises equipment)
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
cpeid => INTEGER (required)
equipid => INTEGER
customerid => INTEGER
gpsx => FLOAT
gpsy => FLOAT
distance => FLOAT
colour => TEXT
frequency => TEXT
installedby => TEXT
dishinstalled => BOOLEAN
groundingcompleted => BOOLEAN
additionalinfo => TEXT ARRAY
primarycpe => BOOLEAN
Result - the SOAP reply will either:
'OK' - to confirm successful processing
error message
deleteCPE - this function is used to delete customer CPE details (customer premises equipment)
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
cpeid => INTEGER (required)
Result - the SOAP reply will either:
'OK' - to confirm successful processing
error message
addBasestation - this function is used to add Basestation details
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
equipid => INTEGER (required)
siteid => INTEGER (required)
sector => TEXT
direction => TEXT
colour => TEXT
frequency => NUMERIC
installed => TEXT
note => TEXT
gatewayid => INTEGER
monitor => TEXT: monitor, no monitor, monitor+sms, monitor no alert
aggregateGraph => BOOLEAN: 't' or 'f'
height => FLOAT: (Basestation Height above ground) in [m]
approximate_coverage_radius => INTEGER: Form477 Field in [km]
dba_name => TEXT: Form477 Field
techcode => INTEGER: Form477 Field one of the following:
10 for Asymmetric xDSL
11 for ADSL2, ADSL2+
12 for VDSL
20 for Symmetric xDSL
30 for Other Copper Wireline
40 for CableModem other than DOCSIS 1, 1.1, 2.0 or 3.0
41 for Cable Modem DOCSIS 1, 1.1 or 2.0
42 for Cable Modem DOCSIS 3.0
50 for Optical Carrier / Fiber to the end user
60 for Satellite
70 for Terrestrial Fixed Wireless
90 for Electric Power Line
0 for All Other
consumer => BOOLEAN: Form477 Field (Consumer Flag) 't' or 'f'
business => BOOLEAN: Form477 Field (Business Flag) 't' or 'f'
max_home_dn => FLOAT: Form477 Field (Maximum Advertised Downstream Bandwidth (Consumer) [Mbps])
max_home_up => FLOAT: Form477 Field (Maximum Advertised Upstream Bandwidth (Consumer) [Mbps])
max_business_dn => FLOAT: Form477 Field (Maximum Contractual Downstream Bandwidth (Business/Government) [Mbps])
max_business_up => FLOAT: Form477 Field (Maximum Contractual Upstream Bandwidth (Business/Government) [Mbps])
coverage_direction => ARRAY: Form477 Field (Coverage Direction) in the following format SE:::SW:::NE:::NW
Result - the SOAP reply will either:
'OK :[new basestation id]' - to confirm successful processing
error message
modifyBasestation - this function is used to modify customer Basestation details
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
basestationid => INTEGER (required)
equipid => INTEGER (required)
siteid => INTEGER
sector => TEXT
direction => TEXT
colour => TEXT
frequency => NUMERIC
installed => TEXT
note => TEXT
gatewayid => INTEGER
monitor => TEXT: monitor, no monitor, monitor+sms, monitor no alert
aggregateGraph => BOOLEAN: 't' or 'f'
height => FLOAT: (Basestation Height above ground) in [m]
approximate_coverage_radius => INTEGER: Form477 Field in [km]
dba_name => TEXT: Form477 Field
techcode => INTEGER: Form477 Field one of the following:
10 for Asymmetric xDSL
11 for ADSL2, ADSL2+
12 for VDSL
20 for Symmetric xDSL
30 for Other Copper Wireline
40 for CableModem other than DOCSIS 1, 1.1, 2.0 or 3.0
41 for Cable Modem DOCSIS 1, 1.1 or 2.0
42 for Cable Modem DOCSIS 3.0
50 for Optical Carrier / Fiber to the end user
60 for Satellite
70 for Terrestrial Fixed Wireless
90 for Electric Power Line
0 for All Other
consumer => BOOLEAN: Form477 Field (Consumer Flag) 't' or 'f'
business => BOOLEAN: Form477 Field (Business Flag) 't' or 'f'
max_home_dn => FLOAT: Form477 Field (Maximum Advertised Downstream Bandwidth (Consumer) [Mbps])
max_home_up => FLOAT: Form477 Field (Maximum Advertised Upstream Bandwidth (Consumer) [Mbps])
max_business_dn => FLOAT: Form477 Field (Maximum Contractual Downstream Bandwidth (Business/Government) [Mbps])
max_business_up => FLOAT: Form477 Field (Maximum Contractual Upstream Bandwidth (Business/Government) [Mbps])
coverage_direction => ARRAY: Form477 Field (Coverage Direction) in the following format SE:::SW:::NE:::NW
Result - the SOAP reply will either:
'OK' - to confirm successful processing
error message
deleteBasestation - this function is used to delete customer Basestation details
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
basestationid => INTEGER (required)
Result - the SOAP reply will either:
'OK' - to confirm successful processing
error message
payInvoice - this function is used to pay specific Invoice based on Invoice Number provided
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
invoiceNo => INTEGER (required)
amount => INTEGER (required)
paymentDate => DATE: YYYY-MM-DD (if not specified current date is used)
paymentType => TEXT (required): direct debit, cash, cheque, online transfer, credit card, debit card, standing order
narrative => TEXT (optional)
Result - the SOAP reply will either:
'OK' - to confirm successful processing
error message
applyPaymentToCustomer - this function is used to add a payment on the customer account.
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
invoicingid => TEXT (required) or customerid
customerid => INTEGER (required) or invoicingid
amount => INTEGER (required)
date => DATE: YYYY-MM-DD (if not specified current date is used)
narrativeText => TEXT (optional)
referenceText => TEXT (optional)
paymentType => TEXT (optional)
external_reference=> TEXT (optional)
Result - the SOAP reply will either:
'OK' - to confirm successful processing
error message
checkSqlQueueSize- this function is used to verify the SQL queue size for remote SQL servers (RADIUS)
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple databases
ip => TEXT (required): ip address of radius server to check the SQL commands queue for
Result - the SOAP reply will either:
'SQL QUEUE SIZE: 0' - to confirm successful processing
error message
REST Format Example
{
"ip" : "1.2.3.4",
"result" : "SQL QUEUE SIZE: 0"
}
listRADIUSdetails - this function is used to list a username and password details to a RADIUS server associated to the customer's account
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple databases
customerid => INTEGER (optional): when used RADIUS usernames of specified customer will be returned
username => TEXT (optional): when used RADIUS usernames of specified username will be returned
password => TEXT (optional): when used RADIUS usernames of specified password will be returned
priority => TEXT (optional): when used RADIUS usernames of specified priority will be returned
existing_radius_username => TEXT (required): when used RADIUS usernames of specified existing_radius_username will be returned
Result - the SOAP reply will either:
XML containing data
error message
REST Format Example
{
"ip" : "78.133.203.161",
"result" : {
"radius_usernames" : [
{
"priority" : "5",
"password" : "875-9700",
"customerid" : "2",
"exclude_from_auto_group_from_bucket" : null,
"id" : "2",
"username" : "GuestMarquette"
}
],
"results" : [
[
"1"
]
]
}
}
addRADIUSdetails - this function is used to add a username and password details to a RADIUS server associated to the customer's account
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple databases
customerid => INTEGER (required)
radius_username => TEXT (required)
radius_password => TEXT (optional, can be left blank if required)
radius_priority => INTEGER (optional, defines sort order)
existing_radius_username => TEXT (optional): instead of customer ID
Result - the SOAP reply will either:
'OK' - to confirm successful processing
error message
deleteRADIUSdetails - this function is used to delete a username and password details from a RADIUS server associated to the customer's account
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple databases
radius_username => TEXT (required)
Result - the SOAP reply will either:
'OK' - to confirm successful processing
error message
addSalesmanTracking - this function is used to add salesman tracking to the database
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple databases
salesmanissueid => INTEGER(required)
datedue => DATE(required) - format YYYY-MM-DD
hourdue => INTEGER(required) - number between 0 and 23
minutedue => INTEGER(required) - number between 0 and 59
salesmanid => INTEGER(optional)
date => DATE(optional) - format YYYY-MM-DD
dateclosed => DATE(optional) - format YYYY-MM-DD
price => NUMBER(optional)
note => TEXT (optional)
addSalesmanTask - this function is used to add salesman issue to the database
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple databases
custId => INTEGER(required)
date_reported => DATE(required) - format YYYY-MM-DD
description => TEXT(required)
type => TEXT(required)
date_closed => DATE(optional) - format YYYY-MM-DD)
hours_spent => NUMBER(optional)
value => NUMBER(optional)
priority => INTEGER(optional): 1,2,3,4 or 5
status => TEXT(optional): open, closed, waiting for customer
var => TEXT(optional): name of Value Added Reseller that exists in the database
rsm => TEXT(optional): name of Regional Sales Manager that exists in the database
ma => TEXT(optional): name of Master Agent that exists in the database
salesman => TEXT(optional): name of Salesman that exists in the database
resolution => TEXT(optional)
custom_field_* => TEXT Note: see custom_tag_* for an alternative way to index.
Note: For custom fields replace the * in custom_field_* with the ID of the custom field defined under settings->Custom Fields.
custom_tag_* => TEXT Note: that TAG needs to defined in the Custom Fields Table. This is an alternative to using custom_field_*
Result - the SOAP reply will either:
'OK:<ISSUEID>' - to confirm successful processing
error message
modifySalesmanTask - this function is used to modify salesman issue to the database
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple databases
custId => INTEGER(required)
issueId => INTEGER(required)
date_reported => DATE(required) - format YYYY-MM-DD
description => TEXT(required)
type => TEXT(required)
date_closed => DATE(optional) - format YYYY-MM-DD)
hours_spent => NUMBER(optional)
value => NUMBER(optional)
priority => INTEGER(optional): 1,2,3,4 or 5
status => TEXT(optional): open, closed, waiting for customer
var => TEXT(optional): name of Value Added Reseller that exists in the database
rsm => TEXT(optional): name of Regional Sales Manager that exists in the database
ma => TEXT(optional): name of Master Agent that exists in the database
salesman => TEXT(optional): name of Salesman that exists in the database
resolution => TEXT(optional)
updateresolution => TEXT(optional): if non-zero then resolution will be appended instead of being overwritten
custom_field_* => TEXT Note: see custom_tag_* for an alternative way to index.
Note: For custom fields replace the * in custom_field_* with the ID of the custom field defined under settings->Custom Fields.
custom_tag_* => TEXT Note: that TAG needs to defined in the Custom Fields Table. This is an alternative to using custom_field_*
Result - the SOAP reply will either:
'OK:<ISSUEID>' - to confirm successful processing
error message
deleteSalesmanTask - this function is used to delete salesman issue from the database
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple databases
issueId => INTEGER(required)
Result - the SOAP reply will either:
'OK' - to confirm successful processing
error message
updateBucketsFromSubscription - this function is used to execute a routine that will update customer buckets (and RADIUS details) based on the subscriptions attached to the account
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple databases
customerid => INTEGER (optional, limits operation to one account only)
force => boolean [0 or 1] - if specified it will force the RADIUS group recalculation even if the bucket has not been changed for the account - enabling new RADIUS accounts to pick up bucket settings, but wiping out all custom changes made to the radius groups
updateRadiusFromBuckets => boolean [0 or 1] - update RADIUS groups from calculated buckets
Result - the SOAP reply will either:
'OK' - to confirm successful processing
error message
updateRadiusFromBuckets - this function is used to execute a routine that will update customer radius settings buckets (and RADIUS details) based on the bucket attached to the account
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple databases
customerid => INTEGER (optional, limits operation to one account only)
Result - the SOAP reply will either:
'OK' - to confirm successful processing
error message
checkExistingEmail - this function is used to check whether customer account with email address supplied already exists in SIMPler system.
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
email => EMAIL ADDRESS (required)
Result - the SOAP reply will either:
0 - customer account with supplied email does not exist
<customerid> - customer ID of found customer
error message
addCustomerNote - this function is used to add a Customer Note to the existing customer
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
customerid => INTEGER (required)
note_title => TEXT (required)
note_text => TEXT (required)
remind_user => TEXT (optional): Create reminder for SIMPLer userid
remind_date => TEXT (optional): Set reminder date. Format YYYY-MM-DD. Defaults to current date
remind_time => TEXT (optional): Set reminder time. Format HH:MM
note_alert => BOOLEAN (optional) : 1 or 0
note_sticky => BOOLEAN (optional) : 1 or 0
Result - the SOAP reply will either:
'OK' - to confirm successful processing
error message
modifyCustomerNote - this function is used to modify an existing Customer Note
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
noteid => INTEGER (required)
note_title => TEXT (optional) Updated Note Title
note_text => TEXT (optional) Updated Note Text
remind_user => TEXT (optional) If specified any existing reminder will be deleted and replaced with a reminder for this user.
remind_date => TEXT (optional): Set reminder date. Format YYYY-MM-DD. Defaults to current date. Ignored unless remind_user set.
remind_time => TEXT (optional): Set reminder time. Format HH:MM. Ignored unless remind_user set.
note_alert => BOOLEAN (optional) : 1 or 0
note_sticky => BOOLEAN (optional) : 1 or 0
Result - the SOAP reply will either:
'OK' - to confirm successful processing
error message
deleteCustomerNote - this function is used to delete an existing Customer Note
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
noteid => INTEGER (required)
Result - the SOAP reply will either:
'OK' - to confirm successful processing
error message
assignCustomerToGroup - this function is used to assign Customer to a group
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
customerid => INTEGER (required)
groupid => INTEGER (required)
Result - the SOAP reply will either:
'OK' - to confirm successful processing
error message
deleteCustomerFromGroup - this function is used to delete customer from a group
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
customerid => INTEGER (required)
groupid => INTEGER (required)
Result - the SOAP reply will either:
'OK' - to confirm successful processing
error message
getActiveSubscriptionData - this function is used to get Active Subscription from customer account
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
customerid => INTEGER (required)
displayall => 1 or 0 (optional if set to 1 it will display inactive subscriptions)
Result - the SOAP reply will either:
XML containing data
error message
deleteSubscription - this function is used to delete an existing Subscription entry.
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple databases
update_wib_files => BOOLEAN: toggles wib update on subscription change for operators using buckets from subscriptions feature
subscriptionid => INTEGER: ID of subscription that is to be deleted
or
customerid => INTEGER
with
deleteActiveProductId => INTEGER: productid of an active product to be deleted from customer subscriptions
or
customerid => INTEGER
with
deleteProductCode => TEXT: deletes all customer subscriptions with a specified product code
or
customerid => INTEGER
with
deleteSubscription => INTEGER (optional): deletes all customer subscriptions
Result - the SOAP reply will either:
OK' - to confirm successful processing, OR
error message
getMaintenanceData - this function is used to get Maintenance Data from customer account
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
customerid => INTEGER (customerid or siteid or equipmentid required)
siteid => INTEGER (customerid or siteid or equipmentid required)
equipmentid => INTEGER (customerid or siteid or equipmentid required)
Result - the SOAP reply will either:
XML containing data
error message
getInvoicesData - this function is used to get Invoices Data from customer account
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
customerid => INTEGER (required)
amountpaid => INTEGER (required)
amountcredited => INTEGER (required)
Result - the SOAP reply will either:
XML containing data
error message
getCustomerData - this function is used to get Customer Data from customer account
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
customerid => INTEGER (required or invoicingid)
invoicingid => TEXT (required or customerid)
ip => 1 (optional): to retrieve IP details,
cpe => 1 (optional): to retrieve CPE details,
creditcard => 1 (optional): to retrieve Credit Card details,
eft => 1 (optional): to retrieve EFT details,
subscription => 1 (optional): to retrieve Subscription details,
maintenance => 1 (optional): to retrieve Maintenance details,
invoices => 1 (optional): to retrieve Invoices details
usage => 1 (optional): to retrieve Customer Traffic Usage details
statement => 1 (optional): to retrieve Customer summary Statement
customFields => 1 (optional): to retrieve Customer custom fields
groups => 1 (optional): to retrieve Customer assigned group id, group name, group description
subaccounts => 1 (optional): to retrieve subaccount information, if available
masteraccounts => 1 (optional): to receive master account information, if available
Result - the SOAP reply will either:
XML containing data
error message
REST Format Example
{
"ip" : "127.0.0.1",
"result" : {
"customer" : {
"installdate" : "2011-03-01",
"website" : "",
"installstreet" : "",
"street" : "Cieszynska 146",
"startdate" : "2011-03-01",
"town" : "London",
"state" : "",
"installzip" : "",
"frequency" : "1",
"email" : "",
"supportemail" : "",
"id" : "27904",
"name" : "Maciej Gawlowski",
"customerstatus2" : "",
"installstreet2" : "",
"zip" : "3",
"invoicingid" : "mgawlowskiXYZ193",
"installtown" : "",
"street2" : "Dom 4",
"customerstatus3" : "",
"type" : "customer home",
"county" : "43-428",
"wibnumber" : "",
"init_date" : "2011-03-01",
"status" : "potential",
"fax" : "",
"vat_exemption" : "No",
"paymentmethod" : "direct debit",
"country" : "Poland",
"installstate" : "",
"nickname" : "mgawlowskiXYZ193",
"customerstatus1" : "potential",
"gpsx" : "",
"customer_tracking" : "",
"phone" : "",
"note" : "",
"customerstatus5" : "",
"accountsemail" : "",
"gpsy" : "",
"sendmethod" : "pdf",
"customerstatus4" : "",
"installcounty" : "",
"value_added_reseller_id":",
"value_added_reseller":"",
"master_agent_id":"",
"master_agent":"",
"salesman_id":"1",
"salesman":"Dennis Soap",
"regional_sales_manager_id":"1",
"regional_sales_manager":"Soap Manager",
"salesman_id":"",
"salesman":"",
"site_id":"",
"site_name":"",
"community_code":"",
"address_additional":"",
"regional_sales_manager":"",
"bucket":"",
"bucketid":"",
},
"usage" : {
"traffic_cap" : "",
"traffic_cap_subscription" : "",
"traffic_cap_overage" : "",
},
}
}
getCustomerStatuses - this function is used to get Customer Data from customer account
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
Result - the JSON reply will either:
Error message
Generation Result
SOAP Format Example
getCustomerStatuses: <customerStatusesRoot> <array>contract</array>
<array>current</array>
<array>enquiry</array>
<array>installed</array>
<array>migrated</array>
<array>Nowy Status</array>
<array>post</array>
<array>potential</array>
<array>simply failed</array>
<array>survey failed</array>
<array>unused</array>
<array>waiting for install</array>
<array>waiting for survey</array>
<array>Web Request</array>
<labels Nowy Status="Nowy Status" Web Request="Web Request" contract="contract" current="Current" enquiry="enquiry" installed="installed" migrated="migrated" post="Disconnected" potential="potential" simply failed="simply failed" survey failed="survey failed" unused="unused" waiting for install="waiting for install" waiting for survey="waiting for survey" />
<substatus_hash name="post" default="" labels="Reason">
<values></values>
<values>affordability (no longer want BB)</values>
<values>competitor</values>
<values>competitor price</values>
<values>competitor product</values>
<values>non payment</values>
<values>price</values>
<values>signal</values>
<values>relocation (no service)</values>
<values>other</values>
<values>Price Increase</values>
<values>response to service issues</values>
</substatus_hash>
<substatus_hash name="survey failed" default="" labels="">
<values>No LOS/Signal</values>
<values>Out of Area</values>
<values>Failed Payment</values>
<values>Contract</values>
<values>Aesthetics</values>
<values>AP Full</values>
<values>Other-Changed Mind</values>
</substatus_hash>
<substatus_hash name="waiting for install" default="3" labels="Priority">
<values>1</values>
<values>2</values>
<values>3</values>
<values>4</values>
<values>5</values>
</substatus_hash>
<substatus_hash name="waiting for survey" default="3" labels="Priority">
<values>1</values>
<values>2</values>
<values>3</values>
<values>4</values>
<values>5</values>
</substatus_hash>
</customerStatusesRoot>
REST Format Example
{
"ip" : "127.0.0.1",
"result" : {
"array" : [
"contract",
"current",
"enquiry",
"installed",
"migrated",
"Nowy Status",
"post",
"potential",
"simply failed",
"survey failed",
"unused",
"waiting for install",
"waiting for survey",
"Web Request"
],
"substatus_hash" : {
"survey failed" : {
"default" : null,
"values" : [
"No LOS/Signal",
"Out of Area",
"Failed Payment",
"Contract",
"Aesthetics",
"AP Full",
"Other-Changed Mind"
],
"labels" : null
},
"waiting for survey" : {
"default" : "3",
"values" : [
"1",
"2",
"3",
"4",
"5"
],
"labels" : "Priority"
},
"post" : {
"default" : null,
"values" : [
"",
"affordability (no longer want BB)",
"competitor",
"competitor price",
"competitor product",
"non payment",
"price",
"signal",
"relocation (no service)",
"other",
"Price Increase",
"response to service issues"
],
"labels" : "Reason"
},
"waiting for install" : {
"default" : "3",
"values" : [
"1",
"2",
"3",
"4",
"5"
],
"labels" : "Priority"
}
},
"labels" : {
"contract" : "contract",
"waiting for survey" : "waiting for survey",
"potential" : "potential",
"installed" : "installed",
"post" : "Disconnected",
"waiting for install" : "waiting for install",
"simply failed" : "simply failed",
"enquiry" : "enquiry",
"survey failed" : "survey failed",
"migrated" : "migrated",
"current" : "Current",
"unused" : "unused",
"Web Request" : "Web Request",
"Nowy Status" : "Nowy Status"
}
}
}
getCustomerStatusHistory - this function returns a list of status change history / information for the specific customerid
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
customerid => INTEGER (required)
Result - the SOAP reply will either:
XML containing data
error message
getEFTData - this function is used to get EFT data from customer account
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
customerid => INTEGER (required)
Result - the SOAP reply will either:
XML containing data
error message
getIPData - this function is used to get IP data from customer account
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
customerid => INTEGER (required)
Result - the SOAP reply will either:
XML containing data
error message
getCreditCardData - this function is used to get Credit Card Data from customer account
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
customerid => INTEGER (required)
Result - the SOAP reply will either:
XML containing data
error message
getCPEData - this function is used to get CPE Data from customer account
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
customerid => INTEGER (optional)
equipid => INTEGER (optional)
nickname => TEXT (optional)
ipaddress => TEXT (optional)
serialnumber => TEXT (optional)
macaddress => TEXT (optional)
all => BOOLEAN (optional) - if set to 1 will list data for all CPEs
Result - the SOAP reply will either:
XML containing data
error message
getGatewayDetails- this function is used to get gatewaydetails/settings by providing a wibnumber or gatewayid
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
gatewayid => INTEGER (required)
Or
wibnumber => INTEGER (required)
Result - the SOAP reply will either:
XML containing data
error message
getProducts - this function is used to get Products Data
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
productid => INTEGER or ARRAY (of INTEGERS) (optional)
customProductFields => TEXT (optional) : if set to 1 it will display the product custom fields
Result - the SOAP reply will either:
XML containing data
error message
searchCustomer - this function is used to search for customer accounts
Attributes - any set constructed from below can be used as long as the required set is provided.
Note: search attributes are pattern matching using POSIX regular expressions as documented in chapter 9.7.3 here: http://www.postgresql.org/docs/9.0/static/functions-matching.html
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
customerid => INTEGER (optional): search on customerid (NOTE requires strict_search to be set)
firstname => TEXT (optional): search on firstname field (i.e. first part of customer name split at the first white space)
lastname => TEXT (optional): search on lastname field (i.e. second part of customer name split at the first white space)
nickname => TEXT (optional): search on state field
invoicingid => TEXT (optional): search on state field
email => TEXT (optional): search on customer email field
phone => TEXT (optional): search on customer phone field
customerstatus => TEXT (optional): search on customer status field, statuses as used in SIMPLer:
contract
current
installed
post
potential
survey failed
unused
waiting for install
waiting for survey
street1 => TEXT (optional): search on customer street 1 field
street2 => TEXT (optional): search on customer street 2 field
city => TEXT (optional): search on customer city field
county => TEXT (optional): search on country field
postcode => TEXT (optional): search on post code/zip code field
state => TEXT (optional): search on state field
country => TEXT (optional): search on country field
limit => INTEGER (optional): limit output to X records - defaults to 20
offset => INTEGER (optional): says to skip that many rows before beginning to return rows
case_sensitive => INTEGER (optional): by default searches are case insensitive, if set to 1 - searches will be case sensitive
order => TEXT (optional): field defines sorting field (firstname, lastname). DEFAULT: customerid
lastmodified => DATE (optional): date customer was last modified - must be valid format: YYYY-MM-DD
add_notes => BOOLEAN: adds note, privatenote fields to output
strict_search => INTEGER (optional): if set it will look for exact matches
custom_field_* => TEXT Note: see custom_tag_* for an alternative way to index.
Note: For custom fields replace the * in custom_field_* with the ID of the custom field defined under settings->Custom Fields
custom_tag_* => TEXT Note: that TAG needs to defined in the Custom Fields Table. This is an alternative to using custom_field_*
Result - the SOAP reply will either:
XML containing data
error message
Example XML Output - note that there are additional data returned apart from customer records that cover query details - such as number of results, limit applied, offset applied, order used to sort results, case_sensitivity option used.
<customerSearchRoot>
<case_sensitive>0</case_sensitive>
<customer id="27738">
<city>Pogwizdow</city>
<country>Albania</country>
<county></county>
<customerid>27738</customerid>
<customerstatus>post</customerstatus>
<email>maciej.gawlowski@gmail.com</email>
<firstname>Maciej</firstname>
<lastname>2 Gawlowski</lastname>
<phone>606473915</phone>
<postcode>43-418</postcode>
<state>Alaska</state>
<street1>Cieszynska 146</street1>
<street2></street2>
</customer>
<customer id="27739">
<city>Pogwizdow</city>
<country>Afghanistan</country>
<county></county>
<customerid>27739</customerid>
<customerstatus>post</customerstatus>
<email>maciej.gawlowski@gmail.com</email>
<firstname>Maciej</firstname>
<lastname>3 Gawlowski</lastname>
<phone>606473915</phone>
<postcode>43-418</postcode>
<state>Alaska</state>
<street1>Cieszynska 146</street1>
<street2></street2>
</customer>
<customer id="27827">
<city>Not Collected</city>
<country>Poland</country>
<county></county>
<customerid>27827</customerid>
<customerstatus>current</customerstatus>
<email>maciej.gawlowski@gmail.com</email>
<firstname>Maciej</firstname>
<lastname>Gawlowski</lastname>
<phone></phone>
<postcode>50-535</postcode>
<state></state>
<street1>Not Collected</street1>
<street2></street2>
</customer>
<customer id="27784">
<city>Not Collected</city>
<country>United States</country>
<county></county>
<customerid>27784</customerid>
<customerstatus>post</customerstatus>
<email></email>
<firstname>Maciej</firstname>
<lastname>Gawlowski</lastname>
<phone>606473915</phone>
<postcode></postcode>
<state></state>
<street1>Not Collected</street1>
<street2></street2>
</customer>
<customer id="27831">
<city>Wroclaw</city>
<country>Poland</country>
<county></county>
<customerid>27831</customerid>
<customerstatus>post</customerstatus>
<email>maciej.gawlowski@gmail.com</email>
<firstname>Maciej</firstname>
<lastname>Gawlowski</lastname>
<phone>606473915</phone>
<postcode>50-536</postcode>
<state>Maryland</state>
<street1>Not Collected</street1>
<street2></street2>
</customer>
<limit>5</limit>
<offset>0</offset>
<order>lastname</order>
<results>307</results>
</customerSearchRoot>
searchInvoices - this function is used to search for invoices
Attributes - any set constructed from below can be used as long as the required set is provided.
Note: search attributes are pattern matching using POSIX regular expressions as documented in chapter 9.7.3 here: http://www.postgresql.org/docs/9.0/static/functions-matching.html
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
customerid => INTEGER (optional): search on customerid
invoiceid => INTEGER (optional): search on invoiceid
invoiceno => INTEGER (optional): search on invoice number
invoicedate => DATE (optional YYYY-MM-DD): search on invoice date
posteddate => DATE (optional YYYY-MM-DD): search on invoice posted date
paymentdate => TEXT (optional YYYY-MM-DD): search on invoice payment date
paymentstatus => TEXT (optional): search on invoice payment status
amount => FLOAT (optional): search on invoice amount
postmethod => TEXT (optional): search on invoice send method
pdf: send via post
none
both
mail: emailed to customer
street1 => TEXT (optional): search on customer street 1 field
street2 => TEXT (optional): search on customer street 2 field
city => TEXT (optional): search on customer city field
county => TEXT (optional): search on country field
postcode => TEXT (optional): search on post code/zip code field
state => TEXT (optional): search on state field
country => TEXT (optional): search on country field
name => TEXT (optional): customer name
limit => INTEGER (optional): limit output to X records - defaults to 20
offset => INTEGER (optional): says to skip that many rows before beginning to return rows
case_sensitive => INTEGER (optional): by default searches are case insensitive, if set to 1 - searches will be case sensitive
order => TEXT (optional): field defines sorting field (firstname, lastname). DEFAULT: customerid
lastmodified => DATE (optional): date customer was last modified - must be valid format: YYYY-MM-DD
Result - the SOAP reply will either:
XML containing data
error message
searchSubscription- this function is used to search for subscriptions
Attributes - any set constructed from below can be used as long as the required set is provided.
Note: search attributes are pattern matching using POSIX regular expressions as documented in chapter 9.7.3 here: http://www.postgresql.org/docs/9.0/static/functions-matching.html
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
customerid => INTEGER (optional): search on customerid
subscriptionid => INTEGER (optional): search on subscriptionid
description => INTEGER (optional): search on description
valid_to => DATE (optional YYYY-MM-DD): search on valid_to
valid_from => DATE (optional YYYY-MM-DD): search on valid_from
subaccount_customerid => INTEGER (optional): search on subaccount_customerid
price => INTEGER (optional): search on price
cycles => INTEGER (optional): cycles
Result - the SOAP reply will either:
XML containing data
error message
synchronizeCustomerAttachments - this function is used to snchronize customer attachments with the FTP server
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple databases
customerid => INTEGER (required)
filenameregexp => TEXT (required): if defined only files that match the regexp will be processed by the script
description => TEXT (required): to specify what description should be used for all new files added
rights => TEXT (required): to specify rights required - field must be in pgsql ARRAY format allowed rights are: billing information, maintenance, network information, sales tracking i.e. {"billin information", "maintenance"}
mode => TEXT (optional): 'electronic_document'
Result - the SOAP reply will either:
'OK' - to confirm successful processing
error message
assignSingleCustomerAttachment- this function is used to synchronize a specific customer attachments with the FTP server
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple databases
customerid => INTEGER (required)
filename => TEXT (required): filename
filesize => TEXT (required): size of the file
accesspath => TEXT (optional): if not used the filename will be used as the accesspath
type => TEXT (optional): type of the file (e.g. "voice")
Result - the SOAP reply will either:
'OK' - to confirm successful processing
error message
synchronizeMaintenanceAttachments - this function is used to synchronize maintenance attachments with the FTP server
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple databases
issuenumber => INTEGER (required)
filenameregexp => TEXT (required): if defined only files that match the regexp will be processed by the script
description => TEXT (required): to specify what description should be used for all new files added
dateadded => TEXT (required): date added
Result - the SOAP reply will either:
'OK' - to confirm successful processing
error message
addCommunityCode - this function is used to add Community Codes to a dedicated table in SIMPLer
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
code => TEXT (required)
Result - the SOAP reply will either:
'OK'
contain error message (i.e. code already exist message)
modifyCommunityCode - this function is used to modify existing Community Codes in a dedicated table in SIMPLer
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
code => TEXT (required)
new_code => TEXT (required)
Result - the SOAP reply will either:
'OK'
contain error message (i.e. code already exist message)
deleteCommunityCode - this function is used to delete existing Community Codes in a dedicated table in SIMPLer
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
code => TEXT (required)
Result - the SOAP reply will either:
'OK'
contain error message (i.e. code already exist message)
listCommunityCode - this function is used to delete existing Community Codes in a dedicated table in SIMPLer
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
Result - the SOAP reply will will come in following XML formatted output:
<customerSearchRoot> <code>Code 1 via API Modified</code>
<code>Code 1 via API</code>
<code>Community Code 4</code>
<code>Community Code 3</code>
<code>Community Code 2</code>
<code>Community Code 1 Default</code>
<results>6</results>
addSubaccount - this function is used to add Subaccount to Master Account in SIMPLer
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
masterCustomerId => TEXT (required)
subCustomerId => TEXT (required)
master_display_subaccount_invoices => BOOLEAN: 't' or 'f'
master_display_subaccount_usage => BOOLEAN: 't' or 'f'
subaccount_display_master_invoices => BOOLEAN: 't' or 'f'
subaccount_synchronization_customerstatus => BOOLEAN: 't' or 'f'
subaccount_synchronization_usage_allowance => BOOLEAN: 't' or 'f'
master_allow_eup_relogin => BOOLEAN: 't' or 'f'
subaccount_invoice_from_master => BOOLEAN: 't' or 'f'
subaccount_invoice_from_master_prorate => VALUE: '0' or '1' or '2' where 0 - No Prorate, 1 - Prorate Option A, 2 - Prorate Option 3
Result - the SOAP reply will either:
'OK'
contain error message (i.e. code already exist message)
updateSubaccount - this function is used to update Subaccount to Master Account in SIMPLer
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
masterCustomerId => TEXT (required)
subCustomerId => TEXT (required)
master_display_subaccount_invoices => BOOLEAN: 't' or 'f'
master_display_subaccount_usage => BOOLEAN: 't' or 'f'
subaccount_display_master_invoices => BOOLEAN: 't' or 'f'
subaccount_synchronization_customerstatus => BOOLEAN: 't' or 'f'
subaccount_synchronization_usage_allowance => BOOLEAN: 't' or 'f'
master_allow_eup_relogin => BOOLEAN: 't' or 'f'
subaccount_invoice_from_master => BOOLEAN: 't' or 'f'
subaccount_invoice_from_master_prorate => VALUE: '0' or '1' or '2' where 0 - No Prorate, 1 - Prorate Option A, 2 - Prorate Option 3
Result - the SOAP reply will either:
'OK'
contain error message (i.e. code already exist message)
deleteSubaccount - this function is used to delete Subaccount from Master Account in SIMPLer
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
masterCustomerId => TEXT (required)
subCustomerId => TEXT (required)
Result - the SOAP reply will either:
'OK'
contain error message (i.e. code already exist message)
generateIP - this function is used to generate an IP (or a set of IP addresses) in SIMPLer.
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
quantity => TEXT (optional): number of IP addresses that are to be generated. If not defined it will default to 1
customerid => TEXT (required): defines customer for whom IP addresses are to be generated
iptype => TEXT (optional): override customers IP type for generation
interfaceid => INTEGER (optional): specify interface to generate IP from
saveInDb => TEXT (optional): if defined - generated IP addresses will automatically be saved to customer account
syncRADIUS => TEXT (optional): if defined - generated IP addresses will automatically be assigned to customer radius accounts and RADIUS server will be updated accordingly (Note: saveInDb attribute must be present)
updateWIB => TEXT (optional): if defined - WIB will be updated with new IP addresses (Note: saveInDb attribute must be present)
updateMAConEUPLogin => BOOLEAN: 1 - Allow to auto - update MAC on EUP login ON, 0 - Allow to auto - update MAC on EUP login OFF
Result - the JSON reply will either:
Error message
Generation Result
SOAP Format Example
<customerSearchRoot>
<gatewayid>1</gatewayid>
<generated>10</generated>
<interfaceid>20</interfaceid>
<ip>192.168.99.68</ip>
<ip>192.168.99.69</ip>
<ip>192.168.99.70</ip>
<ip>192.168.99.71</ip>
<ip>192.168.99.72</ip>
<ip>192.168.99.73</ip>
<ip>192.168.99.74</ip>
<ip>192.168.99.75</ip>
<ip>192.168.99.76</ip>
<ip>192.168.99.77</ip>
<iptype>Public</iptype>
<quantity>10</quantity>
<wibnumber>100</wibnumber>
</customerSearchRoot>
REST Format Example
{
"ip" : "192.168.150.1",
"result" : {
"wibnumber" : "100",
"iptype" : "Public",
"ip" : [
"192.168.99.58",
"192.168.99.59",
"192.168.99.60",
"192.168.99.61",
"192.168.99.62",
"192.168.99.63",
"192.168.99.64",
"192.168.99.65",
"192.168.99.66",
"192.168.99.67"
],
"quantity" : "10",
"gatewayid" : "1",
"generated" : 10,
"interfaceid" : [
"20"
]
}
}
generateIPv6 - this function is used to generate an IPv6 prefix (or a set of IPv6 prefixes) in SIMPLer.
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
quantity => TEXT (optional): number of IPv6 prefixes that are to be generated. If not defined it will default to 1
customerid => TEXT (required): defines customer for whom IP addresses are to be generated
role => TEXT (optional): type of role - Customer or Delegated. Will default to Customer if not defined
interfaceid => INTEGER (optional): specify interface to generate IP from
saveInDb => TEXT (optional): if defined - generated IP prefixes will automatically be saved to customer account
syncRADIUS => TEXT (optional): if defined - generated IP prefixes will automatically be assigned to customer radius accounts and RADIUS server will be updated accordingly (Note: saveInDb attribute must be present)
Result - the JSON reply will either:
Error message
Generation Result
REST Format Example
{
"ip" : "10.10.1.3",
"result" : {
"wibnumber" : "249",
"generatedIPs" : [
"db8:2002:4::/48",
"db8:2002:5::/48",
"db8:2002:6::/48"
],
"gatewayid" : "7",
"generated" : 3
}
}
getInterfaceData - this function is used to get a list of gateway interfaces
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
quantity => TEXT (optional): number of IP addresses that are to be generated. If not defined it will default to 1
id => TEXT (optional): interface ID
gatewayid => TEXT (optional): gateway ID
Result - the JSON reply will either:
Error message
Generation Result
REST Format Example
{
"ip" : "127.0.0.1",
"result" : {
"interfaces" : [
{
"networkaddress" : "10.10.10.0",
"broadcast" : "10.10.10.255",
"startip" : "10.10.10.10",
"gatewayid" : "1",
"interface" : "eth1",
"numberip" : "10",
"label" : "",
"id" : "18",
"role" : "Canopy",
"mask" : "255.255.255.0",
"gwaddress" : "10.10.10.1"
},
{
"networkaddress" : "11.11.11.0",
"broadcast" : "11.11.11.255",
"startip" : "11.11.11.11",
"gatewayid" : "1",
"interface" : "eth1",
"numberip" : "1",
"label" : "",
"id" : "19",
"role" : "Canopy",
"mask" : "255.255.255.0",
"gwaddress" : "11.11.11.1"
},
{
"networkaddress" : "172.16.7.0",
"broadcast" : "172.16.7.255",
"startip" : "172.16.7.201",
"gatewayid" : "1",
"interface" : "eth1",
"numberip" : "12",
"label" : "Test label",
"id" : "12",
"role" : "Public",
"mask" : "255.255.255.0",
"gwaddress" : "172.16.7.1"
},
{
"networkaddress" : "71.255.145.192",
"broadcast" : "71.255.145.223",
"startip" : "71.255.145.194",
"gatewayid" : "3",
"interface" : "LAN1",
"numberip" : "27",
"label" : "FP EDIA 71.255.158.118",
"id" : "22",
"role" : "Public",
"mask" : "255.255.255.224",
"gwaddress" : "71.255.145.193"
},
{
"networkaddress" : "172.16.9.128",
"broadcast" : "172.16.9.191",
"startip" : "172.16.9.130",
"gatewayid" : "2",
"interface" : "eth1",
"numberip" : "2",
"label" : "",
"id" : "16",
"role" : "Customer",
"mask" : "255.255.255.192",
"gwaddress" : "172.16.9.129"
},
{
"networkaddress" : "80.100.100.0",
"broadcast" : "80.100.100.255",
"startip" : "80.100.100.2",
"gatewayid" : "2",
"interface" : "eht0",
"numberip" : "253",
"label" : "Publics for Testing",
"id" : "55",
"role" : "Public",
"mask" : "255.255.255.0",
"gwaddress" : "80.100.100.1"
},
{
"networkaddress" : "192.168.99.0",
"broadcast" : "192.168.99.255",
"startip" : "192.168.99.2",
"gatewayid" : "1",
"interface" : "eth1",
"numberip" : "252",
"label" : "",
"id" : "20",
"role" : "Public",
"mask" : "255.255.255.0",
"gwaddress" : "192.168.99.1"
},
{
"networkaddress" : "172.16.8.0",
"broadcast" : "172.16.9.255",
"startip" : "172.16.8.190",
"gatewayid" : "2",
"interface" : "eth1",
"numberip" : "100",
"label" : "One Canopy range",
"id" : "13",
"role" : "Canopy",
"mask" : "255.255.128.0",
"gwaddress" : "172.16.8.1"
},
{
"networkaddress" : "10.10.10.10",
"broadcast" : "10.10.10.9",
"startip" : "10.10.10.2",
"gatewayid" : "3",
"interface" : "LAN2",
"numberip" : "100",
"label" : "Nothing",
"id" : "21",
"role" : "Public",
"mask" : "255.255.255.192",
"gwaddress" : "10.10.10.1"
}
]
}
}
getOverageAllowances - this function is used to get a list overage allowances
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
customerid => TEXT (optional): customer ID
date_from => TEXT (optional): date from (inclusive)
date_to => TEXT (optional): date to (inclusive)
Result - the JSON reply will either:
Error message
Generation Result
REST Format Example
{
"ip" : "127.0.0.1",
"result" : {
"interfaces" : [
{
"timestamp" : "2018-07-21 02:05:39.637192",
"invoiceid" : "",
"used" : "",
"customerid" : "698",
"method" : "",
"id" : "7174",
"traffic_limit" : "6"
}
]
}
}
customerRadius - this function is used to manipulate (list, add, modify, delete) customer RADIUS tables i.e. radcheck, radreply.
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
table => TEXT (required)[radcheck, radreply, usergroup, radusergroup]: specifies which radius table should be updated. Should be either radcheck, radreply or usergroup (radusergroup on some servers).
action => TEXT (required)[list,add,modify,delete]: specifies what action we want to execute on the table.
list - use this action to list all entries related to either all usernames associated with a SIMPLer customer or with a specified username
add - use this action to add new
modify -
delete -
customerid => TEXT (required when action is 'list' optional otherwise):
username => TEXT (required when action is 'add' optional otherwise):
attribute => TEXT (required when action is 'add' optional otherwise):
op => TEXT (required when action is 'add' optional otherwise):
value => TEXT (required when action is 'add' optional otherwise):
Result - the JSON reply will either:
Error message
Generation Result
SOAP Format Example
list
add
delete
modify
REST Format Example
for add / delete / modify
{
"ip": "192.168.150.1",
"result": {
"table": "radcheck",
"action": "add",
"result": "OK"
}
}
list
{
"ip": "192.168.150.1",
"result": {
"table": "radcheck",
"action": "list",
"results": [
{
"attribute": "Cleartext-Password",
"value": "0ac5ae06a2ec2",
"customerid": "27939",
"id": "4270",
"op": ":=",
"username": "ts_telrad_autopro"
},
{
"attribute": "filter-id",
"value": "firewall-filter",
"customerid": "27939",
"id": "4273",
"op": "==",
"username": "ts_telrad_autopro"
},
]
}
}
listRadiusSessions - this function is used to manipulate (list, add, modify, delete) customer RADIUS tables i.e. radcheck, radreply.
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
customerid => TEXT (optional)
username => TEXT (optional)
active => BOOLEAN (optional)
last10days => BOOLEAN (optional)
Result - the JSON reply will either:
Error message
Generation Result
SOAP Format Example
list via customerid
curl -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"api_username":"username","api_password":"password","operator":"operator","customerid":"17"}' http://server.azotel.com/restapi/listRadiusSessions
or
curl -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"api_username":"username","api_password":"password","operator":"operator","customerid":"17"}' http://server.azotel.com/restapi/API/listRadiusSessions
list via username
curl -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"api_username":"username","api_password":"password","operator":"operator","username":"RADIUSUSERNAME"}' http://server.azotel.com/restapi/API/listRadiusSessions
or
curl -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"api_username":"username","api_password":"password","operator":"operator","username":"RADIUSUSERNAME"}' http://server.azotel.com/restapi/API/listRadiusSessions
REST Format Example
{
"ip" : "188.121.16.66",
"result" : {
"radius_sessions" : [
{
"acctoutputoctets" : "116513067944",
"acctsessiontime" : "9817273",
"acctstarttime_display" : "2018-03-03 18:33:24",
"acctinputoctets" : "9293410279",
"acctsessionid" : "8130ba19",
"nasipaddress" : "37.48.225.24",
"acctsessiontime_display" : "113 day(s) 15h 01m 13s ",
"acctstoptime" : null,
"framedipaddress" : "37.48.226.202",
"framedipv6prefix" : null,
"callingstationid" : "04:18:D6:FA:58:0C",
"radacctid" : "2828389",
"acctinputoctets_display" : "8.7 GB",
"username" : "USERNAME",
"acctstarttime" : "2018-03-03 18:33:24+00",
"acctsessionid_display" : "8130ba19",
"customerid" : "1791",
"acctstoptime_display" : "",
"acctoutputoctets_display" : "108.5 GB"
},
{
"acctoutputoctets" : "16392279807",
"acctsessiontime" : "831656",
"acctstarttime_display" : "2018-02-22 03:31:53",
"acctinputoctets" : "1104564354",
"acctsessionid" : "8130a337",
"nasipaddress" : "37.48.225.24",
"acctsessiontime_display" : "9 day(s) 15h 00m 56s ",
"acctstoptime" : "2018-03-03 18:32:49+00",
"framedipaddress" : "37.48.226.202",
"framedipv6prefix" : null,
"current" : 1,
"callingstationid" : "04:18:D6:FA:58:0C",
"radacctid" : "2756919",
"acctinputoctets_display" : "1.0 GB",
"username" : "USERNAME",
"acctstarttime" : "2018-02-22 03:31:53+00",
"acctsessionid_display" : "8130a337",
"customerid" : "1791",
"acctstoptime_display" : "2018-03-03 18:32:49",
"acctoutputoctets_display" : "15.3 GB"
},
{
"acctoutputoctets" : "49909954754",
"acctsessiontime" : "3632990",
"acctstarttime_display" : "2018-01-11 02:11:11",
"acctinputoctets" : "2725956511",
"acctsessionid" : "81304cb3",
"nasipaddress" : "37.48.225.24",
"acctsessiontime_display" : "42 day(s) 01h 09m 50s ",
"acctstoptime" : "2018-02-22 03:21:01+00",
"framedipaddress" : "37.48.226.202",
"framedipv6prefix" : null,
"current" : 1,
"callingstationid" : "04:18:D6:FA:58:0C",
"radacctid" : "2532410",
"acctinputoctets_display" : "2.5 GB",
"username" : "USERNAME",
"acctstarttime" : "2018-01-11 02:11:11+00",
"acctsessionid_display" : "81304cb3",
"customerid" : "1791",
"acctstoptime_display" : "2018-02-22 03:21:01",
"acctoutputoctets_display" : "46.5 GB"
},
{
"acctoutputoctets" : "3619460",
"acctsessiontime" : "35099",
"acctstarttime_display" : "2018-01-11 02:11:10",
"acctinputoctets" : "2953407",
"acctsessionid" : "81304cb3",
"nasipaddress" : "37.48.225.24",
"acctsessiontime_display" : "09h 44m 59s ",
"acctstoptime" : "2018-01-11 11:56:09+00",
"framedipaddress" : "37.48.226.202",
"framedipv6prefix" : null,
"current" : 1,
"callingstationid" : "04:18:D6:FA:58:0C",
"radacctid" : "2529598",
"acctinputoctets_display" : "2.8 MB",
"username" : "USERNAME",
"acctstarttime" : "2018-01-11 02:11:10+00",
"acctsessionid_display" : "81304cb3",
"customerid" : "1791",
"acctstoptime_display" : "2018-01-11 11:56:09",
"acctoutputoctets_display" : "3.5 MB"
},
]
}
}
collectUsageToRadiusDatabase - this function is used to add usage to RADIUS database
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
incremental => TEXT (optional). If specified the acctinputoctets / acctoutputoctets values will be added to the existing session values. If not specified acctinputoctets / acctoutputoctets are taken as absolute values
data => ARRAY (required) of Usage Objects
Usage Object Attributes:
username
or
account_id => TEXT (required) must match RADIUS username in SIMPLer
acctsessionid => TEXT (optional)
acctuniqueid => TEXT (optional)
nasipaddress => INET (optional),
acctstarttime
or
timestamp => linux timestamp (optional) defining session start (it will be autocalculated if not provided)
acctinputoctets
or
in => NUMBER (required) number of bytes representing inbound traffic. Incrementing counter.
acctoutputoctets
or
out => NUMBER (required) number of bytes representing outbound traffic. Incrementing counter.
calledstationid
or
data_source_identifier => TEXT (optional)
callingstationid
or
data_source_parent => TEXT (optional)
framedipaddress => INET (optional),
EXAMPLE:
[
{
'username' => 13,
'acctinputoctets' => 1,
'acctoutputoctets' => 3,
'timestamp' => 1548857100,
'calledstationid' => 'Router.01',
'callingstationid' => '192.168.200.12',
},
{
'username' => 1011,
'acctinputoctets' => 141,
'acctoutputoctets' => 1807,
'timestamp' => 1548857100 ,
'calledstationid' => 'Router.02,
'callingstationid' => 'cloud'
}
],
Result - the JSON reply will either:
Error message
Generation Result
REST Format Example request
curl -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"operator":"testss","api_username":"YOURAPIUSERNAME","api_password":"YOURAPIPASSWORD","data": [{"timestamp": 1548857100,"in": 1,"out": 3,"data_source_identifier": "192.168.1.123","data_source_parent": "Router.01","account_id": 141},{"timestamp": 1548857100,"in": 141,"out": 1807,"data_source_identifier": "192.168.1.123","data_source_parent": "Router.02","data_type": "Unknown","account_id": 2623}]}' http://server.azotel.com/restapi/API/collectUsageToRadiusDatabase
or
curl -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"operator":"testss","api_username":"YOURAPIUSERNAME","api_password":"YOURAPIPASSWORD","data": [{"timestamp": 1548857100,"in": 1,"out": 3,"data_source_identifier": "192.168.1.123","data_source_parent": "Router.01","data_type":"Unknown","account_id": 141},{"timestamp": 1548857100,"in": 141,"out": 1807,"data_source_identifier": "192.168.1.123","data_source_parent": "Router.02","account_id": 2623}]}' http://server.azotel.com/restapi/collectUsageToRadiusDatabase
REST JSON formatted response example. It returns the OK.
{
"ip" : "78.133.203.161",
"result" : "OK"
}
checkEUPLogin - this is used to check if the given username / password are valid End User Portal login details. If so the corresponding customer ID will be returned.
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
eup_username => TEXT (required) The username to check.
eup_password => TEXT (required) The password to check.
Result - the SOAP reply will either - note if the username / password do not match "ERROR: invalid username/password" will be returned.
"ERROR: Error message"
"OK: nnn" - Where nnn is the customer ID of the matching customer.
Result - the JSON reply will contain the above reply in the "result" attribute. For example:
{
"ip" : "92.235.33.179",
"result" : "OK: 15"
}
hotspotExpiredUsernameAutoRenew - this is used to start Aut Renew procedure on customer hotspot account - that will try to generate auto renew bill and gather a payment for it
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
customerid => INTEGER (required) The customer ID
username => TEXT (required) The username to Auto Renew
Result - the SOAP reply will either - note if the username / password do not match "ERROR: invalid username/password" will be returned.
"ERROR: Error message"
"OK"
Result - the JSON reply will contain the above reply in the "result" attribute. For example:
{
"ip" : "92.235.33.179",
"result" : "OK: 15"
}
NOTE: Nickname rules - there should not be ANY special signs (only "_" sign is allowed), no SPACES are allowed, i.e.: "NewCustomer" or "New_Customer.
generateInvoicePdf - generate PDF from API
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
invoiceid => INTEGER (required) Invoice ID
invoice_custom_field_* => TEXT (optional) - invoice custom field where * is the custom field ID (integer). For the list of available custom field IDs for invoice consult "Custom Fields" page (availability "invoices").
Result - the SOAP reply with either:
"ERROR: Error message"
"OK"
Result - the JSON reply will contain the above reply in the "result" attribute. For example:
{
"ip" : "92.235.33.179",
"result" : "OK"
}
addCustomInvoice - ability to add an Invoice via API
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
invoicedate => DATE (required): Invoice Date, format YYYY-MM-DD
customerid => INTEGER (required): Customer ID
recursive => BOOLEAN (optional): defines whether the invoice takes part in automated invoicing, DEFAULTS to 0 (standalone invoice)
invoice_positions => ARRAY of products (required)
{
productid => INTEGER (required): product ID as exists in SIMPLer
quantity => INTEGER (optional): if not defined DEFAULTS to 1
description => TEXT (optional): if not defined DEFAULTS to product description as defined in SIMPLer
productprice => FLOAT (optional): if not defined DEFAULTS to product price
discount => FLOAT (optional) - defines a discount % on product price - DEFAULTS TO 0
premium => FLOAT (optional) - defines a premium % on product price - DEFAULTS TO 0
tax_mode => TEXT ['','multi','fixed','tax_calculator_id'] (optional) - tax mode - DEFAULTS to product settings
tax_zone => INTEGER (optional) - defines product tax zone id if 'multi' tax_mode - DEFAULTS to product settings
tax_rate => FLOAT (optional) - defines product tax rate - DEFAULTS to product settings
tax_flat_rate => FLOAT (optional) - defines product tax flat tax - DEFAULTS to product settings
non_prorating => BOOLEAN (optional) - specify if product should not be prorated on prorated invoices DEFAULTS TO 0
rounding_method => TEXT ['arithmetic','up','down'] (optional) - rounding method used in calculations - DEFAULTS TO 'arithmetic'
}
send_invoice => BOOLEAN (optional) - DEFAULTS to 0
defer_sand => DATE (optional) - defer SAND date
tax_exemption => BOOLEAN (optional) - define if invoice is to be tax exempted - otherwise it will default to customer account
posteddate => DATE (optional) - Invoice Posted Date, format YYYY-MM-DD, if not defined it will default to Invoice Date
invoiceno => TEXT (optional) - Invoice Number if specific one is to be used. If not defined it will be auto-generated
ordernumber => TEXT (optional) - Order Number to put on the invoice
prorated_invoice => BOOLEAN (optional) - Prorate the invoice to date specified in 'invoicing_date' attribute
invoicing_date => YYYY-MM-DD (optional) - date used for prorating
Result - the SOAP reply with either:
"ERROR: Error message"
"OK: invoiceid"
Result - the JSON reply will contain the above reply in the "result" attribute. For example:
{
"ip" : "127.0.0.1",
"result" : "OK: invoiceid"
}
CURL example for a simple invoice:
curl -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"operator":"operatorname","api_username":"apiuser","api_password":"apipass","customerid":"27964","invoicedate":"2020-02-06","posteddate":"2020-02-06","invoice_positions": [{"productid":"54"},{"productid":"54","quantity":"2"}]}' http://localhost:80/restapi/API/addCustomInvoice
listCustomerBucketData - this function is used to list customer traffic shaping bucket, ip addresses and equipment details
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional) to specify the database in case an operator has multiple databases
customerid => TEXT (optional) only return data for the specified customer
allcustomers => TEXT (optional) if specified results for all customers are returned. Otherwise only customers who have an IP address on their account are returned.
includenobucket => TEXT (optional) if specified results for customers without traffic shaping buckets are included in the results. Otherwise only customers with traffic shaping buckets are returned.
includecustomfields => TEXT (optional) if specified any equipment custom fields will be included in the returned data
Result The JSON reply will contained the returned data in a "result" attribute or an error message. The returned customerBucketData attribute will contain an array containing the following attributes:
name - the customer's name
nickname - the customer's nickname
customerid - the customer's id
status - the customer's status ("current" / "post" / etc)
bucket - Customer traffic shaping bucket details consisting of:
name - Bucket name
downloadrate - download rate in kbit/s
uploadrate - upload rate in kbit/s
ipaddresses - an array of the following for each IP address listed in the customer's IP table
ip - the IP address
mac - the associated MAC address if specified
equipment - an array of the following for each piece of equipment listed in the customer's equipment table
name - equipment nickname
ip - equipment IP address
mac - the associated MAC address if specified
customfields - returned if includecustomfields parameter is set. Contains an array of equipment custom fields containing the following. If there are no custom fields set for a piece of equipment an empty array will be returned.
label - the custom field name
value - the custom field value
{
"ip": "127.0.0.1",
"result": {
"customerBucketData": [
{
"name": "AP Test",
"customerid": "380",
"equipment": [
{
"ip": "10.99.0.0",
"mac": "",
"name": "vxlan55555",
"customfields": [
{
"label": "Deployment",
"value": "Edinburgh"
},
{
"label": "Mask_bits",
"value": "24"
}
]
}
],
"ipaddresses": [
{
"mac": "11:22:33:44:55:66",
"ip": "1.2.3.4"
}
],
"status": "current",
"nickname": "apitest",
"bucket": {
"downloadrate": "2048",
"name": "2M Download / 1M Upload",
"uploadrate": "1024"
}
}
]
}
}
CURL example
curl -H 'Accept: application/json' -H 'Content-Type: application/json' -X POST -d '{"api_username": "username", "api_password": "XXXX", "allcustomers": "1", "includenobucket": "1", "includecustomfields": "1"}' http://127.0.0.1/restapi/listCustomerBucketData
generateEletronicDocument - generate electronic document link or send link to customer or send document to customer
Attributes - any set constructed from below can be used as long as the required set is provided
api_username => TEXT (required)
api_password => TEXT (required)
operator => TEXT (optional): to specify the database in case an operator has multiple database
customerid => INTEGER (required) Customer ID
document_id => INTEGER (required) Electronic document ID
generate_link_only => Boolean 1 : 0 (optional) (default 0) generates the signature link and will return it, useful when customer has no email
senddoconly => Boolean 1 : 0 (optional) (default 0) sends the document only with no signature procedure if you want to save to ftp use sendftpdoc
eupcredgen => Boolean 1 : 0 (optional) (default 0) Generates Customer EUP credentials
sendftpdoc => Boolean 1 : 0 (optional) (default 0) Adds document to ftp server if senddoconly is used.
Result - the SOAP reply with either:
"ERROR: Error message"
"Document Sent Successfully"
Result - the JSON reply will contain the above reply in the "result" attribute. For example:
{
"ip" : "",
"result" : "Document Sent Successfully"
}
generateNumber - ability to generate InvoicingIDs, and other numbers that are in serials, with number series generation function
You will need to execute the above on the respective server and match your settings with what a particular operator is using.
For example:
seriesid: invoicingID
prefix: F
offset: 9010020
length: 7
Curl example
curl -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"operator":"testss","api_username":"vetro","api_password":"YOURPASSWORDHERE","seriesid":"invoicingID","prefix":"F","offset":" 9010020 ","length":"7"}' http://server.azotel.com/restapi/generateNumber