WS_Company Class Reference

Static Public Member Functions

static createCompany ($auth, $company)
static readCompany ($auth)
static updateCompany ($auth, $company)
static deleteCompany ($auth)
static restoreCompany ($auth)
static getCompanyFeatures ($auth)
static addCompanyFeature ($auth, $feature_list)
static removeCompanyFeature ($auth, $feature_list)
static getAvailableFeatures ($auth)

Member Function Documentation

static addCompanyFeature ( auth,
feature_list 
) [static]

Description:

Add a feature for a company
Parameters:
WSAuthentication$authAuthentication 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 company
keyword   - String[40] (Required) - Default keyword for the company to have features added
WSFeatureList$feature_listFeature List Object
id -    Integer (Required)
name -  String  (Required)
ID NAME
5 Address Book
11 Calendar
35 Field Mapping
7 File Upload
2 Inbox
6 Individual
37 International Delivery
14 Keywords
4 Manage Tab
9 MCard
10 Message Center
13 Organization
36 Remote Subscribers
3 Reports Tab
19 Social Media
15 Subscribers
16 Templates
24 URL Callback
12 User
1 WAP
27 Enhanced Mobile Site
Returns:
WSFeatureListResponse $response
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.
id         - Feature id
name       - Feature name
Code Examples:
<?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'] = 'company_keyword';
$auth['code'] = 12345;
 
$feature = array();
$feature['name'] = 'Inbox';
$feature['id'] = 2;
$featurelist = array();
$featurelist['featurelist'] = $feature;

$results = $soap->addCompanyFeature($auth, $featurelist);

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"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
    <soapenv:Header/>
    <soapenv:Body>
    <urn:addCompanyFeature 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">company_keyword</keyword>
    </auth>
    <feature_list xsi:type="urn:WSFeatureList">
    <featurelist xsi:type="urn:WSFeatureArray" soapenc:arrayType="urn:WSFeature[]">
    <feature>
    <id>3</id>
    <name>Reports Tab</name>
    </feature>
    <feature>
    <id>11</id>
    <name>Calendar</name>
    </feature>
    </featurelist>
    </feature_list>
    </urn:addCompanyFeature>
    </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:addCompanyFeatureResponse>
    <addCompanyFeatureReturn xsi:type="ns1:WSFeatureListResponse">
    <message xsi:type="xsd:string">Successfully added feature(s).</message>
    <response xsi:type="ns1:WSFeatureList">
    <featurelist SOAP-ENC:arrayType="ns1:WSFeature[2]" xsi:type="ns1:WSFeatureArray">
    <item xsi:type="ns1:WSFeature">
    <id xsi:type="xsd:int">11</id>
    <name xsi:type="xsd:string">Calendar</name>
    </item>
    <item xsi:type="ns1:WSFeature">
    <id xsi:type="xsd:int">3</id>
    <name xsi:type="xsd:string">Reports Tab</name>
    </item>
    </featurelist>
    </response>
    <result xsi:type="xsd:boolean">true</result>
    </addCompanyFeatureReturn>
    </ns1:addCompanyFeatureResponse>
    </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_company";
    auth.code = "12345";
     
    List<WSFeature> list = new List<WSFeature>();
     
    //create feature list
    WSFeature feature = new WSFeature();
    feature.name = "Calendar";
    feature.id = 11;
    list.Add(feature);
     
    //create feature list
    WSFeatureList feaList = new WSFeatureList();
    feaList.featurelist = list.ToArray();
     
    //create task bind
    WS_CompanyBinding bind = new WS_CompanyBinding();
    bind.Url = "SSL//HOST_URL/webservices/company/2.0.0";
     
    //create result object
    WSFeatureListResponse ws_result = new WSFeatureListResponse();
     
    //call bind event
    ws_result = bind.addCompanyFeature(auth, feaList);
     
    //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;
    WSFeatureList rList = ws_result.response;
    }
static createCompany ( auth,
company 
) [static]

Description:

Create a new company under a white label.
Parameters:
WSAuthentication$authAuthorization Object
username  - String (Required) - Username for white label credentials
password  - String (Required) - Password for white label credentials
api_key   - String (Required) - Credentials for white label
WSDivision$companyCompany Object
name    - String (Optional) - Name of new company to be created
phone   - String (Optional) - Phone number with country code to add to new company
email   - String (Optional) - Email to add to new company
url     - String (Optional) - Web address to add to new company
address - Object (Optional) - There is an address object inside the company object
		street     - String (Optional) - Street address
		street2    - String (Optional) - Second line for street address
		city       - String (Optional) - City
		state      - String (Optional) - State
		state_abbr - String (Optional) - Abbreviated state ie: Idaho = 'ID'
		zip        - String (Optional) - Zip code
Returns:
WSCompanyResponse $response
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      - Email of new company if set at creation
keyword    - Default keyword of new company
name       - Name of new company
phone      - Phone number of new company if set at creation
url        - URL of new company if set at creation
ADDRESS OBJECT - If set at creation it will show here
city
state
state_abbr
street
street2
zip
Code Examples:
<?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['shortcode'] = 12345;
     
    //create a company object
    $company = array();
    $company["name"] = "Sample Company";
    $company["phone"] = "5551234567";
    $company["email"] = "email@test.com";
    $company["url"] = "www.test.com";
    //The following fields are optional to set, but are required to be passed in the object
    $company["default_code"] = 12345;
    $company["divisions"] = '';
    $company["subscriptionnodes"] = '';
    $company["keyword"] = '';
     
    //create an address object to go with the company
    $add = array();
    $add["street"] = "123 East";
    $add["street2"] = "234 North";
    $add["city"] = "Cityville";
    $add["state"] = "Idaho";
    $add["state_abbr"] = "ID";
    $add["zip"] = "12345";
    $company["address"] = $add;

$results = $soap->createCompany($auth, $company);

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" 
 xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
   <soapenv:Header/>
   <soapenv:Body>
      <urn:createCompany soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
         <auth xsi:type="urn:WSAuthentication">
            <!--You may enter the following 5 items in any order-->
            <api_key xsi:type="xsd:string">api_key</api_key>
            <code xsi:type="xsd:string">12345</code>
            <keyword xsi:type="xsd:string">White Label keyword</keyword>
            <password xsi:type="xsd:string">api_password</password>
            <username xsi:type="xsd:string">api_username</username>
         </auth>
         <company xsi:type="urn:WSDivision">
            <!--You may enter the following 9 items in any order-->
            <address xsi:type="urn:WSAddress">
               <!--You may enter the following 6 items in any order-->
               <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">432 Main</street>
               <street2 xsi:type="xsd:string">123 East</street2>
               <zip xsi:type="xsd:int">83401</zip>
            </address>
            <default_code xsi:type="xsd:string"></default_code>
            <divisions xsi:type="urn:WSDivisionArray" soapenc:arrayType="urn:WSDivision[]"/>
            <email xsi:type="xsd:string"></email>
            <keyword xsi:type="xsd:string"></keyword>
            <name xsi:type="xsd:string">Test Company Name</name>
            <phone xsi:type="xsd:string"></phone>
            <subscriptionnodes xsi:type="urn:WSSubscriptionnodeArray" soapenc:arrayType="urn:WSSubscriptionnode[]"/>
            <url xsi:type="xsd:string"></url>
         </company>
      </urn:createCompany>
   </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:createCompanyResponse>
         <createCompanyReturn xsi:type="ns1:WSCompanyResponse">
            <error_code xsi:type="xsd:int">0</error_code>
            <message xsi:type="xsd:string">Successfully created company.</message>
            <response xsi:type="ns1:WSCompany">
               <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">432 Main</street>
                  <street2 xsi:type="xsd:string">123 East</street2>
                  <zip xsi:type="xsd:int">83401</zip>
               </address>
               <default_code xsi:type="xsd:string"/>
               <divisions SOAP-ENC:arrayType="ns1:WSDivision[0]" xsi:type="ns1:WSDivisionArray"/>
               <email xsi:type="xsd:string"/>
               <keyword xsi:type="xsd:string">New companies default keyword</keyword>
               <name xsi:type="xsd:string">Test Company Name</name>
               <phone xsi:type="xsd:string"/>
               <subscriptionnodes SOAP-ENC:arrayType="ns1:WSSubscriptionnode[0]" xsi:type="ns1:WSSubscriptionnodeArray"/>
               <url xsi:type="xsd:string"/>
            </response>
            <result xsi:type="xsd:boolean">true</result>
         </createCompanyReturn>
      </ns1:createCompanyResponse>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
//Create web service authentication

WSAuhtentication auth = new WSAuthentication();
auth.username = "api_username";
auth.password = "api_password";
auth.api_key = "api_key";
auth.code = "12345";

//create company object
WSDivision company = new WSDivision();
company.name = "Sample Company";
company.phone = "1888554433";
company.email = "test@test.com";
company.url = "www.company.com";
//create address object
WSAddress add = new WSAddress();
add.street = "123 East";
add.street2 = "234 South";
add.city = "Cityville";
add.state_abbr = "ID";
add.state = "Idaho";
add.zip = 87654
company.address = add;

//create task bind
WS_CompanyBinding bind = new WS_CompanyBinding();
bind.Url = "SSL//HOST_URL/webservices/company/2.0.0";

//create result object
WSCompanyResponse ws_result = new WSCompanyResponse();

//call bind event
ws_result = bind.createCompany(auth, company);

//check to see if there was an error
if(!ws_result.result){
    label.Text = ws_result.message;
 }else{
   label.Text = ws_result.message;
   WSCompany c = ws_result.response;
 }
 Request
SSL//HOST_URL/httppost/nvp?version=2.0.0&method_name=company.createCompany&username={username}&password={password}&api_key={api_key}&code=12345&keyword={Whitelabel keyword}&name=New_Company_Name


 Response
<?xml version="1.0" encoding="utf-8"?>
<createCompany>
  <message>Successfully created company.</message>
  <error_code></error_code>
  <result>true</result>
  <response>
    <name>newCompanyHttpPost</name>
    <address>
      <street></street>
      <street2></street2>
      <city></city>
      <state></state>
      <state_abbr></state_abbr>
      <zip></zip>
    </address>
    <phone></phone>
    <email></email>
    <url></url>
    <keyword>31319</keyword>
    <default_code></default_code>
    <divisions></divisions>
    <subscriptionnodes></subscriptionnodes>
  </response>
</createCompany>
static deleteCompany ( auth) [static]

Description:

Delete an existing company
Parameters:
WSAuthentication$authAuthorization Object
username  - String[40] (Required) - Username for white label credentials
password  - String[40] (Required) - Password for white label credentials
api_key   - String[40] (Required) - Credentials for white label
code      - Integer    (Required) - Default shortcode or longcode for company
keyword   - String[40] (Required) - Default keyword for the company to be deleted
Returns:
WSCompanyResponse $response
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 successful deletion or not
Code Examples:
<?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'] = 'company_keyword';
$auth['code'] = 12345;

$results = $soap->deleteCompany($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:deleteCompany 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">company_keyword</keyword>
    </auth>
    </urn:deleteCompany>
    </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:deleteCompanyResponse>
    <deleteCompanyReturn xsi:type="ns1:WSCompanyResponse">
    <message xsi:type="xsd:string">Successfully deleted company.</message>
    <response xsi:nil="true" xsi:type="ns1:WSCompany"/>
    <result xsi:type="xsd:boolean">true</result>
    </deleteCompanyReturn>
    </ns1:deleteCompanyResponse>
    </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_company_to_delete";
    auth.code = "12345";
     
    //create task bind
    WS_CompanyBinding bind = new WS_CompanyBinding();
    bind.Url = "SSL//HOST_URL/webservices/company/2.0.0";
     
    //create result object
    WSCompanyResponse ws_result = new WSCompanyResponse();
     
    //call bind event
    ws_result = bind.deleteCompany(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=company.deleteCompany&username={username}&password={password}&api_key={api_key}&code=12345&keyword={Keyword of Company to be deleted}

 Response
<?xml version="1.0" encoding="utf-8"?>
<deleteCompany>
  <message>Successfully deleted company.</message>
  <error_code></error_code>
  <result>true</result>
  <response></response>
</deleteCompany>
static getAvailableFeatures ( auth) [static]

Description:

Get all possible features for company
Parameters:
WSAuthentication$authAuthentication Object
username  - String  (Required) - Username for company credentials
password  - String  (Required) - Password for company credentials
api_key   - String  (Required) - Credentials for company
Returns:
WSFeatureListResponse $response
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.
id         - Feature id
name       - Feature name
Code Examples:
<?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';

$results = $soap->getAvailableFeatures($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:getAvailableFeatures 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>
    </auth>
    </urn:getAvailableFeatures>
    </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:getAvailableFeaturesResponse>
         <getAvailableFeaturesReturn xsi:type="ns1:WSFeatureListResponse">
            <error_code xsi:type="xsd:int">0</error_code>
            <message xsi:type="xsd:string">Successfully retrieved available features.</message>
            <response xsi:type="ns1:WSFeatureList">
               <featurelist SOAP-ENC:arrayType="ns1:WSFeature[21]" xsi:type="ns1:WSFeatureArray">
                  <item xsi:type="ns1:WSFeature">
                     <id xsi:type="xsd:int">5</id>
                     <name xsi:type="xsd:string">Address Book</name>
                  </item>
                  <item xsi:type="ns1:WSFeature">
                     <id xsi:type="xsd:int">38</id>
                     <name xsi:type="xsd:string">Apps</name>
                  </item>
                  <item xsi:type="ns1:WSFeature">
                     <id xsi:type="xsd:int">11</id>
                     <name xsi:type="xsd:string">Calendar</name>
                  </item>
                  <item xsi:type="ns1:WSFeature">
                     <id xsi:type="xsd:int">35</id>
                     <name xsi:type="xsd:string">Field Mapping</name>
                  </item>
                  <item xsi:type="ns1:WSFeature">
                     <id xsi:type="xsd:int">7</id>
                     <name xsi:type="xsd:string">File Upload</name>
                  </item>
                  <item xsi:type="ns1:WSFeature">
                     <id xsi:type="xsd:int">2</id>
                     <name xsi:type="xsd:string">Inbox</name>
                  </item>
                  <item xsi:type="ns1:WSFeature">
                     <id xsi:type="xsd:int">6</id>
                     <name xsi:type="xsd:string">Individual</name>
                  </item>
                  <item xsi:type="ns1:WSFeature">
                     <id xsi:type="xsd:int">37</id>
                     <name xsi:type="xsd:string">International Delivery</name>
                  </item>
                  <item xsi:type="ns1:WSFeature">
                     <id xsi:type="xsd:int">14</id>
                     <name xsi:type="xsd:string">Keywords</name>
                  </item>
                  <item xsi:type="ns1:WSFeature">
                     <id xsi:type="xsd:int">4</id>
                     <name xsi:type="xsd:string">Manage Tab</name>
                  </item>
                  <item xsi:type="ns1:WSFeature">
                     <id xsi:type="xsd:int">9</id>
                     <name xsi:type="xsd:string">MCard</name>
                  </item>
                  <item xsi:type="ns1:WSFeature">
                     <id xsi:type="xsd:int">10</id>
                     <name xsi:type="xsd:string">Message Center</name>
                  </item>
                  <item xsi:type="ns1:WSFeature">
                     <id xsi:type="xsd:int">13</id>
                     <name xsi:type="xsd:string">Organization</name>
                  </item>
                  <item xsi:type="ns1:WSFeature">
                     <id xsi:type="xsd:int">36</id>
                     <name xsi:type="xsd:string">Remote Subscribers</name>
                  </item>
                  <item xsi:type="ns1:WSFeature">
                     <id xsi:type="xsd:int">3</id>
                     <name xsi:type="xsd:string">Reports Tab</name>
                  </item>
                  <item xsi:type="ns1:WSFeature">
                     <id xsi:type="xsd:int">26</id>
                     <name xsi:type="xsd:string">Social Media</name>
                  </item>
                  <item xsi:type="ns1:WSFeature">
                     <id xsi:type="xsd:int">15</id>
                     <name xsi:type="xsd:string">Subscribers</name>
                  </item>
                  <item xsi:type="ns1:WSFeature">
                     <id xsi:type="xsd:int">16</id>
                     <name xsi:type="xsd:string">Templates</name>
                  </item>
                  <item xsi:type="ns1:WSFeature">
                     <id xsi:type="xsd:int">24</id>
                     <name xsi:type="xsd:string">URL Callback</name>
                  </item>
                  <item xsi:type="ns1:WSFeature">
                     <id xsi:type="xsd:int">12</id>
                     <name xsi:type="xsd:string">User</name>
                  </item>
                  <item xsi:type="ns1:WSFeature">
                     <id xsi:type="xsd:int">1</id>
                     <name xsi:type="xsd:string">Wap</name>
                  </item>
               </featurelist>
            </response>
            <result xsi:type="xsd:boolean">true</result>
         </getAvailableFeaturesReturn>
      </ns1:getAvailableFeaturesResponse>
   </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";
     
    //create task bind
    WS_CompanyBinding bind = new WS_CompanyBinding();
    bind.Url = "SSL//HOST_URL/webservices/company/2.0.0";
     
    //create result object
    WSFeatureListResponse ws_result = new WSFeatureListResponse();
     
    //call bind event
    ws_result = bind.getAvailableFeatures(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;
    WSFeatureList list = ws_result.response;
    }
static getCompanyFeatures ( auth) [static]

Description:

Get current company features
Parameters:
WSAuthentication$authAuthentication Object
username  - String  (Required) - Username for company credentials
password  - String  (Required) - Password for company credentials
api_key   - String  (Required) - Credentials for company
keyword   - String  (Required) - Default keyword for the company to be read
Returns:
WSFeatureListResponse $response
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.
id         - Feature id
name       - Feature name
Code Examples:
<?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'] = 'company_keyword';

$results = $soap->getCompanyFeatures($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:getCompanyFeatures 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>
 <keyword xsi:type="xsd:string">company_keyword</api_key>
 </auth>
 </urn:getCompanyFeatures>
 </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:getCompanyFeaturesResponse>
    <getCompanyFeaturesReturn xsi:type="ns1:WSFeatureListResponse">
    <message xsi:type="xsd:string">Successfully retrieved list of features.</message>
    <response xsi:type="ns1:WSFeatureList">
       <featurelist SOAP-ENC:arrayType="ns1:WSFeature[20]" xsi:type="ns1:WSFeatureArray">
                  <item xsi:type="ns1:WSFeature">
                     <id xsi:type="xsd:int">5</id>
                     <name xsi:type="xsd:string">Address Book</name>
                  </item>
                  <item xsi:type="ns1:WSFeature">
                     <id xsi:type="xsd:int">38</id>
                     <name xsi:type="xsd:string">Apps</name>
                  </item>
                  <item xsi:type="ns1:WSFeature">
                     <id xsi:type="xsd:int">11</id>
                     <name xsi:type="xsd:string">Calendar</name>
                  </item>
                  <item xsi:type="ns1:WSFeature">
                     <id xsi:type="xsd:int">35</id>
                     <name xsi:type="xsd:string">Field Mapping</name>
                  </item>
                  <item xsi:type="ns1:WSFeature">
                     <id xsi:type="xsd:int">7</id>
                     <name xsi:type="xsd:string">File Upload</name>
                  </item>
                  <item xsi:type="ns1:WSFeature">
                     <id xsi:type="xsd:int">2</id>
                     <name xsi:type="xsd:string">Inbox</name>
                  </item>
                  <item xsi:type="ns1:WSFeature">
                     <id xsi:type="xsd:int">6</id>
                     <name xsi:type="xsd:string">Individual</name>
                  </item>
                  <item xsi:type="ns1:WSFeature">
                     <id xsi:type="xsd:int">14</id>
                     <name xsi:type="xsd:string">Keywords</name>
                  </item>
                  <item xsi:type="ns1:WSFeature">
                     <id xsi:type="xsd:int">4</id>
                     <name xsi:type="xsd:string">Manage Tab</name>
                  </item>
                  <item xsi:type="ns1:WSFeature">
                     <id xsi:type="xsd:int">9</id>
                     <name xsi:type="xsd:string">MCard</name>
                  </item>
                  <item xsi:type="ns1:WSFeature">
                     <id xsi:type="xsd:int">10</id>
                     <name xsi:type="xsd:string">Message Center</name>
                  </item>
                  <item xsi:type="ns1:WSFeature">
                     <id xsi:type="xsd:int">13</id>
                     <name xsi:type="xsd:string">Organization</name>
                  </item>
                  <item xsi:type="ns1:WSFeature">
                     <id xsi:type="xsd:int">36</id>
                     <name xsi:type="xsd:string">Remote Subscribers</name>
                  </item>
                  <item xsi:type="ns1:WSFeature">
                     <id xsi:type="xsd:int">3</id>
                     <name xsi:type="xsd:string">Reports Tab</name>
                  </item>
                  <item xsi:type="ns1:WSFeature">
                     <id xsi:type="xsd:int">26</id>
                     <name xsi:type="xsd:string">Social Media</name>
                  </item>
                  <item xsi:type="ns1:WSFeature">
                     <id xsi:type="xsd:int">15</id>
                     <name xsi:type="xsd:string">Subscribers</name>
                  </item>
                  <item xsi:type="ns1:WSFeature">
                     <id xsi:type="xsd:int">16</id>
                     <name xsi:type="xsd:string">Templates</name>
                  </item>
                  <item xsi:type="ns1:WSFeature">
                     <id xsi:type="xsd:int">24</id>
                     <name xsi:type="xsd:string">URL Callback</name>
                  </item>
                  <item xsi:type="ns1:WSFeature">
                     <id xsi:type="xsd:int">12</id>
                     <name xsi:type="xsd:string">User</name>
                  </item>
                  <item xsi:type="ns1:WSFeature">
                     <id xsi:type="xsd:int">1</id>
                     <name xsi:type="xsd:string">Wap</name>
                  </item>
               </featurelist>
    </response>
    <result xsi:type="xsd:boolean">true</result>
    </getCompanyFeaturesReturn>
    </ns1:getCompanyFeaturesResponse>
    </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 = "company_keyword";
     
    //create task bind
    WS_CompanyBinding bind = new WS_CompanyBinding();
    bind.Url = "SSL//HOST_URL/webservices/company/2.0.0";
     
    //create result object
    WSFeatureListResponse ws_result = new WSFeatureListResponse();
     
    //call bind event
    ws_result = bind.getCompanyFeatures(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;
    WSFeatureList list = ws_result.response;
    }
static readCompany ( auth) [static]

Description:

Get an existing company.
Parameters:
WSAuthentication$authAuthentication Object
username  - String[40] (Required) - Username for white label credentials
password  - String[40] (Required) - Password for white label credentials
api_key   - String[40] (Required) - Credentials for white label
code      - Integer    (Required) - Default shortcode or longcode for company
keyword   - String[40] (Required) - Default keyword for the company to be read
Returns:
WSCompanyResponse $response
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      - Email of company if set at creation
keyword    - Default keyword of company
name       - Name of company
phone      - Phone number of company if set at creation
url        - URL of company if set at creation
ADDRESS OBJECT - If set at creation it will show here
city
state
state_abbr
street
street2
zip
Code Examples:
<?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'] = 'company_keyword';
$auth['code'] = 12345;

$results = $soap->readCompany($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:readCompany 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">company_keyword</keyword>
    </auth>
    </urn:readCompany>
    </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:readCompanyResponse>
    <readCompanyReturn xsi:type="ns1:WSCompanyResponse">
    <message xsi:type="xsd:string">Successfully read company.</message>
    <response xsi:type="ns1:WSCompany">
    <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">company_keyword</keyword>
    <name xsi:type="xsd:string">Test Company</name>
    <phone xsi:type="xsd:string">8885554433</phone>
    <subscriptionnodes SOAP-ENC:arrayType="ns1:WSSubscriptionnode[0]" xsi:type="ns1:WSSubscriptionnodeArray"/>
    <url xsi:type="xsd:string">http://www.test.com</url>
    </response>
    <result xsi:type="xsd:boolean">true</result>
    </readCompanyReturn>
    </ns1:readCompanyResponse>
    </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_company_read";
    auth.code = "12345";
     
    //create task bind
    WS_CompanyBinding bind = new WS_CompanyBinding();
    bind.Url = "SSL//HOST_URL/webservices/company/2.0.0";
     
    //create result object
    WSCompanyResponse ws_result = new WSCompanyResponse();
     
    //call bind event
    ws_result = bind.readCompany(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;
    WSCompany c = ws_result.response;
    }
 Request
SSL//HOST_URL/httppost/nvp?version=2.0.0&method_name=company.readCompany&username={username}&password={password}&api_key={api_key}&code=12345&keyword={Company keyword}


 Response
<?xml version="1.0" encoding="utf-8"?>
<readCompany>
  <message>Successfully read company.</message>
  <error_code></error_code>
  <result>true</result>
  <response>
    <name>newCompanyHttpPost</name>
    <address>
      <street></street>
      <street2></street2>
      <city></city>
      <state></state>
      <state_abbr></state_abbr>
      <zip></zip>
    </address>
    <phone></phone>
    <email></email>
    <url></url>
    <keyword>31319</keyword>
    <default_code></default_code>
    <divisions></divisions>
    <subscriptionnodes></subscriptionnodes>
  </response>
</readCompany>
static removeCompanyFeature ( auth,
feature_list 
) [static]

Description:

Remove a feature for a company
Parameters:
WSAuthentication$authAuthentication Object
username  - String[40] (Required) - Username for white label credentials
password  - String[40] (Required) - Password for white label credentials
api_key   - String[40] (Required) - Credentials for white label
code      - Integer    (Required) - Default shortcode or longcode for company
keyword   - String[40] (Required) - Default keyword for the company to have features revoked
WSFeatureList$feature_listFeature List Object
id -    Integer (Required) -
name -  String  (Oprional) -
ID NAME
5 Address Book
11 Calendar
35 Field Mapping
7 File Upload
2 Inbox
6 Individual
37 International Delivery
14 Keywords
4 Manage Tab
9 MCard
10 Message Center
13 Organization
36 Remote Subscribers
3 Reports Tab
26 Social Media
15 Subscribers
16 Templates
24 URL Callback
12 User
1 WAP
27 Enhanced Mobile Site
Returns:
WSFeatureListResponse $response
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.
id         - Feature id that was removed
name       - Feature name that was removed
Code Examples:
<?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'] = 'company_keyword';
$auth['code'] = 12345;
 
$feature = array();
$feature['name'] = 'Inbox';
$feature['id'] = 2;
$featurelist = array();
$featurelist['featurelist'] = $feature;

$results = $soap->removeCompanyFeature($auth, $feature);

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:removeCompanyFeature 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">company_keyword</keyword>
    </auth>
    <feature_list xsi:type="urn:WSFeatureList">
    <featureList SOAP-ENC:arrayType="SOAP-ENC:Struct[1]" xsi:type="SOAP-ENC:Array">
    <feature xsi:type="urn:WSFeature">
    <name xsi:type="xsd:string">Sample Feature</name>
    </feature>
    </featureList>
    </feature_list>
    </urn:removeCompanyFeature>
    </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:removeCompanyFeatureResponse>
    <removeCompanyFeatureReturn xsi:type="ns1:WSFeatureListResponse">
    <message xsi:type="xsd:string">Successfully removed feature(s).</message>
    <response xsi:type="ns1:WSFeatureList">
    <featurelist SOAP-ENC:arrayType="ns1:WSFeature[1]" xsi:type="ns1:WSFeatureArray">
    <item xsi:type="ns1:WSFeature">
    <id xsi:type="xsd:int">3</id>
    <name xsi:type="xsd:string">Reports Tab</name>
    </item>
    </featurelist>
    </response>
    <result xsi:type="xsd:boolean">true</result>
    </removeCompanyFeatureReturn>
    </ns1:removeCompanyFeatureResponse>
    </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_company";
    auth.code = "12345";
     
    List<WSFeature> list = new List<WSFeature>();
    //create feature list
    WSFeature feature = new WSFeature();
    feature.name = "Calendar";
    feature.id = 11;
    list.Add(feature);
     
    //create feature list
    WSFeatureList feaList = new WSFeatureList();
    feaList.featurelist = list.ToArray();
     
    //create task bind
    WS_CompanyBinding bind = new WS_CompanyBinding();
    bind.Url = "SSL//HOST_URL/webservices/company/2.0.0";
     
    //create result object
    WSFeatureListResponse ws_result = new WSFeatureListResponse();
     
    //call bind event
    ws_result = bind.removeCompanyFeature(auth, feaList);
     
    //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;
    WSFeatureList rList = ws_result.response;
    }
static restoreCompany ( auth) [static]

Description:

Restore an existing company
Parameters:
WSAuthentication$authAuthentication Object
username  - String[40] (Required) - Username for white label credentials
password  - String[40] (Required) - Password for white label credentials
api_key   - String[40] (Required) - Credentials for white label
code      - Integer    (Required) - Default shortcode or longcode for company
keyword   - String[40] (Required) - Default keyword for the company to be restored
Returns:
WSCompanyResponse $response
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      - Email of company
keyword    - Default keyword of company
name       - Name of company
phone      - Phone number of company
url        - URL of company
ADDRESS OBJECT - If set at creation it will show here
city
state
state_abbr
street
street2
zip
Code Examples:
<?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'] = 'company_keyword';
$auth['code'] = 12345;

$results = $soap->restoreCompany($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:restoreCompany 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">company_keyword</keyword>
    </auth>
    </urn:restoreCompany>
    </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:restoreCompanyResponse>
    <restoreCompanyReturn xsi:type="ns1:WSCompanyResponse">
    <message xsi:type="xsd:string">Successfully restored company.</message>
    <response xsi:type="ns1:WSCompany">
    <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">company_keyword</keyword>
    <name xsi:type="xsd:string">Sample Company</name>
    <phone xsi:type="xsd:string">8885554433</phone>
    <subscriptionnodes SOAP-ENC:arrayType="ns1:WSSubscriptionnode[0]" xsi:type="ns1:WSSubscriptionnodeArray"/>
    <url xsi:type="xsd:string">http://www.test.com</url>
    </response>
    <result xsi:type="xsd:boolean">true</result>
    </restoreCompanyReturn>
    </ns1:restoreCompanyResponse>
    </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_company_restore";
    auth.code = "12345";
     
    //create task bind
    WS_CompanyBinding bind = new WS_CompanyBinding();
    bind.Url = "SSL//HOST_URL/webservices/company/2.0.0";
     
    //create result object
    WSCompanyResponse ws_result = new WSCompanyResponse();
     
    //call bind event
    ws_result = bind.restoreCompany(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;
    WSCompany c = ws_result.response;
    }
 Request
SSL//HOST_URL/httppost/nvp?version=2.0.0&method_name=company.restoreCompany&username={username}&password={password}&api_key={api_key}&code=12345&keyword={Company keyword to be restored}

 Response
<?xml version="1.0" encoding="utf-8"?>
<restoreCompany>
  <message>Successfully restored company.</message>
  <error_code></error_code>
  <result>true</result>
  <response>
    <name>Company Name</name>
    <address>
      <street></street>
      <street2></street2>
      <city></city>
      <state></state>
      <state_abbr></state_abbr>
      <zip></zip>
    </address>
    <phone></phone>
    <email></email>
    <url></url>
    <keyword>31320</keyword>
    <default_code></default_code>
    <divisions></divisions>
    <subscriptionnodes></subscriptionnodes>
  </response>
</restoreCompany>
static updateCompany ( auth,
company 
) [static]

Description:

Update an existing company
Parameters:
WSAuthentication$authAuthorization Object
username  - String[40] (Required) - Username for white label credentials
password  - String[40] (Required) - Password for white label credentials
api_key   - String[40] (Required) - Credentials for white label
code      - Integer    (Required) - Default shortcode or longcode for company
keyword   - String[40] (Required) - Default keyword for the company to be updated
WSDivision$companyCompany Object
email - String (Optional) - Email address to associate with the company
name  - String (Optional) - Name for company
phone - String (Optional) - Phone number with country code to associate with the company
url   - String (Optional) - URL address to associate with the company
address - (Object) - There is an address object inside the company object (Optional)
		street     - String (Optional) - Street address
		street2    - String (Optional) - Second line for street address
		city       - String (Optional) - City
		state      - String (Optional) - State
		state_abbr - String (Optional) - Abbreviated state ie: Idaho = 'ID'
		zip        - String (Optional) - Zip code
Returns:
WSCompanyResponse $response
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      - Email of company
keyword    - Default keyword of company
name       - Name of company
phone      - Phone number of company
url        - URL of company
ADDRESS OBJECT - If set at creation it will show here
city
state
state_abbr
street
street2
zip
Code Examples:
<?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 company object
$company = array();
$company["name"] = "Sample Company";
$company["phone"] = "5551234567";
$company["email"] = "email@test.com";
$company["url"] = "www.test.com";
//The following fields are optional to set, but are required to be passed in the object
$company["default_code"] = 12345;
$company["divisions"] = '';
$company["subscriptionnodes"] = '';
$company["keyword"] = '';

 
//create an address object to go with the company
$add = array();
$add["street"] = "123 East";
$add["street2"] = "234 North";
$add["city"] = "Cityville";
$add["state"] = "Idaho";
$add["state_abbr"] = "ID";
$add["zip"] = "12345";
$company["address"] = $add;

$results = $soap->updateCompany($auth, $company);

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:updateCompany 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">company_keyword</keyword>
    </auth>
    <company xsi:type="urn:WSDivision">
    <email xsi:type="xsd:string">test@test.com</email>
    <name xsi:type="xsd:string">Test Company</name>
    <phone xsi:type="xsd:string">8885554433</phone>
    <url xsi:type="xsd:string">http://www.test.com</url>
    <address xsi:type="urn:WSAddress">
    <city xsi:type="xsd:string">Cityville</city>
    <state xsi:type="xsd:string"></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:integer">87654</zip>
    </address>
    </company>
    </urn:updateCompany>
    </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:updateCompanyResponse>
    <updateCompanyReturn xsi:type="ns1:WSCompanyResponse">
    <message xsi:type="xsd:string">Successfully updated company.</message>
    <response xsi:type="ns1:WSCompany">
    <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">company_keyword</keyword>
    <name xsi:type="xsd:string">Test Company</name>
    <phone xsi:type="xsd:string">8885554433</phone>
    <subscriptionnodes SOAP-ENC:arrayType="ns1:WSSubscriptionnode[0]" xsi:type="ns1:WSSubscriptionnodeArray"/>
    <url xsi:type="xsd:string">http://www.test.com</url>
    </response>
    <result xsi:type="xsd:boolean">true</result>
    </updateCompanyReturn>
    </ns1:updateCompanyResponse>
    </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_company_to_update";
    auth.code = "12345";
     
    //create company object
    WSDivision div = new WSDivision();
    div.name = "Test Company";
    div.phone = "8885554433";
    div.email = "support@company.com";
    div.url = "www.company.com";
     
    //create address object
    WSAddress add = new WSAddress();
    add.street = "123 East";
    add.street2 = "234 South";
    add.city = "Cityville";
    add.state_abbr = "ID";
    add.zip = 87654;
    div.address = add;
     
    //create task bind
    WS_CompanyBinding bind = new WS_CompanyBinding();
    bind.Url = "SSL//HOST_URL/webservices/company/2.0.0";
     
    //create result object
    WSCompanyResponse ws_result = new WSCompanyResponse();
     
    //call bind event
    ws_result = bind.updateCompany(auth,div);
     
    //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;
    WSCompany c = ws_result.response;
    }
 Request
SSL//HOST_URL/httppost/nvp?version=2.0.0&method_name=company.updateCompany&username={username}&password={password}&api_key={api_key}&code=12345&keyword={Company keyword}&name=UpdateCompany


 Response
<?xml version="1.0" encoding="utf-8"?>
<updateCompany>
  <message>Successfully updated company.</message>
  <error_code></error_code>
  <result>true</result>
  <response>
    <name>UpdateCompany</name>
    <address>
      <street></street>
      <street2></street2>
      <city></city>
      <state></state>
      <state_abbr></state_abbr>
      <zip></zip>
    </address>
    <phone></phone>
    <email></email>
    <url></url>
    <keyword>31319</keyword>
    <default_code></default_code>
    <divisions></divisions>
    <subscriptionnodes></subscriptionnodes>
  </response>
</updateCompany>