Receive data updates
Learn how to receive data update events to your app as soon as the user's data syncs to the cloud
Last updated
Was this helpful?
Learn how to receive data update events to your app as soon as the user's data syncs to the cloud
Last updated
Was this helpful?
In order to receive events, you'll need to
If you missed any of the steps above, please refer to the respective guides.
Once you have the above set up, you'll be ready to receive events.
Authentication events occur when a user connects/disconnects their health & fitness data account
Data events occur when new data is available on the user's account
Whenever a has new data available on the respective platform they use, you will receive a data update under one of the following categories
Whenever receiving an event for a which constitutes a duplicate, based on the data type's unique identifier (detailed in each section below), the received data will always be a superset of any previous data received.
This means you should always overwrite data stored on your end with the most up-to-date version.
Use the unique identifier for each payload (detailed below) to overwrite data appropriately upon receiving an update
Data updates will take the following form:
For testing out the different event types mentioned above, you may also use the payload simulator in the Terra Dashboard. See the tutorial below for a step by step guide.
If your destination returns an error code (e.g. your server responds to a webhook event with a 5XX http status code), not to worry! Terra retries to send that event, with exponential backoff, over a period of a little over 24 hours. This ensures that if your server experiences downtime of up to a day, you will still receive any missed data, hence maintaining data integrity.
Terra sends data automatically as soon as it is available on a data source's cloud. That means that if the wearable hasn't synced to the respective app on the end user's phone, or if the app has not synced to the cloud, Terra will be unable to retrieve that data. Wait a bit longer, or try to force a sync (using a "pull down to sync" feature or equivalent available in most apps)
In order to verify if the data has synced to the respective cloud, you may instruct the user to go on their web dashboard for their device using a browser to verify the data is present.
Unique identifier (per ): metadata.summary_id
See for the full Schema & descriptions of each field
Unique identifier (per ): metadata.start_time
See for the full Schema & descriptions of each field
Unique identifier (per ): metadata.start_time
See for the full Schema & descriptions of each field
Unique identifier (per ): metadata.summary_id
See for the full Schema, example, & descriptions of each field
Unique identifier (per ): metadata.start_time
See for the full Schema, example, & descriptions of each field
Any other event types & their explanations will be found in the reference
Unique identifier (per ): metadata.summary_id