There is a newer version of the API available. To link to the newest API documentation, click here - Version 20110301
  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

orderLookup response

 

 

orderLookup Example

orderLookup Request Example - XML

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

        <retailer_id>1</retailer_id>
        <action>orderLookup</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>84058</shipping_postal>
        <shipping_country>US</shipping_country>
        <ip_address>10.0.0.10</ip_address>
        <items>
            <item>
                <item_id>540202</item_id>
                <quantity>1</quantity>
            </item>
            <item>
                <item_id>422</item_id>
                <quantity>2</quantity>
            </item>
        </items>

    </request>
</dce>

orderLookup Response Example - XML

<?xml version="1.0"?>
<dce>
  <response>
    <outcome>success</outcome>
    <supplier_orders>
      <supplier_order>
        <items>
          <item>
            <product_id/>
            <item_id>100460</item_id>
            <sku/>
            <title/>
            <quantity>1</quantity>
            <price>11.33</price>
            <prepay_price>11.00</prepay_price>
            <item_status/>
          </item>
        </items>
        <drop_ship_fees>0.00</drop_ship_fees>
        <transaction_fees/>
        <shipping_fees>8.1375</shipping_fees>
        <sub_total>11.33</sub_total>
        <order_total>19.47</order_total>
        <supplier_id>4</supplier_id>
        <supplier_name/>
        <supplier_order_id/>
        <order_id/>
        <available_actions/>
      </supplier_order>
      <supplier_order>
        <items>
          <item>
            <product_id/>
            <item_id>754683</item_id>
            <sku/>
            <title/>
            <quantity>2</quantity>
            <price>16.43</price>
            <prepay_price>15.95</prepay_price>
            <item_status/>
          </item>
        </items>
        <drop_ship_fees>3.75</drop_ship_fees>
        <transaction_fees/>
        <shipping_fees>10.8045</shipping_fees>
        <sub_total>32.86</sub_total>
        <order_total>47.41</order_total>
        <supplier_id>451</supplier_id>
        <supplier_name/>
        <supplier_order_id/>
        <order_id/>
        <available_actions/>
      </supplier_order>
    </supplier_orders>
    <subtotal>44.19</subtotal>
    <drop_ship_fees>3.75</drop_ship_fees>
    <shipping_fees>18.94</shipping_fees>
    <transaction_fees/>
    <order_total>66.88</order_total>
  </response>
</dce>

orderLookup Request Example - SOAP

<?php
$URL = "https://sandbox.doba.com/soap/20101012/wsdl/ApiRetailerOrder.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="12345";
$objRequest->shipping_state="NY";
$objRequest->shipping_postal="10027";
$objRequest->shipping_country="US";
$item0 = new stdClass();
$item0->item_id = 100460;
$item0->quantity = 1;
$item1 = new stdClass();
$item1->item_id = 754683;
$item1->quantity = 2;
$objRequest->items=Array($item0,$item1);

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] => 3.75
    [order_total] => 64.69
    [shipping_fees] => 16.75
    [subtotal] => 44.19
    [supplier_orders] => Array
        (
            [0] => stdClass Object
                (
                    [available_actions] => 
                    [drop_ship_fees] => 0
                    [items] => Array
                        (
                            [0] => stdClass Object
                                (
                                    [item_id] => 100460
                                    [prepay_price] => 11
                                    [price] => 11.33
                                    [quantity] => 1
                                    [sku] => 
                                    [title] => 
                                )

                        )

                    [order_total] => 18.89
                    [shipping_fees] => 7.56
                    [sub_total] => 11.33
                    [supplier_id] => 4
                    [supplier_name] => 
                    [supplier_order_id] => 
                    [transaction_fees] => 0
                )

            [1] => stdClass Object
                (
                    [available_actions] => 
                    [drop_ship_fees] => 3.75
                    [items] => Array
                        (
                            [0] => stdClass Object
                                (
                                    [item_id] => 754683
                                    [prepay_price] => 15.95
                                    [price] => 16.43
                                    [quantity] => 2
                                    [sku] => 
                                    [title] => 
                                )

                        )

                    [order_total] => 45.8
                    [shipping_fees] => 9.1875
                    [sub_total] => 32.86
                    [supplier_id] => 451
                    [supplier_name] => 
                    [supplier_order_id] => 
                    [transaction_fees] => 0
                )

        )

    [transaction_fees] => 0
)

 

 

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

createOrder response

 

 

createOrder Example

createOrder Request Example - XML

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

        <retailer_id>1</retailer_id>
        <action>createOrder</action>

        <shipping_firstname>Fred</shipping_firstname>
        <shipping_lastname>Johnson</shipping_lastname>
        <shipping_street>123 North 123 South</shipping_street>
        <shipping_city>Fake City</shipping_city>
        <shipping_state>UT</shipping_state>
        <shipping_postal>84058</shipping_postal>
        <shipping_country>US</shipping_country>
        <ip_address>10.0.0.10</ip_address>
        <items>
            <item>
                <item_id>540202</item_id>
                <quantity>1</quantity>
            </item>
            <item>
                <item_id>422</item_id>
                <quantity>1</quantity>
            </item>
        </items>

    </request>
</dce>

createOrder Response Example - XML

<?xml version="1.0"?>
<dce>
  <response>
    <outcome>success</outcome>
    <order_id>323210</order_id>
    <supplier_orders>
      <supplier_order>
        <items>
          <item>
            <product_id/>
            <item_id>100460</item_id>
            <sku/>
            <title/>
            <quantity>2</quantity>
            <price>11.49</price>
            <prepay_price>11.17</prepay_price>
            <item_status/>
          </item>
          <item>
            <product_id/>
            <item_id>198047</item_id>
            <sku/>
            <title/>
            <quantity>1</quantity>
            <price>19.85</price>
            <prepay_price>19.28</prepay_price>
            <item_status/>
          </item>
        </items>
        <drop_ship_fees>0.00</drop_ship_fees>
        <transaction_fees/>
        <shipping_fees>24.4125</shipping_fees>
        <sub_total>42.83</sub_total>
        <order_total>67.24</order_total>
        <supplier_id>4</supplier_id>
        <supplier_name/>
        <supplier_order_id/>
        <order_id/>
        <available_actions/>
      </supplier_order>
    </supplier_orders>
    <subtotal>42.83</subtotal>
    <drop_ship_fees/>
    <shipping_fees>24.41</shipping_fees>
    <transaction_fees/>
    <order_total>67.24</order_total>
  </response>
</dce>

createOrder Request Example - SOAP

<?php
$URL = "https://sandbox.doba.com/soap/20101012/wsdl/ApiRetailerOrder.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="12345";
$objRequest->shipping_firstname="test";
$objRequest->shipping_lastname="test";
$objRequest->shipping_street="123 Dr.";
$objRequest->shipping_city="Somewhere";
$objRequest->shipping_state="UT";
$objRequest->shipping_postal="27715";
$objRequest->shipping_country="US";
$objRequest->po_number="Customer PO Number 5";
$objRequest->ip_address="123.123.123.123";
$item0 = new stdClass();
$item0->item_id = 501219;
$item0->quantity = 1;
$item1 = new stdClass();
$item1->item_id = 198047;
$item1->quantity = 2;
$objRequest->items=Array($item0,$item1);

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] => 323209
    [order_total] => 153.27
    [shipping_fees] => 23.26
    [subtotal] => 128.51
    [supplier_orders] => Array
        (
            [0] => stdClass Object
                (
                    [available_actions] => 
                    [drop_ship_fees] => 1.5
                    [items] => Array
                        (
                            [0] => stdClass Object
                                (
                                    [item_id] => 501219
                                    [item_status] => 
                                    [prepay_price] => 86.26
                                    [price] => 88.81
                                    [product_id] => 
                                    [quantity] => 1
                                    [sku] => 
                                    [title] => 
                                )

                        )

                    [order_id] => 
                    [order_total] => 98.45
                    [shipping_fees] => 8.1375
                    [sub_total] => 88.81
                    [supplier_id] => 1
                    [supplier_name] => 
                    [supplier_order_id] => 
                    [transaction_fees] => 0
                )

            [1] => stdClass Object
                (
                    [available_actions] => 
                    [drop_ship_fees] => 0
                    [items] => Array
                        (
                            [0] => stdClass Object
                                (
                                    [item_id] => 198047
                                    [item_status] => 
                                    [prepay_price] => 19.28
                                    [price] => 19.85
                                    [product_id] => 
                                    [quantity] => 2
                                    [sku] => 
                                    [title] => 
                                )

                        )

                    [order_id] => 
                    [order_total] => 54.82
                    [shipping_fees] => 15.12
                    [sub_total] => 39.7
                    [supplier_id] => 4
                    [supplier_name] => 
                    [supplier_order_id] => 
                    [transaction_fees] => 0
                )

        )

    [transaction_fees] => 0
)

 

 

fundOrder

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

The most secure funding method is "default_payment_account". If the default payment account is a credit card, the CVV2 code will need to be sent as we require all orders to pass CVV2 validation and we are not permitted to store the CVV2 due to security concerns. The merchant can set up their default payment profile at Doba.com.

When the "payment_account_id" payment method is used, the payment_account_id will need to be retrieved from the merchants Doba account by logging into their account and selecting "Settings" and then "Billing".

When the "new_payment_info" payment method is used, you will need to provide all of the information required in order to create the payment method and have it used to fund the order. When the response is successful, the new "payment_account_id" will be returned so that you may store it for later use.

If the response is successful the order has been funded. If it failes, the failure will indicate the reason.

Doba PrePay accounts can be used to fund orders if its set as the default payment profile. In this case, the "cvv2" parameter will still be required in the request, but you can leave it blank.

The only payment methods supported by the API are credit card payments and Doba PrePay. The website must be used to fund an order via PayPal.

Doba cannot be used as a payment processor. The end-customer must purchase the order through the merchant. After the merchant is satisfied that they will receive payment, they will then create the order in the Doba system and fund the order. Doing this allows the merchant to charge a different amount for the items than what they must pay Doba for those items.

fundOrder request

fundOrder response

 

 

fundOrder Example

fundOrder Request Example - XML

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

        <retailer_id>1</retailer_id>
        <action>fundOrder</action>
		
        <order_ids>
            <order_id>321518</order_id>
        </order_ids>
        
	<fund_method>new_payment_info</fund_method>
	
	<billing_firstname>Test Firstname</billing_firstname>
	<billing_lastname>Test Lastname</billing_lastname>
	<billing_street>That billing street</billing_street>
	<billing_city>That billing city</billing_city>
	<billing_state>AZ</billing_state>
	<billing_postal>84067</billing_postal>
	<billing_country>US</billing_country>
	<credit_card_number>4111111111111111</credit_card_number>
	<credit_card_exp_month>02</credit_card_exp_month>
	<credit_card_exp_year>2010</credit_card_exp_year>
	<cvv2>123</cvv2>    
	

    </request>
</dce>

fundOrder Response Example - XML

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

fundOrder Request Example - SOAP

<?php
$URL = "https://sandbox.doba.com/soap/20101012/wsdl/ApiRetailerOrder.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";
$objRequest->fund_method="default_payment_account";
$objRequest->cvv2="";
$objRequest->order_ids=Array("2464513","323208");

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);
?>
<?php
$URL = "https://sandbox.doba.com/soap/20101012/wsdl/ApiRetailerOrder.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";
$objRequest->fund_method="new_payment_info";
$objRequest->payment_account_id="";
$objRequest->billing_firstname="";
$objRequest->billing_lastname="";
$objRequest->billing_street="123 North";
$objRequest->billing_city="Somewhere";
$objRequest->billing_state="MN";
$objRequest->billing_postal="59977";
$objRequest->billing_country="US";
$objRequest->credit_card_number="4111111111111111";
$objRequest->credit_card_exp_month="02";
$objRequest->credit_card_exp_year="2013";
$objRequest->cvv2="123";
$objRequest->order_ids=Array("322106");

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

stdClass Object
(
    [payment_account_id] => 543149
)

 

 

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

getOrderDetail response

 

 

getOrderDetail Example

getOrderDetail Request Example - XML

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

        <retailer_id>123456</retailer_id>
        <action>getOrderDetail</action>
		
        <order_ids>
            <order_id>321518</order_id>
        </order_ids>		
        <order_statuses>
        	<order_status>Completed</order_status>
        	<order_status>Payment Pending</order_status>
        </order_statuses>

    </request>
</dce>

getOrderDetail Response Example - XML

<?xml version="1.0"?>
<dce>
  <response>
    <outcome>success</outcome>
    <orders>
      <order>
        <retailer_id>1223418</retailer_id>
        <order_id>321336</order_id>
        <order_group_id>0</order_group_id>
        <po_number/>
        <status>Awaiting Payment</status>
        <date_placed>2008-04-07 12:39:32</date_placed>
        <subtotal>110.38</subtotal>
        <shipping_fees>13.25</shipping_fees>
        <drop_ship_fees>2.50</drop_ship_fees>
        <order_total>126.13</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> </bill_name>
        <bill_street/>
        <bill_city/>
        <bill_state/>
        <bill_postal/>
        <bill_country>US</bill_country>
        <bill_phone/>
        <supplier_orders>
          <supplier_order>
            <status>Payment Pending</status>
            <credits/>
            <notes/>
            <events>
              <event>
                <date>2008-04-07 12:39:33</date>
                <description>Status change</description>
                <notes>Status changed from Limbo to Payment Pending</notes>
              </event>
            </events>
            <rmas/>
            <shipments/>
            <items>
              <item>
                <quantity_shipped>0</quantity_shipped>
                <supplier_order_item_id>473986</supplier_order_item_id>
                <product_id>43242</product_id>
                <item_id>55713</item_id>
                <sku>201-030</sku>
                <title>Channel 3 Signal Combiner</title>
                <quantity>1</quantity>
                <price>2.76</price>
                <prepay_price>2.68</prepay_price>
                <item_status>Pending</item_status>
              </item>
              <item>
                <quantity_shipped>0</quantity_shipped>
                <supplier_order_item_id>473985</supplier_order_item_id>
                <product_id>143705</product_id>
                <item_id>204396</item_id>
                <sku>MXD55</sku>
                <title>200-Watt Marine CD/Weatherband Receiver with iPlugTM</title>
                <quantity>1</quantity>
                <price>107.62</price>
                <prepay_price>104.53</prepay_price>
                <item_status>Pending</item_status>
              </item>
            </items>
            <drop_ship_fees>2.50</drop_ship_fees>
            <transaction_fees/>
            <shipping_fees>13.25</shipping_fees>
            <sub_total>110.38</sub_total>
            <order_total>126.13</order_total>
            <supplier_id>1</supplier_id>
            <supplier_name>Alpha</supplier_name>
            <supplier_order_id>389760</supplier_order_id>
            <order_id/>
            <available_actions>
              <available_action>cancel</available_action>
              <available_action>pay</available_action>
            </available_actions>
          </supplier_order>
        </supplier_orders>
        <transaction_method/>
        <available_actions>
          <available_action>cancel</available_action>
          <available_action>pay</available_action>
        </available_actions>
        <payment_methods>
          <payment_method>Doba PrePay</payment_method>
          <payment_method>Credit Card</payment_method>
          <payment_method>PayPal</payment_method>
        </payment_methods>
        <transactions/>
        <can_pay/>
        <is_paid/>
        <notes/>
        <shipments/>
      </order>
    </orders>
  </response>
</dce>

getOrderDetail Request Example - SOAP

<?php
$URL = "https://sandbox.doba.com/soap/20101012/wsdl/ApiRetailerOrder.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";
$objRequest->order_ids=Array();
$objRequest->order_statuses=Array("Completed","Payment Pending");

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

Array
(
    [0] => stdClass Object
        (
            [available_actions] => Array
                (
                    [0] => cancel
                    [1] => pay
                )

            [bill_city] => 
            [bill_country] => US
            [bill_name] =>  
            [bill_phone] => 
            [bill_postal] => 
            [bill_state] => 
            [bill_street] => 
            [can_pay] => 
            [date_placed] => 2008-04-07 12:39:32
            [drop_ship_fees] => 2.5
            [is_paid] => 
            [notes] => 
            [order_group_id] => 0
            [order_id] => 321336
            [order_total] => 126.13
            [payment_methods] => Array
                (
                    [0] => Doba PrePay
                    [1] => Credit Card
                    [2] => PayPal
                )

            [po_number] => 
            [retailer_id] => 1223418
            [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
            [shipments] => Array
                (
                )

            [shipping_fees] => 13.25
            [status] => Awaiting Payment
            [subtotal] => 110.38
            [supplier_orders] => Array
                (
                    [0] => stdClass Object
                        (
                            [available_actions] => Array
                                (
                                    [0] => cancel
                                    [1] => pay
                                )

                            [credits] => 0
                            [drop_ship_fees] => 2.5
                            [events] => Array
                                (
                                    [0] => stdClass Object
                                        (
                                            [date] => 2008-04-07 12:39:33
                                            [description] => Status change
                                            [notes] => Status changed from Limbo to Payment Pending
                                        )

                                )

                            [items] => Array
                                (
                                    [0] => stdClass Object
                                        (
                                            [item_id] => 55713
                                            [item_status] => Pending
                                            [prepay_price] => 2.68
                                            [price] => 2.76
                                            [product_id] => 43242
                                            [quantity] => 1
                                            [quantity_shipped] => 0
                                            [sku] => 201-030
                                            [supplier_order_item_id] => 473986
                                            [title] => Channel 3 Signal Combiner
                                        )

                                    [1] => stdClass Object
                                        (
                                            [item_id] => 204396
                                            [item_status] => Pending
                                            [prepay_price] => 104.53
                                            [price] => 107.62
                                            [product_id] => 143705
                                            [quantity] => 1
                                            [quantity_shipped] => 0
                                            [sku] => MXD55
                                            [supplier_order_item_id] => 473985
                                            [title] => 200-Watt Marine CD/Weatherband Receiver with iPlugTM
                                        )

                                )

                            [notes] => 
                            [order_id] => 
                            [order_total] => 126.13
                            [rmas] => Array
                                (
                                )

                            [shipments] => Array
                                (
                                )

                            [shipping_fees] => 13.25
                            [status] => Payment Pending
                            [sub_total] => 110.38
                            [supplier_id] => 1
                            [supplier_name] => Alpha
                            [supplier_order_id] => 389760
                            [transaction_fees] => 0
                        )

                )

            [transaction_method] => 
            [transactions] => Array
                (
                )

        )

    [1] => stdClass Object
        (
            [available_actions] => Array
                (
                    [0] => rma
                )

            [bill_city] => Test
            [bill_country] => US
            [bill_name] => API4Test Test
            [bill_phone] => 1234567890
            [bill_postal] => 84660
            [bill_state] => UT
            [bill_street] => Test
            [can_pay] => 
            [date_placed] => 2008-05-06 12:33:06
            [drop_ship_fees] => 2.5
            [is_paid] => 1
            [notes] => 
            [order_group_id] => 298322
            [order_id] => 321348
            [order_total] => 374.28
            [payment_methods] => Array
                (
                    [0] => Doba PrePay
                    [1] => Credit Card
                    [2] => PayPal
                )

            [po_number] => 
            [retailer_id] => 1223418
            [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
            [shipments] => Array
                (
                    [0] => stdClass Object
                        (
                            [carrier] => UPS
                            [num_parcels] => 0
                            [shipment_date] => 2008-12-15
                            [shipment_items] => Array
                                (
                                    [0] => stdClass Object
                                        (
                                            [item_id] => 3383299
                                            [quantity] => 2
                                            [title] => 
                                        )

                                )

                            [supplier_id] => 109
                            [supplier_name] => Mansfield
                            [tracking] => 2124135235253
                            [weight] => 0
                        )

                    [1] => stdClass Object
                        (
                            [carrier] => UPS
                            [num_parcels] => 0
                            [shipment_date] => 2008-12-15
                            [shipment_items] => Array
                                (
                                    [0] => stdClass Object
                                        (
                                            [item_id] => 3383299
                                            [quantity] => 2
                                            [title] => 
                                        )

                                )

                            [supplier_id] => 109
                            [supplier_name] => Mansfield
                            [tracking] => xjklshhd33323kl2djkd
                            [weight] => 0
                        )

                )

            [shipping_fees] => 18.62
            [status] => Completed
            [subtotal] => 353.16
            [supplier_orders] => Array
                (
                    [0] => stdClass Object
                        (
                            [available_actions] => Array
                                (
                                    [0] => rma
                                )

                            [credits] => 0
                            [drop_ship_fees] => 2.5
                            [events] => Array
                                (
                                    [0] => stdClass Object
                                        (
                                            [date] => 2008-12-15 14:43:03
                                            [description] => Status change
                                            [notes] => Status changed from Shipped to Completed
                                        )

                                    [1] => stdClass Object
                                        (
                                            [date] => 2008-12-15 14:43:03
                                            [description] => Tracking Information
                                            [notes] => We recieved notification that part of this order has shipped
                                        )

                                    [2] => stdClass Object
                                        (
                                            [date] => 2008-12-15 14:43:02
                                            [description] => Status change
                                            [notes] => Status changed from Shipment Pending to Shipped
                                        )

                                    [3] => stdClass Object
                                        (
                                            [date] => 2008-12-15 14:42:02
                                            [description] => Status change
                                            [notes] => Status changed from Awaiting Supplier Acceptance to Shipment Pending
                                        )

                                    [4] => stdClass Object
                                        (
                                            [date] => 2008-12-15 14:41:02
                                            [description] => Status change
                                            [notes] => Status changed from Funded to Awaiting Supplier Acceptance
                                        )

                                    [5] => stdClass Object
                                        (
                                            [date] => 2008-12-15 14:41:02
                                            [description] => Order has been sent to the supplier
                                            [notes] => This order has been sent to the supplier
                                        )

                                    [6] => stdClass Object
                                        (
                                            [date] => 2008-12-15 14:41:02
                                            [description] => Status change
                                            [notes] => Status changed from Funded to Awaiting Supplier Acceptance
                                        )

                                    [7] => stdClass Object
                                        (
                                            [date] => 2008-12-15 14:40:01
                                            [description] => Status change
                                            [notes] => Status changed from Payment Fraud Review to Funded
                                        )

                                    [8] => stdClass Object
                                        (
                                            [date] => 2008-12-15 14:39:31
                                            [description] => Status change
                                            [notes] => Status changed from Payment Pending to Payment Fraud Review
                                        )

                                    [9] => stdClass Object
                                        (
                                            [date] => 2008-05-06 12:33:08
                                            [description] => Status change
                                            [notes] => Status changed from Limbo to Payment Pending
                                        )

                                )

                            [items] => Array
                                (
                                    [0] => stdClass Object
                                        (
                                            [item_id] => 3383299
                                            [item_status] => Shipped
                                            [prepay_price] => 171.51
                                            [price] => 176.58
                                            [product_id] => 
                                            [quantity] => 2
                                            [quantity_shipped] => 4
                                            [sku] => 
                                            [supplier_order_item_id] => 474008
                                            [title] => 
                                        )

                                )

                            [notes] => 
                            [order_id] => 
                            [order_total] => 374.28
                            [rmas] => Array
                                (
                                )

                            [shipments] => Array
                                (
                                    [0] => stdClass Object
                                        (
                                            [carrier] => UPS
                                            [num_parcels] => 0
                                            [shipment_date] => 2008-12-15
                                            [shipment_items] => Array
                                                (
                                                    [0] => stdClass Object
                                                        (
                                                            [item_id] => 3383299
                                                            [quantity] => 2
                                                            [title] => 
                                                        )

                                                )

                                            [tracking] => 2124135235253
                                            [weight] => 0
                                        )

                                    [1] => stdClass Object
                                        (
                                            [carrier] => UPS
                                            [num_parcels] => 0
                                            [shipment_date] => 2008-12-15
                                            [shipment_items] => Array
                                                (
                                                    [0] => stdClass Object
                                                        (
                                                            [item_id] => 3383299
                                                            [quantity] => 2
                                                            [title] => 
                                                        )

                                                )

                                            [tracking] => xjklshhd33323kl2djkd
                                            [weight] => 0
                                        )

                                )

                            [shipping_fees] => 18.62
                            [status] => Completed
                            [sub_total] => 353.16
                            [supplier_id] => 109
                            [supplier_name] => Mansfield
                            [supplier_order_id] => 389766
                            [transaction_fees] => 0
                        )

                )

            [transaction_method] => 
            [transactions] => Array
                (
                )

        )

)

 

 

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

getOrders response

 

 

getOrders Example

getOrders Request Example - XML

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

        <retailer_id>1</retailer_id>
        <action>getOrders</action>

    </request>
</dce>

getOrders Response Example - XML

<?xml version="1.0"?>
<dce>
  <response>
    <outcome>success</outcome>
    <result_total>3</result_total>
    <orders>
      <order>
        <retailer_id>12345</retailer_id>
        <order_id>376166</order_id>
        <order_group_id>0</order_group_id>
        <po_number>3718628</po_number>
        <status>Awaiting Payment</status>
        <date_placed>2008-11-24 17:15:37</date_placed>
        <subtotal>27.08</subtotal>
        <shipping_fees>3.20</shipping_fees>
        <drop_ship_fees>0.00</drop_ship_fees>
        <order_total>31.42</order_total>
        <ship_name>I, Shayla</ship_name>
        <ship_street>M710 1231 E. Colton Ave.</ship_street>
        <ship_city>Redlands</ship_city>
        <ship_state>CA</ship_state>
        <ship_postal>92374</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/>
        <supplier_orders/>
        <transaction_method/>
        <available_actions/>
        <payment_methods>
          <payment_method>Doba PrePay</payment_method>
          <payment_method>Credit Card</payment_method>
          <payment_method>PayPal</payment_method>
        </payment_methods>
        <transactions/>
        <can_pay>1</can_pay>
        <is_paid/>
        <notes/>
        <shipments/>
      </order>
      <order>
        <retailer_id>12345</retailer_id>
        <order_id>376167</order_id>
        <order_group_id>348045</order_group_id>
        <po_number>3719428</po_number>
        <status>Awaiting Payment</status>
        <date_placed>2008-11-24 17:15:42</date_placed>
        <subtotal>11.33</subtotal>
        <shipping_fees>7.39</shipping_fees>
        <drop_ship_fees>0.00</drop_ship_fees>
        <order_total>19.78</order_total>
        <ship_name>Patrick, R</ship_name>
        <ship_street>440A North Duffy Road </ship_street>
        <ship_city>Butler</ship_city>
        <ship_state>PA</ship_state>
        <ship_postal>16001</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/>
        <supplier_orders/>
        <transaction_method/>
        <available_actions/>
        <payment_methods>
          <payment_method>Doba PrePay</payment_method>
          <payment_method>Credit Card</payment_method>
          <payment_method>PayPal</payment_method>
        </payment_methods>
        <transactions/>
        <can_pay>1</can_pay>
        <is_paid/>
        <notes/>
        <shipments/>
      </order>
      <order>
        <retailer_id>12345</retailer_id>
        <order_id>393241</order_id>
        <order_group_id>0</order_group_id>
        <po_number>Customer PO Number 3</po_number>
        <status>Awaiting Payment</status>
        <date_placed>2009-01-13 15:05:19</date_placed>
        <subtotal>7.71</subtotal>
        <shipping_fees>9.00</shipping_fees>
        <drop_ship_fees>1.00</drop_ship_fees>
        <order_total>18.75</order_total>
        <ship_name>Test, Test</ship_name>
        <ship_street>123 Dr.</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/>
        <supplier_orders/>
        <transaction_method/>
        <available_actions/>
        <payment_methods>
          <payment_method>Doba PrePay</payment_method>
          <payment_method>Credit Card</payment_method>
          <payment_method>PayPal</payment_method>
        </payment_methods>
        <transactions/>
        <can_pay>1</can_pay>
        <is_paid/>
        <notes/>
        <shipments/>
      </order>
    </orders>
    <overall_number_of_orders>3</overall_number_of_orders>
    <overall_total_spent>69.95</overall_total_spent>
  </response>
</dce>

getOrders Request Example - SOAP

<?php
$URL = "https://sandbox.doba.com/soap/20101012/wsdl/ApiRetailerOrder.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="12345";
$objRequest->order_ids=Array(123,234,345,456);
$objRequest->statuses=Array("Awaiting Payment","Completed");
$objRequest->from_date="2009-01-01";
$objRequest->to_date="2009-02-01";
$objRequest->sort_direction="asc";
$objRequest->sort_field="price";
$objRequest->order_group_id="";
$objRequest->offset="";
$objRequest->limit="20";

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
                (
                    [available_actions] => Array
                        (
                        )

                    [bill_city] => 
                    [bill_country] => US
                    [bill_name] =>  
                    [bill_phone] => 
                    [bill_postal] => 
                    [bill_state] => 
                    [bill_street] => 
                    [can_pay] => 
                    [date_placed] => 2008-04-07 12:49:00
                    [drop_ship_fees] => 5
                    [is_paid] => 
                    [notes] => 
                    [order_group_id] => 0
                    [order_id] => 329837
                    [order_total] => 101.77
                    [payment_methods] => Array
                        (
                            [0] => Doba PrePay
                            [1] => Credit Card
                            [2] => PayPal
                        )

                    [po_number] => 
                    [retailer_id] => 1227885
                    [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
                    [shipments] => Array
                        (
                        )

                    [shipping_fees] => 15.5
                    [status] => Awaiting Payment
                    [subtotal] => 81.27
                    [supplier_orders] => Array
                        (
                        )

                    [transaction_method] => 
                    [transactions] => Array
                        (
                        )

                )

            [1] => stdClass Object
                (
                    [available_actions] => Array
                        (
                        )

                    [bill_city] => 
                    [bill_country] => US
                    [bill_name] =>  
                    [bill_phone] => 
                    [bill_postal] => 
                    [bill_state] => 
                    [bill_street] => 
                    [can_pay] => 
                    [date_placed] => 2008-04-07 12:51:02
                    [drop_ship_fees] => 3.5
                    [is_paid] => 
                    [notes] => 
                    [order_group_id] => 0
                    [order_id] => 329841
                    [order_total] => 99.1
                    [payment_methods] => Array
                        (
                            [0] => Doba PrePay
                            [1] => Credit Card
                            [2] => PayPal
                        )

                    [po_number] => 
                    [retailer_id] => 1227885
                    [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
                    [shipments] => Array
                        (
                        )

                    [shipping_fees] => 15.5
                    [status] => Awaiting Payment
                    [subtotal] => 80.1
                    [supplier_orders] => Array
                        (
                        )

                    [transaction_method] => 
                    [transactions] => Array
                        (
                        )

                )

            [2] => stdClass Object
                (
                    [available_actions] => Array
                        (
                        )

                    [bill_city] => 
                    [bill_country] => US
                    [bill_name] =>  
                    [bill_phone] => 
                    [bill_postal] => 
                    [bill_state] => 
                    [bill_street] => 
                    [can_pay] => 
                    [date_placed] => 2008-04-07 13:38:57
                    [drop_ship_fees] => 3.5
                    [is_paid] => 
                    [notes] => 
                    [order_group_id] => 0
                    [order_id] => 329851
                    [order_total] => 99.1
                    [payment_methods] => Array
                        (
                            [0] => Doba PrePay
                            [1] => Credit Card
                            [2] => PayPal
                        )

                    [po_number] => 
                    [retailer_id] => 1227885
                    [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
                    [shipments] => Array
                        (
                        )

                    [shipping_fees] => 15.5
                    [status] => Awaiting Payment
                    [subtotal] => 80.1
                    [supplier_orders] => Array
                        (
                        )

                    [transaction_method] => 
                    [transactions] => Array
                        (
                        )

                )

        )

    [overall_number_of_orders] => 9
    [overall_total_spent] => 489.61
    [result_total] => 9
)