eBay Trading API getOrders: check if order is mark

2019-07-29 09:30发布

I want to get all orders from my ebay seller account. Using the GetOrders call works fine.

All of my orders are marked as ACTIVE or COMPLETE depending on the status of the order. But when I mark them as shipped (through API or on the website) the orders stay ACTIVE or COMPLETE after re-crawling. I expected the order status' to be SHIPPED.

  • I use the eBay Java SDK Version 797
  • every API call returns "Success"

How do I figure out if an order is marked as shipped?

Does this depend on the country?

  • I'm using the German eBay sandbox ( the Webgui is a german/english mix ;) )
  • I'm using the .com API-URLs

Here's my code:

GetOrdersCall call = new GetOrdersCall(context);
DetailLevelCodeType[] detailLevels = new DetailLevelCodeType[]{
    DetailLevelCodeType.RETURN_ALL
};
call.setDetailLevel(detailLevels);
call.setOrderRole(TradingRoleCodeType.SELLER);
call.setNumberOfDays(30);
OrderType[] orders;
try {
   orders = call.getOrders();
   for(OrderType order : orders)
      System.out.println(order.getOrderStatus().name());
} catch (Exception e) {}

System.out never prints SHIPPED

1条回答
虎瘦雄心在
2楼-- · 2019-07-29 10:01

You could either check the field

<ShippedTime>2013-02-22T13:22:04.000Z</ShippedTime>

or you can use the information from the transaction array:

<TransactionArray>
  <Transaction>
   <Buyer>
    <Email>test.test.test</Email>
   </Buyer>
   <ShippingDetails>
    <SellingManagerSalesRecordNumber>1234</SellingManagerSalesRecordNumber>
    <ShipmentTrackingDetails>
     <ShippingCarrierUsed>DHL</ShippingCarrierUsed>
     <ShipmentTrackingNumber>123456798</ShipmentTrackingNumber>
    </ShipmentTrackingDetails>
   </ShippingDetails>
   ...
查看更多
登录 后发表回答