Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8269463
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T06:14:04+00:00 2026-06-08T06:14:04+00:00

What would be the best way to retrieve orders from Amazon MWS? My current

  • 0

What would be the best way to retrieve orders from Amazon MWS?

My current code is as follows…

MarketplaceWebServiceOrdersConfig config = new MarketplaceWebServiceOrdersConfig();
config.ServiceURL = productsURL;

MarketplaceWebServiceOrders.MarketplaceWebServiceOrdersClient service = new MarketplaceWebServiceOrdersClient(appname, version, accesskeyID, secretkey, config);             

ListOrdersRequest request = new ListOrdersRequest();
request.MarketplaceId = new MarketplaceIdList();
request.MarketplaceId.Id = new List<string>(new string[] { marketids[0] });
request.SellerId = merchantID;
request.OrderStatus = new OrderStatusList() { Status = new List<OrderStatusEnum>() { OrderStatusEnum.Unshipped, OrderStatusEnum.PartiallyShipped } };
request.CreatedAfter = Convert.ToDateTime(dc.Settings.SingleOrDefault().lastOrdersRetrieved);

ListOrdersResponse response = service.ListOrders(request);

I am having issues passing the ISO Date across, also if you see any other issues with the code please feel free to let me know.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T06:14:07+00:00Added an answer on June 8, 2026 at 6:14 am

    If your looking for something created after the immediate second you make the request, it wont find anything at all as with Amazon you can only grab up to the last 2 minutes of data for orders.

    I had an issue with trying to set time from Now – 5 minutes. After speaking to Amazon support they provided the following nugget: “

    In Orders API, if you don’t specify an end time (CreatedBefore or
    LastUpdatedBefore), it will assume now (actually, now minus 2
    minutes). And in its response, it will tell you exactly what time it
    used as the cutoff time.”

    In your case you will want to remove the CreatedAfter request and let Amazon choose for you.

    If you are then looking for the created after, you can grab the response time Amazon gave and pass that in to your created after param.

    The method I have right now to list orders is as follows, mind you this will just list the orders to console, but the data gets returned all the same:

    public List<string> ListOrders(MarketplaceWebServiceOrders.MarketplaceWebServiceOrders    service, string merchantId, List<OrderStatusEnum> orderStatus)
        {
            List<string> salesOrderIds = new List<string>();
    
            ListOrdersRequest listOrdersRequest = new ListOrdersRequest();
    
            DateTime createdAfter = DateTime.Now.Add(new TimeSpan(-1, 0, 0));
            DateTime createdbefore = DateTime.Now.Add(new TimeSpan(0, -15, 0));
    
            listOrdersRequest.CreatedAfter = createdAfter;
            listOrdersRequest.CreatedBefore = createdbefore;
            listOrdersRequest.SellerId = merchantId;
            listOrdersRequest.OrderStatus = new OrderStatusList();
    
            foreach (OrderStatusEnum status in orderStatus)
            {
                listOrdersRequest.OrderStatus.Status.Add(status);
            }
    
            listOrdersRequest.FulfillmentChannel = new FulfillmentChannelList();
            listOrdersRequest.FulfillmentChannel.Channel = new List<FulfillmentChannelEnum>();
            listOrdersRequest.FulfillmentChannel.Channel.Add(FulfillmentChannelEnum.MFN);
    
    
            listOrdersRequest.MarketplaceId = new MarketplaceIdList();
            listOrdersRequest.MarketplaceId.Id = new List<string>();
            listOrdersRequest.MarketplaceId.Id.Add("yourID");
    
            ListOrdersResponse listOrdersResponse = service.ListOrders(listOrdersRequest);
    
            int i = 0;
    
            foreach (Order order in listOrdersResponse.ListOrdersResult.Orders.Order)
            {
                i++;
                Console.WriteLine("Amazon Order ID:             \t" + order.AmazonOrderId);
                Console.WriteLine("Buyer Name:                  \t" + order.BuyerName);
                Console.WriteLine("Buyer Email:                 \t" + order.BuyerEmail);
                Console.WriteLine("Fulfillment Channel:         \t" + order.FulfillmentChannel);
                Console.WriteLine("Order Status:                \t" + order.OrderStatus);
                Console.WriteLine("Order Total:                 \t" + order.OrderTotal);
                Console.WriteLine("Number of Items Shipped:     \t" + order.NumberOfItemsShipped);
                Console.WriteLine("Number of Items Unshipped:   \t" + order.NumberOfItemsUnshipped);
                Console.WriteLine("Purchase Date:               \t" + order.PurchaseDate);
                Console.WriteLine("===========================================================");
    
                salesOrderIds.Add(order.AmazonOrderId);
    
    
            }
    
            Console.WriteLine("We returned a total of {0} records. ", i);
            return salesOrderIds;
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to make a code snippet database web application. Would the best way
What's the best way retrieve complex queries from a REST service? Suppose I want
postgres 9.2 supports json columns. what would be best way to extend postgres to
What would be the best way to something like this where a timestamp is
What would be the best way to display a dialog whenever my app receives
What would be the best way to version a rails application? We want to
What would be the best way to properly concatenate string with an url inside?
What would be the best way and more idiomatic to break a string into
What would be the best way to convert a 50-digit String to a BigInteger
What would be the best way in Python to parse out chunks of text

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.