Skip to content

Open Exercise Workouts

Create

Request

This endpoint creates an open exercise workout

Security
user
Bodyapplication/jsonrequired
uniqueExerciseIdstring, non-emptyrequired

Unique identifier for this exercise. The machine should generate a unique id for each exercise submitted.

startTimestampinteger, (int64)required

The start of the exercise in milliseconds since the epoch time. It can not be older than seven days.

Example:1672531200000
exerciseNamestring, non-emptyrequired

The name that the partner will give to its exercise.

kiloCaloriesnumber, (double)

The kilo calories (kcal) burned during the exercise.

Example:100
averageHeartRateinteger, (int32)

The average heart rate of this workout in beats/min (bpm).

Example:150
trainingPlanIdinteger, (int64)

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
trainingPlanExerciseIdinteger, (int64)

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
orderNumberinteger, (int32)

Order number of the exercise in the session of the training plan. This can be used for sorting.

Example:1
intervalsArray of objects, non-empty(OpenExerciseWorkoutIntervalDTO)required

The open-exercises workout intervals (sets of exercises).

curl -i -X POST \
  https://developer.egym.com/_mock/equipment/partner-api/api/v1/open-exercises/workouts \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "uniqueExerciseId": "string",
    "startTimestamp": 1672531200000,
    "exerciseName": "string",
    "kiloCalories": 100,
    "averageHeartRate": 150,
    "trainingPlanId": 7189234126347912000,
    "trainingPlanExerciseId": -767612783462,
    "orderNumber": 1,
    "intervals": [
      {
        "duration": 60000
      }
    ]
  }'

Responses

No Content

Response
No content