What is the best way to page through the orders of a Shopify store using the API?

Shopify Expert
57 0 17

Hi,

There are two ways to page through the orders when batch processing the orders of a Shopify store:

1. Using the since_id parameter

2. Using the page parameter

https://docs.shopify.com/api/order#index

My prefered way would be to use the since_id approach becase this would allow for a more fine-grained control on how orders are processed.

I save the last order_id after each order is processed and in this way if something fails in the process I can restart at exactly where it failed.

While with the page parameter I would have to repeat the processing of the oders in the last page.

So my question is if anyone has experience with batch processing orders, which of the two approaches you have used and which would you consider to be best practice?

Thanks

Beautiful and responsive Shopify themes crafted with care at www.kabukithemes.com.
0 Likes