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.
Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024The Hydrogen Visual Editor is now available to merchants in Shopify Editions | Summer '...
By JasonH Sep 2, 2024Note: Customizing your CSS requires some familiarity with CSS and HTML. Before you cust...
By JasonH Aug 12, 2024