Keeping your database up to date it very easy using timestamps. Following your initial call to retrieve the full extract you will have received a timestamp in the response that indicates when the full extract was last generated. Using this timestamp you are able to query the delta endpoint to retrieve the list of profiles that have been modified by ARI since that moment in time, in chronological order, oldest to newest.
Here’s an example curl statement showing how you could request business deltas since 1AM on 4 June 2022:
Note that the timestamp is always provided as the epoch time in milliseconds
For performance reasons, calling the delta endpoint will return a limited number of profiles depending on the size of the profiles, this means that you will need to query the API multiple times to retreive all the delta profiles. You would do this using the “timestamp” field that is returned by the delta query as below:
When the query returns an empty “profiles” array, there are no more changes to be fetched and you can stop iterating and store the last received timestamp.
A Note About Frequency
Due to the use of timestamps to handle deltas, it’s possible to define your own frequency for how often you fetch deltas from us. Traditionally this might have been daily, but using our API as described above means you can run this process more regularly, for example, every 4 hours, every hour or even as frequently as every 10 minutes.