Reputation: 2368
Is there a way to query the API to find a Shop's orders with more detailed query parameters? For example I would like to be able to find an order by entering the client's name or the date of the order.
The available URL query parameters don't allow anything like that.
I realize I could just request all the orders and then filter that data, but I would rather do it directly in the API instead of locally to avoid any overhead.
Edit: Actually I just realized that the only way to query for a specific order is to enter its internally used order ID that the shop owner has no knowledge of. It would be really neat if I could query the API instead by the order "name" which is shown as the order's ID to the shop owner and the order recipient. Any ideas?
Upvotes: 1
Views: 883
Reputation: 11427
I look at it like this. Let's say you're poor and cannot afford a data store for orders in your App, but you have API access and you want to provide a search for merchants.
You get 250 orders per call and 500 API calls with zero troubles, so that is 125,000 orders. The API provides you with 125,000 objects that you are free to query any way you want. Want to show the merchant just orders with last name Smith and a line item of dingo balls with a chaser of a cart note set to "no saturday delivery please"... you can do that. Has nothing to do with Shopify, just your code. I think it is pretty easy to query orders for anything of interest, your mileage may vary.
Me, I keep interesting aspects of orders in a data store in my Apps, and then provide merchants with search results that way... cuts down on API calls, and keeps interesting facets closer at hand.
Upvotes: 1