Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ListOrders not working #144

Closed
chengkiang opened this issue Oct 22, 2020 · 0 comments
Closed

ListOrders not working #144

chengkiang opened this issue Oct 22, 2020 · 0 comments

Comments

@chengkiang
Copy link

Trying to call ListOrders but it's not returning anything. I am using the sample code with updated parameters:-

  const mwsRequestData = {
    Version: '2013-09-01',
    Action: 'ListOrders',
    SellerId: 'MY_SELLER_ID',
    'MarketplaceId.Id.1': 'MY_MARKETPLACE_ID',
    LastUpdatedAfter: new Date(2020, 10, 22)
  };
  try {
    const response = await amazonMws.orders.search(mwsRequestData);
    console.log('response', response);
  } catch (error) {
    console.log('error ', error);
  }

The output from the above code is:

response { Orders: {},
  LastUpdatedBefore: '2020-10-22T08:39:33.362Z',
  ResponseMetadata: { RequestId: '834a49df-a0b5-49fc-b1e5-08c4cd87f6cb' },
  Headers:
   { 'x-mws-quota-max': 'unknown',
     'x-mws-quota-remaining': 'unknown',
     'x-mws-quota-resetson': 'unknown',
     'x-mws-timestamp': '2020-10-22T08:41:33.331Z',
     'content-type': 'text/xml',
     'content-charset': 'unknown',
     'content-length': '354',
     'content-md5': 'unknown',
     date: 'Thu, 22 Oct 2020 08:41:33 GMT' },
  StatusCode: 200 }

Running the same on MWS Scratchpad returns a list of XML-formatted orders, which is correct. In addition, the output changed the LastUpdatedAfter to LastUpdatedBefore.

Changing to CreatedAfter results in an output which changed it to CreatedBefore, and no orders as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant