Retrieve events created & updated in the last 'x' hours

Avatar Jamal Westfield, 

A common use case which the Integrate Events API can be used for is to retrieve customer records which have been created or updated within that last 'x' (number) hours. Any customer querying the API would then be able to setup a cron job to do a request on a regular interval which would then retrieve any recent changes. Upon receiving a subsequent response, these updates can then be applied to another system of record.

 

Due to certain system restrictions two separate date / time attributes will need to be queried. One date attribute filters for records created recently and the other filters for records which have been updated recently. The specific attributes date / time attributes are created and dateUpdated (represented as updated.dateUpdated):

  • dateUpdated (updated.dateUpdated) - Unix timestamp, Eg 1579173732

  • created - Url encoded ISO-8601 timestamp Eg. 2020-01-16T11%3A23%3A10%2B00%3A00

 

An example of the full GET request is as follows: 

https://api.integrate-events.com/v2/events/{event_id}/records?filters[]=and-updated.dateUpdated-gte-1579173732&filters[]=or-created-gte-2020-01-16T11%3A23%3A10%2B00%3A00

  • {event_id} - Specify the corresponding Event ID

  • filters[]=and-updated.dateUpdated-gte - Events updated with a timestamp greater than the last 'x' hours

  • filters[]=or-created-gte - Events created with a timestamp greater than the last 'x' hours

2b7ebb1c-4c75-4271-a574-9c4d85ac317b.png
If you have any questions about using the API, please contact our Support team.

Can't find what you're looking for? Contact us