All the information available for sharing through webhooks are also available through our API. By using the APIs to periodically poll for updates and matching the API response against the records stored on your side to determine any potential changes.
Insights, and the Insights API, are designed to be used to create user messages. This is by far the easiest way to retrieve information for what needs to be communicated to a user. The insights contain all the latest information on the user’s actions, for example a Cancel Insight will include all the required cancellation information. This insight will immediately highlight what’s changed from the previous state and indicate what should be communicated to the user.
Our other APIs, for example the Cancel API, can be used in order to identify updates and, based on the updates, create user messages. The Insights API can do this automatically for you, but there could be use cases where you want to do this yourself. If you want to do this yourself, here’s a step by step example for Cancel:
- Once a cancellation is submitted, you will receive a copy of the cancellation in the API response.
- Store this cancellation in your own database.
- Periodically re-fetch the cancellation from us.
- Analyse the re-fetched cancellation against the version stored in your database and determine if anything has changed.
- Based on the potential changes, identify what to inform the user about.
- Create and send the user a message based on the new information.
Updated 11 months ago