Discussing APIs and development related to customers, discounts, and order management.
Hi Everyone,
I'm not sure what exactly is happening, but as im trying to make a call through the Order API via created_at_min I am only getting back 49 orders. No matter how much I change the date, I get 49 orders max. Everything seemed to be functioning well as I was testing yesterday, but not anymore. Thinking it had to be an error in my code, Ive dug back though it over and over but cant seem to find any isses.
So then I decided to see what response I would get if I went directly to the URL in my browser. I followed the format of " https://[API key]:[API pw]@[storename].myshopify.com/admin/orders.json?created_at_min=2016-12-07T00:15:47-08:00 ". Doing so still only gave a JSON response with 49 orders.
I can't seem to figure out what is going on. Checking the headers shows that I am indeed making only 1 call, so there is no way im hitting the limit. And the call is getting less than 250 orders, so im not hitting that limit either.
Any input would be great!
Thanks!
Hey Brendin,
By default that Orders API endpoint can give you a maximum of 50 orders. You can increase the limit to 250 orders by adding &limit=250 to the URL. If your query has more than 250 results then you can page through them by using the page URL parameter: https://help.shopify.com/api/reference/order#index
Hope this helps!
To learn more visit the Shopify Help Center or the Community Blog.
Josh.... i have read through that doc so many times its not even funny... I have no clue how I missed that!!
Thank you very much!