> For the complete documentation index, see [llms.txt](https://docs.tryterra.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tryterra.co/help-center/help-topics/data-api-sdk/extra-features-scores-graphs-teams-nutrition-cgm/trainingpeaks-read-planned-workouts.md).

# 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](https://docs.tryterra.co/planned-workouts-api/overview).
