# Get Training Plans

This endpoint returns a user cardio training plan

Endpoint: GET /api/v1/cardio/training-plans
Version: 1.2.0
Security: user

## Security:

  - `user` (unknown)
    http bearer JWT

## Response 200:

  - `200` (unknown)
    Ok

## Response 200 fields (application/json):

  - `trainer` (array)
    The training plan exercises prescribed by a trainer.

  - `trainer.author` (object)

  - `trainer.author.userId` (string)
    The userId assigned by EGYM, for example -1c2yqo37vn9m. Can be null on xID authentication if BMA User is not linked to EGYM account.
    Example: -1c2yqo37vn9m

  - `trainer.author.bmaUserId` (string)
    Temporary solution for Matrix. The BMA userId assigned by egym, for example d101df00-ab9d-40f5-8f03-3c50aaa364d6. Only available during xID authentication
    Example: d101df01-ab9d-40f5-8f03-3c50aaa364d6

  - `trainer.author.firstName` (string, required)
    The user's first name.

  - `trainer.author.lastName` (string)
    The user's last name.

  - `trainer.author.image` (object)

  - `trainer.author.image.imageType` (string)
    Enum: "EXERCISE", "EQUIPMENT", "AVATAR", "COVER", "GYM_BANNER", "GYM_PROFILE", "GYM_HEADER", "GYM", "CHART", "BLOG", "PARTNER", "MOBILESPLASH", "SIGNATURE", "CARDIOSCAN", "MUSCLES", "SHARED"

  - `trainer.author.image.imageId` (string)

  - `trainer.exerciseName` (string)
    The name that the partner will give to its exercise.

  - `trainer.sessionName` (string)
    The name that the trainer will give to their exercise.

  - `trainer.startTimestamp` (integer)
    The start of the exercise in milliseconds since the epoch time.
    Example: 1672531200000

  - `trainer.endTimestamp` (integer)
    The end of the exercise in milliseconds since the epoch time.

  - `trainer.frequency` (integer)
    The number of times this exercise should be repeated per week.
    Example: 2

  - `trainer.timezone` (string)
    The timezone where the workout is taking place.

  - `trainer.trainingPlanId` (integer)
    Training Plan ID. When the user selects an exercise from the training plan, this field should contain the training plan id from that exercise when submitting the workout.
    Example: 7189234126347912000

  - `trainer.trainingPlanExerciseId` (integer)
    Training Plan Exercise ID. When the user selects an exercise from the training plan, this field should contain the training plan exercise id from that exercise when submitting the workout.
    Example: -767612783462

  - `trainer.orderNumber` (integer)
    Order number of the exercise in the session of the training plan. This can be used for sorting.
    Example: 1

  - `trainer.intervals` (array)
    The trainer cardio workout intervals.

  - `trainer.intervals.rampAngle` (integer)
    The angle of the ramp.
    Example: 1

  - `trainer.intervals.resistance` (number)
    The resistance.
    Example: 1

  - `trainer.intervals.speed` (number)
    The speed in m/s.
    Example: 2.7777

  - `trainer.intervals.duration` (integer)
    The duration in milliseconds.
    Example: 5000

  - `trainer.intervals.distance` (number)
    The distance in meters.
    Example: 13.8

  - `trainer.intervals.heartRate` (integer)
    The average heart rate of this Interval in beats/min (bpm).
    Example: 130

  - `trainer.intervals.kiloCalories` (number)
    The kilo calories (kcal) burned during the interval.
    Example: 5

  - `trainer.intervals.stepsPerMinute` (integer)
    The steps per minutes.
    Example: 70

  - `trainer.intervals.steps` (integer)
    The number of steps during the interval.
    Example: 10

  - `trainer.intervals.stepHeight` (integer)
    The step height.
    Example: 2

  - `trainer.intervals.strideLengthZone` (integer)
    The stride length zone.
    Example: 1

  - `trainer.intervals.rotations` (integer)
    The rotations, in rotations per minute (rpm).
    Example: 50

  - `trainer.intervals.incline` (number)
    The incline.
    Example: 1.5

  - `trainer.intervals.floors` (integer)
    The floors.
    Example: 1

  - `trainer.intervals.watts` (number)
    Power/Resistance in watts.
    Example: 200

  - `smart` (array)
    The SMART training plan exercises.

  - `smart.startTimestamp` (integer)
    The start of the exercise in milliseconds since the epoch time.
    Example: 1672531200000

  - `smart.endTimestamp` (integer)
    The end of the exercise in milliseconds since the epoch time.

  - `smart.frequency` (integer)
    The number of times this exercise should be repeated per week.
    Example: 2

  - `smart.timezone` (string)
    The timezone where the workout is taking place.

  - `smart.trainingPlanId` (integer)
    Training Plan ID. When the user selects an exercise from the training plan, this field should contain the training plan id from that exercise when submitting the workout.
    Example: 7189234126347912000

  - `smart.trainingPlanExerciseId` (integer)
    Training Plan Exercise ID. When the user selects an exercise from the training plan, this field should contain the training plan exercise id from that exercise when submitting the workout.
    Example: -767612783462

  - `smart.orderNumber` (integer)
    Order number of the exercise in the session of the training plan. This can be used for sorting.
    Example: 1

  - `smart.smartExerciseName` (string)
    Exercise name.
    Enum: "BOOST_METABOLISM", "GET_LEAN", "CARDIO_VARIETY", "BASELINE_ENDURANCE", "FASTER_REGENERATION", "GET_FASTER", "HIGH_END_ENDURANCE", "INCREASE_BLOOD_FLOW", "COME_BACK", "WARM_UP", "COOL_DOWN", "COMBINED_CARDIO", "ONLY_CARDIO", "MIGROS_POTENTIAL_1", "MIGROS_POTENTIAL_2", "MIGROS_EXHAUSTION_1", "MIGROS_EXHAUSTION_2", "MIGROS_RESISTANCE_TO_TIRED_1", "MIGROS_RESISTANCE_TO_TIRED_2"

  - `smart.intensity` (string)
    Exercise intensity.
    Enum: "VERY_HIGH", "HIGH", "MODERATE", "LIGHT", "VERY_LIGHT"

  - `smart.smartTrainingMethod` (string)
    Smart Workout Training Method.
    Enum: "CONTINUOUS", "INTERVAL", "HILL", "VARIETY", "PYRAMID"

  - `smart.trainingGoal` (string)
    The user training goal.
    Enum: "WEIGHT_LOSS", "FITNESS", "MUSCLE_GAIN", "BBP", "BBP_AND_WEIGHT_LOSS", "SPINAL", "REHASPORT"

  - `smart.trainingProgram` (string)
    The user training program.
    Enum: "WEIGHT_LOSS", "FITNESS", "MUSCLE_GAIN", "BBP", "BBP_AND_WEIGHT_LOSS", "REHASPORT", "IMMUNITY"

  - `smart.intervals` (array)
    The smart cardio workout intervals.

  - `genius` (array)
    The AI (Genius) generated training plan exercises.

  - `genius.exerciseName` (string)
    The name that the partner will give to its exercise.

  - `genius.sessionName` (string)
    The name that identifies the session for the user.

  - `genius.startTimestamp` (integer)
    The start of the exercise in milliseconds since the epoch time.
    Example: 1672531200000

  - `genius.endTimestamp` (integer)
    The end of the exercise in milliseconds since the epoch time.

  - `genius.frequency` (integer)
    The number of times this exercise should be repeated per week.
    Example: 2

  - `genius.timezone` (string)
    The timezone where the workout is taking place.

  - `genius.trainingPlanId` (integer)
    Training Plan ID. When the user selects an exercise from the training plan, this field should contain the training plan id from that exercise when submitting the workout.
    Example: 7189234126347912000

  - `genius.trainingPlanExerciseId` (integer)
    Training Plan Exercise ID. When the user selects an exercise from the training plan, this field should contain the training plan exercise id from that exercise when submitting the workout.
    Example: -767612783462

  - `genius.orderNumber` (integer)
    Order number of the exercise in the session of the training plan. This can be used for sorting.
    Example: 1

  - `genius.intervals` (array)
    The cardio workout intervals.

## Response 400:

  - `400` (unknown)
    Bad Request

## Response 400 fields (application/json):

  - `timestamp` (integer)
    Unix epoch milliseconds when the error occurred.
    Example: 1775122463109

  - `path` (string)
    The request path that triggered the error.
    Example: /api/v1/measurements/body/history

  - `status` (integer)
    HTTP status code.
    Example: 400

  - `error` (string)
    Short textual description of the HTTP status.
    Example: Bad Request

  - `requestId` (string)
    Unique identifier for the request, useful for correlating logs and support tickets.
    Example: d0c0fd9e-236

  - `message` (string)
    Human-readable description of the error.
    Example: Invalid request parameters: value must be greater than or equal to 1 and less than or equal to 1000

  - `fieldErrors` (array)
    List of field-level validation errors. Only present when the error was caused by request-body binding failures or custom form validation.

  - `fieldErrors.name` (string)
    The field name.

  - `fieldErrors.message` (string)
    The error message.
    Example: Must not be null.

  - `fieldErrors.rejectedValue` (any)
    The rejected value.
    Example: Must not be null.

  - `errorCode` (string)
    Machine-readable error code for domain-specific errors. Only present for exceptions that carry a custom error code.
    Example: USER_NOT_FOUND

## Response 401:

  - `401` (unknown)
    Unauthorized

## Response 404:

  - `404` (unknown)
    Not Found

## Response 404 fields (application/json):

  - `timestamp` (integer)
    Unix epoch milliseconds when the error occurred.
    Example: 1775122463109

  - `path` (string)
    The request path that triggered the error.
    Example: /api/v1/measurements/body/history

  - `status` (integer)
    HTTP status code.
    Example: 400

  - `error` (string)
    Short textual description of the HTTP status.
    Example: Bad Request

  - `requestId` (string)
    Unique identifier for the request, useful for correlating logs and support tickets.
    Example: d0c0fd9e-236

  - `message` (string)
    Human-readable description of the error.
    Example: Invalid request parameters: value must be greater than or equal to 1 and less than or equal to 1000

  - `fieldErrors` (array)
    List of field-level validation errors. Only present when the error was caused by request-body binding failures or custom form validation.

  - `fieldErrors.name` (string)
    The field name.

  - `fieldErrors.message` (string)
    The error message.
    Example: Must not be null.

  - `fieldErrors.rejectedValue` (any)
    The rejected value.
    Example: Must not be null.

  - `errorCode` (string)
    Machine-readable error code for domain-specific errors. Only present for exceptions that carry a custom error code.
    Example: USER_NOT_FOUND

## Response 500:

  - `500` (unknown)
    Internal Server Error

## Response 500 fields (application/json):

  - `timestamp` (integer)
    Unix epoch milliseconds when the error occurred.
    Example: 1775122463109

  - `path` (string)
    The request path that triggered the error.
    Example: /api/v1/measurements/body/history

  - `status` (integer)
    HTTP status code.
    Example: 400

  - `error` (string)
    Short textual description of the HTTP status.
    Example: Bad Request

  - `requestId` (string)
    Unique identifier for the request, useful for correlating logs and support tickets.
    Example: d0c0fd9e-236

  - `message` (string)
    Human-readable description of the error.
    Example: Invalid request parameters: value must be greater than or equal to 1 and less than or equal to 1000

  - `fieldErrors` (array)
    List of field-level validation errors. Only present when the error was caused by request-body binding failures or custom form validation.

  - `fieldErrors.name` (string)
    The field name.

  - `fieldErrors.message` (string)
    The error message.
    Example: Must not be null.

  - `fieldErrors.rejectedValue` (any)
    The rejected value.
    Example: Must not be null.

  - `errorCode` (string)
    Machine-readable error code for domain-specific errors. Only present for exceptions that carry a custom error code.
    Example: USER_NOT_FOUND

