Terra

Integration

API
Unified API
SDK
SDK
Authentication
Authentication
Streaming
Streaming
Blood
Blood Report API
Planned Workout
Planned Workout
AI Interface
AI Interface

User engagement

Graph API
Graph API
Scores
Health Scores
Rewards
Health Rewards

Use cases

Enterprise
Enterprise
Insurance
Insurance

Developers

Wearable Data
Wearable Data
Community
Community
Documentation
Documentation

Learn

Blog
Blog
Podcast
Podcast
Events
Events
Reports
Reports

Company

Customers
Customers
Careers
Careers
Partners
Partners
Support
Support
Become an integration
Become an integration


Cookie Preferences

Essential CookiesAlways On
Advertisement Cookies
Analytics Cookies

Crunch Time: Embrace the Cookie Monster Within!

We use cookies to enhance your browsing experience and analyse our traffic. By clicking “Accept All”, you consent to our use of cookies according to our Cookie Policy. You can change your mind any time by visiting out cookie policy.

zap

Latest

zap

Popular

API

Unified API

SDK

Phone SDK

Authentication

Widget

Streaming

Streaming

Graph API

Graph API

How to determine if an activity webhook payload is the final version?

All

UrbanBug3 months ago

Hi, I'm building a fitness app that receives activity data via webhooks.

I have two questions regarding activity data updates:

  1. Is there a way to know if an activity payload is the final version?

When I receive an activity webhook with a specific summary_id, is there any flag or indicator that tells me "this is the complete/final version and no further updates will follow"?

I need to trigger a downstream action (creating a user-facing post) only when the activity data is finalized, so knowing when the data is "complete" is important for my use case.

  1. How long can updated versions of the same activity keep arriving?

I understand that the same summary_id can be sent multiple times and should be overwritten each time. But what is the realistic time window for these updates? Could an update arrive 40 minutes or even hours after the initial webhook? Is there a maximum delay we should account for?

Any insights from the team or community would be greatly appreciated. Thanks!

terra

Vanessaadmin2 weeks ago

There's no explicit "final" flag, but here's how to handle it:

1. Each activity is identified by summary_id in the metadata. When you receive the same summary_id again, the new payload is always a superset of the previous one -- so always overwrite.

2. The upload_type field in metadata tells you what kind of update it is:
   - 1 = Automatic (initial upload)
   - 2 = Manual
   - 3 = Update (explicitly an update to a previous payload)
   - 4 = Delete
   - 5 = Pending

Hope this helps!