1. Retailer API

Retailer API

 

getRetailers

Gets an array of retailers registered to the partner.

getRetailers Request Parameters

getRetailers Response Parameters

 

 

getRetailers Example

getRetailers Request Example - XML

<?php
$URL = "https://sandbox.doba.com/api/20110301/xml_partner_api.php";
$strRequest = "
<dce>
  <request>
    <authentication>
      <username>username</username>
      <password>password</password>
    </authentication>
    <action>getRetailers</action>
    <limit>2</limit>
    <from_date>2010-05-01</from_date>
    <to_date>2010-10-30</to_date>
  </request>
</dce>
";
$connection = curl_init();
curl_setopt($connection, CURLOPT_URL, $URL );
curl_setopt($connection, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($connection, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($connection, CURLOPT_POST, 1);
curl_setopt($connection, CURLOPT_POSTFIELDS, $strRequest);
curl_setopt($connection, CURLOPT_RETURNTRANSFER, 1);
set_time_limit(108000);
$strResponse = curl_exec($connection);
if(curl_errno($connection)) {
	print "Curl error: " . curl_error($connection);
} else {
	$info = curl_getinfo($connection);
	print "HTTP Response Code = ".$info["http_code"]."\n";
}
curl_close($connection);

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

getRetailers Response Example - XML

<?xml version="1.0"?>
<dce>
  <response>
    <outcome>success</outcome>
    <total>233</total>
    <limit>2</limit>
    <offset/>
    <retailers>
      <retailer>
        <retailer_id>1990318</retailer_id>
        <first_name>Qwer</first_name>
        <last_name>Qwer</last_name>
        <phone>8018010987</phone>
        <email>qwe@qwer.com</email>
        <address1/>
        <address2/>
        <city>Lehi</city>
        <state>UT</state>
        <postal_code>84604</postal_code>
        <country>US</country>
        <subscription_type>AccessDoba25KSubscription</subscription_type>
        <register_date>2010-10-14 14:47:48</register_date>
        <paid_through_date>2010-11-13</paid_through_date>
        <status>active</status>
        <billing_responsibility>Partner</billing_responsibility>
      </retailer>
      <retailer>
        <retailer_id>1990317</retailer_id>
        <first_name>Qwer</first_name>
        <last_name>Qwer</last_name>
        <phone>8018010987</phone>
        <email>qwer@qwer.com</email>
        <address1>1234 S Main</address1>
        <address2/>
        <city>Lehi</city>
        <state>UT</state>
        <postal_code>84604</postal_code>
        <country>US</country>
        <subscription_type>AccessDoba25KSubscription</subscription_type>
        <register_date>2010-10-14 13:52:39</register_date>
        <paid_through_date>2010-11-13</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/api/20110301/xml_partner_api.php";
$strRequest = "
<dce>
  <request>
    <authentication>
      <username>username</username>
      <password>password</password>
    </authentication>
    <action>getRetailers</action>
    <limit>2</limit>
    <from_date>2010-05-01</from_date>
    <to_date>2010-10-30</to_date>
  </request>
</dce>
";
$connection = curl_init();
curl_setopt($connection, CURLOPT_URL, $URL );
curl_setopt($connection, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($connection, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($connection, CURLOPT_POST, 1);
curl_setopt($connection, CURLOPT_POSTFIELDS, $strRequest);
curl_setopt($connection, CURLOPT_RETURNTRANSFER, 1);
set_time_limit(108000);
$strResponse = curl_exec($connection);
if(curl_errno($connection)) {
	print "Curl error: " . curl_error($connection);
} else {
	$info = curl_getinfo($connection);
	print "HTTP Response Code = ".$info["http_code"]."\n";
}
curl_close($connection);

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

getRetailers Response Example - SOAP

stdClass Object
(
    [limit] => 2
    [offset] => 0
    [retailers] => Array
        (
            [0] => stdClass Object
                (
                    [address1] => 
                    [address2] => 
                    [billing_responsibility] => Partner
                    [city] => Lehi
                    [country] => US
                    [email] => qwe@qwer.com
                    [first_name] => Qwer
                    [last_name] => Qwer
                    [paid_through_date] => 2010-11-13
                    [phone] => 8018010987
                    [postal_code] => 84604
                    [register_date] => 2010-10-14 14:47:48
                    [retailer_id] => 1990318
                    [state] => UT
                    [status] => active
                    [subscription_type] => AccessDoba25KSubscription
                )

            [1] => stdClass Object
                (
                    [address1] => 1234 S Main
                    [address2] => 
                    [billing_responsibility] => Partner
                    [city] => Lehi
                    [country] => US
                    [email] => qwer@qwer.com
                    [first_name] => Qwer
                    [last_name] => Qwer
                    [paid_through_date] => 2010-11-13
                    [phone] => 8018010987
                    [postal_code] => 84604
                    [register_date] => 2010-10-14 13:52:39
                    [retailer_id] => 1990317
                    [state] => UT
                    [status] => active
                    [subscription_type] => AccessDoba25KSubscription
                )

        )

    [total] => 233
)

 

 

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 Parameters

addRetailer Response Parameters

 

 

addRetailer Example

addRetailer Request Example - XML

<?php
$URL = "https://sandbox.doba.com/api/20110301/xml_partner_api.php";
$strRequest = "
<dce>
  <request>
    <authentication>
      <username>username</username>
      <password>password</password>
    </authentication>
    <action>addRetailer</action>
    <email>tech_20111019@12345678.com</email>
    <firstname>Number</firstname>
    <lastname>One</lastname>
    <phone>789-560-6909</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>192.168.0.15</ip_address>
    <subscriptions>
      <subscription>
        <api_code>DPLUS</api_code>
        <frequency>L</frequency>
        <billing_responsibility>P</billing_responsibility>
        <trial>14</trial>
      </subscription>
    </subscriptions>
  </request>
</dce>
";
$connection = curl_init();
curl_setopt($connection, CURLOPT_URL, $URL );
curl_setopt($connection, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($connection, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($connection, CURLOPT_POST, 1);
curl_setopt($connection, CURLOPT_POSTFIELDS, $strRequest);
curl_setopt($connection, CURLOPT_RETURNTRANSFER, 1);
set_time_limit(108000);
$strResponse = curl_exec($connection);
if(curl_errno($connection)) {
	print "Curl error: " . curl_error($connection);
} else {
	$info = curl_getinfo($connection);
	print "HTTP Response Code = ".$info["http_code"]."\n";
}
curl_close($connection);

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

addRetailer Response Example - XML

<?xml version="1.0"?>
<dce>
  <response>
    <outcome>success</outcome>
    <retailer_id>1991615</retailer_id>
    <username>1991615</username>
    <change_password_url>https://www.sandbox.doba.com/change-password.html?ref=C6D2AF231EDB271BF947BD605AE353985B445583F515DB46749CABE484AC5AF35E73896BCAB00FB86E16951CCCA7EA03</change_password_url>
  </response>
</dce>

addRetailer Request Example - SOAP

<?php
$URL = "https://sandbox.doba.com/api/20110301/xml_partner_api.php";
$strRequest = "
<dce>
  <request>
    <authentication>
      <username>username</username>
      <password>password</password>
    </authentication>
    <action>addRetailer</action>
    <email>tech_20111019@12345678.com</email>
    <firstname>Number</firstname>
    <lastname>One</lastname>
    <phone>789-560-6909</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>192.168.0.15</ip_address>
    <subscriptions>
      <subscription>
        <api_code>DPLUS</api_code>
        <frequency>L</frequency>
        <billing_responsibility>P</billing_responsibility>
        <trial>14</trial>
      </subscription>
    </subscriptions>
  </request>
</dce>
";
$connection = curl_init();
curl_setopt($connection, CURLOPT_URL, $URL );
curl_setopt($connection, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($connection, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($connection, CURLOPT_POST, 1);
curl_setopt($connection, CURLOPT_POSTFIELDS, $strRequest);
curl_setopt($connection, CURLOPT_RETURNTRANSFER, 1);
set_time_limit(108000);
$strResponse = curl_exec($connection);
if(curl_errno($connection)) {
	print "Curl error: " . curl_error($connection);
} else {
	$info = curl_getinfo($connection);
	print "HTTP Response Code = ".$info["http_code"]."\n";
}
curl_close($connection);

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

addRetailer Response Example - SOAP

stdClass Object
(
    [change_password_url] => https://www.sandbox.doba.com/change-password.html?ref=575D321FC1ABB867469FE93E2295A0845B445583F515DB46749CABE484AC5AF3FD0943B5F1301758D421CE373F7F698D
    [retailer_id] => 1991616
    [username] => 1991616
)

 

 

upgradeRetailer

Upgrades the retailer to a new subscription.

Will only be allowed if the partner has responsibility 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 Parameters

upgradeRetailer Response Parameters

 

 

upgradeRetailer Example

upgradeRetailer Request Example - XML

<?php
$URL = "https://sandbox.doba.com/api/20110301/xml_partner_api.php";
$strRequest = "
<dce>
  <request>
    <authentication>
      <username>username</username>
      <password>password</password>
    </authentication>
    <action>upgradeRetailer</action>
    <retailer_id>123456</retailer_id>
    <subscription>
      <api_code>DPLUS</api_code>
      <frequency>L</frequency>
    </subscription>
  </request>
</dce>
";
$connection = curl_init();
curl_setopt($connection, CURLOPT_URL, $URL );
curl_setopt($connection, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($connection, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($connection, CURLOPT_POST, 1);
curl_setopt($connection, CURLOPT_POSTFIELDS, $strRequest);
curl_setopt($connection, CURLOPT_RETURNTRANSFER, 1);
set_time_limit(108000);
$strResponse = curl_exec($connection);
if(curl_errno($connection)) {
	print "Curl error: " . curl_error($connection);
} else {
	$info = curl_getinfo($connection);
	print "HTTP Response Code = ".$info["http_code"]."\n";
}
curl_close($connection);

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

upgradeRetailer Response Example - XML

<?xml version="1.0"?>
<dce>
  <response>
    <outcome>failure</outcome>
    <error>
      <level>2</level>
      <code>313</code>
      <message>Required field "api code" not specified. </message>
    </error>
  </response>
</dce>

upgradeRetailer Request Example - SOAP

<?php
$URL = "https://sandbox.doba.com/api/20110301/xml_partner_api.php";
$strRequest = "
<dce>
  <request>
    <authentication>
      <username>username</username>
      <password>password</password>
    </authentication>
    <action>upgradeRetailer</action>
    <retailer_id>123456</retailer_id>
    <subscription>
      <api_code>DPLUS</api_code>
      <frequency>L</frequency>
    </subscription>
  </request>
</dce>
";
$connection = curl_init();
curl_setopt($connection, CURLOPT_URL, $URL );
curl_setopt($connection, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($connection, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($connection, CURLOPT_POST, 1);
curl_setopt($connection, CURLOPT_POSTFIELDS, $strRequest);
curl_setopt($connection, CURLOPT_RETURNTRANSFER, 1);
set_time_limit(108000);
$strResponse = curl_exec($connection);
if(curl_errno($connection)) {
	print "Curl error: " . curl_error($connection);
} else {
	$info = curl_getinfo($connection);
	print "HTTP Response Code = ".$info["http_code"]."\n";
}
curl_close($connection);

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

upgradeRetailer Response Example - SOAP

Error! 2015: Permission denied. 

 

 

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 Parameters

reactivateRetailer Response Parameters

 

 

reactivateRetailer Example

reactivateRetailer Request Example - XML

<?php
$URL = "https://sandbox.doba.com/api/20110301/xml_partner_api.php";
$strRequest = "
<dce>
  <request>
    <authentication>
      <username>username</username>
      <password>password</password>
    </authentication>
    <action>reactivateRetailer</action>
    <retailer_id>123456</retailer_id>
    <subscriptions>
      <subscription>
        <api_code>DPLUS</api_code>
        <frequency>L</frequency>
        <billing_responsibility>P</billing_responsibility>
      </subscription>
    </subscriptions>
  </request>
</dce>
";
$connection = curl_init();
curl_setopt($connection, CURLOPT_URL, $URL );
curl_setopt($connection, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($connection, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($connection, CURLOPT_POST, 1);
curl_setopt($connection, CURLOPT_POSTFIELDS, $strRequest);
curl_setopt($connection, CURLOPT_RETURNTRANSFER, 1);
set_time_limit(108000);
$strResponse = curl_exec($connection);
if(curl_errno($connection)) {
	print "Curl error: " . curl_error($connection);
} else {
	$info = curl_getinfo($connection);
	print "HTTP Response Code = ".$info["http_code"]."\n";
}
curl_close($connection);

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

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/api/20110301/xml_partner_api.php";
$strRequest = "
<dce>
  <request>
    <authentication>
      <username>username</username>
      <password>password</password>
    </authentication>
    <action>reactivateRetailer</action>
    <retailer_id>123456</retailer_id>
    <subscriptions>
      <subscription>
        <api_code>DPLUS</api_code>
        <frequency>L</frequency>
        <billing_responsibility>P</billing_responsibility>
      </subscription>
    </subscriptions>
  </request>
</dce>
";
$connection = curl_init();
curl_setopt($connection, CURLOPT_URL, $URL );
curl_setopt($connection, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($connection, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($connection, CURLOPT_POST, 1);
curl_setopt($connection, CURLOPT_POSTFIELDS, $strRequest);
curl_setopt($connection, CURLOPT_RETURNTRANSFER, 1);
set_time_limit(108000);
$strResponse = curl_exec($connection);
if(curl_errno($connection)) {
	print "Curl error: " . curl_error($connection);
} else {
	$info = curl_getinfo($connection);
	print "HTTP Response Code = ".$info["http_code"]."\n";
}
curl_close($connection);

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

reactivateRetailer Response Example - SOAP

1

 

 

getRetailerAccessInfo

Retrieves 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 Parameters

getRetailerAccessInfo Response Parameters

 

 

getRetailerAccessInfo Example

getRetailerAccessInfo Request Example - XML

<?php
$URL = "https://sandbox.doba.com/api/20110301/xml_partner_api.php";
$strRequest = "
<dce>
  <request>
    <authentication>
      <username>username</username>
      <password>password</password>
    </authentication>
    <action>getRetailerAccessInfo</action>
    <retailer_ids>
      <retailer_id>123456</retailer_id>
    </retailer_ids>
  </request>
</dce>
";
$connection = curl_init();
curl_setopt($connection, CURLOPT_URL, $URL );
curl_setopt($connection, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($connection, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($connection, CURLOPT_POST, 1);
curl_setopt($connection, CURLOPT_POSTFIELDS, $strRequest);
curl_setopt($connection, CURLOPT_RETURNTRANSFER, 1);
set_time_limit(108000);
$strResponse = curl_exec($connection);
if(curl_errno($connection)) {
	print "Curl error: " . curl_error($connection);
} else {
	$info = curl_getinfo($connection);
	print "HTTP Response Code = ".$info["http_code"]."\n";
}
curl_close($connection);

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

getRetailerAccessInfo Response Example - XML

<?xml version="1.0"?>
<dce>
  <response>
    <outcome>success</outcome>
    <retailer_id>1990775</retailer_id>
    <access_sub_api_code>DPLUS</access_sub_api_code>
    <activated_product_limit>1000</activated_product_limit>
    <activated_product_total>289</activated_product_total>
    <remaining>711</remaining>
    <search_limit>5</search_limit>
    <list_limit>1000</list_limit>
  </response>
</dce>

getRetailerAccessInfo Request Example - SOAP

<?php
$URL = "https://sandbox.doba.com/api/20110301/xml_partner_api.php";
$strRequest = "
<dce>
  <request>
    <authentication>
      <username>username</username>
      <password>password</password>
    </authentication>
    <action>getRetailerAccessInfo</action>
    <retailer_ids>
      <retailer_id>123456</retailer_id>
    </retailer_ids>
  </request>
</dce>
";
$connection = curl_init();
curl_setopt($connection, CURLOPT_URL, $URL );
curl_setopt($connection, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($connection, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($connection, CURLOPT_POST, 1);
curl_setopt($connection, CURLOPT_POSTFIELDS, $strRequest);
curl_setopt($connection, CURLOPT_RETURNTRANSFER, 1);
set_time_limit(108000);
$strResponse = curl_exec($connection);
if(curl_errno($connection)) {
	print "Curl error: " . curl_error($connection);
} else {
	$info = curl_getinfo($connection);
	print "HTTP Response Code = ".$info["http_code"]."\n";
}
curl_close($connection);

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

getRetailerAccessInfo Response Example - SOAP

Array
(
    [0] => stdClass Object
        (
            [access_sub_api_code] => DPLUS
            [activated_product_limit] => 1000
            [activated_product_total] => 289
            [list_limit] => 1000
            [remaining] => 711
            [retailer_id] => 1990775
            [search_limit] => 5
        )

)

 

 

getPasswordResetLink

Returns a Password reset url for the specified retailer.

getPasswordResetLink Request Parameters

getPasswordResetLink Response Parameters

 

 

getPasswordResetLink Example

getPasswordResetLink Request Example - XML

<?php
$URL = "https://sandbox.doba.com/api/20110301/xml_partner_api.php";
$strRequest = "
<dce>
  <request>
    <authentication>
      <username>username</username>
      <password>password</password>
    </authentication>
    <action>getPasswordResetLink</action>
    <retailer_id>123456</retailer_id>
  </request>
</dce>
";
$connection = curl_init();
curl_setopt($connection, CURLOPT_URL, $URL );
curl_setopt($connection, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($connection, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($connection, CURLOPT_POST, 1);
curl_setopt($connection, CURLOPT_POSTFIELDS, $strRequest);
curl_setopt($connection, CURLOPT_RETURNTRANSFER, 1);
set_time_limit(108000);
$strResponse = curl_exec($connection);
if(curl_errno($connection)) {
	print "Curl error: " . curl_error($connection);
} else {
	$info = curl_getinfo($connection);
	print "HTTP Response Code = ".$info["http_code"]."\n";
}
curl_close($connection);

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

getPasswordResetLink Response Example - XML

<?xml version="1.0"?>
<dce>
  <response>
    <outcome>success</outcome>
    <value>https://www.sandbox.doba.com/change-password.html?ref=0F2D71CF1DACD773BC1A5D8B474E94785B445583F515DB46749CABE484AC5AF3739CEF034256B693449734EFF9AE1C9D</value>
  </response>
</dce>

getPasswordResetLink Request Example - SOAP

<?php
$URL = "https://sandbox.doba.com/api/20110301/xml_partner_api.php";
$strRequest = "
<dce>
  <request>
    <authentication>
      <username>username</username>
      <password>password</password>
    </authentication>
    <action>getPasswordResetLink</action>
    <retailer_id>123456</retailer_id>
  </request>
</dce>
";
$connection = curl_init();
curl_setopt($connection, CURLOPT_URL, $URL );
curl_setopt($connection, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($connection, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($connection, CURLOPT_POST, 1);
curl_setopt($connection, CURLOPT_POSTFIELDS, $strRequest);
curl_setopt($connection, CURLOPT_RETURNTRANSFER, 1);
set_time_limit(108000);
$strResponse = curl_exec($connection);
if(curl_errno($connection)) {
	print "Curl error: " . curl_error($connection);
} else {
	$info = curl_getinfo($connection);
	print "HTTP Response Code = ".$info["http_code"]."\n";
}
curl_close($connection);

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

getPasswordResetLink Response Example - SOAP

https://www.sandbox.doba.com/change-password.html?ref=0F2D71CF1DACD773BC1A5D8B474E94785B445583F515DB46749CABE484AC5AF3739CEF034256B693449734EFF9AE1C9D

 

 

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 Parameters

requestPartnerPermission Response Parameters

 

 

requestPartnerPermission Example

requestPartnerPermission Request Example - XML

<?php
$URL = "https://sandbox.doba.com/api/20110301/xml_partner_api.php";
$strRequest = "
<dce>
  <request>
    <authentication>
      <username>username</username>
      <password>password</password>
    </authentication>
    <action>requestPartnerPermission</action>
    <retailer_id>123456</retailer_id>
  </request>
</dce>
";
$connection = curl_init();
curl_setopt($connection, CURLOPT_URL, $URL );
curl_setopt($connection, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($connection, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($connection, CURLOPT_POST, 1);
curl_setopt($connection, CURLOPT_POSTFIELDS, $strRequest);
curl_setopt($connection, CURLOPT_RETURNTRANSFER, 1);
set_time_limit(108000);
$strResponse = curl_exec($connection);
if(curl_errno($connection)) {
	print "Curl error: " . curl_error($connection);
} else {
	$info = curl_getinfo($connection);
	print "HTTP Response Code = ".$info["http_code"]."\n";
}
curl_close($connection);

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

requestPartnerPermission Response Example - XML

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

requestPartnerPermission Request Example - SOAP

<?php
$URL = "https://sandbox.doba.com/api/20110301/xml_partner_api.php";
$strRequest = "
<dce>
  <request>
    <authentication>
      <username>username</username>
      <password>password</password>
    </authentication>
    <action>requestPartnerPermission</action>
    <retailer_id>123456</retailer_id>
  </request>
</dce>
";
$connection = curl_init();
curl_setopt($connection, CURLOPT_URL, $URL );
curl_setopt($connection, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($connection, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($connection, CURLOPT_POST, 1);
curl_setopt($connection, CURLOPT_POSTFIELDS, $strRequest);
curl_setopt($connection, CURLOPT_RETURNTRANSFER, 1);
set_time_limit(108000);
$strResponse = curl_exec($connection);
if(curl_errno($connection)) {
	print "Curl error: " . curl_error($connection);
} else {
	$info = curl_getinfo($connection);
	print "HTTP Response Code = ".$info["http_code"]."\n";
}
curl_close($connection);

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

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 Parameters

hasPartnerPermission Response Parameters

 

 

hasPartnerPermission Example

hasPartnerPermission Request Example - XML

<?php
$URL = "https://sandbox.doba.com/api/20110301/xml_partner_api.php";
$strRequest = "
<dce>
  <request>
    <authentication>
      <username>username</username>
      <password>password</password>
    </authentication>
    <action>hasPartnerPermission</action>
    <retailer_id>123456</retailer_id>
  </request>
</dce>
";
$connection = curl_init();
curl_setopt($connection, CURLOPT_URL, $URL );
curl_setopt($connection, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($connection, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($connection, CURLOPT_POST, 1);
curl_setopt($connection, CURLOPT_POSTFIELDS, $strRequest);
curl_setopt($connection, CURLOPT_RETURNTRANSFER, 1);
set_time_limit(108000);
$strResponse = curl_exec($connection);
if(curl_errno($connection)) {
	print "Curl error: " . curl_error($connection);
} else {
	$info = curl_getinfo($connection);
	print "HTTP Response Code = ".$info["http_code"]."\n";
}
curl_close($connection);

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

hasPartnerPermission Response Example - XML

<?xml version="1.0"?>
<dce>
  <response>
    <outcome>success</outcome>
    <has_permission>missing request</has_permission>
    <retailer_id>1990775</retailer_id>
  </response>
</dce>

hasPartnerPermission Request Example - SOAP

<?php
$URL = "https://sandbox.doba.com/api/20110301/xml_partner_api.php";
$strRequest = "
<dce>
  <request>
    <authentication>
      <username>username</username>
      <password>password</password>
    </authentication>
    <action>hasPartnerPermission</action>
    <retailer_id>123456</retailer_id>
  </request>
</dce>
";
$connection = curl_init();
curl_setopt($connection, CURLOPT_URL, $URL );
curl_setopt($connection, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($connection, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($connection, CURLOPT_POST, 1);
curl_setopt($connection, CURLOPT_POSTFIELDS, $strRequest);
curl_setopt($connection, CURLOPT_RETURNTRANSFER, 1);
set_time_limit(108000);
$strResponse = curl_exec($connection);
if(curl_errno($connection)) {
	print "Curl error: " . curl_error($connection);
} else {
	$info = curl_getinfo($connection);
	print "HTTP Response Code = ".$info["http_code"]."\n";
}
curl_close($connection);

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

hasPartnerPermission Response Example - SOAP

stdClass Object
(
    [has_permission] => missing request
    [retailer_id] => 1990775
)

 

 

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 Parameters

removePartnerPermission Response Parameters

 

 

removePartnerPermission Example

removePartnerPermission Request Example - XML

<?php
$URL = "https://sandbox.doba.com/api/20110301/xml_partner_api.php";
$strRequest = "
<dce>
  <request>
    <authentication>
      <username>username</username>
      <password>password</password>
    </authentication>
    <action>removePartnerPermission</action>
    <retailer_id>123456</retailer_id>
  </request>
</dce>
";
$connection = curl_init();
curl_setopt($connection, CURLOPT_URL, $URL );
curl_setopt($connection, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($connection, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($connection, CURLOPT_POST, 1);
curl_setopt($connection, CURLOPT_POSTFIELDS, $strRequest);
curl_setopt($connection, CURLOPT_RETURNTRANSFER, 1);
set_time_limit(108000);
$strResponse = curl_exec($connection);
if(curl_errno($connection)) {
	print "Curl error: " . curl_error($connection);
} else {
	$info = curl_getinfo($connection);
	print "HTTP Response Code = ".$info["http_code"]."\n";
}
curl_close($connection);

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

removePartnerPermission Response Example - XML

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

removePartnerPermission Request Example - SOAP

<?php
$URL = "https://sandbox.doba.com/api/20110301/xml_partner_api.php";
$strRequest = "
<dce>
  <request>
    <authentication>
      <username>username</username>
      <password>password</password>
    </authentication>
    <action>removePartnerPermission</action>
    <retailer_id>123456</retailer_id>
  </request>
</dce>
";
$connection = curl_init();
curl_setopt($connection, CURLOPT_URL, $URL );
curl_setopt($connection, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($connection, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($connection, CURLOPT_POST, 1);
curl_setopt($connection, CURLOPT_POSTFIELDS, $strRequest);
curl_setopt($connection, CURLOPT_RETURNTRANSFER, 1);
set_time_limit(108000);
$strResponse = curl_exec($connection);
if(curl_errno($connection)) {
	print "Curl error: " . curl_error($connection);
} else {
	$info = curl_getinfo($connection);
	print "HTTP Response Code = ".$info["http_code"]."\n";
}
curl_close($connection);

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

removePartnerPermission Response Example - SOAP

1

 

 

createRetailerNote

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

createRetailerNote Request Parameters

createRetailerNote Response Parameters

 

 

createRetailerNote Example

createRetailerNote Request Example - XML

<?php
$URL = "https://sandbox.doba.com/api/20110301/xml_partner_api.php";
$strRequest = "
<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>
";
$connection = curl_init();
curl_setopt($connection, CURLOPT_URL, $URL );
curl_setopt($connection, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($connection, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($connection, CURLOPT_POST, 1);
curl_setopt($connection, CURLOPT_POSTFIELDS, $strRequest);
curl_setopt($connection, CURLOPT_RETURNTRANSFER, 1);
set_time_limit(108000);
$strResponse = curl_exec($connection);
if(curl_errno($connection)) {
	print "Curl error: " . curl_error($connection);
} else {
	$info = curl_getinfo($connection);
	print "HTTP Response Code = ".$info["http_code"]."\n";
}
curl_close($connection);

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

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/api/20110301/xml_partner_api.php";
$strRequest = "
<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>
";
$connection = curl_init();
curl_setopt($connection, CURLOPT_URL, $URL );
curl_setopt($connection, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($connection, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($connection, CURLOPT_POST, 1);
curl_setopt($connection, CURLOPT_POSTFIELDS, $strRequest);
curl_setopt($connection, CURLOPT_RETURNTRANSFER, 1);
set_time_limit(108000);
$strResponse = curl_exec($connection);
if(curl_errno($connection)) {
	print "Curl error: " . curl_error($connection);
} else {
	$info = curl_getinfo($connection);
	print "HTTP Response Code = ".$info["http_code"]."\n";
}
curl_close($connection);

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

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 Parameters

cancelRetailer Response Parameters

 

 

cancelRetailer Example

cancelRetailer Request Example - XML

<?php
$URL = "https://sandbox.doba.com/api/20110301/xml_partner_api.php";
$strRequest = "
<dce>
  <request>
    <authentication>
      <username>username</username>
      <password>password</password>
    </authentication>
    <action>cancelRetailer</action>
    <retailer_id>123456</retailer_id>
  </request>
</dce>
";
$connection = curl_init();
curl_setopt($connection, CURLOPT_URL, $URL );
curl_setopt($connection, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($connection, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($connection, CURLOPT_POST, 1);
curl_setopt($connection, CURLOPT_POSTFIELDS, $strRequest);
curl_setopt($connection, CURLOPT_RETURNTRANSFER, 1);
set_time_limit(108000);
$strResponse = curl_exec($connection);
if(curl_errno($connection)) {
	print "Curl error: " . curl_error($connection);
} else {
	$info = curl_getinfo($connection);
	print "HTTP Response Code = ".$info["http_code"]."\n";
}
curl_close($connection);

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

cancelRetailer Response Example - XML

<?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/api/20110301/xml_partner_api.php";
$strRequest = "
<dce>
  <request>
    <authentication>
      <username>username</username>
      <password>password</password>
    </authentication>
    <action>cancelRetailer</action>
    <retailer_id>123456</retailer_id>
  </request>
</dce>
";
$connection = curl_init();
curl_setopt($connection, CURLOPT_URL, $URL );
curl_setopt($connection, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($connection, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($connection, CURLOPT_POST, 1);
curl_setopt($connection, CURLOPT_POSTFIELDS, $strRequest);
curl_setopt($connection, CURLOPT_RETURNTRANSFER, 1);
set_time_limit(108000);
$strResponse = curl_exec($connection);
if(curl_errno($connection)) {
	print "Curl error: " . curl_error($connection);
} else {
	$info = curl_getinfo($connection);
	print "HTTP Response Code = ".$info["http_code"]."\n";
}
curl_close($connection);

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

cancelRetailer Response Example - SOAP

Error! 366: No action taken. 

 

 

getAutoLoginLink

Returns a link that will allow instant login to the doba website as this merchant.

getAutoLoginLink Request Parameters

getAutoLoginLink Response Parameters

 

 

getAutoLoginLink Example

getAutoLoginLink Request Example - XML

<?php
$URL = "https://sandbox.doba.com/api/20110301/xml_partner_api.php";
$strRequest = "
<dce>
  <request>
    <authentication>
      <username>username</username>
      <password>password</password>
    </authentication>
    <action>getAutoLoginLink</action>
    <retailer_id>123456</retailer_id>
  </request>
</dce>
";
$connection = curl_init();
curl_setopt($connection, CURLOPT_URL, $URL );
curl_setopt($connection, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($connection, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($connection, CURLOPT_POST, 1);
curl_setopt($connection, CURLOPT_POSTFIELDS, $strRequest);
curl_setopt($connection, CURLOPT_RETURNTRANSFER, 1);
set_time_limit(108000);
$strResponse = curl_exec($connection);
if(curl_errno($connection)) {
	print "Curl error: " . curl_error($connection);
} else {
	$info = curl_getinfo($connection);
	print "HTTP Response Code = ".$info["http_code"]."\n";
}
curl_close($connection);

print "URL = $URL\n\n";
print "Method = getAutoLoginLink\n\n";
print "Request:\n=====================================================\n\n";
print_r($strRequest);
print "\n\nResponse:\n=====================================================\n\n";
print_r($strResponse);
?>

getAutoLoginLink Response Example - XML

<?xml version="1.0"?>
<dce>
  <response>
    <outcome>success</outcome>
    <value>https://www.sandbox.doba.com/login.html?uid=1990775&amp;ref=0f11f9a1a2e548c608b99b85c1aef780</value>
  </response>
</dce>

getAutoLoginLink Request Example - SOAP

<?php
$URL = "https://sandbox.doba.com/api/20110301/xml_partner_api.php";
$strRequest = "
<dce>
  <request>
    <authentication>
      <username>username</username>
      <password>password</password>
    </authentication>
    <action>getAutoLoginLink</action>
    <retailer_id>123456</retailer_id>
  </request>
</dce>
";
$connection = curl_init();
curl_setopt($connection, CURLOPT_URL, $URL );
curl_setopt($connection, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($connection, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($connection, CURLOPT_POST, 1);
curl_setopt($connection, CURLOPT_POSTFIELDS, $strRequest);
curl_setopt($connection, CURLOPT_RETURNTRANSFER, 1);
set_time_limit(108000);
$strResponse = curl_exec($connection);
if(curl_errno($connection)) {
	print "Curl error: " . curl_error($connection);
} else {
	$info = curl_getinfo($connection);
	print "HTTP Response Code = ".$info["http_code"]."\n";
}
curl_close($connection);

print "URL = $URL\n\n";
print "Method = getAutoLoginLink\n\n";
print "Request:\n=====================================================\n\n";
print_r($strRequest);
print "\n\nResponse:\n=====================================================\n\n";
print_r($strResponse);
?>

getAutoLoginLink Response Example - SOAP

https://www.sandbox.doba.com/login.html?uid=1990775&ref=0f11f9a1a2e548c608b99b85c1aef780