Orders End point returns an Empty array
Opened this issue · 1 comments
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 :)
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