Wiwiz Setup API Manual and Specification

[Modification Logs]
Ver 1.1 : Parameter ‘client_num’ is supported for voucher (Jul 10, 2014)
Ver 1.2 : Interface for changing vouchers is supported. Parameter voucher_id in ‘delete_voucher’ supports multiple values. (Jan 5, 2015)
Ver 1.3 : Interface of AD Injection is supported. (Jun 26, 2015)
Ver 1.4 : Parameters of blocking AD Interface is supported. (Jan 18, 2016)
Ver 1.5 : ‘delete_voucher_by_name’ is added. (Sep 19, 2017)

 
Index
1. Description
2. Requirements
3. General Information
4. Common Specification
5. Specification of Interfaces
  5.1 Inquiry of hotspot basic information
  5.2 Inquiry of hotspot settings data
  5.3 Creation of a hotspot
  5.4 Modification of a hotspot
  5.5 Deletion of a hotspot
  5.6 Inquiry of vouchers
  5.7 Adding a new voucher
  5.8 Changing a new voucher
  5.9 Deleting a voucher
  5.10 Deleting all vouchers
  5.11 Inquiry of Client Control Rules
  5.12 Adding a new Client Control Rule
  5.13 Changing a Client Control Rule
  5.14 Deleting a Client Control Rule
  5.15 Getting AD Injection Status
  5.16 Changing AD Injection Status
  5.17 Getting All Injecting AD Data
  5.18 Adding a new Injecting AD
  5.19 Changing a new Injecting AD
  5.20 Deleting a new Injecting AD
6. Remarks

1. Description
Wiwiz Setup API is an Application Programming Interface based on Web technology, which is provided by Wiwiz HotSpot Builder. You can use this API to fetch / create / modify hotspot settings data, vouchers, and client control rules.

2. Requirements
1. A Wiwiz Professional Account is required.
2. Get your User Key of your Wiwiz account.
You can get your User Key from “Menu” -> “Upgrade Options” -> “User Key” in Wiwiz Web Panel.

3. General Information
When calling this API, an HTTP request is sent to the given URL with the specified parameters(GET or POST). The inquiry result is returned in XML format with the HTTP response.

4. Common Specification
1. URL request to:
All request must be sent to http://cp.wiwiz.com/as/s/setupapi/
All HTTP query operation must be invoked with HTTP POST method.

2. Common Request Parameters:
The following HTTP parameters must be included in ANY request:

Parameter Name Required/Optional Value / Description
userkey Required Your own User Key
sign Required MD5 hash of your Wiwiz account name – MD5({username})



5. Specification of Interfaces
5.1. Inquiry of hotspot basic information
Request Parameters:

Parameter Name Required/Optional Value / Description
command Required “list_hotspot”

Sample and Explanation of Response:

<?xml version="1.0" encoding="UTF-8"?>
<result>
<status>
        <!-- code: result code
            OK stands for success; a string starts with ERR means something wrong (*Note 1) -->
    <code>OK</code>
    <!-- message: description of result code (for debugging) -->
    <message>Operation Completed</message>
</status>
<data> <!-- shows only if 'code' is OK -->
    <record> <!-- each 'record' tag stands for a data record -->
        <hotspot_id>1374085CF3C</hotspot_id> <!-- HotSpot ID -->
        <name>XXXXXX</name> <!-- HotSpot Name -->
        <running_status>1</running_status> <!-- Authentication Status. 1: ON, 0: OFF -->
    </record>
</data>
</result>

5.2. Inquiry of hotspot settings data
Request Parameters:

Parameter Name Required/Optional Value / Description
command Required “hotspot_settings”
hotspot_id Required HotSpot ID of a hotspot

Sample and Explanation of Response:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <status>
        <!-- code: result code
            OK stands for success; a string starts with ERR means something wrong (*Note 1) -->
        <code>OK</code>
        <!-- message: description of result code (for debugging) -->
        <message>Query Completed</message>
    </status>
<data> <!-- shows only if 'code' is OK -->
        <name>XXXXXX</name> <!-- HotSpot Name -->
        <running_status>1</running_status> <!--  Authentication Status. 1: ON, 0: OFF  -->
        <location>XXXX</location> <!-- Location / Address -->
        <timezone>Etc/GMT-8</timezone> <!-- Time Zone -->
        <longitude></longitude> <!-- Longitude -->
        <latitude></latitude> <!-- Latitude -->
        <owner_name>XXXX</owner_name> <!-- Administrator's Name -->
        <owner_contact>XXXX</owner_contact> <!-- Administrator's Contact -->
        <auth_agree>0</auth_agree> <!-- Auth Method - Agreement. 1: enabled, 0: disabled -->
        <auth_voucher>0</auth_voucher> <!-- Auth Method - Voucher. 1: enabled, 0: disabled -->
        <auth_login>1</auth_login> <!-- Auth Method - Login. 1: enabled, 0: disabled -->
        <logintype>0</logintype> <!-- 0: Registered users of Wiwiz.com, 1: Private accounts -->
        <single_login>0</single_login> <!-- Disables simultaneously authentication. 1:ON, 0:OFF-->
        <auth_api>0</auth_api> <!-- Auth Method - Wiwiz Auth API. 1: enabled, 0: disabled -->
        <authapi_url></authapi_url> <!-- Auth URL (for Wiwiz Auth API) -->
        <auth_sms>0</auth_sms> <!-- Auth Method &#8211; Mobile Verfication. 1: enabled, 0: disabled -->
        <phone_country></phone_country> <!-- Region (Mobile Verfication) -->
        <phone_repeat_interval>1</phone_repeat_interval> <!-- Mini Interval (Mobile Verfication) -->
        <phone_valid_interval>30</phone_valid_interval> <!-- Expiration (Mobile Verfication) -->
        <phone_resend>0</phone_resend> <!-- Allows resend before expired (Mobile Verfication). 1: enabled, 0: disabled -->
        <phone_maxtimes>5</phone_maxtimes> <!-- Daily limit(per phone) -->
        <phone_onlyonce>0</phone_onlyonce> <!-- Invalidates used codes. 1:ON, 0:OFF -->
        <phone_blacklst></phone_blacklst> <!-- Mobile Number Blacklist. Seprated by ';' -->
        <phone_magic_code></phone_magic_code> <!-- Magic Verification Codes. Seprated by ';' -->
        <timeout>10</timeout> <!-- Time Out (minutes) -->
        <isfree>0</isfree> <!-- Free of Charge or Not. 1: Not Free, 0: Free  -->
        <fee_min></fee_min> <!-- Fee (per minute)  -->
        <fee_quarter></fee_quarter> <!-- Fee (per 15 mins) -->
        <fee_halfhr></fee_halfhr> <!-- Fee (per 30 mins) -->
        <fee_hr></fee_hr> <!-- Fee (per hour) -->
        <fee_day></fee_day> <!-- Fee (per day) -->
        <fee_week></fee_week> <!-- Fee (per week) -->
        <fee_month></fee_month> <!-- Fee (per month) -->
        <fee_year></fee_year> <!-- Fee (per year) -->
        <currency></currency> <!-- Currency  -->
        <trial_time>0</trial_time> <!-- Trial Time (minutes)  -->
        <trymac_chk>0</trymac_chk> <!-- Blocks trial of same MAC. 1: enabled, 0: disabled -->
        <whiteaddr></whiteaddr> <!-- White Domain Name/IP. Seprated by ';' -->
        <blackaddr></blackaddr> <!-- Black Domain Name/IP. Seprated by ';' -->
        <incoming_max></incoming_max> <!-- Imcoming Traffic Limit for Each Connection -->
        <outgoing_max></outgoing_max> <!-- Outgoing Traffic Limit for Each Connection -->
        <authpage_type>1</authpage_type> <!-- Authentication Page Type. 0: Customized URL; 1~99: Default Page; 9999: Customized HTML -->
        <authpage_url></authpage_url> <!-- URL of Customized Authentication Page -->
        <authpage_html></authpage_html> <!-- HTML of Customized Authentication Page -->
        <postauthpage_type></postauthpage_type> <!-- Post-authentication Page Type. 0: URL Redirection; 1: Default; 9999: Customized HTML  -->
        <postauthpage_url></postauthpage_url> <!-- URL of Post-authentication Page -->
        <postauthpage_html></postauthpage_html> <!-- HTML of Post-authentication Page -->
    </data>
</result>

5.3 Creation of a hotspot
Request Parameters:

Parameter Name Required/Optional Default Value Max Length(Bytes) Value / Description
command Required “create_hotspot”
name Required 255 HotSpot Name
running_status Optional 1 1 Auth Status. 1: ON, 0: OFF
location Optional 255 Location / Address
timezone Optional 255 Time Zone. *Note 2
longitude Optional 15 Longitude
latitude Optional 15 Latitude
owner_name Optional 255 Administrator’s Name
owner_contact Optional 255 Administrator’s Contact
auth_agree Optional 0 1 Auth Method – Agreement. 1: enabled, 0: disabled
auth_voucher Optional 0 1 Auth Method – Voucher. 1: enabled, 0: disabled
auth_login Optional 0 1 Auth Method – Login. 1: enabled, 0: disabled
logintype Optional 0 1 0: Registered users of Wiwiz.com, 1: Private accounts
single_login Optional 0 1 Disables simultaneously authentication. 1:ON, 0:OFF
auth_api Optional 0 1 Auth Method – Wiwiz Auth API. 1: enabled, 0: disabled
authapi_url Optional 255 Auth URL (for Wiwiz Auth API)
auth_sms Optional 0 1 Auth Method – Mobile Verfication. 1: enabled, 0: disabled
phone_country Optional 20 Region (Mobile Verfication) *Note 3
phone_repeat_interval Optional 1 11 Mini Interval (Mobile Verfication)
phone_valid_interval Optional 60 11 Expiration (Mobile Verfication)
phone_resend Optional 0 1 Allows resend before expired (Mobile Verfication). 1: enabled, 0: disabled
phone_maxtimes Optional 5 11 Daily limit(per phone)
phone_onlyonce Optional 0 1 Invalidates used codes. 1:ON, 0:OFF
phone_blacklst Optional 65535 Mobile Number Blacklist. Seprated by ‘;’
phone_magic_code Optional 65535 Magic Verification Codes. Seprated by ‘;’
timeout Optional 10 11 Time Out (minutes)
isfree Optional 0 1 Free of Charge or Not. 1: Not Free, 0: Free
fee_min Optional 12 Fee (per minute)
fee_quarter Optional 12 Fee (per 15 mins)
fee_halfhr Optional 12 Fee (per 30 mins)
fee_hr Optional 12 Fee (per hour)
fee_day Optional 12 Fee (per day)
fee_week Optional 12 Fee (per week)
fee_month Optional 12 Fee (per month)
fee_year Optional 12 Fee (per year)
currency Optional 20 Currency. *Note 4
trial_time Optional 11 Trial Time (minutes). Digits only.
trymac_chk Optional 0 1 Blocks trial of same MAC. 1: enabled, 0: disabled
whiteaddr Optional 65535 White Domain Name/IP. Seprated by ‘;’
blackaddr Optional 65535 Black Domain Name/IP. Seprated by ‘;’
incoming_max Optional 255 Imcoming Traffic Limit for Each Connection
outgoing_max Optional 255 Outgoing Traffic Limit for Each Connection
authpage_type Optional 1 11 Authentication Page Type. 0: Customized URL; 1~99: Default Page; 9999: Customized HTML
authpage_url Optional 255 URL of Customized Authentication Page
authpage_html Optional 65535 HTML of Customized Authentication Page
postauthpage_type Optional 1 11 Post-auth Page Type.
0: URL Redirection; 1: Default; 9999: Customized HTML
postauthpage_url Optional 255 URL of Post-authentication Page
postauthpage_html Optional 65535 HTML of Post-authentication Page

Sample and Explanation of Response:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <status>
        <!-- code: result code
            OK stands for success; a string starts with ERR means something wrong (*Note 1) -->
        <code>OK</code>
        <!-- message: description of result code (for debugging) -->
        <message>HotSpot Created</message>
    </status>
<data> <!-- shows only if 'code' is OK -->
        <!-- HotSpot ID created -->
        <hotspot_id>14006BD8DC6</hotspot_id>
    </data>
</result>

5.4 Modification of a hotspot
Request Parameters:

Parameter Name Required/Optional Default Value Max Length(Bytes) Value / Description
command Required “change_hotspot”
hotspot_id Required HotSpot ID

Sample and Explanation of Response:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <status>
        <!-- code: result code
            OK stands for success; a string starts with ERR means something wrong (*Note 1) -->
        <code>OK</code>
        <!-- message: description of result code (for debugging) -->
        <message>HotSpot Updated</message>
    </status>
</result>

5.5 Deletion of a hotspot
Request Parameters:

Parameter Name Required/Optional Value / Description
command Required “delete_hotspot”
hotspot_id Required HotSpot ID

Sample and Explanation of Response:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <status>
        <!-- code: result code
            OK stands for success; a string starts with ERR means something wrong (*Note 1) -->
        <code>OK</code>
        <!-- message: description of result code (for debugging) -->
        <message>HotSpot Deleted</message>
    </status>
</result>

5.6 Inquiry of vouchers
Request Parameters:

Parameter Name Required/Optional Value / Description
command Required “list_voucher”
hotspot_id Required HotSpot ID

Sample and Explanation of Response:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <status>
        <!-- code: result code
            OK stands for success; a string starts with ERR means something wrong (*Note 1) -->
        <code>OK</code>
        <!-- message: description of result code (for debugging) -->
        <message>Operation Completed</message>
    </status>
    <data> <!-- shows only if 'code' is OK -->
        <record> <!-- each 'record' tag stands for a data record -->
            <voucher_id>9</voucher_id> <!-- Voucher ID -->
            <voucher>123</voucher> <!-- Voucher. Separated by ";" -->
            <onceonly>0</onceonly> <!-- 1: once only, 0: no limit, 2: once only and used -->
            <minute>30</minute> <!-- Duration (minutes) -->
            <end_time></end_time> <!-- End Time -->
            <expiretime></expiretime> <!-- Expiration Time -->
            <client_num>0</client_num> <!-- Limit of Simultaneously Connection. 0 means no limit. -->
        </record>
    </data>
</result>

5.7 Adding a new voucher
Request Parameters:

Parameter Name Required/Optional Default Value Max Length(Bytes) Value / Description
command Required “add_voucher”
hotspot_id Required HotSpot ID
voucher Required Voucher Codes
Separated by “;” if more than one code
Up to 1000 vouchers allowed
Each Code’s max length is 30 bytes, Alphanumeric only.
onceonly Optional 0 1 1: once only, 0: no limit
minute Optional 11 Duration (minutes)
end_time Optional End Time. Format: “2012-03-05 09:02:00″
expiretime Optional Expiration Time. Format: “2012-03-05 09:02:00″
client_num Optional 0 Limit of Simultaneously Connection. 0 means no limit.

*Note: Only one of minute and end_time can be set, they cannot both be set at the same time.

Sample and Explanation of Response:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <status>
        <!-- code: result code
            OK stands for success; a string starts with ERR means something wrong (*Note 1) -->
        <code>OK</code>
        <!-- message: description of result code (for debugging) -->
        <message>Voucher Created</message>
    </status>
</result>

5.8 Changing a new voucher
Request Parameters:

Parameter Name Required/Optional Default Value Max Length(Bytes) Value / Description
command Required “change_voucher”
hotspot_id Required HotSpot ID
voucher Required Voucher Codes
Separated by “;” if more than one code
Each Code’s max length is 30 bytes, Alphanumeric only.
onceonly Optional 0 1 1: once only, 0: no limit
minute Optional 11 Duration (minutes)
end_time Optional End Time. Format: “2012-03-05 09:02:00″
expiretime Optional Expiration Time. Format: “2012-03-05 09:02:00″
client_num Optional 0 Limit of Simultaneously Connection. 0 means no limit.

*Note: Only one of minute and end_time can be set, they cannot both be set at the same time.

Sample and Explanation of Response:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <status>
        <!-- code: result code
            OK stands for success; a string starts with ERR means something wrong (*Note 1) -->
        <code>OK</code>
        <!-- message: description of result code (for debugging) -->
        <message>Voucher Changed</message>
    </status>
</result>

5.9 Deleting a voucher
Request Parameters:

Parameter Name Required/Optional Value / Description
command Required “delete_voucher”
voucher_id Required Voucher ID. Separated by “;” if more than one ID

Sample and Explanation of Response:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <status>
        <!-- code: result code
            OK stands for success; a string starts with ERR means something wrong (*Note 1) -->
        <code>OK</code>
        <!-- message: description of result code (for debugging) -->
        <message>Voucher Deleted</message>
    </status>
</result>

Alternative method:
Request Parameters:

Parameter Name Required/Optional Value / Description
command Required “delete_voucher_by_name”
hotspot_id Required HotSpot ID
voucher Required Voucher Codes. Separated by “;” if more than one ID

Sample and Explanation of Response:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <status>
        <!-- code: result code
            OK stands for success; a string starts with ERR means something wrong (*Note 1) -->
        <code>OK</code>
        <!-- message: description of result code (for debugging) -->
        <message>Voucher Deleted</message>
    </status>
</result>

5.10 Deleting all vouchers
Request Parameters:

Parameter Name Required/Optional Value / Description
command Required “delete_all_vouchers”
hotspot_id Required HotSpot ID

Sample and Explanation of Response:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <status>
        <!-- code: result code
            OK stands for success; a string starts with ERR means something wrong (*Note 1) -->
        <code>OK</code>
        <!-- message: description of result code (for debugging) -->
        <message>All Vouchers Deleted</message>
    </status>
</result>

5.11 Inquiry of Client Control Rules
Request Parameters:

Parameter Name Required/Optional Value / Description
command Required “list_mac”
hotspot_id Required HotSpot ID

Sample and Explanation of Response:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <status>
        <!-- code: result code
            OK stands for success; a string starts with ERR means something wrong (*Note 1) -->
        <code>OK</code>
        <!-- message: description of result code (for debugging) -->
        <message>Operation Completed</message>
    </status>
    <data> <!-- shows only if 'code' is OK -->
        <record> <!-- each 'record' tag stands for a data record -->
            <mac_id>224</mac_id> <!-- Rule ID -->
            <mac>00:50:56:C0:00:08</mac> <!-- MAC Address -->
            <action>1</action> <!-- Action/Rule. 0: Block, 1: Allow, 2: Auth-free -->
            <memo>Hello, world!</memo> <!-- Description -->
        </record>
    </data>
</result>

5.12 Adding a new Client Control Rule
Request Parameters:

Parameter Name Required/Optional Default Value Max Length(Bytes) Value / Description
command Required “add_mac”
hotspot_id Required HotSpot ID
mac Required 30 MAC Address
action Required 1 Action/Rule.
0: Block, 1: Allow, 2: Auth-free
memo Optional 255 Description

Sample and Explanation of Response:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <status>
        <!-- code: result code
            OK stands for success; a string starts with ERR means something wrong (*Note 1) -->
        <code>OK</code>
        <!-- message: description of result code (for debugging) -->
        <message>MAC Added</message>
    </status>
</result>

5.13 Changing a Client Control Rule
Request Parameters:

Parameter Name Required/Optional Default Value Max Length(Bytes) Value / Description
command Required “change_mac”
hotspot_id Required HotSpot ID
mac_id Required Rule ID
mac Required 30 MAC Address
action Required 1 Action/Rule.
0: Block, 1: Allow, 2: Auth-free
memo Optional 255 Description

Sample and Explanation of Response:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <status>
        <!-- code: result code
            OK stands for success; a string starts with ERR means something wrong (*Note 1) -->
        <code>OK</code>
        <!-- message: description of result code (for debugging) -->
        <message>MAC Changed</message>
    </status>
</result>

5.14 Deleting a Client Control Rule
Request Parameters:

Parameter Name Required/Optional Value / Description
command Required “delete_mac”
hotspot_id Required HotSpot ID
mac_id Required Rule ID

Sample and Explanation of Response:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <status>
        <!-- code: result code
            OK stands for success; a string starts with ERR means something wrong (*Note 1) -->
        <code>OK</code>
        <!-- message: description of result code (for debugging) -->
        <message>MAC Deleted</message>
    </status>
</result>

5.15 Getting AD Injection Status
Request Parameters:

Parameter Name Required/Optional Value / Description
command Required “get_inj_ad_status”
hotspot_id Required HotSpot ID

Sample and Explanation of Response:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <status>
        <!-- code: result code
            OK stands for success; a string starts with ERR means something wrong (*Note 1) -->
        <code>OK</code>
        <!-- message: description of result code (for debugging) -->
        <message>Query Completed</message>
</status>
    <data> <!-- shows only if 'code' is OK -->
        <inj_ad_flag>1</inj_ad_flag> <!--  Flag of AD Injection Enabling. 1: enable, 0: disable. Note: takes about 10 minutes to take effect. -->
        <interval>10</interval> <!-- Interval of Re-show after closing AD (minutes) -->
    </data>
</result>

5.16 Changing AD Injection Status
Request Parameters:

Parameter Name Required/Optional Value / Description
command Required “change_inj_ad_status”
hotspot_id Required HotSpot ID
inj_ad_flag Optional Flag of AD Injection Enabling. 1: enable, 0: disable.
Takes about 10 minutes to take effect.
interval Optional Interval of Re-show after closing AD (minutes)

Sample and Explanation of Response:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <status>
        <!-- code: result code
            OK stands for success; a string starts with ERR means something wrong (*Note 1) -->
        <code>OK</code>
        <!-- message: description of result code (for debugging) -->
        <message>AD Status Changed</message>
</status>
</result>

5.17 Getting All Injecting AD Data
Request Parameters:

Parameter Name Required/Optional Value / Description
command Required “list_inj_ad”
hotspot_id Required HotSpot ID

Sample and Explanation of Response:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <status>
        <!-- code: result code
            OK stands for success; a string starts with ERR means something wrong (*Note 1) -->
        <code>OK</code>
        <!-- message: description of result code (for debugging) -->
        <message>Operation Completed</message>
    </status>
  <data> <!-- shows only if 'code' is OK -->
      <record> <!-- each 'record' tag stands for a data record -->
          <ad_id>3568</ad_id> <!-- AD's ID -->
          <position>0</position> <!-- Position. 0:right-bottom, 1:center-bottom, 2:left-bottom, 3:right-top, 4:center-top, 5:left-top, 6:center -->
          <img_url>http://www.abc.com/img/hello.jpg</img_url> <!-- URL of AD Image -->
          <width></width> <!-- Width of AD Image -->
          <height></height> <!-- Height of AD Image -->
          <url_txt>baidu.com wiwiz.com</url_txt> <!-- Key words of URL -->
          <title_txt>iPhone iPad PC</title_txt> <!-- Key words of page title -->
          <ua_txt>Android iPhone Mobile</ua_txt> <!-- Key words of User Agent -->
          <b_url_txt>google.com</b_url_txt> <!-- Key words of URL for blocking AD -->
          <b_title_txt>Fire</b_title_txt> <!-- Key words of page title for blocking AD -->
          <b_ua_txt>Windows</b_ua_txt> <!-- Key words of User Agent for blocking AD -->          
          <click_url>http://www.abc.com</click_url> <!-- URL on clicking -->
          <remarks>my AD 1</remarks> <!-- Remarks -->
          <valid>1</valid> <!-- Enabling Flag. 1: enable, 0:disable -->
          <close_on_click>1</close_on_click> <!-- Flag of closing AD on clicking. 1: enable, 0:disable  -->
      </record>
  </data>
</result>

5.18 Adding a new Injecting AD
Request Parameters:

Parameter Name Required/Optional Default Value Max Length(Bytes) Value / Description
command Required “add_inj_ad”
hotspot_id Required HotSpot ID
img_url Required 255 URL of AD Image
width Optional Width of AD Image. Number only.
height Optional Height of AD Image. Number only.
position Required 0 1 Position.
1:center-bottom, 2:left-bottom, 3:right-top, 4:center-top, 5:left-top, 6:center
close_on_click Required 1 1 Flag of closing AD on clicking.
1: enable, 0:disable
click_url Optional 255 URL on clicking
url_txt Optional 255 Key words of URL. Separate with a SPACE.
title_txt Optional 255 Key words of page title. Separate with a SPACE.
ua_txt Optional 255 Key words of User Agent. Separate with a SPACE.
b_url_txt Optional 255 Key words of URL for blocking AD. Separate with a SPACE.
b_title_txt Optional 255 Key words of page title for blocking AD. Separate with a SPACE.
b_ua_txt Optional 255 Key words of User Agent for blocking AD. Separate with a SPACE.
valid Required 1 1 Enabling Flag. 1: enable, 0:disable
remarks Optional 255 Remarks

Sample and Explanation of Response:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <status>
        <!-- code: result code
            OK stands for success; a string starts with ERR means something wrong (*Note 1) -->
        <code>OK</code>
        <!-- message: description of result code (for debugging) -->
        <message>AD Added</message>
</status>
</result>

5.19 Changing a new Injecting AD
Request Parameters:

Parameter Name Required/Optional Default Value Max Length(Bytes) Value / Description
command Required “add_inj_ad”
hotspot_id Required HotSpot ID
ad_id Required AD’s ID
img_url Required 255 URL of AD Image
width Optional Width of AD Image. Number only.
height Optional Height of AD Image. Number only.
position Required 0 1 Position.
1:center-bottom, 2:left-bottom, 3:right-top, 4:center-top, 5:left-top, 6:center
close_on_click Required 1 1 Flag of closing AD on clicking.
1: enable, 0:disable
click_url Optional 255 URL on clicking
url_txt Optional 255 Key words of URL. Separate with a SPACE.
title_txt Optional 255 Key words of page title. Separate with a SPACE.
ua_txt Optional 255 Key words of User Agent. Separate with a SPACE.
b_url_txt Optional 255 Key words of URL for blocking AD. Separate with a SPACE.
b_title_txt Optional 255 Key words of page title for blocking AD. Separate with a SPACE.
b_ua_txt Optional 255 Key words of User Agent for blocking AD. Separate with a SPACE.
valid Required 1 1 Enabling Flag. 1: enable, 0:disable
remarks Optional 255 Remarks

Sample and Explanation of Response:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <status>
        <!-- code: result code
            OK stands for success; a string starts with ERR means something wrong (*Note 1) -->
        <code>OK</code>
        <!-- message: description of result code (for debugging) -->
        <message>AD Changed</message>
</status>
</result>

5.20 Deleting a new Injecting AD
请求参数说明:

Parameter Name Required/Optional Value / Description
command Required “delete_inj_ad”
hotspot_id Required HotSpot ID
ad_id Required AD’s ID

Sample and Explanation of Response:

<?xml version="1.0" encoding="UTF-8"?>
<result>
    <status>
        <!-- code: result code
            OK stands for success; a string starts with ERR means something wrong (*Note 1) -->
        <code>OK</code>
        <!-- message: description of result code (for debugging) -->
        <message>AD Deleted</message>
</status>
</result>



6. Remarks
Note 1:Result Codes

OK Success
ERR50000 Please Upgrade to Wiwiz Professional Edition
ERR50001 Invalid User Key or Sign
ERR50002 Invalid Parameter Value
ERR50003 Parameter Value Cannot Be Empty
ERR50004 At Least One Fee Rate Must Be Set
ERR50005 If ‘isfree’ is 1, ‘auth_login’ must be 1 and ‘logintype’ must be 0
ERR50006 ‘isfree’ must be 0 if ‘auth_login’ is 1 and ‘logintype’ is 1
ERR50010 Invalid HotSpot ID
ERR50011 Exceeds Hotspot Number Limit
ERR50013 Exceeds Voucher Number Limit (10000)
ERR50014 Duplicated MAC Address

Note 2:Time Zone

Etc/GMT+0
Etc/GMT+1
Etc/GMT+10
Etc/GMT+11
Etc/GMT+12
Etc/GMT+2
Etc/GMT+3
Etc/GMT+4
Etc/GMT+5
Etc/GMT+6
Etc/GMT+7
Etc/GMT+8
Etc/GMT+9
Etc/GMT-0
Etc/GMT-1
Etc/GMT-10
Etc/GMT-11
Etc/GMT-12
Etc/GMT-13
Etc/GMT-14
Etc/GMT-2
Etc/GMT-3
Etc/GMT-4
Etc/GMT-5
Etc/GMT-6
Etc/GMT-7
Etc/GMT-8
Etc/GMT-9
*Be aware that time zone is in POSIX-style. For example, Etc/GMT-8 stands for GMT+8:00.

Note 3: Countries and Regions (Code: Meaning)

AR:Argentina
AT:Austria
AU:Australia
BE:Belgium
BR:Brazil
CA:Canada
CH:Switzerland
CN:China
DE:Germany
DK:Denmark
ES:Spain
FR:France
GB:United Kingdom
HK:Hong Kong
ID:Indonesia
IE:Ireland
IL:Israel
IN:India
IT:Italy
JO:Jordan
JP:Japan
KR:Korea
KY:Cayman Islands
LU:Luxembourg
MO:Macao
MX:Mexico
MY:Malaysia
NL:Netherlands
NO:Norway
NZ:New Zealand
PH:Philippines
PK:Pakistan
PL:Poland
SE:Sweden
SG:Singapore
TH:Thailand
TR:Turkey
TW:Taiwan
US:United States
ZA:South Africa

Note 4: Currency
USD
EUR
JPY
HKD
CNY

Comments are closed.