A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
Hi,
I've been looking for an easy, quick and safe way to count variants of a shop for quite some time.
The products/count.json endpoint exists, is documented and works fine.
The variants/count.json endpoint is not documented, but it exists and works.
So my question is : can I use it safely ? Why is it not documented ? Or can it be removed anytime without warning ?
(I would expect an answer from @Shopify staff please 🙂 )
Thanks
Solved! Go to the solution
This is an accepted solution.
Hey @niels-hecquard ,
Thanks for your patience on this one! I was able to get the final word on this one from the dev team that runs the products/variants component.
The tl;dr is that the endpoint you are hitting is valid and there are no plans to deprecate it in the foreseeable future, and the reason why it is currently undocumented is because it has not undergone the official testing and release methodology that we typically apply to any publicly released platform feature. Until that process has taken place, it will remain undocumented and technically "unsupported" even if it is in a usable state for your needs.
It's currently in the backlog for tasks assigned to that dev group so you can expect an official release of this feature and associated documentation in the future, however I do not currently have an approximate ETA on that for the moment.
I hope that answers your question and thanks again for the patience!
Best,
To learn more visit the Shopify Help Center or the Community Blog.
Hello @niels-hecquard ,
Are you referring to THIS FUNCTION, and if not, can you please clarify?
Best,
To learn more visit the Shopify Help Center or the Community Blog.
Hi @GrahamS,
No sorry, you mention the API available at this address: curl -X GET "https://your-development-store.myshopify.com/admin/api/2021-10/products/632910392/variants/count.jso..." \
-H "X-Shopify-Access-Token: {access_token}"
I'm referring to the API available at this address:
curl -X GET "https://your-development-store.myshopify.com/admin/api/2021-10/variants/count.json" \
-H "X-Shopify-Access-Token: {access_token}"
which is not documented but works.
Note the absence of /products/632910392 in the URL.
My goal is to count all variants of all products in one call.
Hello @niels-hecquard ,
I've submitted an inquiry regarding this endpoint function to our products developer team for review - no updates on the matter just yet, but I'll reply to the thread the moment new information is available. I appreciate your patience while I get this one sorted out!
Best,
To learn more visit the Shopify Help Center or the Community Blog.
This is an accepted solution.
Hey @niels-hecquard ,
Thanks for your patience on this one! I was able to get the final word on this one from the dev team that runs the products/variants component.
The tl;dr is that the endpoint you are hitting is valid and there are no plans to deprecate it in the foreseeable future, and the reason why it is currently undocumented is because it has not undergone the official testing and release methodology that we typically apply to any publicly released platform feature. Until that process has taken place, it will remain undocumented and technically "unsupported" even if it is in a usable state for your needs.
It's currently in the backlog for tasks assigned to that dev group so you can expect an official release of this feature and associated documentation in the future, however I do not currently have an approximate ETA on that for the moment.
I hope that answers your question and thanks again for the patience!
Best,
To learn more visit the Shopify Help Center or the Community Blog.