I am building a Node REST API that makes calls to a list of Products. I am using the ‘since_id’ parameter to only retrieve new records that have been added since the last call. However, I am noticing that duplicate records are being returned in my list. Has anyone else encountered this issue and found a solution to prevent the duplicate records? Any help would be greatly appreciated, thank you.
do {
page = await shopify.api.rest.Product.all({
session: session,
limit: 50,
since_id: page.length > 0 ? page[page.length - 1].id : undefined,
});
products = products.concat(page);
} while (page.length > 0);