我使用eBay getorder API获取订单列表,但现在我想选择订单并更新其状态。
我该怎么做?请,任何帮助将不胜感激
我正在使用互联网上的一些代码,它在更改状态时显示“成功”。但是,当我再次加载订单列表时,它仍然是“完整”(或者如果我在api中使用运输=假)仍然是“完整”。
代码:
//create the context
ApiContext context = new ApiContext();
//set the User token
context.ApiCredential.eBayToken = "token";
//set the server url
// context.SoapApiServerUrl = "https://api.sandbox.ebay.com/wsapi";
context.SoapApiServerUrl = "https://api.ebay.com/wsapi";
//enable logging
context.ApiLogManager = new ApiLogManager();
context.ApiLogManager.ApiLoggerList.Add(new FileLogger("log.txt", true, true, true));
context.ApiLogManager.EnableLogging = true;
//set the version
context.Version = "705";
context.Site = SiteCodeType.UK;
//Create the call and set the fields
CompleteSaleCall apicall = new CompleteSaleCall(context);
//Either ItemID-TransactionID or OrderLineItemID or OrderID is required. If item is part of an order, specify OrderID.
apicall.OrderLineItemID = "123467585959-0";
apicall.Shipped = true;
//apicall.Shipment = new ShipmentType();
//apicall.Shipment.ShipmentTrackingDetails = new ShipmentTrackingDetailsTypeCollection();
//ShipmentTrackingDetailsType shpmnt = new ShipmentTrackingDetailsType();
//shpmnt.ShipmentTrackingNumber = "VZ9478668";
//shpmnt.ShippingCarrierUsed = "YourCarrier";
//apicall.Shipment.ShipmentTrackingDetails.Add(shpmnt);
//Specify time in GMT. This is an optional field
//If you don't specify a value for the ShippedTime, it will be defaulted to the time at which the call was made
// apicall.Shipment.ShippedTime = new DateTime(2011, 3, 5, 10, 0, 0).ToUniversalTime();
//call the Execute method
apicall.Execute();
Console.WriteLine(apicall.ApiResponse.Ack);
谢谢
答案 0 :(得分:3)
这应该有效:CompleteSale in Trading AP我
答案 1 :(得分:1)
要将易趣订单状态从有效状态更改为已完成,您可以调用“ReviseCheckoutStatus”API,它对我有用:)