The API for my POS service is limited to 1000 results per call. I want to setup a daily routine that downloads all orders and related data and appends it to a google sheet that contains historical data. In order to accumulate the historical data, I will need to send an API call with the appropriate start time and end time, then repeat. It uses UNIX time, so determining the start and end times is a matter of a math. The question is, how do I iterate through each period?
While I have not used the webhooks feature, it occurs to me that the start and end dates could be integrated into the webhook URL and at the end of each flow, the url could be updated with the next period’s dates. It would then, theoretically, iterate through each period and append the data to a google sheet. Would this work?