Development discussions around Shopify APIs
Lets say I have a specific product in mind that is for sale. A one of a kind. A handle of i-am-special. Now consider a shop having a Flash sale. Perhaps 1000 orders happening over the course of an hour.
I want to ask the API this question. "Hey, is there an order where this product with this handle i-am-special is a line item?
At the moment, I can download N orders that happened, and inspect the line items of each one, looking for a match, but that seems like it would be really slow and primitive to be doing throughout this period of the flash sale.
Is there a convenient way to get the one order that may contain this precious item without downloading all the orders and inspecting each one, over and over again? I know I can download N orders, and build my own lookup table, ensuring I only do an order once, and then I can just inspect that lookup table... but I am sussing out if a GQL option might also be considered.
User | RANK |
---|---|
46 | |
16 | |
9 | |
9 | |
7 |
Thanks to all Community members that participated in our inaugural 2 week AMA on the new E...
By Jacqui Mar 10, 2023Upskill and stand out with the new Shopify Foundations Certification program
By SarahF_Shopify Mar 6, 2023One of the key components to running a successful online business is having clear and co...
By Ollie Mar 6, 2023