question

eoutlet_uk avatar image
0 Likes"
eoutlet_uk asked

CompleteSaleAPI - CompleteSale call not working when specifying OrderID

Hello, I've been trying to wrap my head around the CompleteSaleCall for hours now. The documentation implies that this call can be made by specifiying the ShipmentType, containing the ShipmentTrackingDetailsType and the OrderID field. Therefore, my code is as follows: CompleteSaleCall completeSaleApi = new CompleteSaleCall( apiContext2 ); completeSaleApi.OrderID = "xxxxxxxxxxx"; try { completeSaleApi.CompleteSale( "", "", true, true ); } catch (ApiException ex) { var exception = ex; } var response = completeSaleApi.ApiResponse; The OrderID is taken from GetOrdersCall, and is either the ItemID / TransactionID pair with a hyphen, or the Generated OrderID from Mutli-Line orders. The shipping method for this particular scenario doesn't have a tracking number, and therefore shipment details have been omitted. This works perfectly fine when I call the CompleteSale Method specifying an ItemID and TransactionID as arguments and NOT setting the OrderID. eg: completeSaleApi.CompleteSale( "xxxxxxxxxx", "yyyyyyyyyy", true, true ); Any help would be greatly appreciated. -Dan.
.NETcompletesaleapi
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

devanathan.developersupport@ebay.com avatar image
0 Likes"
devanathan.developersupport@ebay.com answered
Hello eoutlet_uk, You can use the CompleteSaleRequestType object to specify the OrderID and the corresponding shipment details. CompleteSaleCall apicall = new CompleteSaleCall(GetContext()); CompleteSaleRequestType request = new CompleteSaleRequestType(); request.Shipment = new ShipmentType(); .. .. .. request.ShippedSpecified = true; request.Shipped = true; and make the call using the apicall.Execute method apicall.ExecuteRequest(request); Best Regards, Devanathan Sampath, eBay Developer Support
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

eoutlet_uk avatar image
0 Likes"
eoutlet_uk answered
Brilliant, thanks! :D
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.