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

Orders End point returns an Empty array #16

Open
AteqEjaz opened this issue Nov 9, 2021 · 1 comment
Open

Orders End point returns an Empty array #16

AteqEjaz opened this issue Nov 9, 2021 · 1 comment

Comments

@AteqEjaz
Copy link

AteqEjaz commented Nov 9, 2021

Hi,

We have 1 unshipped order inside our seller account, i can get that order if i pass "order_id" but when i try to fetch all orders API returns an Empty orders array, Any thoughts?

Connection #1 to host sellingpartnerapi-na.amazon.com left intact
ETHON: performed EASY effective_url=https://sellingpartnerapi-na.amazon.com/orders/v0/orders?MarketplaceIds=A1AM78C64UMOY8&**CreatedAfter=2021-11-02T00%3A00** response_code=200 return_code=ok total_time=1.552231
HTTP response body BEGIN
{"payload":{"Orders":[],"CreatedBefore":"2021-11-09T08:41:44Z"}}
END

Headers: {"Date"=>"Tue, 09 Nov 2021 08:43:44 GMT", "Content-Type"=>"application/json", "Content-Length"=>"64", "Connection"=>"keep-alive", "x-amzn-RequestId"=>"adacfb38-29e8-4bd3-a369-348040e0fd99", "x-amzn-RateLimit-Limit"=>"0.0167", "x-amz-apigw-id"=>"Ih0uGFecIAMFRTQ=", "X-Amzn-Trace-Id"=>"Root=1-618a34c0-43b3b4386bffd4a306dd58c7"}
#<AmzSpApi::OrdersApiModel::GetOrdersResponse:0x00007f91b8ef07a8 @payload={:Orders=>[], :CreatedBefore=>"2021-11-09T08:41:44Z"}>
=> #<AmzSpApi::OrdersApiModel::GetOrdersResponse:0x00007f91b8ef07a8 @payload={:Orders=>[], :CreatedBefore=>"2021-11-09T08:41:44Z"}>

Thanks :)

@iamricks
Copy link

Try passing the order_statuses maybe?

Something like:

orders = client.get_orders(["ATVPDKIKX0DER"], { 
                  created_after: created_after,
                  order_statuses: ["Unshipped", "PartiallyShipped", "Shipped", "Pending"],
                  max_results_per_page: 100,
              }).payload

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

2 participants