Static Public Member Functions | |
| static | createSubscriptionnode ($auth, $group) |
| static | readSubscriptionnode ($auth) |
| static | updateSubscriptionnode ($auth, $group) |
| static | deleteSubscriptionnode ($auth) |
| static | restoreSubscriptionnode ($auth) |
| static | getActiveSubscribers ($auth) |
| static | getAllSubscribers ($auth) |
| static | getDivisionGroups ($auth) |
| static createSubscriptionnode | ( | $ | auth, |
| $ | group | ||
| ) | [static] |
Description:
| WSAuthentication | $auth | Authentication Object
username - String[40] (Required) - Username for company credentials
password - String[40] (Required) - Password for company credentials
api_key - String[40] (Required) - Credentials for company
code - Integer (Required) - Default shortcode or longcode for keyword
keyword - String[40] (Required) - Default keyword for the division or company that the group
(subscription node) will be under
|
| WSSubscriptionnode | $group | Group Object
ispublic - Integer (Optional) - 1 = public, 0 = not public, this will determine whether or not
it will show up on the subscription widget
name - String (Required) - Name of the new group
stackOrder - Integer (Optional) - This determines the order in the orgainization tree
|
result - True/False, This will indicate whether the request was successful or not. error_code - If there was an error in the request it will return an error number here. ispublic - 1 = public, 0 = not public keyword - New keyword for the group (subscriptionNode) name - Name of the group (subscriptionNode) stackOrder - Order that it will show up in the organization tree
<?php $wsdl = 'SSL//HOST_URL/webservices/?version=2.0.0&wsdl'; $soap = new SoapClient($wsdl); //create an authentication object $auth = array(); $auth['username'] = 'api_username'; $auth['password'] = 'api_password'; $auth['api_key'] = 'xxxxxxxxxxxxxx'; $auth['keyword'] = 'keyword'; $auth['code'] = 12345; //create a subscription group object $sg = array(); $sg["name"] = "Sample Subscription Group"; $sg["ispublic"] = "1"; $sg["stackOrder"] = "1"; //the following fields are optional to set but required to be passed in the object $sg["default_code"] = 12345; $sg["keywords"] = ""; $sg["divisions"] = ""; $sg["subscriptionnodes"] = ""; $results = $soap->createSubscriptionnode($auth, $sg); print_r($results); if ($results->result == 0 || $results->error > 0) { //error processing throw new Exception($results->message); } else { //after success processing }
SOAP Request
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:urn="urn:webservices2_0_0">
<soapenv:Header/>
<soapenv:Body>
<urn:createSubscriptionnode soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<auth xsi:type="urn:WSAuthentication">
<username xsi:type="xsd:string">api_username</username>
<password xsi:type="xsd:string">api_password</password>
<api_key xsi:type="xsd:string">xxxxxxxxxxxxxx</api_key>
<code xsi:type="xsd:string">12345</code>
<keyword xsi:type="xsd:string">division_keyword</keyword>
</auth>
<group xsi:type="urn:WSSubscriptionnode">
<ispublic xsi:type="xsd:integer">1</ispublic>
<name xsi:type="xsd:string">Sample Group</name>
<stackOrder xsi:type="xsd:integer">0</stackOrder>
</group>
</urn:createSubscriptionnode>
</soapenv:Body>
</soapenv:Envelope>
SOAP Response
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="urn:webservices2_0_0"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:createSubscriptionnodeResponse>
<createSubscriptionnodeReturn xsi:type="ns1:WSSubscriptionnodeResponse">
<message xsi:type="xsd:string">Successfully created subscription group.</message>
<response xsi:type="ns1:WSSubscriptionnode">
<ispublic xsi:type="xsd:int">1</ispublic>
<keyword xsi:type="xsd:string">group keyword</keyword>
<name xsi:type="xsd:string">Sample Group</name>
<stackOrder xsi:type="xsd:int">0</stackOrder>
</response>
<result xsi:type="xsd:boolean">true</result>
</createSubscriptionnodeReturn>
</ns1:createSubscriptionnodeResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
//create web service authentication WSAuthentication auth = new WSAuthentication(); auth.username = "api_username"; auth.password = "api_password"; auth.api_key = "xxxxxxxxxxxxxx"; auth.keyword = "keyword_of_parent_division"; auth.code = "12345"; //create subscription group object WSSubscriptionnode sub = new WSSubscriptionnode(); sub.name = "Test Group"; sub.ispublic = 1; sub.stackOrder = 0; //create task bind WS_SubscriptionnodeBinding bind = new WS_SubscriptionnodeBinding(); bind.Url = "SSL//HOST_URL/webservices/subscriptionnode/2.0.0"; //create result object WSSubscriptionnodeResponse ws_result = new WSSubscriptionnodeResponse(); //call bind event ws_result = bind.createSubscriptionnode(auth, sub); //check to see if there was an error if (!ws_result.result) { //handle error label.Text = ws_result.message; } else { //handle successful response label.Text = ws_result.message; WSSubscriptionnode s = ws_result.response; }
Request SSL//HOST_URL/httppost/nvp?version=2.0.0&method_name=subscriptionnode.createSubscriptionnode&username={username}&password={password}&api_key={api_key}&code=12345&keyword={Division Keyword}&name=New Group Response <?xml version="1.0" encoding="utf-8"?> <createSubscriptionnode> <message>Successfully created subscription group.</message> <error_code></error_code> <result>true</result> <response> <name>New Group</name> <ispublic>1</ispublic> <keywords> <item> <word>31322</word> <note></note> <response></response> <subscribed_response></subscribed_response> <callback_url></callback_url> <auto_subscribe>1</auto_subscribe> <keyword_type>1</keyword_type> <app_identifier></app_identifier> <active>1</active> <fields></fields> </item> </keywords> <stackOrder></stackOrder> <default_code></default_code> </response> </createSubscriptionnode>
| static deleteSubscriptionnode | ( | $ | auth | ) | [static] |
Description:
| WSAuthentication | $auth | Authentication Object username - String[40] (Required) - Username for company credentials password - String[40] (Required) - Password for company credentials api_key - String[40] (Required) - Credentials for company code - Integer (Required) - Default shortcode or longcode for keyword keyword - String[40] (Required) - Default keyword for the group to be deleted |
result - True/False, This will indicate whether the request was successful or not. error_code - If there was an error in the request it will return an error number here. message - Message stating whether the deletion was successful or not
<?php $wsdl = 'SSL//HOST_URL/webservices/?version=2.0.0&wsdl'; $soap = new SoapClient($wsdl); //create an authentication object $auth = array(); $auth['username'] = 'api_username'; $auth['password'] = 'api_password'; $auth['api_key'] = 'xxxxxxxxxxxxxx'; $auth['keyword'] = 'group_keyword'; $auth['code'] = 12345; $results = $soap->deleteSubscriptionnode($auth); print_r($results); if ($results->result == 0 || $results->error > 0) { //error processing throw new Exception($results->message); } else { //after success processing }
SOAP Request
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:urn="urn:webservices2_0_0">
<soapenv:Header/>
<soapenv:Body>
<urn:deleteSubscriptionnode soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<auth xsi:type="urn:WSAuthentication">
<username xsi:type="xsd:string">api_username</username>
<password xsi:type="xsd:string">api_password</password>
<api_key xsi:type="xsd:string">xxxxxxxxxxxxxx</api_key>
<code xsi:type="xsd:string">12345</code>
<keyword xsi:type="xsd:string">group_keyword</keyword>
</auth>
</urn:deleteSubscriptionnode>
</soapenv:Body>
</soapenv:Envelope>
SOAP Response
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="urn:webservices2_0_0"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:deleteSubscriptionnodeResponse>
<deleteSubscriptionnodeReturn xsi:type="ns1:WSSubscriptionnodeResponse">
<message xsi:type="xsd:string">Successfully deleted subscription group.</message>
<response xsi:nil="true" xsi:type="ns1:WSSubscriptionnode"/>
<result xsi:type="xsd:boolean">true</result>
</deleteSubscriptionnodeReturn>
</ns1:deleteSubscriptionnodeResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
//create web service authentication WSAuthentication auth = new WSAuthentication(); auth.username = "api_username"; auth.password = "api_password"; auth.api_key = "xxxxxxxxxxxxxx"; auth.keyword = "keyword_of_group_to_delete"; auth.code = "12345"; //create task bind WS_SubscriptionnodeBinding bind = new WS_SubscriptionnodeBinding(); bind.Url = "SSL//HOST_URL/webservices/subscriptionnode/2.0.0"; //create result object WSSubscriptionnodeResponse ws_result = new WSSubscriptionnodeResponse(); //call bind event ws_result = bind.deleteSubscriptionnode(auth); //check to see if there was an error if (!ws_result.result) { //handle error label.Text = ws_result.message; } else { //handle successful response label.Text = ws_result.message; }
Request SSL//HOST_URL/httppost/nvp?version=2.0.0&method_name=subscriptionnode.deleteSubscriptionnode&username={username}&password={password}&api_key={api_key}&code=12345&keyword={Group keyword to be deleted} Response <?xml version="1.0" encoding="utf-8"?> <deleteSubscriptionnode> <message>Successfully deleted subscription group.</message> <error_code></error_code> <result>true</result> <response></response> </deleteSubscriptionnode>
| static getActiveSubscribers | ( | $ | auth | ) | [static] |
Description:
| WSAuthentication | $auth | Authentication Object username - String[40] (Required) - Username for company credentials password - String[40] (Required) - Password for company credentials api_key - String[40] (Required) - Credentials for company code - Integer (Required) - Default shortcode or longcode for keyword keyword - String[40] (Required) - Default keyword for the group to be read |
result - True/False, This will indicate whether the request was successful or not.
error_code - If there was an error in the request it will return an error number here.
email - 0 = Subscriber will not receive messages via email, 1 = Subscriber will receive messages via email
landline - 0 = Subscriber will not receive messages via landline, 1 = Subscriber will receive messages via landline
mobiletxt - 0 = Subscriber will not receive messages via SMS, 1 = Subscriber will receive messages via SMS
mobilevoice - 0 = Subscriber will not receive messages via voice to text, 1 = Subscriber will receive messages via voice to text
name - Group name
subscribed_type - Internal use only, This will return how the subscriber was opted in (API, Widget, SMS, etc...)
unsubdate - Internal uss only, Date of unsubscription
updated_at - Last date the subscriber had been updated
email - Subscribers email
first_name - Subscribers first name
last_name - Subscribers last name
password - This is not divulged
phone - Subscribers phone number
role_id - Returns subscribers role id for group
ADDRESS OBJECT
city
state
state_abbr
street
street2
zip
<?php $wsdl = 'SSL//HOST_URL/webservices/?version=2.0.0&wsdl'; $soap = new SoapClient($wsdl); //create an authentication object $auth = array(); $auth['username'] = 'api_username'; $auth['password'] = 'api_password'; $auth['api_key'] = 'xxxxxxxxxxxxxx'; $auth['keyword'] = 'group_keyword'; $auth['code'] = 12345; $results = $soap->getActiveSubscribers($auth); print_r($results); if ($results->result == 0 || $results->error > 0) { //error processing throw new Exception($results->message); } else { //after success processing }
SOAP Request
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:urn="urn:webservices2_0_0">
<soapenv:Header/>
<soapenv:Body>
<urn:getActiveSubscribers soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<auth xsi:type="urn:WSAuthentication">
<username xsi:type="xsd:string">api_username</username>
<password xsi:type="xsd:string">api_password</password>
<api_key xsi:type="xsd:string">xxxxxxxxxxxxxx</api_key>
<code xsi:type="xsd:string">12345</code>
<keyword xsi:type="xsd:string">group_keyword</keyword>
</auth>
</urn:getActiveSubscribers>
</soapenv:Body>
</soapenv:Envelope>
SOAP Response
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="urn:webservices2_0_0"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:getActiveSubscribersResponse>
<getActiveSubscribersReturn xsi:type="ns1:WSSubscriberListResponse">
<error_code xsi:type="xsd:int">0</error_code>
<message xsi:type="xsd:string">Successfully retreived active subscribers</message>
<response xsi:type="ns1:WSSubscriberList">
<subscribers SOAP-ENC:arrayType="ns1:WSSubscriber[1]" xsi:type="ns1:WSSubscriberArray">
<item xsi:type="ns1:WSSubscriber">
<created_at xsi:type="xsd:string">2011-10-04 08:22:37</created_at>
<custom_field xsi:type="xsd:string"/>
<default_keyword xsi:type="xsd:string"/>
<email xsi:type="xsd:int">0</email>
<landline xsi:type="xsd:int">0</landline>
<mobiletxt xsi:type="xsd:int">1</mobiletxt>
<mobilevoice xsi:type="xsd:int">0</mobilevoice>
<name xsi:type="xsd:string">Company, Division or Group name</name>
<subscribed_type xsi:type="xsd:int">2</subscribed_type>
<unsubdate xsi:type="xsd:string"/>
<updated_at xsi:type="xsd:string">2011-10-06 08:40:25</updated_at>
<user xsi:type="ns1:WSUser">
<address xsi:type="ns1:WSAddress">
<city xsi:nil="true"/>
<state xsi:nil="true"/>
<state_abbr xsi:nil="true"/>
<street xsi:nil="true"/>
<street2 xsi:nil="true"/>
<zip xsi:nil="true"/>
</address>
<carrier xsi:type="xsd:string">Subscriber Carrier</carrier>
<email xsi:type="xsd:string">Subscriber Email</email>
<first_name xsi:type="xsd:string">Subscribers first name</first_name>
<landline xsi:type="xsd:string">18885554422</landline>
<last_name xsi:type="xsd:string">Subscribers last name</last_name>
<password xsi:type="xsd:string"/>
<phone xsi:type="xsd:string">18885554433</phone>
<role_id xsi:type="xsd:int">5</role_id>
</user>
</item>
</subscribers>
</response>
<result xsi:type="xsd:boolean">true</result>
</getActiveSubscribersReturn>
</ns1:getActiveSubscribersResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
//create web service authentication WSAuthentication auth = new WSAuthentication(); auth.username = "api_username"; auth.password = "api_password"; auth.api_key = "xxxxxxxxxxxxxx"; auth.keyword = "group_keyword"; auth.code = "12345"; //create task bind WS_SubscriptionnodeBinding bind = new WS_SubscriptionnodeBinding(); bind.Url = "SSL//HOST_URL/webservices/subscriptionnode/2.0.0"; //create result object WSSubscriberListResponse ws_result = new WSSubscriberListResponse(); //call bind event ws_result = bind.getActiveSubscribers(auth); //check to see if there was an error if (!ws_result.result) { //handle error label.Text = ws_result.message; } else { //handle successful response label.Text = ws_result.message; WSSubscriberList list = ws_result.response; }
Request SSL//HOST_URL/httppost/nvp?version=2.0.0&method_name=subscriptionnode.getActiveSubscribers&username={username}&password={password}&api_key={api_key}&code=12345&keyword={Group Keyword} Response <?xml version="1.0" encoding="utf-8"?> <getAllSubscribers> <message>Successfully retreived subscribers</message> <error_code></error_code> <result>true</result> <response> <subscribers> <item> <user> <first_name>Test</first_name> <last_name>User</last_name> <phone>18885554433</phone> <email>test@test.com</email> <landline></landline> <role_id></role_id> <password></password> <address> <street></street> <street2></street2> <city></city> <state></state> <state_abbr></state_abbr> <zip></zip> </address> <carrier>cingular</carrier> </user> <name>Group</name> <landline>0</landline> <mobiletxt>1</mobiletxt> <mobilevoice>0</mobilevoice> <email>1</email> <created_at>2011-11-29 14:20:29</created_at> <updated_at>2011-12-02 12:10:19</updated_at> <unsubdate></unsubdate> <custom_field></custom_field> <subscribed_type>6</subscribed_type> <default_keyword></default_keyword> </item> </subscribers> </response> </getAllSubscribers>
| static getAllSubscribers | ( | $ | auth | ) | [static] |
Description:
| WSAuthentication | $auth | Authentication Object username - String[40] (Required) - Username for company credentials password - String[40] (Required) - Password for company credentials api_key - String[40] (Required) - Credentials for company code - Integer (Required) - Default shortcode or longcode for keyword keyword - String[40] (Required) - Default keyword for the group to be read |
result - True/False, This will indicate whether the request was successful or not.
error_code - If there was an error in the request it will return an error number here.
email - 0 = Subscriber will not receive messages via email, 1 = Subscriber will receive messages via email
landline - 0 = Subscriber will not receive messages via landline, 1 = Subscriber will receive messages via landline
mobiletxt - 0 = Subscriber will not receive messages via SMS, 1 = Subscriber will receive messages via SMS
mobilevoice - 0 = Subscriber will not receive messages via voice to text, 1 = Subscriber will receive messages via voice to text
name - Group name
subscribed_type - Internal use only, This will return how the subscriber was opted in (API, Widget, SMS, etc...)
unsubdate - Internal uss only, Date of unsubscription
updated_at - Last date the subscriber had been updated
email - Subscribers email
first_name - Subscribers first name
last_name - Subscribers last name
password - This is not divulged
phone - Subscribers phone number
role_id - Returns subscribers role id for group
ADDRESS OBJECT
city
state
state_abbr
street
street2
zip
<?php $wsdl = 'SSL//HOST_URL/webservices/?version=2.0.0&wsdl'; $soap = new SoapClient($wsdl); //create an authentication object $auth = array(); $auth['username'] = 'api_username'; $auth['password'] = 'api_password'; $auth['api_key'] = 'xxxxxxxxxxxxxx'; $auth['keyword'] = 'group_keyword'; $auth['code'] = 12345; $results = $soap->getAllSubscribers($auth); print_r($results); if ($results->result == 0 || $results->error > 0) { //error processing throw new Exception($results->message); } else { //after success processing }
SOAP Request
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:urn="urn:webservices2_0_0">
<soapenv:Header/>
<soapenv:Body>
<urn:getAllSubscibers soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<auth xsi:type="urn:WSAuthentication">
<username xsi:type="xsd:string">api_username</username>
<password xsi:type="xsd:string">api_password</password>
<api_key xsi:type="xsd:string">xxxxxxxxxxxxxx</api_key>
<code xsi:type="xsd:string">12345</code>
<keyword xsi:type="xsd:string">group_keyword</keyword>
</auth>
</urn:getAllSubscibers>
</soapenv:Body>
</soapenv:Envelope>
SOAP Response
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="urn:webservices2_0_0"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:getAllSubscibersResponse>
<getAllSubscibersReturn xsi:type="ns1:WSSubscriberListResponse">
<message xsi:type="xsd:string">Successfully retreived subscribers</message>
<response xsi:type="ns1:WSSubscriberList">
<subscribers SOAP-ENC:arrayType="ns1:WSSubscriber[1]" xsi:type="ns1:WSSubscriberArray">
<item xsi:type="ns1:WSSubscriber">
<created_at xsi:type="xsd:string">2011-02-22 16:41:32</created_at>
<custom_field xsi:type="xsd:string"/>
<email xsi:type="xsd:string">0</email>
<landline xsi:type="xsd:int">0</landline>
<mobiletxt xsi:type="xsd:int">1</mobiletxt>
<mobilevoice xsi:type="xsd:int">0</mobilevoice>
<unsubdate xsi:type="xsd:string"/>
<user xsi:type="ns1:WSUser">
<address xsi:type="ns1:WSAddress">
<city xsi:nil="true"/>
<state xsi:nil="true"/>
<state_abbr xsi:nil="true"/>
<street xsi:nil="true"/>
<street2 xsi:nil="true"/>
<zip xsi:nil="true"/>
</address>
<email xsi:type="xsd:string">subscriber email</email>
<first_name xsi:type="xsd:string">subscriber first name</first_name>
<landline xsi:type="xsd:string">subscriber land line</landline>
<last_name xsi:type="xsd:string">subscriber last name</last_name>
<phone xsi:type="xsd:string">subscriber phone</phone>
<role_id xsi:type="xsd:int">5</role_id>
</user>
</item>
</subscribers>
</response>
<result xsi:type="xsd:boolean">true</result>
</getAllSubscibersReturn>
</ns1:getAllSubscibersResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
//create web service authentication WSAuthentication auth = new WSAuthentication(); auth.username = "api_username"; auth.password = "api_password"; auth.api_key = "xxxxxxxxxxxxxx"; auth.keyword = "group_keyword"; auth.code = "12345"; //create task bind WS_SubscriptionnodeBinding bind = new WS_SubscriptionnodeBinding(); bind.Url = "SSL//HOST_URL/webservices/subscriptionnode/2.0.0"; //create result object WSSubscriberListResponse ws_result = new WSSubscriberListResponse(); //call bind event ws_result = bind.getAllSubscibers(auth); //check to see if there was an error if (!ws_result.result) { //handle error label.Text = ws_result.message; } else { //handle successful response label.Text = ws_result.message; WSSubscriberList list = ws_result.response; }
Request SSL//HOST_URL/httppost/nvp?version=2.0.0&method_name=subscriptionnode.getAllSubscribers&username={username}&password={password}&api_key={api_key}&code=12345&keyword={Group Keyword} Response <?xml version="1.0" encoding="utf-8"?> <getAllSubscribers> <message>Successfully retreived subscribers</message> <error_code></error_code> <result>true</result> <response> <subscribers> <item> <user> <first_name>Test</first_name> <last_name>User</last_name> <phone>18885554433</phone> <email>test@test.com</email> <landline></landline> <role_id></role_id> <password></password> <address> <street></street> <street2></street2> <city></city> <state></state> <state_abbr></state_abbr> <zip></zip> </address> <carrier>cingular</carrier> </user> <name>Group</name> <landline>0</landline> <mobiletxt>1</mobiletxt> <mobilevoice>0</mobilevoice> <email>1</email> <created_at>2011-11-29 14:20:29</created_at> <updated_at>2011-12-02 12:10:19</updated_at> <unsubdate></unsubdate> <custom_field></custom_field> <subscribed_type>6</subscribed_type> <default_keyword></default_keyword> </item> </subscribers> </response> </getAllSubscribers>
| static getDivisionGroups | ( | $ | auth | ) | [static] |
Description:
| WSAuthentication | $auth | Authentication Object username - String[40] (Required) - Username for company credentials password - String[40] (Required) - Password for company credentials api_key - String[40] (Required) - Credentials for company code - Integer (Required) - Default shortcode or longcode for keyword keyword - String[40] (Required) - Default keyword for the division to be read |
result - True/False, This will indicate whether the request was successful or not.
error_code - If there was an error in the request it will return an error number here.
email - URL for division if set at division creation
keyword - Default keyword for the division
name - Name of division
phone - URL for division if set at division creation
ispublic - 1 = public, 0 = not public
keyword - New keyword for the group (subscriptionNode)
name - Name of the group (subscriptionNode)
stackOrder - Order that it will show up in the organization tree
url - URL for division if set at division creation
ADDRESS OBJECT
city
state
state_abbr
street
street2
zip
<?php $wsdl = 'SSL//HOST_URL/webservices/?version=2.0.0&wsdl'; $soap = new SoapClient($wsdl); //create an authentication object $auth = array(); $auth['username'] = 'api_username'; $auth['password'] = 'api_password'; $auth['api_key'] = 'xxxxxxxxxxxxxx'; $auth['keyword'] = 'group_keyword'; $auth['code'] = 12345; $results = $soap->getDivisionGroups($auth); print_r($results); if ($results->result == 0 || $results->error > 0) { //error processing throw new Exception($results->message); } else { //after success processing }
SOAP Request
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:urn="urn:webservices2_0_0">
<soapenv:Header/>
<soapenv:Body>
<urn:getDivisionGroups soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<auth xsi:type="urn:WSAuthentication">
<username xsi:type="xsd:string">api_username</username>
<password xsi:type="xsd:string">api_password</password>
<api_key xsi:type="xsd:string">xxxxxxxxxxxxxx</api_key>
<code xsi:type="xsd:string">12345</code>
<keyword xsi:type="xsd:string">group_keyword</keyword>
</auth>
</urn:getDivisionGroups>
</soapenv:Body>
</soapenv:Envelope>
SOAP Response
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="urn:webservices2_0_0"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:getDivisionGroupsResponse>
<getDivisionGroupsReturn xsi:type="ns1:WSDivisionResponse">
<message xsi:type="xsd:string">Successfully retrieved division groups.</message>
<response xsi:type="ns1:WSDivision">
<address xsi:type="ns1:WSAddress">
<city xsi:type="xsd:string">Cityville</city>
<state xsi:type="xsd:string">Idaho</state>
<state_abbr xsi:type="xsd:string">ID</state_abbr>
<street xsi:type="xsd:string">123 East</street>
<street2 xsi:type="xsd:string">234 South</street2>
<zip xsi:type="xsd:int">87654</zip>
</address>
<divisions SOAP-ENC:arrayType="ns1:WSDivision[0]" xsi:type="ns1:WSDivisionArray"/>
<email xsi:type="xsd:string">test@test.com</email>
<keyword xsi:type="xsd:string">31122</keyword>
<name xsi:type="xsd:string">Test Division</name>
<phone xsi:type="xsd:string"/>
<subscriptionnodes SOAP-ENC:arrayType="ns1:WSSubscriptionnode[3]" xsi:type="ns1:WSSubscriptionnodeArray">
<item xsi:type="ns1:WSSubscriptionnode">
<ispublic xsi:type="xsd:int">1</ispublic>
<keyword xsi:type="xsd:string">group keyword</keyword>
<name xsi:type="xsd:string">group name</name>
<stackOrder xsi:type="xsd:int">0</stackOrder>
</item>
<item xsi:type="ns1:WSSubscriptionnode">
<ispublic xsi:type="xsd:int">1</ispublic>
<keyword xsi:type="xsd:string">group keyword</keyword>
<name xsi:type="xsd:string">group name</name>
<stackOrder xsi:type="xsd:int">0</stackOrder>
</item>
<item xsi:type="ns1:WSSubscriptionnode">
<ispublic xsi:type="xsd:int">1</ispublic>
<keyword xsi:type="xsd:string">group keyword</keyword>
<name xsi:type="xsd:string">group name</name>
<stackOrder xsi:type="xsd:int">0</stackOrder>
</item>
</subscriptionnodes>
<url xsi:type="xsd:string">http://www.test.com</url>
</response>
<result xsi:type="xsd:boolean">true</result>
</getDivisionGroupsReturn>
</ns1:getDivisionGroupsResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
//create web service authentication WSAuthentication auth = new WSAuthentication(); auth.username = "api_username"; auth.password = "api_password"; auth.api_key = "xxxxxxxxxxxxxx"; auth.keyword = "division_keyword"; auth.code = "12345"; //create task bind WS_SubscriptionnodeBinding bind = new WS_SubscriptionnodeBinding(); bind.Url = "SSL//HOST_URL/webservices/subscriptionnode/2.0.0"; //create result object WSDivisionResponse ws_result = new WSDivisionResponse(); //call bind event ws_result = bind.getDivisionGroups(auth); //check to see if there was an error if (!ws_result.result) { //handle error label.Text = ws_result.message; } else { //handle successful response label.Text = ws_result.message; WSDivision d = ws_result.response; }
SSL//HOST_URL/httppost/nvp?version=2.0.0&method_name=subscriptionnode.getDivisionGroups&username={username}&password={password}&api_key={api_key}&code=12345&keyword={Division keyword} <?xml version="1.0" encoding="utf-8"?> <getDivisionGroups> <message>Successfully retrieved division groups.</message> <error_code></error_code> <result>true</result> <response> <name>Division</name> <address> <street></street> <street2></street2> <city></city> <state></state> <state_abbr></state_abbr> <zip></zip> </address> <phone>18885554433</phone> <email>email@test.com</email> <url></url> <keyword>31193</keyword> <default_code>12345</default_code> <divisions></divisions> <subscriptionnodes> <item> <name>Group 1</name> <ispublic>1</ispublic> <keywords> <item> <word>Keyword 1</word> <note></note> <response></response> <subscribed_response></subscribed_response> <callback_url></callback_url> <auto_subscribe></auto_subscribe> <keyword_type>6</keyword_type> <app_identifier></app_identifier> <active>1</active> <fields></fields> </item> <item> <word>Keyword 2</word> <note></note> <response></response> <subscribed_response></subscribed_response> <callback_url></callback_url> <auto_subscribe></auto_subscribe> <keyword_type>5</keyword_type> <app_identifier></app_identifier> <active>0</active> <fields></fields> </item> <item> <word>Keyword 3</word> <note></note> <response></response> <subscribed_response></subscribed_response> <callback_url></callback_url> <auto_subscribe></auto_subscribe> <keyword_type>5</keyword_type> <app_identifier></app_identifier> <active>1</active> <fields></fields> </item> <item> <word>31194(Default Keyword)</word> <note></note> <response></response> <subscribed_response></subscribed_response> <callback_url></callback_url> <auto_subscribe></auto_subscribe> <keyword_type>1</keyword_type> <app_identifier></app_identifier> <active>1</active> <fields></fields> </item> </keywords> <stackOrder></stackOrder> <default_code>91011</default_code> </item> <item> <name>Group 2</name> <ispublic>1</ispublic> <keywords> <item> <word>31323<word> <note></note> <response></response> <subscribed_response></subscribed_response> <callback_url></callback_url> <auto_subscribe></auto_subscribe> <keyword_type>1</keyword_type> <app_identifier></app_identifier> <active>1</active> <fields></fields> </item> </keywords> <stackOrder></stackOrder> <default_code>12345</default_code> </item> <item> <name>Group 3</name> <ispublic>1</ispublic> <keywords> <item> <word>31225</word> <note></note> <response></response> <subscribed_response></subscribed_response> <callback_url></callback_url> <auto_subscribe></auto_subscribe> <keyword_type>1</keyword_type> <app_identifier></app_identifier> <active>1</active> <fields></fields> </item> </keywords> <stackOrder></stackOrder> <default_code>12345</default_code> </item> </subscriptionnodes> </response> </getDivisionGroups>
| static readSubscriptionnode | ( | $ | auth | ) | [static] |
Description:
| WSAuthentication | $auth | Authentication Object username - String[40] (Required) - Username for company credentials password - String[40] (Required) - Password for company credentials api_key - String[40] (Required) - Credentials for company code - Integer (Required) - Default shortcode or longcode for keyword keyword - String[40] (Required) - Default keyword for the group to be read |
result - True/False, This will indicate whether the request was successful or not. error_code - If there was an error in the request it will return an error number here. ispublic - 1 = public, 0 = not public keyword - New keyword for the group (subscriptionNode) name - Name of the group (subscriptionNode) stackOrder - Order that it will show up in the organization tree
<?php $wsdl = 'SSL//HOST_URL/webservices/?version=2.0.0&wsdl'; $soap = new SoapClient($wsdl); //create an authentication object $auth = array(); $auth['username'] = 'api_username'; $auth['password'] = 'api_password'; $auth['api_key'] = 'xxxxxxxxxxxxxx'; $auth['keyword'] = 'group_keyword'; $auth['code'] = 12345; $results = $soap->readSubscriptionnode($auth); print_r($results); if ($results->result == 0 || $results->error > 0) { //error processing throw new Exception($results->message); } else { //after success processing }
SOAP Request
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:urn="urn:webservices2_0_0">
<soapenv:Header/>
<soapenv:Body>
<urn:readSubscriptionnode soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<auth xsi:type="urn:WSAuthentication">
<username xsi:type="xsd:string">api_username</username>
<password xsi:type="xsd:string">api_password</password>
<api_key xsi:type="xsd:string">xxxxxxxxxxxxxx</api_key>
<code xsi:type="xsd:string">12345</code>
<keyword xsi:type="xsd:string">group_keyword</keyword>
</auth>
</urn:readSubscriptionnode>
</soapenv:Body>
</soapenv:Envelope>
SOAP Response
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="urn:webservices2_0_0"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:readSubscriptionnodeResponse>
<readSubscriptionnodeReturn xsi:type="ns1:WSSubscriptionnodeResponse">
<message xsi:type="xsd:string">Successfully read subscription group.</message>
<response xsi:type="ns1:WSSubscriptionnode">
<ispublic xsi:type="xsd:int">1</ispublic>
<keyword xsi:type="xsd:string">group keyword</keyword>
<name xsi:type="xsd:string">group name</name>
<stackOrder xsi:type="xsd:int">0</stackOrder>
</response>
<result xsi:type="xsd:boolean">true</result>
</readSubscriptionnodeReturn>
</ns1:readSubscriptionnodeResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
//create web service authentication WSAuthentication auth = new WSAuthentication(); auth.username = "api_username"; auth.password = "api_password"; auth.api_key = "xxxxxxxxxxxxxx"; auth.keyword = "keyword_of_group"; auth.code = "12345"; //create task bind WS_SubscriptionnodeBinding bind = new WS_SubscriptionnodeBinding(); bind.Url = "SSL//HOST_URL/webservices/subscriptionnode/2.0.0"; //create result object WSSubscriptionnodeResponse ws_result = new WSSubscriptionnodeResponse(); //call bind event ws_result = bind.readSubscriptionnode(auth); //check to see if there was an error if (!ws_result.result) { //handle error label.Text = ws_result.message; } else { //handle successful response label.Text = ws_result.message; WSSubscriptionnode s = ws_result.response; }
Request SSL//HOST_URL/httppost/nvp?version=2.0.0&method_name=subscriptionnode.readSubscriptionnode&username={username}&password={password}&api_key={api_key}&code=12345&keyword={Group Keyword} Response <?xml version="1.0" encoding="utf-8"?> <readSubscriptionnode> <message>Successfully read subscription group.</message> <error_code></error_code> <result>true</result> <response> <name>newGroupHttpPost2</name> <ispublic>1</ispublic> <keywords> <item> <word>31322</word> <note></note> <response></response> <subscribed_response></subscribed_response> <callback_url></callback_url> <auto_subscribe>1</auto_subscribe> <keyword_type>1</keyword_type> <app_identifier></app_identifier> <active>1</active> <fields></fields> </item> <item> <word>31322</word> <note></note> <response></response> <subscribed_response></subscribed_response> <callback_url></callback_url> <auto_subscribe>1</auto_subscribe> <keyword_type>1</keyword_type> <app_identifier></app_identifier> <active>1</active> <fields></fields> </item> </keywords> <stackOrder></stackOrder> <default_code>12345</default_code> </response> </readSubscriptionnode>
| static restoreSubscriptionnode | ( | $ | auth | ) | [static] |
Description:
| WSAuthentication | $auth | Authentication Object username - String[40] (Required) - Username for company credentials password - String[40] (Required) - Password for company credentials api_key - String[40] (Required) - Credentials for company code - Integer (Required) - Default shortcode or longcode for keyword keyword - String[40] (Required) - Default keyword for the group to be restored |
result - True/False, This will indicate whether the request was successful or not. error_code - If there was an error in the request it will return an error number here. ispublic - 1 = public, 0 = not public keyword - New keyword for the group (subscriptionNode) name - Name of the group (subscriptionNode) stackOrder - Order that it will show up in the organization tree
<?php $wsdl = 'SSL//HOST_URL/webservices/?version=2.0.0&wsdl'; $soap = new SoapClient($wsdl); //create an authentication object $auth = array(); $auth['username'] = 'api_username'; $auth['password'] = 'api_password'; $auth['api_key'] = 'xxxxxxxxxxxxxx'; $auth['keyword'] = 'group_keyword'; $auth['code'] = 12345; $results = $soap->restoreSubscriptionnode($auth); print_r($results); if ($results->result == 0 || $results->error > 0) { //error processing throw new Exception($results->message); } else { //after success processing }
SOAP Request
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:urn="urn:webservices2_0_0">
<soapenv:Header/>
<soapenv:Body>
<urn:restoreSubscriptionnode soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<auth xsi:type="urn:WSAuthentication">
<username xsi:type="xsd:string">api_username</username>
<password xsi:type="xsd:string">api_password</password>
<api_key xsi:type="xsd:string">xxxxxxxxxxxxxx</api_key>
<code xsi:type="xsd:string">12345</code>
<keyword xsi:type="xsd:string">group_keyword</keyword>
</auth>
</urn:restoreSubscriptionnode>
</soapenv:Body>
</soapenv:Envelope>
SOAP Response
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="urn:webservices2_0_0"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:restoreSubscriptionnodeResponse>
<restoreSubscriptionnodeReturn xsi:type="ns1:WSSubscriptionnodeResponse">
<message xsi:type="xsd:string">Successfully restored subscription group.</message>
<response xsi:type="ns1:WSSubscriptionnode">
<ispublic xsi:type="xsd:int">1</ispublic>
<keyword xsi:type="xsd:string">group keyword</keyword>
<name xsi:type="xsd:string">group name</name>
<stackOrder xsi:type="xsd:int">0</stackOrder>
</response>
<result xsi:type="xsd:boolean">true</result>
</restoreSubscriptionnodeReturn>
</ns1:restoreSubscriptionnodeResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
//create web service authentication WSAuthentication auth = new WSAuthentication(); auth.username = "api_username"; auth.password = "api_password"; auth.api_key = "xxxxxxxxxxxxxx"; auth.keyword = "keyword_of_group_to_be_restored"; auth.code = "12345"; //create task bind WS_SubscriptionnodeBinding bind = new WS_SubscriptionnodeBinding(); bind.Url = "SSL//HOST_URL/webservices/subscriptionnode/2.0.0"; //create result object WSSubscriptionnodeResponse ws_result = new WSSubscriptionnodeResponse(); //call bind event ws_result = bind.restoreSubscriptionnode(auth); //check to see if there was an error if (!ws_result.result) { //handle error label.Text = ws_result.message; } else { //handle successful response label.Text = ws_result.message; WSSubscriptionnode s = ws_result.response; }
Request SSL//HOST_URL/httppost/nvp?version=2.0.0&method_name=subscriptionnode.restoreSubscriptionnode&username={username}&password={password}&api_key={api_key}&code=12345&keyword={Group keyword to be restored} Response <?xml version="1.0" encoding="utf-8"?> <restoreSubscriptionnode> <message>Successfully restored subscription group.</message> <error_code></error_code> <result>true</result> <response> <name>UpdateGroupHttpPost2</name> <ispublic>1</ispublic> <keywords> <item> <word>31322</word> <note></note> <response></response> <subscribed_response></subscribed_response> <callback_url></callback_url> <auto_subscribe>1</auto_subscribe> <keyword_type>1</keyword_type> <app_identifier></app_identifier> <active>1</active> <fields></fields> </item> </keywords> <stackOrder></stackOrder> <default_code></default_code> </response> </restoreSubscriptionnode>
| static updateSubscriptionnode | ( | $ | auth, |
| $ | group | ||
| ) | [static] |
Description:
| WSAuthentication | $auth | Authentication Object username - String[40] (Required) - Username for company credentials password - String[40] (Required) - Password for company credentials api_key - String[40] (Required) - Credentials for company code - Integer (Required) - Default shortcode or longcode for keyword keyword - String[40] (Required) - Default keyword for the group to be updated |
| WSSubscriptionnode | $group | Group Object
ispublic - Integer (Optional) - 1 = public, 0 = not public, this will determine whether or not
it will show up on the subscription widget
name - String (Required) - Name of the group
stackOrder - Integer (Optional) - This determines the order in the orgainization tree
|
result - True/False, This will indicate whether the request was successful or not. error_code - If there was an error in the request it will return an error number here. ispublic - 1 = public, 0 = not public keyword - New keyword for the group (subscriptionNode) name - Name of the group (subscriptionNode) stackOrder - Order that it will show up in the organization tree
<?php $wsdl = 'SSL//HOST_URL/webservices/?version=2.0.0&wsdl'; $soap = new SoapClient($wsdl); //create an authentication object $auth = array(); $auth['username'] = 'api_username'; $auth['password'] = 'api_password'; $auth['api_key'] = 'xxxxxxxxxxxxxx'; $auth['keyword'] = 'group_keyword'; $auth['code'] = 12345; //create a subscription group object $sg = array(); $sg["name"] = "Sample Subscription Group"; $sg["ispublic"] = "1"; $sg["stackOrder"] = "1"; //the following fields are optional to set but required to be passed in the object $sg["default_code"] = 12345; $sg["keywords"] = ""; $sg["divisions"] = ""; $sg["subscriptionnodes"] = ""; $results = $soap->updateSubscriptionnode($auth, $sg); print_r($results); if ($results->result == 0 || $results->error > 0) { //error processing throw new Exception($results->message); } else { //after success processing }
XML Request
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:urn="urn:webservices2_0_0">
<soapenv:Header/>
<soapenv:Body>
<urn:restoreSubscriptionnode soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<auth xsi:type="urn:WSAuthentication">
<username xsi:type="xsd:string">api_username</username>
<password xsi:type="xsd:string">api_password</password>
<api_key xsi:type="xsd:string">xxxxxxxxxxxxxx</api_key>
<code xsi:type="xsd:string">12345</code>
<keyword xsi:type="xsd:string">group_keyword</keyword>
</auth>
<group xsi:type="urn:WSSubscriptionnode">
<ispublic xsi:type="xsd:integer">1</ispublic>
<name xsi:type="xsd:string">Sample Group Test</name>
<stackOrder xsi:type="xsd:integer">0</stackOrder>
</group>
</urn:restoreSubscriptionnode>
</soapenv:Body>
</soapenv:Envelope>
XML Response
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="urn:webservices2_0_0"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:updateSubscriptionnodeResponse>
<updateSubscriptionnodeReturn xsi:type="ns1:WSSubscriptionnodeResponse">
<message xsi:type="xsd:string">Successfully updated subscription group.</message>
<response xsi:type="ns1:WSSubscriptionnode">
<ispublic xsi:type="xsd:int">1</ispublic>
<keyword xsi:type="xsd:string">group keyword</keyword>
<name xsi:type="xsd:string">group name</name>
<stackOrder xsi:type="xsd:int">0</stackOrder>
</response>
<result xsi:type="xsd:boolean">true</result>
</updateSubscriptionnodeReturn>
</ns1:updateSubscriptionnodeResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
//create web service authentication WSAuthentication auth = new WSAuthentication(); auth.username = "api_username"; auth.password = "api_password"; auth.api_key = "xxxxxxxxxxxxxx"; auth.keyword = "keyword_of_group"; auth.code = "12345"; //create subscription group object WSSubscriptionnode sub = new WSSubscriptionnode(); sub.name = "Test Group"; sub.ispublic = 1; sub.stackOrder = 0; //create task bind WS_SubscriptionnodeBinding bind = new WS_SubscriptionnodeBinding(); bind.Url = "SSL//HOST_URL/webservices/subscriptionnode/2.0.0"; //create result object WSSubscriptionnodeResponse ws_result = new WSSubscriptionnodeResponse(); //call bind event ws_result = bind.updateSubscriptionnode(auth,sub); //check to see if there was an error if (!ws_result.result) { //handle error label.Text = ws_result.message; } else { //handle successful response label.Text = ws_result.message; WSSubscriptionnode s = ws_result.response; }
Request SSL//HOST_URL/httppost/nvp?version=2.0.0&method_name=subscriptionnode.updateSubscriptionnode&username={username}&password={password}&api_key={api_key}&code=12345&keyword={Group Keyword}&name=Update Group Name Response <?xml version="1.0" encoding="utf-8"?> <updateSubscriptionnode> <message>Successfully updated subscription group.</message> <error_code></error_code> <result>true</result> <response> <name>Update Group Name</name> <ispublic>1</ispublic> <keywords> <item> <word>31322</word> <note></note> <response></response> <subscribed_response></subscribed_response> <callback_url></callback_url> <auto_subscribe>1</auto_subscribe> <keyword_type>1</keyword_type> <app_identifier></app_identifier> <active>1</active> <fields></fields> </item> </keywords> <stackOrder></stackOrder> <default_code></default_code> </response> </updateSubscriptionnode>