A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
Hi Team,
We are trying to fetch a list of orders specific to a customer. But we are getting an empty list in the response.
We tried using both SDK and API, and neither of them worked.
API: https://customer.myshopify.com/admin/api/2022-01/orders.json
API Response:
SDK: orders = with_shopify_session { ShopifyAPI::Order.where(customer_id: customer.id) }
Can you help me to solve the issue?
Thanks,
I'm wondering if the orders you're trying to retrieve are over 60 days old? If that's the case, your app will need to have the read_all_orders access scope added in order to access orders older than 60 days. Please let me know if you have further questions!
To learn more visit the Shopify Help Center or the Community Blog.
Hi @csam,
We are only trying to retrieve the orders created in the last 30 days. The seller has read_orders access.
1. Should not the API return the orders created within 60 days by default? We didn't pass any parameter to the API to retrieve the 60-day old orders.
2. Is it possible to get the corresponding errors if something is wrong with the API request?
Okay, thanks for confirming that. The correct format for making this request via the REST API directly would be /admin
If you're still having trouble with this, we're going to need a little more info for this issue - could you please fill out all fields on the Report an Issue form found under the Partners Support section? Any additional information you can provide around this issue would be very helpful. This will let us take a look in the logs and at the store, to see what might be causing the behaviour.
Thanks!
To learn more visit the Shopify Help Center or the Community Blog.
Hi @csam,
I get the same result(empty list) with the "/admin/api/2021-10/customers/207119551/orders.json" API. I will update more details. Thanks.
Hi, i've the same problem. Have you resolved it?
Please, i'm receiving the same result(empty list) and i need help.
Thank you,
Maybe the same issue here. We are receiving orders but only one or two, when we may have taken 50 - 100 orders over the day. We are using the created_at_min and _max parameters. Or is this another issue?