node.js - Date Last Run Node Js and Shopify
I'm developing a node js app and connecting with Shopify to pull orders. I can set the GET request on a schedule however how do I setup the parameters to get orders since last pull date so I don't keep pulling the same orders?
The simplest way is to get all orders first, once. Once you do that and process them all, you will have the ID of the latest order. Save that ID. Next time you do a pull operation, you'll note that the API has a query parameter labelled since_id that represents the last order pulled. Shopify will return orders since that ID. Again, process the orders, save the latest ID as your new since_id, and continue.
Didn't find the answer?
Our community is visited by hundreds of Shopify development professionals every day. Ask your question and get a quick answer for free.
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.