> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fitsociety.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get client training section data

> Returns all sections needed to render the client training home page in a single request. Sections are fetched in parallel. Most sections are independently guarded by `client.trainingSectionsAccess` — a disabled section returns its empty/null default without failing the entire response. When both muscle activation and performance summary are disabled, their shared history scope is not queried. Muscle activation reads only exercise identity and repetition inputs, preserving the existing date fallback rules. Two sections have their OWN gating, independent of `trainingSectionsAccess`: `workoutOfTheDay` (WOD feature system) and `weeklyRanking` (leaderboard config) — each self-reports `enabled`/`hidden` and either can be off while the other is on. When the entire page is disabled (`pageEnabled: false`) all sections are empty/null and the request returns immediately without hitting any data sources. `programmeCalendarData` is the full day view for the selected date (day header, month dot grid, and that date's programme cards) — the SAME object `GET /app/v1/workout/client/programme-day` returns — selected with `?date=`; it is gated by the `trainingPlanAssignedSection` flag, being that list's calendar view. A section that FAILS also degrades to its empty/null default rather than failing the request, so an empty section is indistinguishable from a broken one in the payload — the server logs which section failed.

Requires the workout_client_plans:read scope. This operation maps to /app/v1/workout/client/training-section and retains its Workout V2 permission, feature-flag, and resource-scope checks.

The clientId path parameter identifies the client represented by the request context.



## OpenAPI

````yaml /openapi/public-v1.json get /public/v1/workout/clients/{clientId}/training-section
openapi: 3.1.0
info:
  title: FITsociety Public API v1
  version: 1.0.0
  description: >-
    Developer Public API endpoints under `/public/v1`. This reference is
    filtered to OAuth/Bearer Public API resources and excludes provider callback
    receivers, storefront routes, public widgets, wishlist routes, and
    access-device validation endpoints.
  contact:
    name: FITsociety Engineering
servers:
  - url: https://api.fitsociety.io
    description: Production
security: []
tags:
  - name: Workout
    description: >-
      Workout V2 libraries, programmes, client plans, calendars, sessions,
      groups, settings and progress. AI operations are excluded.
  - name: OAuth
    description: Public API OAuth endpoints for server-to-server client credentials.
  - name: Health
    description: Public API token health checks.
  - name: Platform
    description: >-
      Inspect Public API client context, capabilities, scopes, and redacted
      audit logs.
  - name: Company Catalog
    description: Read and manage company profile metadata and locations.
  - name: Clients
    description: >-
      Create and manage clients through the Public API using Bearer access
      tokens.
  - name: Coaches
    description: Retrieve coaches for the authenticated company via integrations.
  - name: Calendar Events
    description: Read Public API calendar events.
  - name: Calendar Templates
    description: >-
      Read and manage event types and event templates used by calendar
      availability and bookings.
  - name: Calendar Extensions
    description: >-
      Read recurring bookings, booking requests, calendar tasks, and
      availability closure metadata.
  - name: Availability
    description: Read bookable availability slots and signed availability tokens.
  - name: Availability Management
    description: >-
      Manage coach and location availability templates used to derive bookable
      slots.
  - name: Bookings
    description: Read and manage Public API bookings.
  - name: Finance
    description: >-
      Read invoices, transactions, products, subscriptions, and memberships with
      guarded finance writes.
  - name: Credits
    description: >-
      Read company-wide and client-scoped credit allocations, mutations, and
      guarded credit adjustments.
  - name: Exports
    description: >-
      Create and monitor asynchronous company exports through Public API Bearer
      endpoints.
  - name: Webhooks
    description: >-
      Manage outbound webhook subscriptions and inspect delivery attempts
      through Public API Bearer endpoints.
  - name: Measurements
    description: Read and write client measurement entries.
  - name: Progress Photos
    description: Read client progress photo metadata and short-lived signed media URLs.
  - name: Forms
    description: Read, create, update, and archive company form templates.
  - name: Intakes
    description: Assign intake forms and read client intake assignments and submissions.
  - name: Check-ups
    description: >-
      Schedule and cancel client check-ups and read their status and
      submissions.
  - name: Documents
    description: >-
      Read client document and folder metadata, register external document
      links, update metadata, and archive documents from Public API listings.
      Binary upload, permanent deletion, and company-wide document management
      are not exposed.
  - name: Habits
    description: Read habits and habit entries.
  - name: Goals
    description: Read client goal summaries.
  - name: Conversations
    description: >-
      Read and manage direct and group chat conversations through the Public
      API.
  - name: Reports
    description: Read aggregate attendance, revenue, and retention summaries.
paths:
  /public/v1/workout/clients/{clientId}/training-section:
    get:
      tags:
        - Workout
      summary: Get client training section data
      description: >-
        Returns all sections needed to render the client training home page in a
        single request. Sections are fetched in parallel. Most sections are
        independently guarded by `client.trainingSectionsAccess` — a disabled
        section returns its empty/null default without failing the entire
        response. When both muscle activation and performance summary are
        disabled, their shared history scope is not queried. Muscle activation
        reads only exercise identity and repetition inputs, preserving the
        existing date fallback rules. Two sections have their OWN gating,
        independent of `trainingSectionsAccess`: `workoutOfTheDay` (WOD feature
        system) and `weeklyRanking` (leaderboard config) — each self-reports
        `enabled`/`hidden` and either can be off while the other is on. When the
        entire page is disabled (`pageEnabled: false`) all sections are
        empty/null and the request returns immediately without hitting any data
        sources. `programmeCalendarData` is the full day view for the selected
        date (day header, month dot grid, and that date's programme cards) — the
        SAME object `GET /app/v1/workout/client/programme-day` returns —
        selected with `?date=`; it is gated by the `trainingPlanAssignedSection`
        flag, being that list's calendar view. A section that FAILS also
        degrades to its empty/null default rather than failing the request, so
        an empty section is indistinguishable from a broken one in the payload —
        the server logs which section failed.


        Requires the workout_client_plans:read scope. This operation maps to
        /app/v1/workout/client/training-section and retains its Workout V2
        permission, feature-flag, and resource-scope checks.


        The clientId path parameter identifies the client represented by the
        request context.
      operationId: publicWorkoutgetPublicV1WorkoutClientsClientIdTrainingSection
      parameters:
        - in: query
          name: clientId
          required: false
          schema:
            type: string
            example: 67f1234567890abcdef1234
          description: >-
            Only required when the caller is a coach/admin. Client users are
            resolved from the auth token automatically.
        - in: query
          name: date
          required: false
          schema:
            type: string
            pattern: ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$
            example: '2026-09-22'
          description: >-
            Which day `programmeCalendarData` resolves to, as `YYYY-MM-DD` (same
            contract as `GET /app/v1/workout/client/programme-day`). Omit for
            today in the company's timezone. Anything else → 400
            `INVALID_DATE_FORMAT`.
        - name: clientId
          in: path
          required: true
          schema:
            type: string
            pattern: ^[a-fA-F0-9]{24}$
          description: Client in the company bound to the Public API token.
      responses:
        '200':
          description: >-
            Training page sections. Disabled sections return their empty/null
            defaults; the shape is always the same.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/PublicApiSuccessResponse'
                  - type: object
                    properties:
                      data:
                        $ref: >-
                          #/components/schemas/PublicWorkoutSourceGETAppV1WorkoutClientTrainingSectionResponse200
              examples:
                success:
                  summary: Successful response
                  value:
                    data:
                      accessControl:
                        pageEnabled: true
                        sections:
                          trainingPlanAssignedSection: true
                          muscleActivation: true
                          workoutPlanLibrary: true
                          videoLibrary: true
                          freestyleWorkout: true
                          performanceSummary: true
                          dailyTrainingNotes: true
                      workoutOfTheDay:
                        enabled: true
                        hidden: false
                        state: resume
                        wod:
                          id: 67f1234567890abcdef1234
                          title: Fat Burn Program
                          description: ''
                          planId: 67f1234567890abcdef1234
                          planMomentId: 67f1234567890abcdef1234
                          planName: Fat Burn Program
                          thumbnail: https://cdn.example.com/wod.jpg
                          scheduledDate: '2026-07-13T00:00:00.000Z'
                          scoringType: amrap
                          sourceType: template
                          participantCount: 12
                          completionCount: 5
                          sessionId: 6670aa11bb22cc33dd44ee55
                          sessionStatus: in_progress
                          summary:
                            totalSets: 12
                            completedSets: 4
                            elapsedMinutes: 18
                            expectedDurationMinutes: 110
                            volumeKg: 27
                            reps: 48
                          startedBy:
                            avatars:
                              - clientId: 67f1234567890abcdef1234
                                image: https://cdn.example.com/clients/a1.jpg
                                name: Kaylynn Lubin
                            totalCount: 14
                            othersCount: 12
                          myWorkoutRank:
                            scoreType: totalReps
                            rank: 4
                            value: 124
                            displayScore: 124
                            totalParticipants: 14
                      weeklyRanking:
                        enabled: true
                        hidden: false
                        resetLabel: Reset in 4 days - Sunday Midnight
                        weekStart: '2026-07-12T00:00:00.000Z'
                        weekEnd: '2026-07-19T00:00:00.000Z'
                        data:
                          - rank: 4
                            clientId: 67f1234567890abcdef1234
                            firstName: Kaylynn
                            lastName: Lubin
                            name: Kaylynn Lubin
                            image: https://cdn.example.com/4.jpg
                            xp: 3895
                            trend: up
                            anonymousAvatar: false
                            isCurrentUser: true
                        currentUser:
                          rank: 4
                          clientId: 67f1234567890abcdef1234
                          firstName: Kaylynn
                          lastName: Lubin
                          name: Kaylynn Lubin
                          image: https://cdn.example.com/4.jpg
                          xp: 3895
                          trend: up
                          nextRank: 3
                          nextRankValue: 4500
                          xpToNextRank: 605
                          progressToNextRank: 0.8656
                          participating: true
                          inTop5: true
                          isCurrentUser: true
                        avatars:
                          - clientId: 67f1234567890abcdef1234
                            image: https://cdn.example.com/clients/a1.jpg
                            name: Kaylynn Lubin
                        totalCount: 50
                        othersCount: 47
                      trainingPlanAssignedSection:
                        - _id: 67f1234567890abcdef1234
                          name: 12-Week Strength Program
                          description: Progressive overload strength block.
                          images:
                            - url: https://cdn.example.com/workouts/plan-cover.jpg
                          thumbnail: https://cdn.example.com/workouts/plan-cover.jpg
                          difficulty: Intermediate
                          intensity: High
                          category: Strength
                          status: Active
                          duration:
                            startDate: '2026-04-15'
                            endDate: '2026-06-15'
                            hasEndDate: true
                          schedule:
                            mode: multi_week
                            releasePolicy: weekly_from_start
                            startDate: '2026-09-08'
                            timeZone: Europe/Amsterdam
                            totalWeeks: 4
                            layout: calendar_week
                            weeks:
                              - weekNumber: 1
                                days:
                                  - weekday: 1
                                    isRestDay: false
                                    items:
                                      - _id: 67f1234567890abcdef1234
                                        order: 1
                                        startTime: '08:30'
                                        plannedDurationMinutes: 45
                                        status: today
                                        plannedDate: '2026-09-08'
                                        scheduledDate: '2026-09-08'
                                        source: programme
                                        clientAdjustment:
                                          action: moved
                                          occurrenceDate: '2026-09-08'
                                          scheduledDate: '2026-09-08'
                                          changedAt: null
                                        canClientRestore: true
                                        type: workout
                                        planMomentId: 67f1234567890abcdef1234
                          scheduleMode: multi_week
                          planWeeks:
                            - weekNumber: 1
                              startDate: '2026-09-14'
                              endDate: '2026-09-20'
                              isCurrentWeek: true
                            - weekNumber: 2
                              startDate: '2026-09-21'
                              endDate: '2026-09-27'
                              isCurrentWeek: false
                          progress:
                            total: 4
                            completed: 2
                            progressPercentage: 50
                            isCompleted: false
                          createdAt: '2026-04-12T10:00:00.000Z'
                          updatedAt: '2026-04-12T10:00:00.000Z'
                      programmeCalendarData:
                        date: '2026-09-22'
                        month: 2026-09
                        dayLabel: Tue
                        dayName: Tuesday
                        dayOfMonth: 22
                        isToday: true
                        programmeMonthCalendar:
                          month: 2026-09
                          monthLabel: September 2026
                          monthStart: '2026-09-01'
                          monthEnd: '2026-09-30'
                          gridStart: '2026-08-31'
                          gridEnd: '2026-10-04'
                          planIds:
                            - 67f1234567890abcdef1234
                          dates:
                            - date: '2026-09-22'
                              dayOfMonth: 22
                              weekday: 2
                              isCurrentMonth: true
                              isToday: true
                              isRestDay: false
                              itemCount: 3
                              statuses:
                                - completed
                                - in_process
                                - not_started
                        programmes:
                          - {}
                      freestyleWorkout:
                        state: continue
                        sessionId: 67f1234567890abcdef1234
                        planId: null
                        planMomentId: null
                        status: in_progress
                        startedAt: '2026-06-01T09:00:00.000Z'
                      muscleActivation:
                        range:
                          startDate: '2026-05-18T00:00:00.000Z'
                          endDate: '2026-05-24T23:59:59.999Z'
                          days: 7
                        total:
                          raw:
                            quadriceps: 120
                            chest: 80
                            hamstrings: 60
                          normalized:
                            quadriceps: 1
                            chest: 0.67
                            hamstrings: 0.5
                          maxValue: 120
                          topMuscles:
                            - muscle: quadriceps
                              value: 120
                      workoutPlanLibrary:
                        - _id: 67f1234567890abcdef1234
                          name: 4-Day Strength Block
                          description: Progressive upper/lower split.
                          thumbnail: https://cdn.example.com/workouts/plan-cover.jpg
                          difficulty: Intermediate
                          intensity: High
                          category: Strength
                          scheduleMode: recurring
                          categoryName: Strength Programs
                      videoLibrary:
                        - _id: 67f1234567890abcdef1234
                          title: Full-Body HIIT Workout
                          description: 45-minute high intensity session.
                          url: https://cdn.example.com/videos/hiit-thumb.jpg
                          platform: s3
                          type: video
                          duration: 2700
                          language: en
                          level: Intermediate
                          category: Cardio
                          categoryName: HIIT Collection
                          isFavorite: false
                          progress:
                            watchedDuration: 245
                            progressPercentage: 62.5
                            isCompleted: false
                      performanceSummary:
                        sessionsTotal: 81
                        sessionsCompleted: 56
                        averageRating: 7.8
                        maxWeight: 109
                        averageVolumePerSession: 3895.1
                        distinctExercises: 59
                        totalReps: 1128
                        totalTimeSeconds: 331200
                        totalVolume: 218130.5
                        totalActiveWorkout: 3
                      dailyTrainingNotes: Felt strong today, increased squat weight.
                      notesExists: true
                    meta:
                      requestId: 4f849d7d-f4f1-45cc-b4b7-3984a3d17f83
                      rateLimit:
                        limit: 10
                        remaining: 9
                        resetSeconds: 1
        '400':
          description: >-
            Company context is missing (`COMPANY_ID_REQUIRED`), client id is
            absent or malformed (`INVALID_CLIENT_ID`), the resolved client
            document was not found (`CLIENT_NOT_FOUND`), or `date` is not a
            `YYYY-MM-DD` calendar date (`INVALID_DATE_FORMAT`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiError'
              examples:
                invalidRequest:
                  summary: Invalid request
                  value:
                    error:
                      code: 400
                      key: request.invalid
                      message: The request is invalid.
                    meta:
                      requestId: 4f849d7d-f4f1-45cc-b4b7-3984a3d17f83
                      rateLimit:
                        limit: 10
                        remaining: 9
                        resetSeconds: 1
        '401':
          $ref: '#/components/schemas/ErrorResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiError'
              examples:
                missingBearer:
                  summary: Missing Bearer token
                  value:
                    error:
                      code: 401
                      key: auth.missing_bearer
                      message: Authorization Bearer token is required.
                    meta:
                      requestId: 4f849d7d-f4f1-45cc-b4b7-3984a3d17f83
                      rateLimit:
                        limit: 10
                        remaining: 9
                        resetSeconds: 1
                invalidToken:
                  summary: Invalid or expired token
                  value:
                    error:
                      code: 401
                      key: auth.invalid_token
                      message: The access token is invalid or expired.
                    meta:
                      requestId: 4f849d7d-f4f1-45cc-b4b7-3984a3d17f83
                      rateLimit:
                        limit: 10
                        remaining: 9
                        resetSeconds: 1
                invalidClient:
                  summary: Inactive or revoked client
                  value:
                    error:
                      code: 401
                      key: auth.invalid_client
                      message: The Public API client is inactive or revoked.
                    meta:
                      requestId: 4f849d7d-f4f1-45cc-b4b7-3984a3d17f83
                      rateLimit:
                        limit: 10
                        remaining: 9
                        resetSeconds: 1
        '403':
          $ref: '#/components/schemas/ErrorResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiError'
              examples:
                insufficientScopes:
                  summary: Missing required scope
                  value:
                    error:
                      code: 403
                      key: scopes.insufficient
                      message: The access token does not include the required scope.
                      details:
                        requiredScopes:
                          - required:scope
                    meta:
                      requestId: 4f849d7d-f4f1-45cc-b4b7-3984a3d17f83
                      rateLimit:
                        limit: 10
                        remaining: 9
                        resetSeconds: 1
        '404':
          $ref: '#/components/schemas/ErrorResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiError'
              examples:
                notFound:
                  summary: Resource not found
                  value:
                    error:
                      code: 404
                      key: resource.not_found
                      message: The requested Public API resource was not found.
                    meta:
                      requestId: 4f849d7d-f4f1-45cc-b4b7-3984a3d17f83
                      rateLimit:
                        limit: 10
                        remaining: 9
                        resetSeconds: 1
        '409':
          $ref: '#/components/schemas/ErrorResponse'
        '422':
          $ref: '#/components/schemas/ErrorResponse'
        '429':
          $ref: '#/components/schemas/ErrorResponse'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiError'
              examples:
                rateLimitExceeded:
                  summary: Rate limit exceeded
                  value:
                    error:
                      code: 429
                      key: rate_limit.exceeded
                      message: Too many Public API requests. Retry later.
                    meta:
                      requestId: 4f849d7d-f4f1-45cc-b4b7-3984a3d17f83
                      rateLimit:
                        limit: 10
                        remaining: 0
                        resetSeconds: 1
                        retryAfterSeconds: 1
        '500':
          description: Unexpected server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiError'
              examples:
                serverInternalError:
                  summary: Unexpected server error
                  value:
                    error:
                      code: 500
                      key: server.internal_error
                      message: An unexpected Public API server error occurred.
                    meta:
                      requestId: 4f849d7d-f4f1-45cc-b4b7-3984a3d17f83
                      rateLimit:
                        limit: 10
                        remaining: 9
                        resetSeconds: 1
      security:
        - PublicBearerAuth: []
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: >-
            curl -X GET
            "https://api.fitsociety.io/public/v1/workout/clients/{clientId}/training-section"
            \
              -H "Authorization: Bearer <access_token>"
components:
  schemas:
    PublicApiSuccessResponse:
      type: object
      additionalProperties: false
      required:
        - data
        - meta
      properties:
        data:
          type: object
        meta:
          $ref: '#/components/schemas/PublicApiMeta'
    PublicWorkoutSourceGETAppV1WorkoutClientTrainingSectionResponse200:
      type: object
      properties:
        accessControl:
          type: object
          description: >-
            Per-section visibility flags derived from
            `client.trainingSectionsAccess`.
          properties:
            pageEnabled:
              type: boolean
              example: true
              description: >-
                When `false` all section data is empty/null and the sections
                flags are all `false`.
            sections:
              type: object
              properties:
                trainingPlanAssignedSection:
                  type: boolean
                  example: true
                muscleActivation:
                  type: boolean
                  example: true
                workoutPlanLibrary:
                  type: boolean
                  example: true
                videoLibrary:
                  type: boolean
                  example: true
                freestyleWorkout:
                  type: boolean
                  example: true
                performanceSummary:
                  type: boolean
                  example: true
                dailyTrainingNotes:
                  type: boolean
                  example: true
        workoutOfTheDay:
          type: object
          description: >-
            Workout-of-the-Day card. Self-gated by the WOD feature system
            (`CompanyFeatureSettings.wod` + `CompanyWODSettings.enabled` + the
            client's WOD opt-out), NOT by `trainingSectionsAccess`.
          properties:
            enabled:
              type: boolean
              example: true
              description: '`false` when the WOD feature is off for the company.'
            hidden:
              type: boolean
              example: false
              description: >-
                `true` when the client opted out under an `opted_in_only`
                company visibility setting.
            state:
              type: string
              enum:
                - start
                - resume
                - completed
                - none
              example: resume
              description: >-
                Drives the card CTA: `start` → Start Now, `resume` → Resume,
                `completed` → View Results, `none` → No workout posted today.
                Absent when `enabled:false`.
            wod:
              type: object
              nullable: true
              description: '`null` when disabled, hidden, or no WOD is published today.'
              properties:
                id:
                  type: string
                  example: 67f1234567890abcdef1234
                title:
                  type: string
                  example: Fat Burn Program
                description:
                  type: string
                  example: ''
                planId:
                  type: string
                  example: 67f1234567890abcdef1234
                planMomentId:
                  type: string
                  example: 67f1234567890abcdef1234
                planName:
                  type: string
                  example: Fat Burn Program
                thumbnail:
                  type: string
                  example: https://cdn.example.com/wod.jpg
                scheduledDate:
                  type: string
                  format: date-time
                  example: '2026-07-13T00:00:00.000Z'
                scoringType:
                  type: string
                  example: amrap
                  description: >-
                    `standard` | `amrap` | `emom` | `forTime` | `tabata` |
                    `maxLoad`.
                sourceType:
                  type: string
                  enum:
                    - template
                    - custom
                  example: template
                participantCount:
                  type: integer
                  example: 12
                completionCount:
                  type: integer
                  example: 5
                sessionId:
                  type: string
                  nullable: true
                  example: 6670aa11bb22cc33dd44ee55
                sessionStatus:
                  type: string
                  nullable: true
                  example: in_progress
                  description: >-
                    The current client's own WOD session status; `null` until
                    they start.
                summary:
                  type: object
                  description: Card stat chips for the client's session.
                  properties:
                    totalSets:
                      type: integer
                      example: 12
                    completedSets:
                      type: integer
                      example: 4
                    elapsedMinutes:
                      type: integer
                      example: 18
                    expectedDurationMinutes:
                      type: integer
                      example: 110
                    volumeKg:
                      type: number
                      example: 27
                    reps:
                      type: integer
                      example: 48
                startedBy:
                  type: object
                  description: >-
                    Preview of clients who started this WOD (the '+N' avatar
                    bubble).
                  properties:
                    avatars:
                      type: array
                      description: First 2 clients to start (earliest first).
                      items:
                        type: object
                        description: Compact client avatar entry.
                        properties:
                          clientId:
                            type: string
                            example: 67f1234567890abcdef1234
                          image:
                            type: string
                            example: https://cdn.example.com/clients/a1.jpg
                          name:
                            type: string
                            example: Kaylynn Lubin
                    totalCount:
                      type: integer
                      example: 14
                      description: Distinct clients who started this WOD.
                    othersCount:
                      type: integer
                      example: 12
                      description: '`totalCount − avatars.length`.'
                myWorkoutRank:
                  type: object
                  nullable: true
                  description: >-
                    Compact current-client WOD rank; `null` when the workout
                    leaderboard is off or the client has no entry yet.
                  properties:
                    scoreType:
                      type: string
                      example: totalReps
                    rank:
                      type: integer
                      example: 4
                    value:
                      type: number
                      example: 124
                    displayScore:
                      type: number
                      example: 124
                    totalParticipants:
                      type: integer
                      example: 14
        weeklyRanking:
          type: object
          description: >-
            'Your ranking this week' block. Self-gated by the company
            leaderboard config (`enabled` + `weeklyLeaderboardEnabled`),
            independent of the WOD feature, so it still renders on a 'No WOD
            today' screen.
          properties:
            enabled:
              type: boolean
              example: true
              description: >-
                `false` when the leaderboard or the weekly leaderboard is
                disabled for the company.
            hidden:
              type: boolean
              example: false
              description: '`true` when the client hid themselves from leaderboards.'
            resetLabel:
              type: string
              nullable: true
              example: Reset in 4 days - Sunday Midnight
            weekStart:
              type: string
              format: date-time
              example: '2026-07-12T00:00:00.000Z'
              nullable: true
            weekEnd:
              type: string
              format: date-time
              example: '2026-07-19T00:00:00.000Z'
              nullable: true
            data:
              type: array
              description: Top 5 for the current week.
              items:
                type: object
                properties:
                  rank:
                    type: integer
                    example: 4
                  clientId:
                    type: string
                    example: 67f1234567890abcdef1234
                  firstName:
                    type: string
                    example: Kaylynn
                  lastName:
                    type: string
                    example: Lubin
                  name:
                    type: string
                    example: Kaylynn Lubin
                  image:
                    type: string
                    example: https://cdn.example.com/4.jpg
                  xp:
                    type: integer
                    example: 3895
                  trend:
                    type: string
                    enum:
                      - up
                      - down
                      - flat
                    example: up
                  anonymousAvatar:
                    type: boolean
                    example: false
                  isCurrentUser:
                    type: boolean
                    example: true
            currentUser:
              type: object
              nullable: true
              description: >-
                The current client's own row + 'XP to next rank' progress.
                Always present when the client participates. `inTop5` tells the
                UI whether to render it as a separate row (false) or only use it
                for the progress bar (true — already inside `data`). Fetched
                separately from the top 5 ONLY when the client is outside it.
              properties:
                rank:
                  type: integer
                  example: 4
                clientId:
                  type: string
                  example: 67f1234567890abcdef1234
                firstName:
                  type: string
                  example: Kaylynn
                lastName:
                  type: string
                  example: Lubin
                name:
                  type: string
                  example: Kaylynn Lubin
                image:
                  type: string
                  example: https://cdn.example.com/4.jpg
                xp:
                  type: integer
                  example: 3895
                trend:
                  type: string
                  enum:
                    - up
                    - down
                    - flat
                  example: up
                nextRank:
                  type: integer
                  nullable: true
                  example: 3
                  description: '`null` at rank #1.'
                nextRankValue:
                  type: number
                  nullable: true
                  example: 4500
                xpToNextRank:
                  type: number
                  nullable: true
                  example: 605
                  description: >-
                    XP needed to reach the rank above (the '605 XP to rank #3'
                    line). `0` at rank #1.
                progressToNextRank:
                  type: number
                  nullable: true
                  example: 0.8656
                  description: '0–1 progress toward the next rank; `1` at rank #1.'
                participating:
                  type: boolean
                  example: true
                inTop5:
                  type: boolean
                  example: true
                isCurrentUser:
                  type: boolean
                  example: true
            avatars:
              type: array
              description: >-
                First 3 clients for the '+N others' strip (same shape as WOD
                `startedBy.avatars`).
              items:
                type: object
                description: Compact client avatar entry.
                properties:
                  clientId:
                    type: string
                    example: 67f1234567890abcdef1234
                  image:
                    type: string
                    example: https://cdn.example.com/clients/a1.jpg
                  name:
                    type: string
                    example: Kaylynn Lubin
            totalCount:
              type: integer
              example: 50
              description: Total distinct weekly participants.
            othersCount:
              type: integer
              example: 47
              description: '`totalCount − avatars.length`.'
        trainingPlanAssignedSection:
          type: array
          description: >-
            Up to 5 most-recently assigned workout plans for the client, both
            switched on and switched off (`status`: `Active` | `Inactive`). Each
            card carries `planWeeks` for a multi-week plan (`schedule.mode:
            multi_week`) and `[]` for a recurring one.
          items:
            type: object
            description: >-
              Compact assigned workout plan card with current-attempt progress
              for reusable sequence days, permanent completion for
              multi-week/calendar programmes, and normalized week-release
              schedule metadata.
            properties:
              _id:
                type: string
                example: 67f1234567890abcdef1234
              name:
                type: string
                example: 12-Week Strength Program
              description:
                type: string
                example: Progressive overload strength block.
              images:
                type: array
                items:
                  type: object
                  properties:
                    url:
                      type: string
                      example: https://cdn.example.com/workouts/plan-cover.jpg
              thumbnail:
                type: string
                example: https://cdn.example.com/workouts/plan-cover.jpg
                description: 'Convenience field: first image URL (`images[0].url`), or `""`.'
              difficulty:
                type: string
                example: Intermediate
              intensity:
                type: string
                example: High
              category:
                type: string
                example: Strength
              status:
                type: string
                enum:
                  - Active
                  - Inactive
                example: Active
                description: >-
                  Whether the plan is switched on. Switched-off (`Inactive`)
                  plans are LISTED here on purpose — pausing is reversible and
                  nothing is deleted, so the client can see what they paused and
                  switch it back on with `PATCH
                  /app/v1/workout/plans/client/template/{templateId}/status`.
                  Render the difference from this field. `Draft` plans are never
                  returned; use `.../archive` to take a plan out of the list
                  entirely.
              duration:
                type: object
                properties:
                  startDate:
                    type: string
                    example: '2026-04-15'
                  endDate:
                    type: string
                    example: '2026-06-15'
                  hasEndDate:
                    type: boolean
                    example: true
              schedule:
                type: object
                required:
                  - mode
                  - releasePolicy
                  - startDate
                  - timeZone
                  - totalWeeks
                properties:
                  mode:
                    type: string
                    enum:
                      - recurring
                      - multi_week
                    example: multi_week
                  releasePolicy:
                    type: string
                    enum:
                      - all_at_once
                      - weekly_from_start
                    example: weekly_from_start
                  startDate:
                    oneOf:
                      - type: string
                        format: date
                        pattern: ^\d{4}-\d{2}-\d{2}$
                        example: '2026-09-08'
                      - type: string
                        enum:
                          - ''
                        example: ''
                    description: >-
                      Blank for templates and legacy sequence recurring
                      schedules. Assigned recurring calendar_week schedules
                      require the canonical company-local Monday anchor.
                      Assigned multi-week schedules accept any canonical date;
                      for calendar_week, week 1 is the Monday-Sunday week
                      containing it and days before it are not scheduled
                      (`isBeforeStart`).
                  timeZone:
                    type: string
                    example: Europe/Amsterdam
                    description: Company time zone used to evaluate weekly availability.
                  totalWeeks:
                    type: integer
                    minimum: 0
                    example: 4
                  layout:
                    type: string
                    enum:
                      - sequence
                      - calendar_week
                    example: calendar_week
                  weeks:
                    type: array
                    items:
                      type: object
                      required:
                        - weekNumber
                        - days
                      properties:
                        weekNumber:
                          type: integer
                          minimum: 1
                          example: 1
                        days:
                          type: array
                          items:
                            type: object
                            required:
                              - weekday
                              - isRestDay
                              - items
                            properties:
                              weekday:
                                type: integer
                                minimum: 1
                                maximum: 7
                                example: 1
                                description: >-
                                  ISO weekday number: 1 is Monday and 7 is
                                  Sunday.
                              isRestDay:
                                type: boolean
                                example: false
                              items:
                                type: array
                                items:
                                  oneOf:
                                    - type: object
                                      additionalProperties: false
                                      required:
                                        - type
                                        - order
                                        - planMomentId
                                      properties:
                                        _id:
                                          type: string
                                          example: 67f1234567890abcdef1234
                                        order:
                                          type: integer
                                          minimum: 1
                                          example: 1
                                        startTime:
                                          type: string
                                          pattern: ^(?:[01]\d|2[0-3]):[0-5]\d$|^$
                                          example: '08:30'
                                        plannedDurationMinutes:
                                          type:
                                            - number
                                            - 'null'
                                          minimum: 0
                                          example: 45
                                          description: >-
                                            Planned duration in minutes; null when
                                            no target is set.
                                        status:
                                          type:
                                            - string
                                            - 'null'
                                          enum:
                                            - in_progress
                                            - completed
                                            - overdue
                                            - today
                                            - upcoming
                                            - null
                                          readOnly: true
                                          example: today
                                          description: >-
                                            Occurrence presentation status. Template
                                            items use null; cancelled occurrences
                                            fall back to overdue, today, or
                                            upcoming.
                                        plannedDate:
                                          oneOf:
                                            - type: string
                                              format: date
                                              pattern: ^\d{4}-\d{2}-\d{2}$
                                              example: '2026-09-08'
                                            - type: string
                                              enum:
                                                - ''
                                              example: ''
                                          readOnly: true
                                          description: >-
                                            Original authored occurrence date for a
                                            calendar response item.
                                        scheduledDate:
                                          oneOf:
                                            - type: string
                                              format: date
                                              pattern: ^\d{4}-\d{2}-\d{2}$
                                              example: '2026-09-08'
                                            - type: string
                                              enum:
                                                - ''
                                              example: ''
                                          readOnly: true
                                          description: >-
                                            Effective calendar date after a client
                                            move; otherwise plannedDate.
                                        source:
                                          type: string
                                          enum:
                                            - programme
                                          readOnly: true
                                        clientAdjustment:
                                          oneOf:
                                            - type: object
                                              required:
                                                - action
                                                - occurrenceDate
                                                - scheduledDate
                                                - changedAt
                                              properties:
                                                action:
                                                  type: string
                                                  enum:
                                                    - moved
                                                    - skipped
                                                occurrenceDate:
                                                  type: string
                                                  format: date
                                                  pattern: ^\d{4}-\d{2}-\d{2}$
                                                  example: '2026-09-08'
                                                scheduledDate:
                                                  oneOf:
                                                    - type: string
                                                      format: date
                                                      pattern: ^\d{4}-\d{2}-\d{2}$
                                                      example: '2026-09-08'
                                                    - type: string
                                                      enum:
                                                        - ''
                                                      example: ''
                                                changedAt:
                                                  type:
                                                    - string
                                                    - 'null'
                                                  format: date-time
                                                  example: null
                                            - type: 'null'
                                          readOnly: true
                                        canClientRestore:
                                          type: boolean
                                          readOnly: true
                                        type:
                                          type: string
                                          enum:
                                            - workout
                                          example: workout
                                        planMomentId:
                                          type: string
                                          example: 67f1234567890abcdef1234
                                    - type: object
                                      additionalProperties: false
                                      required:
                                        - type
                                        - order
                                        - activityType
                                        - name
                                      properties:
                                        _id:
                                          type: string
                                          example: 67f1234567890abcdef1234
                                        order:
                                          type: integer
                                          minimum: 1
                                          example: 1
                                        startTime:
                                          type: string
                                          pattern: ^(?:[01]\d|2[0-3]):[0-5]\d$|^$
                                          example: '08:30'
                                        plannedDurationMinutes:
                                          type:
                                            - number
                                            - 'null'
                                          minimum: 0
                                          example: 45
                                          description: >-
                                            Planned duration in minutes; null when
                                            no target is set.
                                        status:
                                          type:
                                            - string
                                            - 'null'
                                          enum:
                                            - in_progress
                                            - completed
                                            - overdue
                                            - today
                                            - upcoming
                                            - null
                                          readOnly: true
                                          example: today
                                          description: >-
                                            Occurrence presentation status. Template
                                            items use null; cancelled occurrences
                                            fall back to overdue, today, or
                                            upcoming.
                                        plannedDate:
                                          oneOf:
                                            - type: string
                                              format: date
                                              pattern: ^\d{4}-\d{2}-\d{2}$
                                              example: '2026-09-08'
                                            - type: string
                                              enum:
                                                - ''
                                              example: ''
                                          readOnly: true
                                          description: >-
                                            Original authored occurrence date for a
                                            calendar response item.
                                        scheduledDate:
                                          oneOf:
                                            - type: string
                                              format: date
                                              pattern: ^\d{4}-\d{2}-\d{2}$
                                              example: '2026-09-08'
                                            - type: string
                                              enum:
                                                - ''
                                              example: ''
                                          readOnly: true
                                          description: >-
                                            Effective calendar date after a client
                                            move; otherwise plannedDate.
                                        source:
                                          type: string
                                          enum:
                                            - programme
                                          readOnly: true
                                        clientAdjustment:
                                          oneOf:
                                            - type: object
                                              required:
                                                - action
                                                - occurrenceDate
                                                - scheduledDate
                                                - changedAt
                                              properties:
                                                action:
                                                  type: string
                                                  enum:
                                                    - moved
                                                    - skipped
                                                occurrenceDate:
                                                  type: string
                                                  format: date
                                                  pattern: ^\d{4}-\d{2}-\d{2}$
                                                  example: '2026-09-08'
                                                scheduledDate:
                                                  oneOf:
                                                    - type: string
                                                      format: date
                                                      pattern: ^\d{4}-\d{2}-\d{2}$
                                                      example: '2026-09-08'
                                                    - type: string
                                                      enum:
                                                        - ''
                                                      example: ''
                                                changedAt:
                                                  type:
                                                    - string
                                                    - 'null'
                                                  format: date-time
                                                  example: null
                                            - type: 'null'
                                          readOnly: true
                                        canClientRestore:
                                          type: boolean
                                          readOnly: true
                                        type:
                                          type: string
                                          enum:
                                            - activity
                                          example: activity
                                        activityType:
                                          type: string
                                          enum:
                                            - running
                                            - cycling
                                            - walking
                                            - swimming
                                            - rowing
                                            - padel
                                            - mobility
                                            - other
                                          example: running
                                        name:
                                          type: array
                                          minItems: 1
                                          items:
                                            type: object
                                            required:
                                              - lang
                                              - value
                                            properties:
                                              lang:
                                                type: string
                                                enum:
                                                  - en
                                                  - nl
                                                  - fr
                                                  - de
                                                  - es
                                                example: en
                                              value:
                                                type: string
                                                example: Full Body Strength
                                          example:
                                            - lang: en
                                              value: Full Body Strength
                                            - lang: nl
                                              value: Full Body Kracht
                                        description:
                                          type: array
                                          items:
                                            type: object
                                            required:
                                              - lang
                                              - value
                                            properties:
                                              lang:
                                                type: string
                                                enum:
                                                  - en
                                                  - nl
                                                  - fr
                                                  - de
                                                  - es
                                                example: en
                                              value:
                                                type: string
                                                example: Full Body Strength
                                        cardio:
                                          type: object
                                          additionalProperties: false
                                          description: >-
                                            Optional structured activity
                                            prescription. Requires workoutsectionv2
                                            + workoutV2ProgrammeCalendar +
                                            workoutV2CardioBuilder. Omitted from
                                            disabled reads. Supported sports:
                                            running (paceZone E/T/I/R/RP, absolute
                                            pace, absolute HR, RPE), walking (pace,
                                            HR, RPE), cycling (power, HR, RPE),
                                            rowing (pace, power, HR, RPE), swimming
                                            (pace, RPE). Rejected for workout,
                                            padel, mobility and other items. Totals
                                            overwrite planned duration/distance;
                                            unknown time or distance contributes
                                            zero.
                                          properties:
                                            slotKey:
                                              type: string
                                              description: >-
                                                Generated when missing; retain across
                                                edits, copies and weeks.
                                            sessionType:
                                              type: string
                                              enum:
                                                - easy
                                                - zone2
                                                - long_run
                                                - threshold_continuous
                                                - threshold_reps
                                                - interval
                                                - race_pace
                                                - time_trial
                                                - race
                                              description: >-
                                                Running only. Template session codes:
                                                threshold_continuous = drempel_c,
                                                threshold_reps = drempel_r, interval,
                                                race_pace = doeltempo, zone2. A typed
                                                session with empty blocks is a skeleton
                                                to be filled later.
                                            controlMode:
                                              type: string
                                              enum:
                                                - pace
                                                - hr
                                              description: >-
                                                Binding signal. Defaults from
                                                sessionType: hr for easy, zone2 and
                                                long_run; pace for threshold_continuous,
                                                threshold_reps, interval and race_pace;
                                                none for time_trial and race. A
                                                contradicting value is rejected.
                                            ladderStep:
                                              type: integer
                                              minimum: 1
                                              description: >-
                                                Ladder position: interval 1–8,
                                                threshold_reps 1–7, threshold_continuous
                                                1–5 (15/18/20/22/25 min). Rejected for
                                                other session types.
                                            poolLengthM:
                                              type: number
                                              enum:
                                                - 25
                                                - 50
                                              description: Swimming only.
                                            blocks:
                                              type: array
                                              maxItems: 10
                                              items:
                                                type: object
                                                additionalProperties: false
                                                properties:
                                                  _id:
                                                    type: string
                                                    example: 67f1234567890abcdef1234
                                                  repeat:
                                                    type: integer
                                                    minimum: 1
                                                    maximum: 50
                                                    default: 1
                                                  steps:
                                                    type: array
                                                    maxItems: 20
                                                    items:
                                                      type: object
                                                      additionalProperties: false
                                                      required:
                                                        - kind
                                                        - durationType
                                                      properties:
                                                        _id:
                                                          type: string
                                                          example: 67f1234567890abcdef1234
                                                        kind:
                                                          type: string
                                                          enum:
                                                            - warmup
                                                            - work
                                                            - recovery
                                                            - rest
                                                            - cooldown
                                                        durationType:
                                                          type: string
                                                          enum:
                                                            - time
                                                            - distance
                                                            - open
                                                        durationValue:
                                                          type:
                                                            - number
                                                            - 'null'
                                                          minimum: 0
                                                          default: null
                                                          description: >-
                                                            Required seconds for time or metres for
                                                            distance; null/omitted for open.
                                                        target:
                                                          type: object
                                                          additionalProperties: false
                                                          required:
                                                            - kind
                                                          description: >-
                                                            Allowed kinds and zones depend on the
                                                            sport. Zone targets require zone; other
                                                            targets require ordered low/high bounds.
                                                            Pace is seconds/km for running/walking,
                                                            seconds/500m for rowing, seconds/100m
                                                            for swimming. Percentages are percent
                                                            values; HR is bpm, power is watts, RPE
                                                            is 1–10. Numeric strings with dot or
                                                            comma decimals are accepted.
                                                          properties:
                                                            kind:
                                                              type: string
                                                              enum:
                                                                - paceZone
                                                                - pacePct
                                                                - pace
                                                                - hrZone
                                                                - hrPct
                                                                - hr
                                                                - powerZone
                                                                - powerPct
                                                                - power
                                                                - rpe
                                                            zone:
                                                              type: string
                                                              enum:
                                                                - E
                                                                - T
                                                                - I
                                                                - R
                                                                - RP
                                                                - Z1
                                                                - Z2
                                                                - Z3
                                                                - Z4
                                                                - Z5
                                                                - Z6
                                                                - Z7
                                                                - easy
                                                                - endurance
                                                                - threshold
                                                                - speed
                                                              description: >-
                                                                Run pace: E (easy), T (threshold), I
                                                                (interval), R (repetition), RP (race
                                                                pace = goal time / goal distance, never
                                                                derived from T). Running has no HR
                                                                zones; HR bands are absolute bpm from
                                                                athlete data. Walking/rowing pace and
                                                                five-zone HR: Z1–Z5. Bike/row power:
                                                                Z1–Z7. Swimming pace: easy, endurance,
                                                                threshold, speed.
                                                            basis:
                                                              type: string
                                                              enum:
                                                                - lthr
                                                                - maxHr
                                                              description: HR zone/percentage targets only.
                                                            low:
                                                              type: number
                                                              minimum: 0
                                                            high:
                                                              type: number
                                                              minimum: 0
                                                        secondaryTarget:
                                                          type: object
                                                          additionalProperties: false
                                                          required:
                                                            - kind
                                                          description: >-
                                                            Allowed kinds and zones depend on the
                                                            sport. Zone targets require zone; other
                                                            targets require ordered low/high bounds.
                                                            Pace is seconds/km for running/walking,
                                                            seconds/500m for rowing, seconds/100m
                                                            for swimming. Percentages are percent
                                                            values; HR is bpm, power is watts, RPE
                                                            is 1–10. Numeric strings with dot or
                                                            comma decimals are accepted.
                                                          properties:
                                                            kind:
                                                              type: string
                                                              enum:
                                                                - paceZone
                                                                - pacePct
                                                                - pace
                                                                - hrZone
                                                                - hrPct
                                                                - hr
                                                                - powerZone
                                                                - powerPct
                                                                - power
                                                                - rpe
                                                            zone:
                                                              type: string
                                                              enum:
                                                                - E
                                                                - T
                                                                - I
                                                                - R
                                                                - RP
                                                                - Z1
                                                                - Z2
                                                                - Z3
                                                                - Z4
                                                                - Z5
                                                                - Z6
                                                                - Z7
                                                                - easy
                                                                - endurance
                                                                - threshold
                                                                - speed
                                                              description: >-
                                                                Run pace: E (easy), T (threshold), I
                                                                (interval), R (repetition), RP (race
                                                                pace = goal time / goal distance, never
                                                                derived from T). Running has no HR
                                                                zones; HR bands are absolute bpm from
                                                                athlete data. Walking/rowing pace and
                                                                five-zone HR: Z1–Z5. Bike/row power:
                                                                Z1–Z7. Swimming pace: easy, endurance,
                                                                threshold, speed.
                                                            basis:
                                                              type: string
                                                              enum:
                                                                - lthr
                                                                - maxHr
                                                              description: HR zone/percentage targets only.
                                                            low:
                                                              type: number
                                                              minimum: 0
                                                            high:
                                                              type: number
                                                              minimum: 0
                                                        notes:
                                                          type: string
                                                          default: ''
                                                        stroke:
                                                          type: string
                                                          enum:
                                                            - free
                                                            - back
                                                            - breast
                                                            - fly
                                                            - im
                                                            - choice
                                                            - kick
                                                            - drill
                                                          description: Swimming only.
                                                        equipment:
                                                          type: array
                                                          items:
                                                            type: string
                                                            enum:
                                                              - pullBuoy
                                                              - paddles
                                                              - fins
                                                              - kickboard
                                                              - snorkel
                                                          description: Swimming only.
                                                        restMode:
                                                          type: string
                                                          enum:
                                                            - rest
                                                            - sendOff
                                                          description: >-
                                                            Swimming only. sendOff requires
                                                            sendOffSec.
                                                        sendOffSec:
                                                          type: number
                                                          minimum: 1
                                                          description: Swimming sendOff only.
                                                        cadence:
                                                          type: object
                                                          additionalProperties: false
                                                          required:
                                                            - low
                                                            - high
                                                          properties:
                                                            low:
                                                              type: number
                                                              minimum: 0
                                                            high:
                                                              type: number
                                                              minimum: 0
                                                    default: []
                                              default: []
                                            sourceTemplateId:
                                              type:
                                                - string
                                                - 'null'
                                              example: null
                                        targetDistanceMeters:
                                          type:
                                            - number
                                            - 'null'
                                          minimum: 0
                                          example: 5000
                                          description: >-
                                            Planned distance in meters; null when no
                                            target is set.
                                  discriminator:
                                    propertyName: type
                                    mapping:
                                      workout: >-
                                        #/components/schemas/WorkoutProgrammeCalendarWorkoutItem
                                      activity: >-
                                        #/components/schemas/WorkoutProgrammeCalendarActivityItem
              scheduleMode:
                type: string
                enum:
                  - recurring
                  - multi_week
                example: multi_week
                description: >-
                  Which kind of programme this is, the same field the library
                  cards carry. Defaults to `recurring` when the plan never
                  stored a mode. `planWeeks` is populated only when this is
                  `multi_week`.
              planWeeks:
                type: array
                description: >-
                  Every week of the programme with its real date span — the week
                  picker's data, and the authority for which weeks exist
                  (disable the ‹ › arrows at the first and last entry). Same
                  shape and same builder as `planWeeks` on `GET
                  /app/v1/workout/client/library/template/{templateId}/progress`.


                  **Multi-week plans only.** Always `[]` when `schedule.mode` is
                  `recurring`: that plan is a single repeating week with no
                  picker to fill. Also `[]` for a multi-week plan whose weeks
                  have no resolvable dates, and for one whose stored calendar
                  definition no longer validates (the card itself still
                  renders).


                  A sequence-layout multi-week plan still gets entries, taken
                  from each week's `availableFrom`, with `endDate: ""`.
                items:
                  type: object
                  properties:
                    weekNumber:
                      type: integer
                      minimum: 1
                      example: 1
                    startDate:
                      type: string
                      example: '2026-09-14'
                    endDate:
                      type: string
                      example: '2026-09-20'
                    isCurrentWeek:
                      type: boolean
                      example: true
                      description: >-
                        Whether today falls inside this week's span, resolved in
                        the COMPANY's timezone — the same one the spans were
                        built in. At most ONE entry is `true`; none are once the
                        programme is over or before it starts, so do not assume
                        a match exists. A sequence-layout week (a `startDate`
                        with no `endDate`) is current from its start onwards.
                example:
                  - weekNumber: 1
                    startDate: '2026-09-14'
                    endDate: '2026-09-20'
                    isCurrentWeek: true
                  - weekNumber: 2
                    startDate: '2026-09-21'
                    endDate: '2026-09-27'
                    isCurrentWeek: false
              progress:
                type: object
                description: >-
                  Recurring sequence days show only active-attempt progress and
                  return to ready after completion. Multi-week/calendar
                  programmes retain all-time completion across active,
                  non-archived/non-deleted moments. A moment is completed by a
                  non-deleted completed session for the exact plan and moment;
                  partial progress uses one selected active attempt and never
                  unions attempts.
                properties:
                  total:
                    type: integer
                    example: 4
                    description: Active days in the plan.
                  completed:
                    type: integer
                    example: 2
                    description: Days with a completed session.
                  progressPercentage:
                    type: integer
                    example: 50
                  isCompleted:
                    type: boolean
                    example: false
              createdAt:
                type: string
                format: date-time
                example: '2026-04-12T10:00:00.000Z'
              updatedAt:
                type: string
                format: date-time
                example: '2026-04-12T10:00:00.000Z'
        programmeCalendarData:
          type: object
          nullable: true
          description: >-
            Everything the client's multi-week calendar programmes have
            scheduled on the resolved `?date=` (today when omitted): the day
            header, the month dot grid, and that date's programme cards.
            Identical shape to `GET /app/v1/workout/client/programme-day`.
            `null` when `trainingPlanAssignedSection` is disabled or the fetch
            failed.
          properties:
            date:
              type: string
              example: '2026-09-22'
            month:
              type: string
              example: 2026-09
            dayLabel:
              type: string
              example: Tue
            dayName:
              type: string
              example: Tuesday
            dayOfMonth:
              type:
                - integer
                - 'null'
              example: 22
            isToday:
              type: boolean
              example: true
            programmeMonthCalendar:
              type: object
              nullable: true
              description: >-
                Month dot grid aggregated across EVERY assigned multi-week
                calendar programme (`schedule.mode: multi_week` +
                `schedule.layout: calendar_week`) — a sequence-layout plan has
                no per-day dates or items and so contributes nothing.
                Switched-off (`Inactive`) programmes contribute dots as well,
                matching the plan list exactly so the calendar and the cards it
                belongs to can never show a different set of programmes; the
                card states which are paused. Padded to whole weeks, so `dates`
                always starts on a Monday, ends on a Sunday and has a length
                that is a multiple of 7 — chunk it by 7 for rows. Covers the
                month containing the resolved `?date=`; omitted, it is the
                current company-local month. Gated by the same flag as
                `trainingPlanAssignedSection` (it is that list's calendar view),
                so `null` when that section is disabled.
              properties:
                month:
                  type: string
                  example: 2026-09
                monthLabel:
                  type: string
                  example: September 2026
                monthStart:
                  type: string
                  example: '2026-09-01'
                monthEnd:
                  type: string
                  example: '2026-09-30'
                gridStart:
                  type: string
                  example: '2026-08-31'
                  description: The Monday on/before the 1st.
                gridEnd:
                  type: string
                  example: '2026-10-04'
                  description: The Sunday on/after the last day.
                planIds:
                  type: array
                  description: >-
                    The programmes that contributed dots, oldest first — the
                    same order their dots appear in each `statuses`.
                  items:
                    type: string
                    example: 67f1234567890abcdef1234
                dates:
                  type: array
                  items:
                    type: object
                    properties:
                      date:
                        type: string
                        example: '2026-09-22'
                      dayOfMonth:
                        type: integer
                        example: 22
                      weekday:
                        type: integer
                        minimum: 1
                        maximum: 7
                        example: 2
                        description: 1 = Monday.
                      isCurrentMonth:
                        type: boolean
                        example: true
                        description: >-
                          `false` for the adjacent months' spill-over days in
                          the first and last rows.
                      isToday:
                        type: boolean
                        example: true
                      isRestDay:
                        type: boolean
                        example: false
                        description: '`true` when ANY contributing programme rests that day.'
                      itemCount:
                        type: integer
                        example: 3
                        description: >-
                          How many items this date actually holds, across every
                          programme. Unaffected by the de-duplication of
                          `statuses` below.
                      statuses:
                        type: array
                        description: >-
                          ONE entry per DISTINCT state, in first-seen order,
                          across ALL of the client's programmes — the grid shows
                          a date's states, not its item count, so three
                          programmes each finishing a workout that date render a
                          single `completed` dot while a mixed date still shows
                          every state it holds. A rest day is a single `rest`.
                          `[]` when nothing is scheduled. Anything neither
                          finished nor underway is `not_started`. Use
                          `itemCount` for how many items the date actually has.
                        items:
                          type: string
                          enum:
                            - completed
                            - in_process
                            - not_started
                            - rest
                        example:
                          - completed
                          - in_process
                          - not_started
            programmes:
              type: array
              items:
                type: object
                properties: {}
                additionalProperties: false
        freestyleWorkout:
          type: object
          nullable: true
          description: '`null` when the section is disabled.'
          properties:
            state:
              type: string
              enum:
                - create
                - start
                - continue
              example: continue
              description: >-
                `create` = no active session; `start` = session exists but no
                exercises logged; `continue` = session has performances.
            sessionId:
              type: string
              example: 67f1234567890abcdef1234
              nullable: true
            planId:
              type: string
              example: null
              nullable: true
            planMomentId:
              type: string
              example: null
              nullable: true
            status:
              type: string
              example: in_progress
            startedAt:
              type: string
              nullable: true
              example: '2026-06-01T09:00:00.000Z'
        muscleActivation:
          type: object
          nullable: true
          description: >-
            7-day muscle activation heatmap. `null` when the section is
            disabled.
          properties:
            range:
              type: object
              properties:
                startDate:
                  type: string
                  format: date-time
                  example: '2026-05-18T00:00:00.000Z'
                endDate:
                  type: string
                  format: date-time
                  example: '2026-05-24T23:59:59.999Z'
                days:
                  type: integer
                  example: 7
            total:
              type: object
              properties:
                raw:
                  type: object
                  description: >-
                    Raw activation score per muscle key (e.g. `quadriceps`,
                    `chest`).
                  additionalProperties:
                    type: number
                  example:
                    quadriceps: 120
                    chest: 80
                    hamstrings: 60
                normalized:
                  type: object
                  description: >-
                    Scores normalised to a 0–1 range relative to the
                    highest-activated muscle.
                  additionalProperties:
                    type: number
                  example:
                    quadriceps: 1
                    chest: 0.67
                    hamstrings: 0.5
                maxValue:
                  type: number
                  example: 120
                topMuscles:
                  type: array
                  description: Top 10 most-activated muscles, sorted descending.
                  items:
                    type: object
                    properties:
                      muscle:
                        type: string
                        example: quadriceps
                      value:
                        type: number
                        example: 120
        workoutPlanLibrary:
          type: array
          description: >-
            Up to 5 workout template cards from the company library, respecting
            category order. `[]` when the section is disabled.
          items:
            type: object
            description: >-
              Flat template card for the Workout Library section (up to 5
              items).
            properties:
              _id:
                type: string
                example: 67f1234567890abcdef1234
              name:
                type: string
                example: 4-Day Strength Block
              description:
                type: string
                example: Progressive upper/lower split.
              thumbnail:
                type: string
                example: https://cdn.example.com/workouts/plan-cover.jpg
              difficulty:
                type: string
                example: Intermediate
              intensity:
                type: string
                example: High
              category:
                type: string
                example: Strength
              scheduleMode:
                type: string
                enum:
                  - recurring
                  - multi_week
                example: recurring
                description: >-
                  Which kind of programme this is. Defaults to `recurring` when
                  the plan never stored a mode.
              categoryName:
                type: string
                example: Strength Programs
        videoLibrary:
          type: array
          description: >-
            Up to 5 published video cards from the company video library,
            including watch progress. `[]` when the section is disabled.
          items:
            type: object
            description: Flat video card for the Video Library section (up to 5 items).
            properties:
              _id:
                type: string
                example: 67f1234567890abcdef1234
              title:
                type: string
                example: Full-Body HIIT Workout
              description:
                type: string
                example: 45-minute high intensity session.
              url:
                type: string
                example: https://cdn.example.com/videos/hiit-thumb.jpg
                description: >-
                  For `s3`: thumbnail/poster image URL. For other platforms: the
                  external video link.
              platform:
                type: string
                example: s3
                description: 'Source platform: `s3`, `youtube`, `tiktok`, etc.'
              type:
                type: string
                enum:
                  - video
                  - link
                example: video
                description: '`video` for s3, `link` for external platforms.'
              duration:
                type: number
                nullable: true
                example: 2700
                description: Duration in seconds.
              language:
                type: string
                example: en
              level:
                type: string
                example: Intermediate
              category:
                type: string
                example: Cardio
              categoryName:
                type: string
                example: HIIT Collection
              isFavorite:
                type: boolean
                example: false
              progress:
                type: object
                nullable: true
                properties:
                  watchedDuration:
                    type: number
                    example: 245
                    description: Seconds watched.
                  progressPercentage:
                    type: number
                    example: 62.5
                  isCompleted:
                    type: boolean
                    example: false
        performanceSummary:
          type: object
          nullable: true
          description: >-
            All-time performance summary for the client. `null` when the section
            is disabled.
          properties:
            sessionsTotal:
              type: integer
              example: 81
              description: Total sessions (all statuses).
            sessionsCompleted:
              type: integer
              example: 56
              description: Sessions with status `completed`.
            averageRating:
              type: number
              example: 7.8
              description: Average session rating (0 when no ratings).
            maxWeight:
              type: number
              example: 109
              description: Heaviest single-lift weight across all performances.
            averageVolumePerSession:
              type: number
              example: 3895.1
              description: Total volume ÷ sessions that have performances.
            distinctExercises:
              type: integer
              example: 59
              description: Unique exercise ids across all performances.
            totalReps:
              type: integer
              example: 1128
              description: Sum of totalReps across all performances.
            totalTimeSeconds:
              type: integer
              example: 331200
              description: Sum of totalTimeSeconds across all performances.
            totalVolume:
              type: number
              example: 218130.5
              description: Sum of totalVolume across all performances.
            totalActiveWorkout:
              type: integer
              example: 3
              description: Sessions currently in_progress / paused / stopped.
        dailyTrainingNotes:
          type: string
          example: Felt strong today, increased squat weight.
          description: >-
            Today's training note for the client. Empty string `""` when no note
            exists or the section is disabled.
        notesExists:
          type: boolean
          example: true
          description: '`true` when today''s training note is non-empty.'
    PublicApiError:
      type: object
      additionalProperties: false
      required:
        - error
        - meta
      properties:
        error:
          type: object
          additionalProperties: false
          required:
            - code
            - key
            - message
          properties:
            code:
              type: integer
              example: 401
            key:
              type: string
              example: auth.invalid_token
            message:
              type: string
              example: The access token is invalid.
            details:
              type: object
              additionalProperties: true
        meta:
          $ref: '#/components/schemas/PublicApiMeta'
    ErrorResponse:
      allOf:
        - $ref: '#/components/schemas/StandardResponse'
        - example:
            status: 401
            error: true
            message: MISSING_AUTH
    PublicApiMeta:
      type: object
      additionalProperties: false
      required:
        - requestId
      properties:
        requestId:
          type: string
          description: Stable request correlation id. Mirrors `X-Request-Id` when supplied.
          example: 4f849d7d-f4f1-45cc-b4b7-3984a3d17f83
        rateLimit:
          $ref: '#/components/schemas/PublicApiRateLimitMeta'
    StandardResponse:
      type: object
      properties:
        status:
          type: integer
          example: 200
        error:
          type: boolean
          example: false
        message:
          type: string
          example: SUCCESS
      required:
        - status
        - error
        - message
    PublicApiRateLimitMeta:
      type: object
      additionalProperties: false
      properties:
        limit:
          type: integer
          example: 10
        remaining:
          type: integer
          example: 9
        resetSeconds:
          type: integer
          description: Seconds until the current rate limit window resets.
          example: 1
        retryAfterSeconds:
          type: integer
          description: Present when the request was rate limited.
          example: 1
  securitySchemes:
    PublicBearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Opaque
      description: >-
        Public API access token issued by `/public/v1/oauth/token`. Example:
        `Authorization: Bearer fspt_...`. Each resource request rechecks the
        token company's current provider access. Disabling access blocks
        existing tokens with `403 auth.provider_unavailable`.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.