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

UrbanBug2 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 hours 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!


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.