Hi
When requesting an order list, the response is limited to 100 orders. These orders always seem to have the most recent order in the system first.
So what this means is that if you have more than 100 orders to retrieve then you cannot ask for the oldest 100 then retrieve the remainder on subsequent calls.
Is there a way to either get all orders in 1 call or at least get the oldest first so you can loop calls to get all available orders
You’re not able to change the order the orders return in, instead the way pulling all orders is generally done is put your fetch in a while loop that has an incremental value. This can be used for the page parameter in your get request. Finally you’ll need an escape from your while block when an error is returned upon requesting a page beyond the number that are available
Using a while loop to achieve getting all orders was my first thought, but I see a problem with that.
Forgive me if I am missing something but the parameters are from a created or updated date, or from a given id. With the return of the first iteration returning the most recent orders, it is not clear how to make subsequent iterations go backwards. If the oldest 100 were returned you would simply advance the date/id to the most recent returned, and then go again until you received no more orders.
Trying to do that with the current setup would surely result in the same orders being returned on each iteration. Maybe I am not seeing an offset param in the API call