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

# List classes

> Returns the organization's class occurrences, ordered by start time. One row is one occurrence - a weekly class materializes a row per session, linked by `recurrenceId` and `occurrenceIndex` - so a row's `id` is what a booking's `classId` points at.

The window is open by default: with neither bound the whole schedule is in scope, past included, because this endpoint serves operators reconciling what happened rather than members shopping for a slot. `startDate` keeps occurrences still running at or after it, `endDate` keeps occurrences starting before it (exclusive), and each accepts an ISO date-time or a bare `YYYY-MM-DD` read as midnight UTC. Overlap, not containment, so a long or multi-day class shows up on every day it covers.

Page with `limit`/`offset` against the `total` the response reports. Ordering is stable (`startTime`, then id).

Every class the organization owns is in scope - member-only and private occurrences included, and those at a deactivated club - because the key holder is the operator, not a visitor. `locale` resolves `name` and `description`; the full `translations` blob is returned either way.




## OpenAPI

````yaml /openapi-platform.json get /v1/platform/classes
openapi: 3.0.0
info:
  title: 1club Platform API
  version: 1.0.0
  description: >-
    The 1club Platform API lets you programmatically access and manage your
    organization's data.


    ## Official API Contract


    This documentation is the official source of truth for the 1club Platform
    API.

    If an integration relies on undocumented endpoints, fields, response shapes,
    or internal behavior outside this spec, we can't guarantee backward
    compatibility.

    Build against what's documented here to stay stable as the platform evolves.


    ## Authentication


    All requests require a customer API key passed as a Bearer token:


    ```

    Authorization: Bearer 1club_sk_live_...

    ```


    Generate API keys from the admin portal under **Settings > API Tokens**.

    The key is tied to your organization - all responses are scoped to your
    org's data.


    ## Rate Limiting


    - **100 requests per minute** per API key

    - When exceeded, the API returns `429 Too Many Requests` with a
    `Retry-After` header

    - Rate limit headers are included in every response:
      - `X-RateLimit-Limit` - max requests per window
      - `X-RateLimit-Remaining` - requests remaining
      - `X-RateLimit-Reset` - seconds until the window resets

    ## Errors


    | Status | Meaning |

    |--------|---------|

    | `400` | Invalid request parameters |

    | `401` | Missing or invalid API key |

    | `404` | Resource not found (or doesn't belong to your organization) |

    | `429` | Rate limit exceeded |

    | `500` | Internal server error |
  contact:
    name: 1club API Support
    email: support@1club.ai
servers:
  - url: https://api.1club.ai
    description: Production API
security:
  - customerApiAuth: []
tags: []
paths:
  /v1/platform/classes:
    get:
      tags:
        - Classes
      summary: List classes
      description: >
        Returns the organization's class occurrences, ordered by start time. One
        row is one occurrence - a weekly class materializes a row per session,
        linked by `recurrenceId` and `occurrenceIndex` - so a row's `id` is what
        a booking's `classId` points at.


        The window is open by default: with neither bound the whole schedule is
        in scope, past included, because this endpoint serves operators
        reconciling what happened rather than members shopping for a slot.
        `startDate` keeps occurrences still running at or after it, `endDate`
        keeps occurrences starting before it (exclusive), and each accepts an
        ISO date-time or a bare `YYYY-MM-DD` read as midnight UTC. Overlap, not
        containment, so a long or multi-day class shows up on every day it
        covers.


        Page with `limit`/`offset` against the `total` the response reports.
        Ordering is stable (`startTime`, then id).


        Every class the organization owns is in scope - member-only and private
        occurrences included, and those at a deactivated club - because the key
        holder is the operator, not a visitor. `locale` resolves `name` and
        `description`; the full `translations` blob is returned either way.
      parameters:
        - in: query
          name: startDate
          schema:
            type: string
          description: >-
            Keep occurrences ending after this instant. ISO date-time or
            `YYYY-MM-DD`. Omit for no lower bound.
        - in: query
          name: endDate
          schema:
            type: string
          description: >-
            Keep occurrences starting before this instant (exclusive). ISO
            date-time or `YYYY-MM-DD`. Omit for no upper bound.
        - in: query
          name: clubId
          schema:
            type: integer
          description: Only classes at this club
        - in: query
          name: classTypeId
          schema:
            type: integer
          description: Only classes of this class type
        - in: query
          name: instructorId
          schema:
            type: integer
          description: Only classes this instructor is assigned to teach
        - in: query
          name: status
          schema:
            type: string
            enum:
              - active
              - cancelled
          description: >-
            Only classes with this status. A cancelled occurrence keeps its
            bookings.
        - in: query
          name: sport
          schema:
            type: string
          description: Only classes for this sport
        - in: query
          name: search
          schema:
            type: string
          description: Case-insensitive match on the class name
        - in: query
          name: locale
          schema:
            type: string
          description: Locale for translated fields (e.g. "en", "es")
        - in: query
          name: limit
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 50
          description: Maximum number of classes to return
        - in: query
          name: offset
          schema:
            type: integer
            minimum: 0
            default: 0
          description: Number of classes to skip
      responses:
        '200':
          description: Page of classes
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlatformClassPage'
        '400':
          $ref: '#/components/responses/PlatformBadRequest'
        '401':
          $ref: '#/components/responses/PlatformUnauthorized'
        '403':
          description: API key is missing the required `classes:read` scope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlatformError'
        '429':
          $ref: '#/components/responses/PlatformRateLimited'
      security:
        - customerApiAuth: []
components:
  schemas:
    PlatformClassPage:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/PlatformClass'
        total:
          type: integer
          description: Total classes matching the filters, ignoring pagination
        limit:
          type: integer
        offset:
          type: integer
    PlatformError:
      type: object
      properties:
        error:
          type: string
    PlatformClass:
      type: object
      description: >-
        One class occurrence. A weekly class materializes a row per session,
        linked by `recurrenceId` and `occurrenceIndex`, so `id` is what a
        booking's `classId` points at - and what distinguishes two groups
        running in the same hour. Read the roster with GET
        /v1/platform/classes/{id}/bookings.
      properties:
        id:
          type: integer
        name:
          type: string
        slug:
          type: string
          nullable: true
        description:
          type: string
          nullable: true
        images:
          type: array
          items:
            type: string
        classTypeId:
          type: integer
          nullable: true
        classType:
          type: object
          nullable: true
          properties:
            id:
              type: integer
            name:
              type: string
              nullable: true
            slug:
              type: string
              nullable: true
            maxPartySize:
              type: integer
              nullable: true
        clubId:
          type: integer
        club:
          type: object
          nullable: true
          properties:
            id:
              type: integer
            name:
              type: string
            slug:
              type: string
              nullable: true
        areaId:
          type: integer
          nullable: true
          description: Room or court the class occupies, when one is assigned.
        area:
          type: object
          nullable: true
          properties:
            id:
              type: integer
            name:
              type: string
        startTime:
          type: string
          format: date-time
        endTime:
          type: string
          format: date-time
        durationMinutes:
          type: integer
        isMultiDay:
          type: boolean
        status:
          type: string
          enum:
            - active
            - cancelled
          description: A cancelled occurrence keeps its bookings and roster.
        visibility:
          type: string
          enum:
            - Public
            - Member_only
            - Private
        sport:
          type: string
          nullable: true
        color:
          type: string
          nullable: true
        price:
          type: number
          format: float
          nullable: true
          description: >-
            Price including the organization's default tax - what a member is
            charged.
        priceBeforeTax:
          type: number
          format: float
          nullable: true
          description: The price as stored on the class, before tax.
        isFree:
          type: boolean
        maxCapacity:
          type: integer
          nullable: true
          description: Seats; null when uncapped.
        maxPartySize:
          type: integer
          description: Largest party one booking may bring, from the class type.
        bookedCount:
          type: integer
          description: 'Seats taken: attendee bookings plus standalone walk-in check-ins.'
        currentBookings:
          type: integer
          description: Legacy alias of `bookedCount`.
        spotsLeft:
          type: integer
          nullable: true
          description: >-
            `maxCapacity - bookedCount`, floored at 0; null when capacity is
            unlimited.
        waitlistCount:
          type: integer
          description: Entries waiting (pending or notified).
        allowWaitlist:
          type: boolean
        timeStatus:
          type: string
          enum:
            - past
            - upcoming
        availabilityStatus:
          type: string
          enum:
            - available
            - full
        recurrenceId:
          type: integer
          nullable: true
          description: The series this occurrence belongs to; null for a one-off class.
        occurrenceIndex:
          type: integer
          nullable: true
          description: Position within the series, as materialized.
        recurrence:
          type: object
          nullable: true
          description: The series rule, when this occurrence belongs to one.
          properties:
            id:
              type: integer
            frequency:
              type: string
              enum:
                - daily
                - weekly
                - monthly
            interval:
              type: integer
            daysOfWeek:
              type: array
              items:
                type: string
            endsType:
              type: string
              enum:
                - until
                - after
                - never
            endsDate:
              type: string
              format: date-time
              nullable: true
            endsTotalOccurrences:
              type: integer
              nullable: true
            status:
              type: string
              enum:
                - active
                - paused
                - cancelled
        instructors:
          type: array
          description: >-
            Who teaches the occurrence. The instructor's own weekly availability
            is not included; read it from GET /v1/platform/instructors.
          items:
            $ref: '#/components/schemas/PlatformInstructor'
        externalSource:
          type: string
          nullable: true
          description: >-
            Import provenance - set when the occurrence came from an external
            system rather than being created in 1club.
        externalId:
          type: string
          nullable: true
          description: >-
            The source system's id for this occurrence, for reconciliation
            against it.
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        translations:
          type: object
          nullable: true
          additionalProperties: true
          description: >-
            Every locale's copy, keyed by language code (e.g. 'es', 'fr').
            Returned alongside the `locale`-resolved `name`/`description`, so an
            integration syncing a multilingual timetable can read all of them in
            one call.
    PlatformInstructor:
      type: object
      description: Public instructor shape returned alongside classes.
      properties:
        id:
          type: integer
        contactId:
          type: integer
        sports:
          type: array
          items:
            type: string
        typeId:
          type: integer
          nullable: true
        type:
          type: object
          nullable: true
          properties:
            id:
              type: integer
            name:
              type: string
        experience:
          type: string
          nullable: true
        hourlyRate:
          type: number
          format: float
          nullable: true
        bio:
          type: object
          nullable: true
          additionalProperties: true
          description: EditorJS document for the instructor bio.
        certifications:
          type: array
          items:
            type: string
        isActive:
          type: boolean
        isBookable:
          type: boolean
        contact:
          type: object
          nullable: true
          properties:
            name:
              type: string
              nullable: true
            profileImage:
              type: string
              nullable: true
  responses:
    PlatformBadRequest:
      description: Invalid request (bad parameters, or a body that fails validation)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PlatformError'
    PlatformUnauthorized:
      description: Invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PlatformError'
    PlatformRateLimited:
      description: Rate limit exceeded
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PlatformError'
  securitySchemes:
    customerApiAuth:
      type: http
      scheme: bearer
      description: >-
        Organization-scoped bearer credential: a customer API key
        (1club_sk_live_...) or an MCP OAuth access token.

````