Get JSON of sorted products

Highlighted
Shopify Partner
6 0 2

Hi 

Im using the /admin/products.json api call, is there any option to get products sorted by price asc/desc or title alpha-bet asc/desc or best-selling with this api call, or maybe there is any other api call that can give me this information?

Thank you.

1 Like
Highlighted
Excursionist
70 0 14

Hey, this is something I've wished for as well, but ordering/sorting isn't mentioned in the docs http://docs.shopify.com/api/product and does not appear to be supported by the Shopify Rest API.  My recommendation would be to request all products (remembering to use the limit/page parameters described in the docs) and sort/operate on them however you wish once you've pulled them all.  

Hope this helps

Product Customizer - Creating extremely customizable products within Shopify is no longer a hassle! BlogFeeder - Automatically pull updates from any RSS feed into your Shopify blog Happy Ending - Personalize your thank you page
0 Likes
Highlighted
New Member
6 0 0

It's 2020, and I think that the 'order' parameter is not still documented in the API docs, so it is unclear if this is a supported feature.

Shopify staff have posted about the parameter, such as here: https://community.shopify.com/c/Shopify-APIs-SDKs/Sorting-Products-in-Products-json-by-price/m-p/209... .

 

Could someone from Shopify please clarify if the order parameter (for the REST API products.json endpoint) is supported or documented? Thanks!

0 Likes