Cancel eBay order via API

2019-09-10 15:27发布

I use CompleteSale function to mark order as completed on eBay via API. What is the way to cancel existing order on eBay via API?

标签: c# ebay-api
1条回答
干净又极端
2楼-- · 2019-09-10 16:05

I think you want AddDispute. It can be used to cancel single line orders.

It takes TransactionId and ItemID OR OrderLineItemID (concatenation of ItemID and TransactionID, with a hyphen in between these two ID [OrderLineItemID = ItemID + "-" + OrderLineItemID]). Presumably, you can call it multiple times to cancel multiple lines. I am not 100% sure though.

Sample from Ebay's customer help.

<?xml version="1.0" encoding="utf-8"?>
<AddDisputeRequest xmlns="urn:ebay:apis:eBLBaseComponents">
  <Version>673</Version>
  <DisputeReason>TransactionMutuallyCanceled</DisputeReason>
  <DisputeExplanation>BuyerNoLongerWantsItem</DisputeExplanation>  
  <ItemID>140451132057</ItemID>
  <TransactionID>0</TransactionID>
  <RequesterCredentials>
    <eBayAuthToken> xxx</eBayAuthToken>
    </RequesterCredentials>
</AddDisputeRequest>
查看更多
登录 后发表回答