5

I get a list of orders using eBay getorder API, but now I want to select an order and update its status.

How can I do that? Please, any help would be appreciated

I am using some code off the internet, and it shows "success" on changing the status. But when I load the order list again (or if I use shipped=false in API) it's still "complete".

Code:

    //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);

Thank you

Rick Smith
  • 3,962
  • 6
  • 13
  • 24
ehsankayani
  • 53
  • 1
  • 4
  • have you tried completeSale method of api? – Shoaib Shaikh Jan 03 '12 at 05:51
  • hi yes, thank you i did it using the completessale method :).i can change order status to paid, and shipped in bulk now.But one thing why does still when i getorder usingapi the orderstatus = active? should it not change to shipped or paid etc? – ehsankayani Jan 03 '12 at 10:07
  • it should return latest status. are you getting sccuess in response to completesale? – Shoaib Shaikh Jan 04 '12 at 05:14

2 Answers2

4

This should work: CompleteSale in Trading API

zengr
  • 38,346
  • 37
  • 130
  • 192
  • It's an old thread but I have a question, I want to change the status of order from `Complete` to my custom status `Confirmed`, can we do so? @zengr – CodeGenius May 26 '18 at 21:17
1

For changing ebay order status from active to completed you can call "ReviseCheckoutStatus" API, it worked for me :)