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

Callbacks

Callbacks are sent to the URL on file to notify your system of changes in order status, product status, etc. Callbacks are essential to keeping the end-user up to date with the most accurate information available to the Doba platform.

Refer to the Sandbox Web Site section for information regarding the callback URL.

Callbacks are sent as an HTTP POST to the callback URL stored in your account. In PHP, the XML data is contained in the $_POST['xml'] variable.

To ensure proper security for callback updates, you should only accept callbacks originating from IP address range of 64.58.224.x.

Callbacks we send that don't get an HTTP 200 response will be retried 5 times. If it fails 5 times we will stop attemping to send them. We then send an email to the technical contact email address we have on file containing the responses we received when attempting to send the callback to your callback URL so that you are aware of the problem. If this happens 25 times, we will turn off callbacks and stop sending them to you and you will need to contact Doba Technical Support at api@doba.com to reset your account.

 

 

Product/Inventory Updates

Product and inventory information can be automatically sent to your system whenever a supplier updates a product that is stored in the retailers watchlist.

The product update callbacks will utilize the XML response within the getProductDetail API method.

The inventory update callbacks will utilize the XML response within the getProductInventory API method.

In order to receive automicatic updates via callbacks, the following criteria must be meet:

Follow these steps to test your inventory callback URL:

  1. Log into sandbox.smb.doba.com with your sandbox retailer username and password.
  2. Select "Data Export" on the top navigation and then select "API Settings".
  3. Put a check in the box's next to "Send Product Detail Updates" and "Send Product Inventory Updates" and enter your callback URL in the "Callback URL" text box. You'll probably want to put a check in the box next to "Send Product Order Updates" so that is set. Click "SAVE" to save the settings.
  4. Find a product you want to receive a callback for using the catalog and add it to a Warehouse folder.
  5. Go to the "WAREHOUSE" tab and click on the product you just added to view its details.
  6. Click the yellow "Send API Callback" button to initiate the callback.
  7. A callback will be sent to your system within a few minutes.

Below is an example of the data provided in a product callback update:

<dce>
<response>
<outcome>success</outcome>
<items>
    <item>
        <product_id>51423</product_id>
        <item_id>64397</item_id>
        <product_title>Horn for Car Alarms</product_title>
        <item_name>Horn for Car Alarms</item_name>
        <description>&lt;li&gt;6-tone, 125dB electronic siren</description>
        <additional_details/>
        <product_sku>CS-198III</product_sku>
        <brand>Crime Stopper</brand>
        <condition>new</condition>
        <freight>0</freight>
        <ship_width>4.00</ship_width>
        <ship_length>4.00</ship_length>
        <ship_height>3.00</ship_height>
        <ship_weight>1.00</ship_weight>
        <ship_cost>7.38</ship_cost>
        <sku>CS-198III</sku>
        <upc>048097100197</upc>
        <map>0.00</map>
        <price>9.39</price>
        <prepay_price>8.99</prepay_price>
        <msrp>19.95</msrp>
        <qty_avail>16</qty_avail>
        <stock>in-stock</stock>
        <last_update>2008-09-18 10:11:53</last_update>
        <images>
            <image>
                <url>http://d1k0ppjronk6up.cloudfront.net/products/_thumb/cs-198iii.jpg</url>
                <thumb_url/>
                <image_height>0</image_height>
                <image_width>0</image_width>
                <default>1</default>
            </image>
        </images>
        <supplier_id>1</supplier_id>
        <supplier_name>DBL</supplier_name>
        <supplier_processing>1-4 business days to ship out and receive tracking number.</supplier_processing>
        <supplier_alerts/>
        <supplier_notes>This supplier does not ship to Hawaii or Alaska. These products are not eligible for return. Please contact the appropriate manufacturer for troubleshooting repair service.</supplier_notes>
        <supplier_drop_fee>1.50</supplier_drop_fee>
        <product_group>basic</product_group>
        <categories>
            <category>
                <id>33596</id>
                <name>Product Catalog</name>
                <selected/>
                <count/>
            </category>
            <category>
                <id>30971</id>
                <name>automotive and tool</name>
                <selected/>
                <count/>
            </category>
            <category>
                <id>30972</id>
                <name>automotive</name>
                <selected/>
                <count/>
            </category>
            <category>
                <id>30986</id>
                <name>alarms</name>
                <selected/>
                <count/>
            </category>
            <category>
                <id>30987</id>
                <name>alarm with lcd</name>
                <selected/>
                <count/>
            </category>
        </categories>
        <attributes/>
    </item>
</items>
<retailer_id>157</retailer_id>
<callback_type>item_detail</callback_type>
</response>
</dce>

Below is an example of the data provided in an inventory callback update:

<dce>
<response>
<outcome>success</outcome>
<items>
    <item>
        <item_id>64397</item_id>
        <product_id>51423</product_id>
        <stock>in-stock</stock>
        <qty_avail>16</qty_avail>
        <price>9.26</price>
        <prepay_price>8.99</prepay_price>
    </item>
    <item>
        <item_id>54678</item_id>
        <product_id>41254</product_id>
        <stock>in-stock</stock>
        <qty_avail>126</qty_avail>
        <price>92.64</price>
        <prepay_price>90.99</prepay_price>
    </item>
</items>
<retailer_id>157</retailer_id>
<callback_type>inventory_update</callback_type>
</response>
</dce>

 

 

Order Updates

Order updates will be delivered to your system whenever a funded order has been updated by the supplier.

The data contained in the callback is identical to the data received via the getOrderDetail API method.

When testing callbacks in the Sandbox environment the shipping information is automatically generated and the order status updates every 1-2 mintues after an order is funded.

Below is an example of the data provided in an order callback update:

<dce>
<response>
<outcome>success</outcome>
<orders>
    <order>
        <retailer_id>1</retailer_id>
        <order_id>321</order_id>
        <order_group_id>55</order_group_id>
        <po_number/>
        <status>Various</status>
        <date_placed>2011-01-15 19:17:05</date_placed>
        <subtotal>18.27</subtotal>
        <shipping_fees>13.62</shipping_fees>
        <drop_ship_fees/>
        <order_total>36.89</order_total>
        <ship_name>Test Firstname Test Lastname</ship_name>
        <ship_street>That one street</ship_street>
        <ship_city>That one city</ship_city>
        <ship_state>CA</ship_state>
        <ship_postal>84058</ship_postal>
        <ship_country>US</ship_country>
        <ship_phone>5555555555</ship_phone>
        <bill_name>Test Firstname Test Lastname</bill_name>
        <bill_street>That one street</bill_street>
        <bill_city>That one city</bill_city>
        <bill_state>CA</bill_state>
        <bill_postal>84058</bill_postal>
        <bill_country>US</bill_country>
        <bill_phone>5555555555</bill_phone>
        <supplier_orders>
            <supplier_order>
                <status>Shipment Pending</status>
                <credits/>
                <notes/>
                <events>
                    <event>
                        <date>2011-01-16 04:36:03</date>
                        <description>Status change</description>
                        <notes>Status changed from Processing to Shipment Pending</notes>
                    </event>
                    <event>
                        <date>2011-01-16 04:36:02</date>
                        <description>Supplier Response</description>
                        <notes>We recieved notification from the supplier stating this order was okay.</notes>
                    </event>
                    <event>
                        <date>2011-01-16 04:36:02</date>
                        <description>Status change</description>
                        <notes>Status changed from Awaiting Supplier Acceptance to Processing</notes>
                    </event>
                    <event>
                        <date>2011-01-15 19:20:20</date>
                        <description>Status change</description>
                        <notes>Status changed from Funded to Awaiting Supplier Acceptance</notes>
                    </event>
                    <event>
                        <date>2011-01-15 19:20:20</date>
                        <description>Order has been sent to the supplier</description>
                        <notes>This order has been sent to the supplier</notes>
                    </event>
                    <event>
                        <date>2011-01-15 19:19:33</date>
                        <description>Status change</description>
                        <notes>Status changed from Payment Pending to Funded</notes>
                    </event>
                    <event>
                        <date>2011-01-15 19:17:05</date>
                        <description>Status change</description>
                        <notes>Status changed from Limbo to Payment Pending</notes>
                    </event>
                </events>
                <rmas/>
                <shipments>
                    <shipment>
                        <shipment_items>
                            <shipment_item>
                                <item_id>79340</item_id>
                                <title>Dia-Sharp Diamond Bench Stone Sharpener, Coarse, 4 in. </title>
                                <quantity>1</quantity>
                            </shipment_item>
                        </shipment_items>
                        <carrier>FEDEX</carrier>
                        <tracking>564564564564654</tracking>
                        <shipment_date>2011-01-17</shipment_date>
                        <num_parcels>1</num_parcels>
                        <weight>1.000</weight>
                    </shipment>
                </shipments>
                <items>
                     <item>
                        <quantity_shipped>1</quantity_shipped>
                        <supplier_order_item_id>826788</supplier_order_item_id>
                        <product_id>59917</product_id>
                        <item_id>79340</item_id>
                        <sku>DMD4C</sku>
                        <title>Dia-Sharp Diamond Bench Stone Sharpener, Coarse, 4 in. </title>
                        <quantity>1</quantity>
                        <price>7.64</price>
                        <prepay_price>7.64</prepay_price>
                        <item_status>Shipped</item_status>
                    </item>
                    <item>
                        <quantity_shipped>0</quantity_shipped>
                        <supplier_order_item_id>827183</supplier_order_item_id>
                        <product_id>215199</product_id>
                        <item_id>540202</item_id>
                        <sku>5711</sku>
                        <title>O 6qt Two Tiered Food Steamer</title>
                        <quantity>1</quantity>
                        <price>28.22</price>
                        <prepay_price>27.41</prepay_price>
                        <item_status>Shipment Pending</item_status>
                    </item>
                </items>
                <drop_ship_fees/>
                <transaction_fees/>
                <shipping_fees>6.50</shipping_fees>
                <sub_total>1.62</sub_total>
                <order_total>10.62</order_total>
                <supplier_id>5</supplier_id>
                <supplier_name>Diamond</supplier_name>
                <supplier_order_id>126</supplier_order_id>
                <order_id/>
                <available_actions/>
            </supplier_order>
        </supplier_orders>
        <transaction_method>Credit Card</transaction_method>
        <available_actions/>
        <payment_methods>
            <payment_method>Credit Card</payment_method>
            <payment_method>PayPal</payment_method>
        </payment_methods>
        <transactions>
            <transaction>
                <id>176</id>
                <auth_id>0</auth_id>
                <date>2011-01-15 19:19:33</date>
                <type>auth</type>
                <description>Authorize Purchase 55</description>
                <amount>37.88</amount>
                <method>Credit Card</method>
                <cc_last_four>0000</cc_last_four>
            </transaction>
        </transactions>
        <can_pay/>
        <is_paid/>
        <notes/>
        <shipments>
            <shipment>
                <supplier_id>5</supplier_id>
                <supplier_name>Albatross</supplier_name>
                <shipment_items>
                    <shipment_item>
                        <item_id>79340</item_id>
                        <title>Dia-Sharp Diamond Bench Stone Sharpener, Coarse, 4 in. </title>
                        <quantity>1</quantity>
                    </shipment_item>
                </shipment_items>
                <carrier>FEDEX</carrier>
                <tracking>564564564564654</tracking>
                <shipment_date>2011-01-17</shipment_date>
                <num_parcels>1</num_parcels>
                <weight>1.000</weight>
            </shipment>
        </shipments>
    </order>
</orders>
<retailer_id>157</retailer_id>
<callback_type>order_update</callback_type>
</response>
</dce>