Skip to content

WorkoutTemplate Schema

A WorkoutTemplate represents a planned workout with target reps, weights, and intensity prescriptions.

Interactive Explorer

Loading schema...

Top-Level Properties

FieldTypeRequiredDescription
namestringYesTemplate name (1-200 chars)
exercisesExerciseTemplate[]YesThe exercises to perform (min 1)
notesstringNoNotes about this template
dayinteger (1-7)NoDay of week (1=Monday, 7=Sunday)

ExerciseTemplate

A single exercise prescription within a template.

FieldTypeRequiredDescription
exerciseExerciseYesWhich exercise to perform
setsSetTemplate[]YesThe sets to perform (min 1)
orderintegerNoPosition in workout (1-indexed)
notesstringNoNotes specific to this exercise
supersetIdintegerNoGroups exercises into supersets
restSecondsintegerNoRecommended rest between sets

Exercise

Same structure as in WorkoutLog:

FieldTypeRequiredDescription
namestringYesHuman-readable exercise name
equipmentstringNoEquipment used
categorystringNoBody part or category
musclesWorkedstring[]NoSpecific muscles targeted

SetTemplate

Prescribes what to do in a set.

FieldTypeRequiredDescription
targetRepsintegerNoExact target rep count
targetRepsMinintegerNoMinimum reps in range
targetRepsMaxintegerNoMaximum reps in range
targetWeightnumberNoAbsolute weight target
unit"kg" | "lb"ConditionalRequired if targetWeight is present
percentagenumber (0-100)NoPercentage of reference
percentageOfstringConditionalReference for percentage (e.g., "1RM")
targetRPEnumber (0-10)NoTarget RPE
targetRIRintegerNoTarget Reps In Reserve
typestringNoSet type (default: "working")
restintegerNoRest after this set (seconds)
tempostringNoTempo notation
notesstringNoNotes for this set

Conditional Validation

The schema enforces:

  1. If targetWeight is present, unit must also be present
  2. If percentage is present, percentageOf must also be present

Rep Ranges

Use targetRepsMin and targetRepsMax for rep ranges:

json
{
  "targetRepsMin": 8,
  "targetRepsMax": 12
}

Or use targetReps for an exact count:

json
{
  "targetReps": 5
}

Percentage-Based Loading

For percentage-based programs (like 5/3/1):

json
{
  "percentage": 85,
  "percentageOf": "1RM",
  "targetReps": 5
}

Common percentageOf values: 1RM, TM (Training Max), E1RM (Estimated 1RM)

Example

json
{
  "name": "Squat Day",
  "day": 1,
  "exercises": [
    {
      "exercise": {
        "name": "Barbell Back Squat",
        "equipment": "barbell",
        "category": "legs"
      },
      "restSeconds": 180,
      "sets": [
        { "percentage": 65, "percentageOf": "TM", "targetReps": 5, "type": "warmup" },
        { "percentage": 75, "percentageOf": "TM", "targetReps": 5 },
        { "percentage": 85, "percentageOf": "TM", "targetReps": 5 },
        { "percentage": 85, "percentageOf": "TM", "targetReps": 5, "type": "amrap" }
      ]
    },
    {
      "exercise": {
        "name": "Barbell Back Squat",
        "equipment": "barbell"
      },
      "notes": "BBB sets",
      "sets": [
        { "percentage": 50, "percentageOf": "TM", "targetReps": 10 },
        { "percentage": 50, "percentageOf": "TM", "targetReps": 10 },
        { "percentage": 50, "percentageOf": "TM", "targetReps": 10 },
        { "percentage": 50, "percentageOf": "TM", "targetReps": 10 },
        { "percentage": 50, "percentageOf": "TM", "targetReps": 10 }
      ]
    }
  ]
}

Full Schema

Click to expand full JSON Schema
json
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://openweight.org/schemas/workout-template.schema.json",
  "title": "WorkoutTemplate",
  "description": "A planned workout with prescribed exercises and sets",
  "type": "object",
  "required": ["name", "exercises"],
  "additionalProperties": true
}

See the full schema on GitHub.

Released under the Apache 2.0 License.