Dedicated to the Hydrogen framework, headless commerce, and building custom storefronts using the Storefront API.
Hi,
I'm having an issue with the checkouts API returning inconsistent results.
For example, when I fetch the count of checkouts with created_at_min = 2019-09-03, at the time of writing this, the result is 1,100. The checkouts API with a limit of 50 per page should have 22 page of results, this is not the case.
If I execute a request to the checkout API to retrieve the results using the same params (created_at_min = 2019-09-03), there's actually 25 pages of results!
This is an issue for our implementation because we are looping through each page, based on the result of the count.
Is anyone able to shed some light on why the count and checkouts API's are not consistent and how we can fetch the counts accurately to loop through the correct number of pages?
For reference, the count API I'm using is:
/admin/checkouts/count.json?created_at_min=2019-09-03
The checkout API I'm using is:
/admin/checkouts.json?created_at_min=2019-09-03&limit=50&page=25
Thanks!
Hey @inked ,
It's tough to say off the top of my head, but I could definitely take a closer look for you if I could see the shop that this was occurring on.
Would you mind sharing the .myshopify.com URL of the shop you're looking at?
Josh | Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Hello,
I've sent you a private message with our store URL.
Thanks.
Hey @inked ,
Thanks for that - I saw that and took a look. After speaking with our checkout team, they realized that the count endpoint isn't aware of timezones which is where the discrepancy is coming from. I've filed a bug report with them so that we can get this taken care of. In the meantime you may notice that the numbers are a little bit off, but this shouldn't be something permanent.
Josh | Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog