Cannot parse Trail running
AllCompetentPerch1 week ago
Hi, I'm working on historical data from a Garmin export, and I'm receiving the following metadata:
The problem being that "type" 149 is not mentioned in the Terra API docs: https://docs.tryterra.co/reference/health-and-fitness-api/data-models#activitytype
In my garmin it is tracked as a Trail run, but I cannot seem to parse it as a trail run through Terra then? Trail running seems like a popular sport, so I'm a bit confused as to why this is not supported, or am I looking in the wrong spot?
Any help would be greatly appreciated!
Vanessaadmin1 week ago
Hi,
Garmin activity type 149 is Trail Running in Terra's unified API, so your parsing instinct is right, it's just missing from the public Data Models reference page - we are updating this shortly in our docs!
Type 149 (Trail Running) and type 150 (Gravel Cycling) are recent additions that haven't made it into the docs table yet, but both are live and safe to map against.
You can map metadata.type == 149 to "Trail Run" in your downstream logic. Garmin's TRAIL_RUNNING activity maps to type 149 in Terra, distinct from the parent Running type (8), Treadmill Running (58), and Indoor Running (133). Other Garmin run variants without a dedicated code (street, track, obstacle, ultra, virtual) roll up to type 8.
One side note: the name field on metadata is the user-entered Garmin activity title (e.g. "Oud-Heverlee Trail Running"), so it's free-form and not reliable for classification. Use type as the canonical field.
Happy building!