1. Order API

Order API

Status Overview

There are several order status'. The most standard Supplier Order Status' are the following, in order of a standard order process:

When an order is created through the API, the initial status will be "Awaiting Payment" for both the supplier order and the items in each order. Once funded, the supplier order and items will update to "Funded". Next, both order and item will update to "Shipment Pending". The next status depends on which payment method is used. If funded by credit card, the next status would be "Shipped". If funded by PayPal or PrePay the next status will be "Completed". For credit cards, the status will be "Shipped" until we charge the credit card for the full amount of the order. After the card is charged, it will then update to "Completed".

Other important status' include:

 

orderLookup

Retrieves the fully-loaded, checkout totals for the specified item_id's.

This call should be used to determine the total cost of all items so that it can be shown to the end-customer before the order is submitted.

orderLookup Request Parameters

orderLookup Response Parameters

 

 

orderLookup Example

orderLookup Request Example - XML

<?php
$URL = "https://sandbox.doba.com/api/20110301/xml_retailer_api.php";
$strRequest = "
<dce>
  <request>
    <authentication>
      <username>username</username>
      <password>password</password>
    </authentication>
    <retailer_id>1990775</retailer_id>
    <action>orderLookup</action>
    <shipping_street>321 South 321 North</shipping_street>
    <shipping_city>Real City</shipping_city>
    <shipping_state>UT</shipping_state>
    <shipping_postal>84043</shipping_postal>
    <shipping_country>US</shipping_country>
    <items>
      <item>
        <item_id>5589431</item_id>
        <quantity>3</quantity>
      </item>
    </items>
  </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 = orderLookup\n\n";
print "Request:\n=====================================================\n\n";
print_r($strRequest);
print "\n\nResponse:\n=====================================================\n\n";
print_r($strResponse);
?>

orderLookup Response Example - XML

<?xml version="1.0"?>
<dce>
  <response>
    <outcome>success</outcome>
    <supplier_orders>
      <supplier_order>
        <items>
          <item>
            <product_id>4910541</product_id>
            <item_id>5589431</item_id>
            <sku>T50838</sku>
            <title>AA Rechargeable NiMH Battery Retail Pack, 2450mAh - 4 Pack</title>
            <quantity>3</quantity>
            <price>10.34</price>
            <prepay_price>10.04</prepay_price>
            <item_status>in-stock</item_status>
          </item>
        </items>
        <drop_ship_fees>1.5</drop_ship_fees>
        <transaction_fees/>
        <shipping_fees>9.02</shipping_fees>
        <sub_total>31.02</sub_total>
        <order_total>41.54</order_total>
        <supplier_id>1</supplier_id>
        <supplier_name>DBL</supplier_name>
        <supplier_order_id/>
        <available_actions/>
      </supplier_order>
    </supplier_orders>
    <subtotal>31.02</subtotal>
    <drop_ship_fees>1.5</drop_ship_fees>
    <shipping_fees>9.02</shipping_fees>
    <transaction_fees>0</transaction_fees>
    <order_total>41.54</order_total>
  </response>
</dce>

orderLookup Request Example - SOAP

<?php
$URL = "https://sandbox.doba.com/soap/20110301/wsdl/ApiRetailerOrder.wsdl";
$options = array(
    "trace" => 1,
);
$client = new SoapClient($URL, $options);

$objRequest = new stdClass();
    $objAuth =  array(
        "username" => "username",
        "password" => "password",
    );
    $objRequest->authentication = $objAuth;
    $objRequest->retailer_id = "1992510";
    $objRequest->shipping_street = "300 South 301 East";
    $objRequest->shipping_city = "Lehi";
    $objRequest->shipping_state = "UT";
    $objRequest->shipping_postal = "84043";
    $objRequest->shipping_country = "US";
    $objItems = array(
        array("item_id" => "4309901","quantity" => "1"),
        array("item_id" => "4400449","quantity" => "1"),
    );
    $objRequest->items = $objItems;

try { $Response = $client->orderLookup($objRequest); }
catch ( SOAPFault $e ) {$Response = ("Error ".$e->faultcode.": ".$e->faultstring); }
print "URL = $URL\n\n";
print "Method = orderLookup\n\n";
print "Request:\n=====================================================\n\n";
print_r($objRequest);
print "\n\nResponse:\n=====================================================\n\n";
print_r($Response);
?>

orderLookup Response Example - SOAP

stdClass Object
(
    [drop_ship_fees] => 0
    [order_total] => 37.8
    [shipping_fees] => 0
    [subtotal] => 36.81
    [supplier_orders] => Array
        (
            [0] => stdClass Object
                (
                    [available_actions] =>
                    [drop_ship_fees] => 0
                    [items] => Array
                        (
                            [0] => stdClass Object
                                (
                                    [item_id] => 4309901
                                    [item_status] => in-stock
                                    [prepay_price] => 0.01
                                    [price] => 0.01
                                    [product_id] => 3958837
                                    [quantity] => 1
                                    [sku] => 355630
                                    [title] => Snowman Earrings Case Pack 6
                                )

                            [1] => stdClass Object
                                (
                                    [item_id] => 4400449
                                    [item_status] => in-stock
                                    [prepay_price] => 35.74
                                    [price] => 36.8
                                    [product_id] => 4049095
                                    [quantity] => 1
                                    [sku] => 357319
                                    [title] => Paris Hilton Themed Bangle Bracelets Case Pack 6
                                )

                        )

                    [order_total] => 37.8
                    [shipping_fees] => 0
                    [sub_total] => 36.81
                    [supplier_id] => 1529
                    [supplier_name] => Dollar Days
                    [transaction_fees] => 0.99
                )

        )

    [transaction_fees] => 0.99
)

 

 

createOrder

Creates an order from the specified item_id's.

Each item will be verified for stock. If an item is not available, the response will include that information.

If the item_id requested is not available for purchase the response will include the following error:

Error 400: The quantity specified of the specified item is not currently available. JV-I-166[#3340105] has 0 instock

createOrder Request Parameters

createOrder Response Parameters

 

 

createOrder Example

createOrder Request Example - XML

<?php
$URL = "https://sandbox.doba.com/api/20110301/xml_retailer_api.php";
$strRequest = "
<dce>
  <request>
    <authentication>
      <username>username</username>
      <password>password</password>
    </authentication>
    <retailer_id>1990775</retailer_id>
    <action>createOrder</action>
    <shipping_firstname>Johnny</shipping_firstname>
    <shipping_lastname>Begood</shipping_lastname>
    <shipping_street>321 South 321 North</shipping_street>
    <shipping_city>Real City</shipping_city>
    <shipping_state>UT</shipping_state>
    <shipping_postal>84043</shipping_postal>
    <shipping_country>US</shipping_country>
    <ip_address>158.123.35.2</ip_address>
    <items>
      <item>
        <item_id>5589431</item_id>
        <quantity>1</quantity>
      </item>
    </items>
  </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 = createOrder\n\n";
print "Request:\n=====================================================\n\n";
print_r($strRequest);
print "\n\nResponse:\n=====================================================\n\n";
print_r($strResponse);
?>

createOrder Response Example - XML

<?xml version="1.0"?>
<dce>
  <response>
    <outcome>success</outcome>
    <order_id>329480</order_id>
    <supplier_orders>
      <supplier_order>
        <items>
          <item>
            <product_id>4910541</product_id>
            <item_id>5589431</item_id>
            <sku>T50838</sku>
            <title>AA Rechargeable NiMH Battery Retail Pack, 2450mAh - 4 Pack</title>
            <quantity>1</quantity>
            <price>10.34</price>
            <prepay_price>10.04</prepay_price>
            <item_status>in-stock</item_status>
          </item>
        </items>
        <drop_ship_fees>1.5</drop_ship_fees>
        <transaction_fees/>
        <shipping_fees>9.02</shipping_fees>
        <sub_total>10.34</sub_total>
        <order_total>20.86</order_total>
        <supplier_id>1</supplier_id>
        <supplier_name>DBL</supplier_name>
        <supplier_order_id/>
        <available_actions/>
      </supplier_order>
    </supplier_orders>
    <subtotal>10.34</subtotal>
    <drop_ship_fees>1.5</drop_ship_fees>
    <shipping_fees>9.02</shipping_fees>
    <transaction_fees>0</transaction_fees>
    <order_total>20.86</order_total>
  </response>
</dce>

createOrder Request Example - SOAP

<?php
$URL = "https://sandbox.doba.com/soap/20110301/wsdl/ApiRetailerOrder.wsdl";
$client = new SoapClient($URL, array("trace" => 1));

$objAuth = new stdClass();
$objAuth->username = "twhitney9aisle";
$objAuth->password = "sandbox";
$objRequest->authentication = $objAuth;
$objRequest->retailer_id = "1223961";
$objRequest->shipping_firstname = "Johnny";
$objRequest->shipping_lastname = "Begood";
$objRequest->shipping_street = "321 South 321 North";
$objRequest->shipping_city = "Real City";
$objRequest->shipping_state = "UT";
$objRequest->shipping_postal = "84043";
$objRequest->shipping_country = "US";
$objRequest->ip_address = "158.123.35.2";
$obj_items = new stdClass();
$obj_items->item_id = "5589431";
$obj_items->quantity = "1";
$objRequest->items = array($obj_items);

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

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

createOrder Response Example - SOAP

stdClass Object
(
    [drop_ship_fees] => 1.5
    [order_id] => 329481
    [order_total] => 20.86
    [shipping_fees] => 9.02
    [subtotal] => 10.34
    [supplier_orders] => Array
        (
            [0] => stdClass Object
                (
                    [available_actions] => 
                    [drop_ship_fees] => 1.5
                    [items] => Array
                        (
                            [0] => stdClass Object
                                (
                                    [item_id] => 5589431
                                    [item_status] => in-stock
                                    [prepay_price] => 10.04
                                    [price] => 10.34
                                    [product_id] => 4910541
                                    [quantity] => 1
                                    [sku] => T50838
                                    [title] => AA Rechargeable NiMH Battery Retail Pack, 2450mAh - 4 Pack
                                )

                        )

                    [order_total] => 20.86
                    [shipping_fees] => 9.02
                    [sub_total] => 10.34
                    [supplier_id] => 1
                    [supplier_name] => DBL
                    [supplier_order_id] => 
                    [transaction_fees] => 0
                )

        )

    [transaction_fees] => 0
)

 

 

fundOrder

Funds a previously created order currently in the "Awaiting Payment" state.

fundOrder Request Parameters

fundOrder Response Parameters

 

 

fundOrder Example

fundOrder Request Example - XML

<?php
$URL = "https://sandbox.doba.com/api/20110301/xml_retailer_api.php";
$strRequest = "
<dce>
  <request>
    <authentication>
      <username>username</username>
      <password>password</password>
    </authentication>
    <retailer_id>1990775</retailer_id>
    <action>fundOrder</action>
    <fund_method>default_payment_account</fund_method>
    <cvv2>123</cvv2>
    <order_ids>
      <order_id>327873</order_id>
    </order_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 = fundOrder\n\n";
print "Request:\n=====================================================\n\n";
print_r($strRequest);
print "\n\nResponse:\n=====================================================\n\n";
print_r($strResponse);
?>

fundOrder Response Example - XML

<?xml version="1.0"?>
<dce>
  <response>
    <outcome>failure</outcome>
    <error>
      <level>3</level>
      <code>403</code>
      <message>The order specified is invalid. </message>
    </error>
  </response>
</dce>

fundOrder Request Example - SOAP

<?php
$URL = "https://sandbox.doba.com/soap/20110301/wsdl/ApiRetailerOrder.wsdl";
$client = new SoapClient($URL, array("trace" => 1));

$objAuth = new stdClass();
$objAuth->username = "twhitney9aisle";
$objAuth->password = "sandbox";
$objRequest->authentication = $objAuth;
$objRequest->retailer_id = "1223961";
$objRequest->fund_method = "default_payment_account";
$objRequest->cvv2 = "123";
$objRequest->order_ids=array("327873");

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

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

fundOrder Response Example - SOAP

Error! 403: The order specified is invalid. 

 

 

getOrderDetail

Retrieves current order information and status, including tracking information if available, for specified orders or orders in a specific order status.

The available order statuses can be found here.

getOrderDetail Request Parameters

getOrderDetail Response Parameters

 

 

getOrderDetail Example

getOrderDetail Request Example - XML

<?php
$URL = "https://sandbox.doba.com/api/20110301/xml_retailer_api.php";
$strRequest = "
<dce>
  <request>
    <authentication>
      <username>username</username>
      <password>password</password>
    </authentication>
    <retailer_id>1990775</retailer_id>
    <action>getOrderDetail</action>
    <order_ids>
      <order_id>327873</order_id>
    </order_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 = getOrderDetail\n\n";
print "Request:\n=====================================================\n\n";
print_r($strRequest);
print "\n\nResponse:\n=====================================================\n\n";
print_r($strResponse);
?>

getOrderDetail Response Example - XML

<?xml version="1.0"?>
<dce>
  <response>
    <outcome>failure</outcome>
    <error>
      <level>3</level>
      <code>402</code>
      <message>The order specified was not found. </message>
    </error>
  </response>
</dce>

getOrderDetail Request Example - SOAP

<?php
$URL = "https://sandbox.doba.com/soap/20110301/wsdl/ApiRetailerOrder.wsdl";
$client = new SoapClient($URL, array("trace" => 1));

$objAuth = new stdClass();
$objAuth->username = "twhitney9aisle";
$objAuth->password = "sandbox";
$objRequest->authentication = $objAuth;
$objRequest->retailer_id = "1223961";
$objRequest->order_ids=array("327873");

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

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

getOrderDetail Response Example - SOAP

Error! 402: The order specified was not found. 

 

 

getOrders

Retrieves current order information and status, including tracking information if available, for specified orders or orders in a specific order status.

If no orders or other criteria is provided the response will include all available orders.

If you are not specifying a particular parameter, do not include it in the request as the API will return unexpected results.

getOrders Request Parameters

getOrders Response Parameters

 

 

getOrders Example

getOrders Request Example - XML

<?php
$URL = "https://sandbox.doba.com/api/20110301/xml_retailer_api.php";
$strRequest = "
<dce>
  <request>
    <authentication>
      <username>username</username>
      <password>password</password>
    </authentication>
    <retailer_id>1990775</retailer_id>
    <action>getOrders</action>
    <limit>5</limit>
  </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 = getOrders\n\n";
print "Request:\n=====================================================\n\n";
print_r($strRequest);
print "\n\nResponse:\n=====================================================\n\n";
print_r($strResponse);
?>

getOrders Response Example - XML

<?xml version="1.0"?>
<dce>
  <response>
    <outcome>success</outcome>
    <orders>
      <order>
        <retailer_id>1223961</retailer_id>
        <order_id>323264</order_id>
        <order_group_id>298440</order_group_id>
        <po_number/>
        <status>Completed</status>
        <statuses>
          <statuse>Completed</statuse>
        </statuses>
        <date_placed>2009-03-04 16:24:16</date_placed>
        <subtotal>41</subtotal>
        <shipping_fees>24.29</shipping_fees>
        <drop_ship_fees/>
        <order_total>66.5</order_total>
        <ship_name>Test Lastname, Test Firstname</ship_name>
        <ship_street>That one street</ship_street>
        <ship_city>That one city</ship_city>
        <ship_state>UT</ship_state>
        <ship_postal>84058</ship_postal>
        <ship_country>US</ship_country>
        <ship_phone/>
        <bill_name>travis whitney</bill_name>
        <bill_street>Lehi</bill_street>
        <bill_city>Lehi</bill_city>
        <bill_state>UT</bill_state>
        <bill_postal>84043</bill_postal>
        <bill_country>US</bill_country>
        <bill_phone>1234567890</bill_phone>
        <payment_methods/>
        <can_pay/>
        <is_paid>2</is_paid>
        <suppliers>
          <supplier>D &amp; H</supplier>
        </suppliers>
      </order>
      <order>
        <retailer_id>1223961</retailer_id>
        <order_id>323464</order_id>
        <order_group_id>0</order_group_id>
        <po_number>Customer PO Number 7</po_number>
        <status>Awaiting Payment</status>
        <statuses>
          <statuse>Awaiting Payment</statuse>
        </statuses>
        <date_placed>2009-05-28 10:15:13</date_placed>
        <subtotal>133.18</subtotal>
        <shipping_fees>24.66</shipping_fees>
        <drop_ship_fees>1.5</drop_ship_fees>
        <order_total>162.01</order_total>
        <ship_name>Test, Test</ship_name>
        <ship_street> </ship_street>
        <ship_city>Somewhere</ship_city>
        <ship_state>UT</ship_state>
        <ship_postal>27715</ship_postal>
        <ship_country>US</ship_country>
        <ship_phone/>
        <bill_name> </bill_name>
        <bill_street/>
        <bill_city/>
        <bill_state/>
        <bill_postal/>
        <bill_country>US</bill_country>
        <bill_phone/>
        <payment_methods>
          <payment_method>Doba PrePay</payment_method>
          <payment_method>Credit Card</payment_method>
          <payment_method>PayPal</payment_method>
        </payment_methods>
        <can_pay/>
        <is_paid/>
        <suppliers>
          <supplier>DBL</supplier>
          <supplier>D &amp; H</supplier>
        </suppliers>
      </order>
      <order>
        <retailer_id>1223961</retailer_id>
        <order_id>327583</order_id>
        <order_group_id>300310</order_group_id>
        <po_number/>
        <status>Completed</status>
        <statuses>
          <statuse>Completed</statuse>
        </statuses>
        <date_placed>2010-12-16 22:52:12</date_placed>
        <subtotal>14.72</subtotal>
        <shipping_fees>8.76</shipping_fees>
        <drop_ship_fees/>
        <order_total>23.48</order_total>
        <ship_name>asdf, asdf</ship_name>
        <ship_street>asdf</ship_street>
        <ship_city>asdf</ship_city>
        <ship_state>AL</ship_state>
        <ship_postal>84043</ship_postal>
        <ship_country>US</ship_country>
        <ship_phone/>
        <bill_name>travis whitney</bill_name>
        <bill_street>Lehi</bill_street>
        <bill_city>Lehi</bill_city>
        <bill_state>UT</bill_state>
        <bill_postal>84043</bill_postal>
        <bill_country>US</bill_country>
        <bill_phone>1234567890</bill_phone>
        <payment_methods/>
        <can_pay/>
        <is_paid>2</is_paid>
        <suppliers>
          <supplier>D &amp; H</supplier>
        </suppliers>
      </order>
      <order>
        <retailer_id>1223961</retailer_id>
        <order_id>328696</order_id>
        <order_group_id>0</order_group_id>
        <po_number/>
        <status>Awaiting Payment</status>
        <statuses>
          <statuse>Awaiting Payment</statuse>
        </statuses>
        <date_placed>2011-10-11 12:22:37</date_placed>
        <subtotal>10.34</subtotal>
        <shipping_fees>9.02</shipping_fees>
        <drop_ship_fees>1.5</drop_ship_fees>
        <order_total>20.86</order_total>
        <ship_name>Begood, Johnny</ship_name>
        <ship_street>321 South 321 North</ship_street>
        <ship_city>Real City</ship_city>
        <ship_state>UT</ship_state>
        <ship_postal>84043</ship_postal>
        <ship_country>US</ship_country>
        <ship_phone/>
        <bill_name> </bill_name>
        <bill_street/>
        <bill_city/>
        <bill_state/>
        <bill_postal/>
        <bill_country>US</bill_country>
        <bill_phone/>
        <payment_methods>
          <payment_method>Doba PrePay</payment_method>
          <payment_method>Credit Card</payment_method>
          <payment_method>PayPal</payment_method>
        </payment_methods>
        <can_pay>1</can_pay>
        <is_paid/>
        <suppliers>
          <supplier>DBL</supplier>
        </suppliers>
      </order>
      <order>
        <retailer_id>1223961</retailer_id>
        <order_id>328697</order_id>
        <order_group_id>0</order_group_id>
        <po_number/>
        <status>Awaiting Payment</status>
        <statuses>
          <statuse>Awaiting Payment</statuse>
        </statuses>
        <date_placed>2011-10-11 12:22:55</date_placed>
        <subtotal>10.34</subtotal>
        <shipping_fees>9.02</shipping_fees>
        <drop_ship_fees>1.5</drop_ship_fees>
        <order_total>20.86</order_total>
        <ship_name>Begood, Johnny</ship_name>
        <ship_street>321 South 321 North</ship_street>
        <ship_city>Real City</ship_city>
        <ship_state>UT</ship_state>
        <ship_postal>84043</ship_postal>
        <ship_country>US</ship_country>
        <ship_phone/>
        <bill_name> </bill_name>
        <bill_street/>
        <bill_city/>
        <bill_state/>
        <bill_postal/>
        <bill_country>US</bill_country>
        <bill_phone/>
        <payment_methods>
          <payment_method>Doba PrePay</payment_method>
          <payment_method>Credit Card</payment_method>
          <payment_method>PayPal</payment_method>
        </payment_methods>
        <can_pay>1</can_pay>
        <is_paid/>
        <suppliers>
          <supplier>DBL</supplier>
        </suppliers>
      </order>
    </orders>
    <result_total>35</result_total>
    <overall_number_of_orders>35</overall_number_of_orders>
    <overall_total_spent>919.51</overall_total_spent>
  </response>
</dce>

getOrders Request Example - SOAP

<?php
$URL = "https://sandbox.doba.com/soap/20110301/wsdl/ApiRetailerOrder.wsdl";
$client = new SoapClient($URL, array("trace" => 1));

$objAuth = new stdClass();
$objAuth->username = "twhitney9aisle";
$objAuth->password = "sandbox";
$objRequest->authentication = $objAuth;
$objRequest->retailer_id = "1223961";
$objRequest->limit = "5";

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

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

getOrders Response Example - SOAP

stdClass Object
(
    [orders] => Array
        (
            [0] => stdClass Object
                (
                    [bill_city] => Lehi
                    [bill_country] => US
                    [bill_name] => travis whitney
                    [bill_phone] => 1234567890
                    [bill_postal] => 84043
                    [bill_state] => UT
                    [bill_street] => Lehi
                    [can_pay] => 
                    [date_placed] => 2009-03-04 16:24:16
                    [drop_ship_fees] => 0
                    [is_paid] => 1
                    [order_group_id] => 298440
                    [order_id] => 323264
                    [order_total] => 66.5
                    [payment_methods] => Array
                        (
                        )

                    [po_number] => 
                    [retailer_id] => 1223961
                    [ship_city] => That one city
                    [ship_country] => US
                    [ship_name] => Test Lastname, Test Firstname
                    [ship_phone] => 
                    [ship_postal] => 84058
                    [ship_state] => UT
                    [ship_street] => That one street
                    [shipping_fees] => 24.29
                    [status] => Completed
                    [subtotal] => 41
                )

            [1] => stdClass Object
                (
                    [bill_city] => 
                    [bill_country] => US
                    [bill_name] =>  
                    [bill_phone] => 
                    [bill_postal] => 
                    [bill_state] => 
                    [bill_street] => 
                    [can_pay] => 
                    [date_placed] => 2009-05-28 10:15:13
                    [drop_ship_fees] => 1.5
                    [is_paid] => 
                    [order_group_id] => 0
                    [order_id] => 323464
                    [order_total] => 162.01
                    [payment_methods] => Array
                        (
                            [0] => Doba PrePay
                            [1] => Credit Card
                            [2] => PayPal
                        )

                    [po_number] => Customer PO Number 7
                    [retailer_id] => 1223961
                    [ship_city] => Somewhere
                    [ship_country] => US
                    [ship_name] => Test, Test
                    [ship_phone] => 
                    [ship_postal] => 27715
                    [ship_state] => UT
                    [ship_street] =>  
                    [shipping_fees] => 24.66
                    [status] => Awaiting Payment
                    [subtotal] => 133.18
                )

            [2] => stdClass Object
                (
                    [bill_city] => Lehi
                    [bill_country] => US
                    [bill_name] => travis whitney
                    [bill_phone] => 1234567890
                    [bill_postal] => 84043
                    [bill_state] => UT
                    [bill_street] => Lehi
                    [can_pay] => 
                    [date_placed] => 2010-12-16 22:52:12
                    [drop_ship_fees] => 0
                    [is_paid] => 1
                    [order_group_id] => 300310
                    [order_id] => 327583
                    [order_total] => 23.48
                    [payment_methods] => Array
                        (
                        )

                    [po_number] => 
                    [retailer_id] => 1223961
                    [ship_city] => asdf
                    [ship_country] => US
                    [ship_name] => asdf, asdf
                    [ship_phone] => 
                    [ship_postal] => 84043
                    [ship_state] => AL
                    [ship_street] => asdf
                    [shipping_fees] => 8.76
                    [status] => Completed
                    [subtotal] => 14.72
                )

            [3] => stdClass Object
                (
                    [bill_city] => 
                    [bill_country] => US
                    [bill_name] =>  
                    [bill_phone] => 
                    [bill_postal] => 
                    [bill_state] => 
                    [bill_street] => 
                    [can_pay] => 1
                    [date_placed] => 2011-10-11 12:22:37
                    [drop_ship_fees] => 1.5
                    [is_paid] => 
                    [order_group_id] => 0
                    [order_id] => 328696
                    [order_total] => 20.86
                    [payment_methods] => Array
                        (
                            [0] => Doba PrePay
                            [1] => Credit Card
                            [2] => PayPal
                        )

                    [po_number] => 
                    [retailer_id] => 1223961
                    [ship_city] => Real City
                    [ship_country] => US
                    [ship_name] => Begood, Johnny
                    [ship_phone] => 
                    [ship_postal] => 84043
                    [ship_state] => UT
                    [ship_street] => 321 South 321 North
                    [shipping_fees] => 9.02
                    [status] => Awaiting Payment
                    [subtotal] => 10.34
                )

            [4] => stdClass Object
                (
                    [bill_city] => 
                    [bill_country] => US
                    [bill_name] =>  
                    [bill_phone] => 
                    [bill_postal] => 
                    [bill_state] => 
                    [bill_street] => 
                    [can_pay] => 1
                    [date_placed] => 2011-10-11 12:22:55
                    [drop_ship_fees] => 1.5
                    [is_paid] => 
                    [order_group_id] => 0
                    [order_id] => 328697
                    [order_total] => 20.86
                    [payment_methods] => Array
                        (
                            [0] => Doba PrePay
                            [1] => Credit Card
                            [2] => PayPal
                        )

                    [po_number] => 
                    [retailer_id] => 1223961
                    [ship_city] => Real City
                    [ship_country] => US
                    [ship_name] => Begood, Johnny
                    [ship_phone] => 
                    [ship_postal] => 84043
                    [ship_state] => UT
                    [ship_street] => 321 South 321 North
                    [shipping_fees] => 9.02
                    [status] => Awaiting Payment
                    [subtotal] => 10.34
                )

        )

    [overall_number_of_orders] => 35
    [overall_total_spent] => 919.51
    [result_total] => 35
)