Can you specify ascending or descending on a field when posting a request?

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?

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:

  1. Download and sort on your end: Get all orders and sort them within your code based on the desired field (e.g., order ID).

  2. 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

Thank you PageFly Theodor. Your answers have always been quite to the point and have resolved my issues.