For the complete documentation index, see llms.txt. This page is also available as Markdown.

How do I read planned workouts from TrainingPeaks?

List a TrainingPeaks user's planned workouts with GET /plannedWorkouts and a date window, after enabling Planned Workouts for your environment.

Call GET /plannedWorkouts?user_id=... with a start_date and end_date. The list includes workouts planned in TrainingPeaks, such as ones a coach created, alongside any you scheduled through Terra.

  • Pass a date window. Both dates are planned dates and both are inclusive. Without them, workouts created in TrainingPeaks are only listed for the last 30 days, so upcoming ones won't appear.

  • Workouts created in TrainingPeaks are read only. They have is_external: true and no planned_workout_id or workout_id, so they can't be fetched, updated or deleted by ID. Use provider_workout_id to identify them.

  • Check the X-Terra-Provider-Fetch header. Anything other than ok means the TrainingPeaks read didn't complete, and the list only holds workouts you scheduled through Terra.

Enable Planned Workouts first

Planned Workouts is a separate permission from the read data types, and it is set per environment. On the Connections page, open the scopes settings button in the Sources section, tick Planned Workouts under Read and Write Permissions, and save. Repeat for each environment you use.

TrainingPeaks asks the user for its planned workout permissions when they connect, based on the data types enabled at that moment. Users who connected before you enabled Planned Workouts need to reconnect once to grant them.

See the Planned Workouts API overview.

Last updated

Was this helpful?