A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
I'm trying to fetch all orders from GET orders endpoint (REST). But I observed that the orders that are marked as `fulfilled` are not available from that endpoint.
Is there any other way through which we can get all the `fulfilled` orders from REST?
Solved! Go to the solution
This is an accepted solution.
Hello,
I was able to fetch "fulfilled" orders by using filter `status = any` on REST 'orders' endpoint.
REST (GET) : /admin/api/2020-01/orders.json?status=any
Exactly having the same problem since last 3 days..Could someone help plz? Not seeing any error messages..But the retrieval gives me null results..We are on 2020 01.
Jay
This is an accepted solution.
Hello,
I was able to fetch "fulfilled" orders by using filter `status = any` on REST 'orders' endpoint.
REST (GET) : /admin/api/2020-01/orders.json?status=any
Hello,
I was able to fetch "fulfilled" orders by using filter `status = any` on REST 'orders' endpoint.
REST (GET) : /admin/api/2020-01/orders.json?status=any
Thanks for taking time to respond. Much appreciated..But marking status = Any will return fulfilled and not fulfilled orders as well? We need to get just those orders that were marked as fulfilled.. Thoughts ?
Jay
That status=any gotcha is annoying. You'd think that if you are passing an API request without a slew of query parameters then logically your response set would include the wide-open array. Unfortunately not. Also, I've found sometimes most API providers that might not have fully-fleshed out query parameters results in the API consumer having to pull _too many_ records. And then parse through the iteration of them in order to weed out what they don't want. Although that's an expensive operation with API rate limits and whatnot. But it is what it is 🙂
Try this
/admin/orders.json?status=any&fulfillment_status=shipped
You need to use both query params options i.e status=any and fulfillment_status=shipped to fetch fulfilled orders.
Hope this helps 🙂
Thanks,
that helps.
@RishabhD Hey man, thanks A LOT. I spent too much time trying to figure it out.
Both parameters are required, otherwise empty respons or incomplete orders list are given.
Rly appriciate