Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
When posting a request for a list of orders from Shopify, can you specify that the list be returned in a specific order on a selected field? Like order id ascending or descending.
Are there other functions that would return a record with the current maximum value so that you could determine where to stop when processing a list in number order?
Solved! Go to the solution
This is an accepted solution.
Hi @t3chlady ,
This is Theodore from PageFly - Shopify Page Builder App.
Shopify's Order API doesn't let you directly sort order lists. Here's how to achieve similar results:
Download and sort on your end: Get all orders and sort them within your code based on the desired field (e.g., order ID).
Filter by since_id: This is good for new orders. Include the since_id parameter in future requests to only get orders created after a specific point (the ID of the latest order you received before).
Best regards,
Theodore | PageFly
Please let me know if it works by giving it a Like or marking it as a solution!
PageFly - #1 Page Builder for Shopify merchants.
All features are available from Free plan. Live Chat Support is available 24/7.
This is an accepted solution.
Hi @t3chlady ,
This is Theodore from PageFly - Shopify Page Builder App.
Shopify's Order API doesn't let you directly sort order lists. Here's how to achieve similar results:
Download and sort on your end: Get all orders and sort them within your code based on the desired field (e.g., order ID).
Filter by since_id: This is good for new orders. Include the since_id parameter in future requests to only get orders created after a specific point (the ID of the latest order you received before).
Best regards,
Theodore | PageFly
Please let me know if it works by giving it a Like or marking it as a solution!
PageFly - #1 Page Builder for Shopify merchants.
All features are available from Free plan. Live Chat Support is available 24/7.
Thank you PageFly Theodor. Your answers have always been quite to the point and have resolved my issues.
Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025