How to fix two Zwift events with overlapping times

TotalWhitefish7 months ago

I have received two payloads for a Zwift user within an hour of eachother, however both payloads start at the same timestamp 2024-03-05T09:30:32 but different end times. Why is this the case? I can provide the full payload separately if it helps

terra

Alexadmin7 months ago

Hey there. After looking into this, it seems that the first payload was sent when Zwift autosaved the cycling session and the second event was sent after the session had finished. Regardless, both events can be unified by looking at the metadata.summary_id property which you can use to overwrite the old payload in your database.

Whilst most activity events are only sent once after completion, occasionally a provider may send a half-complete event pre-maturely determining the end of the exercise or sometimes a correction payload might be sent updating certains values or after recalculating scores. In either case, the best practice is to use the summary_id property to unify the data.


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.