eBay Trading API getOrders: check if order is marked as shipped

大兔子大兔子 提交于 2019-12-11 07:26:47

问题


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:


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>
   ...


来源:https://stackoverflow.com/questions/14844391/ebay-trading-api-getorders-check-if-order-is-marked-as-shipped

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!