There is a newer version of the API available. To link to the newest API documentation, click here - Version 20110301
  1. Retailer API

Retailer API

 

getRetailers

Gets an array of retailers registered to the partner.

getRetailers request

getRetailers response

 

 

getRetailers Example

getRetailers Request Example - XML

<dce>
    <request>
	
        <authentication>
            <username>username</username>
            <password>password</password>
        </authentication>

	    <action>getRetailers</action>
		
		<limit>2</limit>
	</request>
</dce>

getRetailers Response Example - XML

<?xml version="1.0"?>
<dce>
  <response>
    <outcome>success</outcome>
    <total>27</total>
    <limit>2</limit>
    <offset/>
    <retailers>
      <retailer>
        <retailer_id>123456</retailer_id>
        <first_name>John E</first_name>
        <last_name>Doe</last_name>
        <phone>8018010987</phone>
        <email>newtest@test.com</email>
        <address1>1234 Fake St</address1>
        <address2/>
        <city>Lehi</city>
        <state>UT</state>
        <postal_code>84604</postal_code>
        <country>US</country>
        <subscription_type>AccessSubscription</subscription_type>
        <register_date>2010-08-20 12:48:27</register_date>
        <paid_through_date>2010-09-19</paid_through_date>
        <status>active</status>
        <billing_responsibility>Partner</billing_responsibility>
      </retailer>
      <retailer>
        <retailer_id>7654321</retailer_id>
        <first_name>Qwer</first_name>
        <last_name>Qwer</last_name>
        <phone>7899879876</phone>
        <email>test@test.com</email>
        <address1>1234 S Main</address1>
        <address2/>
        <city>Demo</city>
        <state>UT</state>
        <postal_code>78915</postal_code>
        <country>US</country>
        <subscription_type>AccessSubscription</subscription_type>
        <register_date>2010-07-12 14:34:56</register_date>
        <paid_through_date>2010-08-11</paid_through_date>
        <status>active</status>
        <billing_responsibility>Partner</billing_responsibility>
      </retailer>
    </retailers>
  </response>
</dce>

getRetailers Request Example - SOAP

<?php
$URL = "https://sandbox.doba.com/soap/20101012/wsdl/ApiPartnerRetailer.wsdl";
$client = new SoapClient($URL, array("trace" => 1));
$objAuth = new stdClass();
$objAuth->username = "username";
$objAuth->password = "password";
$objRequest = new stdClass();
$objRequest->authentication = $objAuth;
$objRequest->limit=2;

try { $Response = $client->getRetailers($objRequest); }
catch ( SOAPFault $e ) {$Response = ("Error ".$e->faultcode.": ".$e->faultstring); }

print "URL = $URL\n\n";
print "Method = getRetailers\n\n";
print "Request:\n=====================================================\n\n";
print_r($objRequest);
print "\n\nResponse:\n=====================================================\n\n";
print_r($Response);
?>

getRetailers Response Example - SOAP

stdClass Object
(
    [limit] => 2
    [offset] => 0
    [retailers] => Array
        (
            [0] => stdClass Object
                (
                    [address1] => 1234 Fake St
                    [address2] => 
                    [billing_responsibility] => Partner
                    [city] => Lehi
                    [country] => US
                    [email] => newtest@test.com
                    [first_name] => John E
                    [last_name] => Doe
                    [paid_through_date] => 2010-09-19
                    [phone] => 8018010987
                    [postal_code] => 84604
                    [register_date] => 2010-08-20 12:48:27
                    [retailer_id] => 123456
                    [state] => UT
                    [status] => active
                    [subscription_type] => AccessSubscription
                )
 
            [1] => stdClass Object
                (
                    [address1] => 1234 S Main
                    [address2] => 
                    [billing_responsibility] => Partner
                    [city] => Demo
                    [country] => US
                    [email] => test@test.com
                    [first_name] => Qwer
                    [last_name] => Qwer
                    [paid_through_date] => 2010-08-11
                    [phone] => 7899879876
                    [postal_code] => 78915
                    [register_date] => 2010-07-12 14:34:56
                    [retailer_id] => 7654321
                    [state] => UT
                    [status] => active
                    [subscription_type] => AccessSubscription
                )
 
        )
 
    [total] => 27
)

 

 

addRetailer

Adds a retailer (aka lead, member, user, merchant) to the Doba platform.

See the section titled Creating Users through the API for example API calls.

Note: The please contact your account representative at Doba to get a list of api_code's that work with your account.

addRetailer request

addRetailer response

 

 

addRetailer Example

addRetailer Request Example - XML

<dce>
    <request>
	
        <authentication>
            <username>username</username>
            <password>password</password>
        </authentication>

	    <action>addRetailer</action>

		<email>tech20090220-2@12345678.com</email>
		<firstname>Number</firstname>
		<lastname>One</lastname>
		<phone>789-555-5555</phone>
		<billing_street>890 North 456 South</billing_street>
		<billing_city>Cape Town</billing_city>
		<billing_state>AZ</billing_state>
		<billing_postal>78915</billing_postal>
		<billing_country>US</billing_country>
	    <accept_terms>1</accept_terms>
		<ip_address>10.0.0.10</ip_address>

	    <subscriptions>
			<subscription>
				<api_code>AD1K</api_code>
				<frequency>Y</frequency>
				<billing_responsibility>P</billing_responsibility>
				<trial>14</trial>   
			</subscription>
		</subscriptions>

	</request>
</dce>

addRetailer Response Example - XML

<?xml version="1.0"?>
<dce>
  <response>
    <outcome>success</outcome>
    <retailer_id>123456</retailer_id>
    <username>tech20090220-2@123456789.com</username>
    <change_password_url>https://www.sandbox.doba.com/members/change_password.php?ref=J29TC0tuZZMZiiA44L1sTw1UbmZDhRe4KEiCi3sCp020u8WQdM2mn%2BSXCoYpAVSv</change_password_url>
  </response>
</dce>

addRetailer Request Example - SOAP

<?php
$URL = "https://sandbox.doba.com/soap/20101012/wsdl/ApiPartnerRetailer.wsdl";
$client = new SoapClient($URL, array("trace" => 1));
$objAuth = new stdClass();
$objAuth->username = "username";
$objAuth->password = "password";
$objRequest = new stdClass();
$objRequest->authentication = $objAuth;
$objRequest->firstname="Foo_First";
$objRequest->lastname="Foo_Last";
$objRequest->phone="123-123-1234";
$objRequest->billing_street="123 East 400 West";
$objRequest->billing_city="Omaha";
$objRequest->billing_state="UT";
$objRequest->billing_postal="12345";
$objRequest->billing_country="US";
$objRequest->credit_card_number="4111111111111111";
$objRequest->credit_card_exp_month="08";
$objRequest->credit_card_exp_year="2010";
$objRequest->accept_terms="1";
$objRequest->email="tech20090220-1@12345678.com";
$objRequest->username="";
$objRequest->ip_address="11.12.13.14";
$objRequest->accept_terms="1";
$sub0 = new stdClass();
$sub0->api_code = "AD1K";
$sub0->frequency = "M";
$sub0->billing_responsibility = "P";
$sub0->trial = "7";
$objRequest->subscriptions=Array($sub0);

try { $Response = $client->addRetailer($objRequest); }
catch ( SOAPFault $e ) {$Response = ("Error ".$e->faultcode.": ".$e->faultstring); }

print "URL = $URL\n\n";
print "Method = addRetailer\n\n";
print "Request:\n=====================================================\n\n";
print_r($objRequest);
print "\n\nResponse:\n=====================================================\n\n";
print_r($Response);
?>

addRetailer Response Example - SOAP

stdClass Object
(
    [retailer_id] => 1223942
    [change_password_url] => https://www.sandbox.doba.com/members/change_password.php?ref=oCsvJ%2Bfo%2FUYlf3Gn%2BxEu3A1UbmZDhRe4KEiCi3sCp03ZSLPw5aw70Jy0w6qQr8Ef
    [username] => tech20090220-1@12345678.com
)

 

 

upgradeRetailer

Upgrades the retailer to a new subscription.

Can only be done if the partner has responibility for the account.

Note: The please contact your account representative at Doba to get a list of api_code's that work with your account.

upgradeRetailer request

upgradeRetailer response

There are no response fields for this method. Either the request is successful or it fails.

 

 

upgradeRetailer Example

upgradeRetailer Request Example - XML

<?xml version="1.0"?>
<dce>
  <request>
    <authentication>
      <username>username</username>
      <password>password</password>
    </authentication>
    <action>upgradeRetailer</action>
    <retailer_id>1223549</retailer_id>
    <subscriptions>
      <subscription>
        <api_code>AD1K</api_code>
        <frequency>M</frequency>
        <billing_responsibility>P</billing_responsibility>
        <trial>7</trial>
      </subscription>
    </subscriptions>
  </request>
</dce>

upgradeRetailer Response Example - XML

<?xml version="1.0"?>
<dce>
  <response>
    <outcome>success</outcome>
    <value>1</value>
  </response>
</dce>

upgradeRetailer Request Example - SOAP

<?php
$URL = "https://sandbox.doba.com/soap/20101012/wsdl/ApiPartnerRetailer.wsdl";
$client = new SoapClient($URL, array("trace" => 1));
$objAuth = new stdClass();
$objAuth->username = "username";
$objAuth->password = "password";
$objRequest = new stdClass();
$objRequest->authentication = $objAuth;
$objRequest->retailer_id="123465";
$sub0 = new stdClass();
$sub0->api_code = "AD1K";
$sub0->frequency = "M";
$sub0->billing_responsibility = "P";
$sub0->trial = "7";
$objRequest->subscriptions=Array($sub0);

try { $Response = $client->upgradeRetailer($objRequest); }
catch ( SOAPFault $e ) {$Response = ("Error ".$e->faultcode.": ".$e->faultstring); }

print "URL = $URL\n\n";
print "Method = upgradeRetailer\n\n";
print "Request:\n=====================================================\n\n";
print_r($objRequest);
print "\n\nResponse:\n=====================================================\n\n";
print_r($Response);
?>

upgradeRetailer Response Example - SOAP

1

 

 

reactivateRetailer

Re-assumes financial responsibility for a retailer.

Can only be done if the partner originally created the account.

Note: The please contact your account representative at Doba to get a list of api_code's that work with your account.

reactivateRetailer request

reactivateRetailer response

There are no response fields for this method. Either the request is successful or it fails.

 

 

reactivateRetailer Example

reactivateRetailer Request Example - XML

<?xml version="1.0"?>
<dce>
  <request>
    <authentication>
      <username>username</username>
      <password>password</password>
    </authentication>
    <action>reactivateRetailer</action>
    <retailer_id>1223549</retailer_id>
    <subscriptions>
      <subscription>
        <api_code>AD1K</api_code>
        <frequency>M</frequency>
        <billing_responsibility>P</billing_responsibility>
        <trial>7</trial>
      </subscription>
    </subscriptions>
  </request>
</dce>

reactivateRetailer Response Example - XML

<?xml version="1.0"?>
<dce>
  <response>
    <outcome>success</outcome>
    <value>1</value>
  </response>
</dce>

reactivateRetailer Request Example - SOAP

<?php
$URL = "https://sandbox.doba.com/soap/20101012/wsdl/ApiPartnerRetailer.wsdl";
$client = new SoapClient($URL, array("trace" => 1));
$objAuth = new stdClass();
$objAuth->username = "username";
$objAuth->password = "password";
$objRequest = new stdClass();
$objRequest->authentication = $objAuth;
$objRequest->retailer_id="123465";
$sub0 = new stdClass();
$sub0->api_code = "AD1K";
$sub0->frequency = "M";
$sub0->billing_responsibility = "P";
$sub0->trial = "7";
$objRequest->subscriptions=Array($sub0);

try { $Response = $client->reactivateRetailer($objRequest); }
catch ( SOAPFault $e ) {$Response = ("Error ".$e->faultcode.": ".$e->faultstring); }

print "URL = $URL\n\n";
print "Method = reactivateRetailer\n\n";
print "Request:\n=====================================================\n\n";
print_r($objRequest);
print "\n\nResponse:\n=====================================================\n\n";
print_r($Response);
?>

reactivateRetailer Response Example - SOAP

1

 

 

getRetailerAccessInfo

Retrievs user access and status information.

If your partner account has a valid authorization with the retailer_id and the retailer account is not active it will return an api_code of "EXPIRED". This means that the retailer will need to re-activate their account in order for them to access the Doba catalog through your software or directly at www.doba.com.

If your partner account has a valid authorization with the retailer_id but you don't own the account, and the account is active, it will return a blank api_code. This means that the retailer does have access to the catalog but they are paying for their own account.

If your partner account has a valid authorization with the retailer_id and you own the account, meaning that you are financially responsible for the account, not the customer, then we will return the api_code on the account.

If you do not have a valid authorization link, it will return "Error 380: Retailer ID does not exist or you do not have access to this retailer." as an error. This means that you must request authorization from this retailer, using the requestPartnerPermission API method, in order to make API calls on their behalf.

getRetailerAccessInfo request

getRetailerAccessInfo response

 

 

getRetailerAccessInfo Example

getRetailerAccessInfo Request Example - XML

<dce>
    <request>
	
        <authentication>
            <username>username</username>
            <password>password</password>
        </authentication>

	<action>getRetailerAccessInfo</action>
		
	<retailer_ids>
		<retailer_id>123456</retailer_id>
	</retailer_ids>

    </request>
</dce>

getRetailerAccessInfo Response Example - XML

<?xml version="1.0"?>
<dce>
  <response>
    <outcome>success</outcome>
    <retailer_info>
      <access_sub_api_code>AD1K</access_sub_api_code>
      <product_detail_total>1000</product_detail_total>
      <product_detail_count/>
      <product_inventory_total>1000</product_inventory_total>
      <product_inventory_count/>
    </retailer_info>
    <retailer_info>
      <access_sub_api_code>AD1K</access_sub_api_code>
      <product_detail_total>1000</product_detail_total>
      <product_detail_count/>
      <product_inventory_total>1000</product_inventory_total>
      <product_inventory_count/>
    </retailer_info>
  </response>
</dce>

getRetailerAccessInfo Request Example - SOAP

<?php
$URL = "https://sandbox.doba.com/soap/20101012/wsdl/ApiPartnerRetailer.wsdl";
$client = new SoapClient($URL, array("trace" => 1));
$objAuth = new stdClass();
$objAuth->username = "username";
$objAuth->password = "password";
$objRequest = new stdClass();
$objRequest->authentication = $objAuth;
$objRequest->retailer_ids=array(123456);

try { $Response = $client->getRetailerAccessInfo($objRequest); }
catch ( SOAPFault $e ) {$Response = ("Error ".$e->faultcode.": ".$e->faultstring); }

print "URL = $URL\n\n";
print "Method = getRetailerAccessInfo\n\n";
print "Request:\n=====================================================\n\n";
print_r($objRequest);
print "\n\nResponse:\n=====================================================\n\n";
print_r($Response);
?>

getRetailerAccessInfo Response Example - SOAP

Array
(
    [0] => stdClass Object
        (
            [access_sub_api_code] => EXPIRED
            [product_detail_count] => 
            [product_detail_total] => 
            [product_inventory_count] => 
            [product_inventory_total] => 
            [retailer_id] => 2182317
        )

    [1] => stdClass Object
        (
            [access_sub_api_code] => 
            [product_detail_count] => 
            [product_detail_total] => 10000
            [product_inventory_count] => 
            [product_inventory_total] => 10000
            [retailer_id] => 1225132
        )

)

 

 

getPasswordResetLink

Returns a Password reset url for the specified retailer.

getPasswordResetLink request

getPasswordResetLink response

 

 

getPasswordResetLink Example

getPasswordResetLink Request Example - XML

<dce>
    <request>
	
        <authentication>
            <username>username</username>
            <password>password</password>
        </authentication>

	<action>getPasswordResetLink</action>
		
	<retailer_id>123456</retailer_id>

    </request>
</dce>

getPasswordResetLink Response Example - XML

<?xml version="1.0"?>
<dce>
  <response>
    <outcome>success</outcome>
    <value>https://www.sandbox.doba.com/members/change_password.php?ref=J29TC0tuZZMZiiA44L1sTw1UbmZDhRe4KEiCi3sCp020u8WQdM2mn%2BSXCoYpAVSv</value>
  </response>
</dce>

getPasswordResetLink Request Example - SOAP

<?php
$URL = "https://sandbox.doba.com/soap/20101012/wsdl/ApiPartnerRetailer.wsdl";
$client = new SoapClient($URL, array("trace" => 1));
$objAuth = new stdClass();
$objAuth->username = "username";
$objAuth->password = "password";
$objRequest = new stdClass();
$objRequest->authentication = $objAuth;
$objRequest->retailer_id="123456";

try { $Response = $client->getPasswordResetLink($objRequest); }
catch ( SOAPFault $e ) {$Response = ("Error ".$e->faultcode.": ".$e->faultstring); }

print "URL = $URL\n\n";
print "Method = getPasswordResetLink\n\n";
print "Request:\n=====================================================\n\n";
print_r($objRequest);
print "\n\nResponse:\n=====================================================\n\n";
print_r($Response);
?>

getPasswordResetLink Response Example - SOAP

https://www.sandbox.doba.com/members/change_password.php?ref=oCsvJ%2Bfo%2FUYlf3Gn%2BxEu3A1UbmZDhRe4KEiCi3sCp03ZSLPw5aw70Jy0w6qQr8Ef

 

 

requestPartnerPermission

Submits a request to the retailer requesting confirmation to allow the partner to submit API calls on behalf of the retailer.

The retailer_id of the retailer is required for this method. Retailers can retrive their retailer_id using the following insctructions:

1. Log into your Doba account.
2. Your Retailer ID will be listed in the top-right-hand corner.

The retailer will need to log into their Doba account at http://www.doba.com in order to accept/deny the request. If they are already logged in, they can go to the "Settings" page and select "Profile". There they can accept/denie any open authorization reqests.

A callback will be submitted to the partners system upon acceptance/denial by the retailer. For more information, see Retailer/Partner Permission Acceptance

Note: Retailers have the ability to revoke Partner Permissions from within their Doba account. If a retailer chooses to revoke your permission, we will issue a callback to your callback URL on file.

requestPartnerPermission request

requestPartnerPermission response

There is no response fields for this method. Either the request is successful or it fails. Failure is very rare as the only way this would happen is if there is a problem with the API system as a whole.

 

 

requestPartnerPermission Example

requestPartnerPermission Request Example - XML

<dce>
    <request>
	
        <authentication>
            <username>username</username>
            <password>password</password>
        </authentication>

	<action>requestPartnerPermission</action>
		
	<retailer_id>1223549</retailer_id>

    </request>
</dce>

requestPartnerPermission Response Example - XML

<?xml version="1.0"?>
<dce>
  <response>
    <outcome>success</outcome>
  </response>
</dce>

requestPartnerPermission Request Example - SOAP

<?php
$URL = "https://sandbox.doba.com/soap/20101012/wsdl/ApiPartnerRetailer.wsdl";
$client = new SoapClient($URL, array("trace" => 1));
$objAuth = new stdClass();
$objAuth->username = "username";
$objAuth->password = "password";
$objRequest = new stdClass();
$objRequest->authentication = $objAuth;
$objRequest->retailer_id="123456";

try { $Response = $client->requestPartnerPermission($objRequest); }
catch ( SOAPFault $e ) {$Response = ("Error ".$e->faultcode.": ".$e->faultstring); }

print "URL = $URL\n\n";
print "Method = requestPartnerPermission\n\n";
print "Request:\n=====================================================\n\n";
print_r($objRequest);
print "\n\nResponse:\n=====================================================\n\n";
print_r($Response);
?>

requestPartnerPermission Response Example - SOAP

1

 

 

hasPartnerPermission

Returns the permissions given to the partner on behalf of a retailer. Used to determine if a retailer has given a partner permission to submit API calls, such as product information calls and order create calls, on their behalf.

hasPartnerPermission request

hasPartnerPermission response

 

 

hasPartnerPermission Example

hasPartnerPermission Request Example - XML

<dce>
    <request>
	
        <authentication>
            <username>username</username>
            <password>password</password>
        </authentication>

	<action>hasPartnerPermission</action>
		
	<retailer_id>123456</retailer_id>

    </request>
</dce>

hasPartnerPermission Response Example - XML

<?xml version="1.0"?>
<dce>
  <response>
    <outcome>success</outcome>
    <has_permission>accepted</has_permission>
    <retailer_id>123456</retailer_id>
  </response>
</dce>

hasPartnerPermission Request Example - SOAP

<?php
$URL = "https://sandbox.doba.com/soap/20101012/wsdl/ApiPartnerRetailer.wsdl";
$client = new SoapClient($URL, array("trace" => 1));
$objAuth = new stdClass();
$objAuth->username = "username";
$objAuth->password = "password";
$objRequest = new stdClass();
$objRequest->authentication = $objAuth;
$objRequest->retailer_id="123456";

try { $Response = $client->hasPartnerPermission($objRequest); }
catch ( SOAPFault $e ) {$Response = ("Error ".$e->faultcode.": ".$e->faultstring); }

print "URL = $URL\n\n";
print "Method = hasPartnerPermission\n\n";
print "Request:\n=====================================================\n\n";
print_r($objRequest);
print "\n\nResponse:\n=====================================================\n\n";
print_r($Response);
?>

hasPartnerPermission Response Example - SOAP

stdClass Object
(
    [has_permission] => accepted
    [retailer_id] => 123456
)

 

 

removePartnerPermission

Removes permissions granted by the retailer to the partner. If permissions are removed, all future API calls submitted by this partner on behalf of the retailer will be denied. To request that permissions be re-instated, use the requestPartnerPermission function.

removePartnerPermission request

removePartnerPermission response

There is no response fields for this method. Either the request is successful or it fails. Failure is very rare as the only way this would happen is if there is a problem with the API system as a whole.

 

 

removePartnerPermission Example

removePartnerPermission Request Example - XML

<dce>
    <request>
	
        <authentication>
            <username>username</username>
            <password>password</password>
        </authentication>
	<action>removePartnerPermission</action>
		
	<retailer_id>123456</retailer_id>

    </request>
</dce>

removePartnerPermission Response Example - XML

<?xml version="1.0"?>
<dce>
  <response>
    <outcome>success</outcome>
  </response>
</dce>

removePartnerPermission Request Example - SOAP

<?php
$URL = "https://sandbox.doba.com/soap/20101012/wsdl/ApiPartnerRetailer.wsdl";
$client = new SoapClient($URL, array("trace" => 1));
$objAuth = new stdClass();
$objAuth->username = "username";
$objAuth->password = "password";
$objRequest = new stdClass();
$objRequest->authentication = $objAuth;
$objRequest->retailer_id="123456";

try { $Response = $client->removePartnerPermission($objRequest); }
catch ( SOAPFault $e ) {$Response = ("Error ".$e->faultcode.": ".$e->faultstring); }

print "URL = $URL\n\n";
print "Method = removePartnerPermission\n\n";
print "Request:\n=====================================================\n\n";
print_r($objRequest);
print "\n\nResponse:\n=====================================================\n\n";
print_r($Response);
?>

removePartnerPermission Response Example - SOAP

1

 

 

createRetailerNote

Adds a note the the retailers account that can be seen by Doba personnel.

createRetailerNote request

createRetailerNote response

There is no response fields for this method. Either the request is successful or it fails. Failure is very rare as the only way this would happen is if there is a problem with the API system as a whole.

 

 

createRetailerNote Example

createRetailerNote Request Example - XML

<dce>
    <request>
	
        <authentication>
            <username>username</username>
            <password>password</password>
        </authentication>
	<action>createRetailerNote</action>
		
	<retailer_id>123456</retailer_id>
	
	<note>This customer is very nice. Yes, very nice indeed.</note>

    </request>
</dce>

createRetailerNote Response Example - XML

<?xml version="1.0"?>
<dce>
  <response>
    <outcome>success</outcome>
    <value>1</value>
  </response>
</dce>

createRetailerNote Request Example - SOAP

<?php
$URL = "https://sandbox.doba.com/soap/20101012/wsdl/ApiPartnerRetailer.wsdl";
$client = new SoapClient($URL, array("trace" => 1));
$objAuth = new stdClass();
$objAuth->username = "username";
$objAuth->password = "password";
$objRequest = new stdClass();
$objRequest->authentication = $objAuth;
$objRequest->retailer_id="123456";

try { $Response = $client->createRetailerNote($objRequest); }
catch ( SOAPFault $e ) {$Response = ("Error ".$e->faultcode.": ".$e->faultstring); }

print "URL = $URL\n\n";
print "Method = createRetailerNote\n\n";
print "Request:\n=====================================================\n\n";
print_r($objRequest);
print "\n\nResponse:\n=====================================================\n\n";
print_r($Response);
?>

createRetailerNote Response Example - SOAP

1

 

 

cancelRetailer

Ends financial responsibility for a partner. This call can only be utilized when a partner is paying for the retailers subscription. Upon success, the retailer will be billed when the subscription expires. The retailer's account will continue to be active until the expiration date.

In some circumstances the request will fail. This typically means that the account has already been canceled or the partner is not financially responsible for the account which means they are not allowed to cancel the account. Typically, if this response is seen, there was no reason for the request to be made in the first place and can be accepted as successful.

cancelRetailer request

cancelRetailer response

There are no response fields for this method. Either the request is successful or it fails.

 

 

cancelRetailer Example

cancelRetailer Request Example - XML

<dce>
    <request>
	
        <authentication>
            <username>username</username>
            <password>password</password>
        </authentication>
	<action>cancelRetailer</action>
		
	<retailer_id>123456</retailer_id>

    </request>
</dce>

cancelRetailer Response Example - XML

The following is an example of a successful cancelRetailer request.

<?xml version="1.0"?>
<dce>
  <response>
    <outcome>success</outcome>
    <value>1</value>
  </response>
</dce>

The following is an example of a failed cancelRetailer request.

<?xml version="1.0"?>
<dce>
  <response>
    <outcome>failure</outcome>
    <error>
      <level>3</level>
      <code>366</code>
      <message>No action taken. </message>
    </error>
  </response>
</dce>

cancelRetailer Request Example - SOAP

<?php
$URL = "https://sandbox.doba.com/soap/20101012/wsdl/ApiPartnerRetailer.wsdl";
$client = new SoapClient($URL, array("trace" => 1));
$objAuth = new stdClass();
$objAuth->username = "username";
$objAuth->password = "password";
$objRequest = new stdClass();
$objRequest->authentication = $objAuth;
$objRequest->retailer_id="123456";

try { $Response = $client->cancelRetailer($objRequest); }
catch ( SOAPFault $e ) {$Response = ("Error ".$e->faultcode.": ".$e->faultstring); }

print "URL = $URL\n\n";
print "Method = cancelRetailer\n\n";
print "Request:\n=====================================================\n\n";
print_r($objRequest);
print "\n\nResponse:\n=====================================================\n\n";
print_r($Response);
?>

cancelRetailer Response Example - SOAP

1