A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
Greetings,
We recently identified a problem with our Shopify API while retrieving orders. The behavior is unstable with some orders that are working and some others not.
For instance, this call returns an empty array https://XX:[email protected]/admin/api/2021-07/orders.json?ids=4238414479530
This one is working: https://XX:[email protected]/admin/api/2021-07/orders.json?ids=4238688485546
How could we solve this issue? All our systems depend on Shopify.
Thank you
How old is Order with ID 4238414479530? Shopify only returns orders that are upto 60 days old. If you need orders older than that, you need to request special permissions on your App settings screen.
Thanks @tolgapaksoy for your assistance.
No, the order has been placed on Jan 14th 2022.
Hi @qwertyu
I would recommend contacting Shopify support to have technical support take a look at the store for you as it seems there may be something going wrong with this particular order. If you are not the store owner and do not have a a staff account on the store, please have the owner or a staff member contact support with the information directly.
Thanks!
To learn more visit the Shopify Help Center or the Community Blog.
Hi @csam
Unfortunately, there are other orders having this issue.
How can I get in touch with the technical support? When discussing with customer care, they recommended posting the problem in the forum as they cannot help on the technical side.
Thank you
Hi @qwertyu
I did some testing and found that if you add a parameter for the order status of status=any it will return the order this way. Eg. /admin/api/2021-07/orders.json?ids=4238414479530&status=any
Only open orders are returned by default via the orders.json endpoint on the REST API, so if you want all orders, you will need to specify "any". Alternatively you can use the format /admin/api/2021-07/orders.json?id=4238414479530 or /admin/api/2021-07/orders/4238414479530.json to return a single specific order of any status. Hope this helps!
To learn more visit the Shopify Help Center or the Community Blog.