A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
If a shop has multiple fulfillment locations you can filter the orders (in the shop admin) based on a selected location. Unfortunately, it looks as though reference_location_id is not a filter option for the ORDER REST API.
By inspecting the post headers when I change the location I see a rather complex graphql query being sent to core "OrderListData" somewhere in there is an additional query ordersList() that returns the filtered results based on the order locationID.
Anyone out there know if its possible to do similar? I'm guessing it will be a rather expensive query but would be interested nevertheless.
Cheers
@garyrgilbert wrote:
If a shop has multiple fulfillment locations you can filter the orders (in the shop admin) based on a selected location. Unfortunately, it looks as though reference_location_id is not a filter option for the ORDER REST API.
By inspecting the post headers when I change the location I see a rather complex graphql query being sent to core "OrderListData" somewhere in there is an additional query ordersList() that returns the filtered results based on the order locationID.
Anyone out there know if its possible to do similar? I'm guessing it will be a rather expensive query but would be interested nevertheless.
Cheers
Could u use https://shopify.dev/docs/admin-api/graphql/reference/shipping-and-fulfillment/fulfillmentorder ?
Fulfillment order is specific to an order.
It answers the question. "Which locations will fulfill the items on this order?"
The question I want answered is "Which orders have items that will be fulfilled from this location?"
or in other words:
"Give me the X number of orders that have items that can be fulfilled by Y location_id."
Hello @garyrgilbert
You had any luck with this query yet, we have a requirement where we have to fetch orders based on the assigned locations. Currently we are fetching individual orders which is taking up a lot of time.
Please let me know if there was any further development from Shopify's end or something insightful that you could suggest.
Thank you
Deepak