For full functionality of this site it is necessary to enable JavaScript.
Here are the instructions how to enable JavaScript in your web browser.

Knowledge base

Find the answer to your question

Advanced Search PView

Search terms
Search Type
Product
Category
Language
Format
SDK
Sort by
Direction

Order management using Trading API - GetOrders

  • Answer ID 1788
  • Published 02/22/2011 04:26 PM
  • Updated 10/21/2013 01:45 PM
  • Permalink https://ebaydts.com/eBayKBDetails?KBid=1788
Product
Recommended implementation for order management using the Trading API

Detailed Description

With version 705 and above, you can take advantage of the updates made to the GetOrders API call to manage your orders using the Trading API.

You can get your orders based on one of these filters:

 Filter  Use Case  Filter Sample
Order creation time Get the information about an order only for the first time when it is created. No subsequent updates are required.

<CreateTimeFrom>2011-01-01T01:00:00.000Z</CreateTimeFrom>
<CreateTimeTo>2011-01-01T01:00:15.000Z</CreateTimeTo>

Order modification time Get all updates about an order such as updates to payment & shipping status <ModTimeFrom>2011-01-01T01:00:00.000Z</ModTimeFrom>
<ModTimeTo>2011-01-01T01:00:15.000Z</ModTimeTo>
OrderID  Get information about specific orders <OrderIDArray>
  <OrderID>300704</OrderID>
  <OrderID>290003392786-7635515019</OrderID>
</OrderIDArray>


Here are the recommended steps for getting the transaction information and managing your orders:

  1. Make a call to GetOrders every 15 minutes with:
    • DetailLevel set to ReturnAll
    • filter that is appropriate for your use case (either creation or modified time) and use it consistently in all your calls
    • set "Create / Mod TimeFrom" to the last time you made the call minus 2 minutes.  You are going back 2 mins to ensure that no orders are missed.
    • set "Create / Mod TimeTo" time to the current time minus 2 minutes.  You are going back to ensure that you do not pick up any orders that are still in the process of being completed. 
    • Pagination
  2. Iterate through each order
  3. Check for Order.CheckoutStatus.Status
    • If it is Complete then it is ready for post sales processing
      • An order many contain one or more line items.  Iterate through each transaction in TransactionArray to get the item information
      • Next, check the payment method used during checkout and the payment status using the fields CheckoutStatus.PaymentMethod and CheckoutStatus.eBayPaymentStatus
        • If the payment method is one of the integrated methods on eBay, such as PayPal, Moneybookers(Skrill), ProPay, IntegratedMerchantCreditCard or Paymate, and the eBayPaymentStatus is NoPaymentFailure then the mark the order as paid.  Additionally, you should look for the ExternalTransactionID and PaidTime for the purposes of reconciliation with the payment system.
        • If the payment method is not integrated on eBay such as Other, the eBayPaymentStatus will be NoPaymentFailure, however the seller will need to confirm if the payment is complete.  The ExternalTransactionID field will have a value of SIS.  Please see this article for details: 
          What does SIS mean?   
    • If Checkout is not Complete, then the transaction is not completely ready for post sales processing
      • You need to allocate the inventory for the transaction, but do need to wait for the checkout and payment information.
        •  Some of it can change from the defaults such as the buyer may choose to an address other than their default address during the checkout process.
        • Other data points will remain unchanged such as item details, the OrderLineItemID, Quantity Purchased; which you can use for managing your inventory, but not fulfillment.
      • To determine the final value fee, wait till the CheckoutStatus turns to Complete
  4. If  HasMoreOrders field in the response is true, increment the PageNumber and make the call and iterate through the orders as above.

 

Note:
When you are in the process of downloading your orders, ensure that you do not make any updates such as marking items as paid or shipped using the website or CompleteSale. Please see the following KB article for more details: 
Transactions missing in GetSellerTransactions response



FAQs:

How can I match up my eBay transactions with my PayPal transactions?
In the ExternalTransaction container, the ExternalTransactionID field is the the PayPal TransactionID. You can use this to sync up with the PayPal IPNs, APIs or reports. You need to ensure that you have set the DetailLevel field to ReturnAll when you make the request.
See this KB article for more details: 
Linking eBay and PayPal Transactions

-----------

Can the composition of an order change?
As long as an order is not in the Completed state, its composition can change.

Here are a few examples:

Example1:
· Buyer Purchases 2 items from the same seller - ItemID1, ItemID2

· Seller creates an order OrderID1 containing ItemID1 & ItemID2, so that buyer can combine payments of both the items

· Buyer chooses to pay for items individually

· OrderID1 becomes defunct

Example 2:

· Buyer Purchases 3 items from the same seller - ItemID1, ItemID2, ItemID3

· Seller creates an order OrderID1 containing ItemID1, ItemID2 & ItemID3, so that buyer can combine payments of both the items

· Buyer completes checkout and pays for ItemID1 & ItemID2

· OrderID1 becomes defunct, new Order OrderID 2 is created for ItemID1 & ItemID2

· Since OrderID2 is in a Completed state, buyer or seller cannot add ItemID 3 to it.

· Buyer Pays for ItemID 3. This becomes a separate order OrderID3.


Additional Information 

Documentation:
http://developer.ebay.com/DevZone/XML/docs/Reference/eBay/GetOrders.html

How well did this answer your question?

Answers others found helpful

Print Email This Page Delicious Digg Facebook Reddit StumbleUpon Twitter