EGYM L2 API

Operations related to L2 level of integration

Operations 2

GET /classes Search Classes #
GET /classes/{classId} Get Class Details #

Documentation

Specifications

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/egym-l2-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

egym-l2-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Canonical GroupX Classes L2 API
  description: This specification defines *Canonical API* for GroupX Classes Service, which provides operations for working with Group Exercise Classes, their schedules and attendees.
  version: '1.0'
servers:
- url: https://example.org/%3Cpartner%3E/group-classes/v1.0
tags:
- name: L2
  description: Operations related to L2 level of integration
paths:
  /classes:
    get:
      tags:
      - L2
      summary: Search Classes
      description: 'This operation searches GroupX Classes by date range.


        #### Additional contracts

        N/A'
      operationId: searchClasses
      parameters:
      - name: locationId
        in: query
        description: 'ClubMS Location ID, which indicates Location to search Classes in. This ID is returned by Canonical Locations API or provided manually to EGYM admins.


          ##### Possible reasons of validation errors:

          * missing => 400

          * notFound => 404

          '
        required: true
        schema:
          type: string
      - name: endDateTime
        in: query
        description: 'Defines end of the timerange for Class search


          ##### Possible reasons of validation errors:

          * missing => 400

          * wrongFormat => 400

          * lessThanStartDateTime => 400

          '
        required: true
        schema:
          type: string
          format: date-time
      - name: startDateTime
        in: query
        description: 'Defines start of the timerange for Class search


          ##### Possible reasons of validation errors:

          * missing => 400

          * wrongFormat => 400

          * greaterThanEndDateTime => 400

          '
        required: true
        schema:
          type: string
          format: date-time
      - $ref: '#/components/parameters/userSecretHeader'
      - $ref: '#/components/parameters/userIdHeader'
      - $ref: '#/components/parameters/userLocaleHeader'
      - $ref: '#/components/parameters/locationSecretHeader'
      - $ref: '#/components/parameters/locationIdHeader'
      - $ref: '#/components/parameters/locationGroupSecretHeader'
      - $ref: '#/components/parameters/locationGroupIdHeader'
      - $ref: '#/components/parameters/chainSecretHeader'
      - $ref: '#/components/parameters/chainIdHeader'
      - $ref: '#/components/parameters/clientSecretHeader'
      - $ref: '#/components/parameters/clientIdHeader'
      responses:
        '200':
          description: 'List of found Classes.


            ##### Contracts

            * Section `brief` is required.

            * If *`metaOption::bookingEnabled`* is true then `free` flag is required, optional otherwise.

            '
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/GroupXClass'
            .:
              examples:
                response:
                  value:
                  - brief:
                      id: ECS18
                      name: Yoga 24
                      startDateTime: '2016-08-23T16:00:00Z'
                      endDateTime: '2016-08-23T17:00:00Z'
                      locationId: ECB23
                      instructor:
                        firstName: Anna
                        lastName: Jones
                        fullName: Anna Jones
                      activity:
                        name: Yoga
                      free: true
                  - brief:
                      id: ECS97
                      name: TRX Small Group
                      startDateTime: '2016-08-24T18:00:00Z'
                      endDateTime: '2016-08-24T18:30:00Z'
                      locationId: ECB23
                      instructor:
                        firstName: Anna
                        lastName: Jones
                        fullName: Anna Jones
                      activity:
                        name: TRX
  /classes/{classId}:
    get:
      tags:
      - L2
      summary: Get Class Details
      description: 'This operation returns all detailed information about GroupX Class.


        #### Additional Contracts

        1. Parameter `exerciserId` is supported only if *`metaOption::bookingEnabled`* = true. If booking is disabled, then 400 status code must be returned when `exerciserId` is specified.

        2. If *`metaOption::bookingEnabled`* = true, parameter `exerciserId` is optional. If it is specified, then `GroupXClassAttendeeBookingDetails` is provided in response. If `exerciserId` is not specified, then response has no attendee booking details.'
      operationId: getClassDetails
      parameters:
      - name: classId
        in: path
        description: 'ClubMS Class Unique ID


          ##### Possible reasons of validation errors:

          * notFound => 404

          '
        required: true
        schema:
          type: string
      - name: exerciserId
        in: query
        description: 'ClubMS Exerciser Unique ID which is returned by Canonical Users API and/or by Canonical Members API.


          ##### Possible reasons of validation errors:

          * notSupported => 400

          * notFound => 404

          '
        required: false
        schema:
          type: string
      - $ref: '#/components/parameters/userLocaleHeader'
      - $ref: '#/components/parameters/userSecretHeader'
      - $ref: '#/components/parameters/userIdHeader'
      - $ref: '#/components/parameters/locationSecretHeader'
      - $ref: '#/components/parameters/locationIdHeader'
      - $ref: '#/components/parameters/locationGroupSecretHeader'
      - $ref: '#/components/parameters/locationGroupIdHeader'
      - $ref: '#/components/parameters/chainSecretHeader'
      - $ref: '#/components/parameters/chainIdHeader'
      - $ref: '#/components/parameters/clientSecretHeader'
      - $ref: '#/components/parameters/clientIdHeader'
      responses:
        '200':
          description: 'Class full information and Attendee Booking Details


            ##### Contracts

            * If *`metaOption::bookingEnabled`* is true then `free` flag is required, optional otherwise.

            * Section `bookingDetails` is required if *`metaOption::bookingEnabled`* = true, and is not supported otherwise.

            * Section `attendeeBookingDetails` is required only if parameter `exerciserId` was specified.

            '
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GroupXClass'
            .:
              examples:
                response:
                  value:
                    brief:
                      $ref: '#/paths/~1classes/get/responses/200/examples/./0/brief'
                    bookingDetails:
                      capacity: 10
                      booked: 3
                      waitlistCapacity: 2
                      waitlistBooked: 0
                    details:
                      description: 'A blend of two popular types of mind-body connected exercise: Yoga and Pilates. Done to calming, relaxed mode music, each discipline has postures which are duplicated with the other, so a blending of these two types of exercise styles is a natural.

                        '
                      room:
                        name: room 21
                        description: a gymnasium on 2nd floor
                      level:
                        name: Beginner
                        description: 'This level will focus on more intensive techniques, patterns and longer pieces of choreography.

                          '
                      legalNotes: 'Only one free trial can be redeemed per person. No other free trial offer in any form will be available to someone who has previously used a free trial.

                        '
                      pricing:
                        price: 10
                      customInfo:
                      - key: childcare
                        value: true
                      - key: kidshours
                        value: 11am-18pm
                    attendeeBookingDetails:
                      exerciserId: EE3519
                      booked: true
                      waitlistBooked: false
                      waitlistPosition: 0
                      eligibility:
                        addToClassEligibility:
                          eligible: false
                          lackOfProduct: true
                          reason: Product Yoga-10 not available
                        removeFromClassEligibility:
                          eligible: false
                        addToWaitlistEligibility:
                          eligible: false
                          reason: No waitlist available
                        removeFromWaitlistEligibility:
                          eligible: false
components:
  parameters:
    userLocaleHeader:
      name: X-User-Locale
      in: header
      description: see 'Additional Data HTTP Headers' for details.
      schema:
        type: string
    chainIdHeader:
      name: X-Chain-ID
      in: header
      description: see 'Additional Data HTTP Headers' for details.
      schema:
        type: string
    locationGroupSecretHeader:
      name: X-Location-Group-Secret
      in: header
      description: see 'Additional Data HTTP Headers' for details.
      schema:
        type: string
    userSecretHeader:
      name: X-User-Secret
      in: header
      description: see 'Additional Data HTTP Headers' for details.
      schema:
        type: string
    locationSecretHeader:
      name: X-Location-Secret
      in: header
      description: see 'Additional Data HTTP Headers' for details.
      schema:
        type: string
    locationIdHeader:
      name: X-Location-ID
      in: header
      description: see 'Additional Data HTTP Headers' for details.
      schema:
        type: string
    userIdHeader:
      name: X-User-ID
      in: header
      description: see 'Additional Data HTTP Headers' for details.
      schema:
        type: string
    chainSecretHeader:
      name: X-Chain-Secret
      in: header
      description: see 'Additional Data HTTP Headers' for details.
      schema:
        type: string
    locationGroupIdHeader:
      name: X-Location-Group-ID
      in: header
      description: see 'Additional Data HTTP Headers' for details.
      schema:
        type: string
    clientSecretHeader:
      name: X-Client-Secret
      in: header
      description: see 'Additional Data HTTP Headers' for details.
      schema:
        type: string
    clientIdHeader:
      name: X-Client-ID
      in: header
      description: see 'Additional Data HTTP Headers' for details.
      schema:
        type: string
  schemas:
    CustomInfo:
      type: array
      description: 'Key-Value map to represent additional information of an entity.

        Partners could contain diverse information of same entities. This type designed to store that information.

        '
      items:
        type: object
        properties:
          key:
            type: string
          value:
            type: string
        required:
        - key
        - value
    GroupXClassBrief:
      type: object
      description: Brief details of the groupX class for bulk retrieval
      properties:
        id:
          type: string
          description: Unique ID of the GroupX Class in the ClubMS. This is the same ID that's used in `getClassDetails` operation
        name:
          type: string
          description: Name of the Class (e.g. 'Yoga 24', 'TRX Small Group', 'Body Pump')
        startDateTime:
          type: string
          description: Start date/time of the GroupX Class in UTC timezone
          format: date-time
        endDateTime:
          type: string
          description: End date/time of the GroupX Class in UTC timezone
          format: date-time
        locationId:
          type: string
          description: 'Unique ID of the location in ClubMS that this class belongs to. This is the same ID as returned by Canonical Locations API or as manually provided to EGYM admins for locations configuration.

            '
        free:
          type: boolean
          description: Indicates that the class is free (not paid)
        waitlisted:
          type: boolean
          description: Indicates whether the given exerciser is in the waitlist of this class
        childCare:
          type: boolean
          description: Defines if child care option is available for the Class
        reservable:
          type: boolean
          description: Defines if Class is reservable
        instructor:
          type: object
          description: '*Required property* Information about Intructor who leads the Class

            '
          properties:
            firstName:
              type: string
            lastName:
              type: string
            fullName:
              type: string
            customInfo:
              $ref: '#/components/schemas/CustomInfo'
          required:
          - fullName
        activity:
          type: object
          description: '*Required property* Information about Activity of the Class

            '
          properties:
            name:
              type: string
              description: Name of the Class activity (e.g. 'Yoga 24', 'TRX Small Group', 'Body Pump'), often it is the same as groupX class name, but it might be also a more general name (depends on ClubMS, e.g. 'Yoga', 'TRX')
          required:
          - name
        customInfo:
          $ref: '#/components/schemas/CustomInfo'
      required:
      - id
      - name
      - startDateTime
      - endDateTime
    GroupXClass:
      type: object
      description: GroupX Class with all details
      properties:
        brief:
          $ref: '#/components/schemas/GroupXClassBrief'
        bookingDetails:
          $ref: '#/components/schemas/GroupXClassBookingDetails'
        details:
          $ref: '#/components/schemas/GroupXClassDetails'
        attendeeBookingDetails:
          $ref: '#/components/schemas/GroupXClassAttendeeBookingDetails'
      required:
      - brief
      - details
    GroupXClassEligibility:
      type: object
      description: 'Represents booking/cancellation opearions eligibility for Class/Exerciser pair.

        '
      properties:
        addToClassEligibility:
          $ref: '#/components/schemas/GroupXClassOperationExtendedEligibility'
        bookSpotEligibility:
          $ref: '#/components/schemas/GroupXClassOperationEligibility'
        removeFromClassEligibility:
          $ref: '#/components/schemas/GroupXClassOperationEligibility'
        addToWaitlistEligibility:
          $ref: '#/components/schemas/GroupXClassOperationExtendedEligibility'
        removeFromWaitlistEligibility:
          $ref: '#/components/schemas/GroupXClassOperationEligibility'
        updateBookingEligibility:
          $ref: '#/components/schemas/GroupXClassOperationEligibility'
      required:
      - addToClassEligibility
      - removeFromClassEligibility
      - addToWaitlistEligibility
      - removeFromWaitlistEligibility
    GroupXClassDetails:
      type: object
      description: Comprehensive details of the groupX class
      properties:
        description:
          type: string
          description: Long description of the groupX class
        room:
          type: object
          description: '**Optional property** The room where this class takes place.

            '
          properties:
            name:
              type: string
              description: Short name of the room.
            description:
              type: string
              description: Details about this room
            roomPhotoUrl:
              type: string
              description: URL to the room scheme or photo
            customInfo:
              $ref: '#/components/schemas/CustomInfo'
          required:
          - name
        level:
          type: object
          description: '**Optional property** The level of the groupX class (e.g. ''Intermediate'', ''Advanced'')

            '
          properties:
            name:
              type: string
              description: Short name of the level.
            description:
              type: string
              description: Details about this level
          required:
          - name
        pricing:
          type: object
          description: '**Optional property** The price of paid groupX class. If the class is free could be omited

            '
          properties:
            price:
              type: number
              description: price amount
              format: double
          required:
          - price
        legalNotes:
          type: string
          description: Legal notes for this class (often provider specific)
        customInfo:
          $ref: '#/components/schemas/CustomInfo'
    GroupXClassOperationExtendedEligibility:
      type: object
      description: Represents particular operation eligibility for Class/Exerciser pair providing extra data.
      properties:
        eligible:
          type: boolean
          description: 'Indicates if operation on a given Class is eligible for a give Exerciser.

            '
        lackOfProduct:
          type: boolean
          description: 'Indicates that there are enough products on an Exerciser''s account balance to pay for a Class. Products could be Class bundles, points etc.

            This attribute must be absent for eligible=`true`.

            '
        userPaymentOnFile:
          type: boolean
          description: 'Indicates that user has a valid payment source on file to pay for a Class.

            This attribute must be absent for eligible=`true` or lackOfProduct=`false`.

            '
      required:
      - eligible
    GroupXClassOperationEligibility:
      type: object
      description: Represents particular operation eligibility for Class/Exerciser pair.
      properties:
        eligible:
          type: boolean
          description: 'Indicates if operation on a given Class is eligible for a given Exerciser.

            '
      required:
      - eligible
    GroupXClassBookingDetails:
      type: object
      description: Booking details of the GroupX Class
      properties:
        capacity:
          type: integer
          description: Capacity of the GroupX Class for booking online
          format: int32
        booked:
          type: integer
          description: Spots booked online for this GroupX Class
          format: int32
        waitlistCapacity:
          type: integer
          format: int32
        waitlistBooked:
          type: integer
          format: int32
        availableSpots:
          type: array
          items:
            type: string
      required:
      - capacity
      - booked
      - waitlistCapacity
      - waitlistBooked
    GroupXClassAttendeeBookingDetails:
      type: object
      description: Information about attendance of the given exerciser in this GroupX Class
      properties:
        exerciserId:
          type: string
          description: ClubMS Exerciser Unique ID which is returned by Canonical Users API and/or by Canonical Members API.
        booked:
          type: boolean
          description: Indicates whether this class is booked by the given exerciser
        waitlistBooked:
          type: boolean
          description: Indicates whether the given exerciser is in the waitlist of this class
        spotBooked:
          type: string
          description: Indicates exact spot booked by the given exerciser
        eligibility:
          $ref: '#/components/schemas/GroupXClassEligibility'
        waitlistPosition:
          type: integer
          description: Position of given exerciser in the waitlist of this class
          format: int32
      required:
      - exerciserId
      - booked
      - waitlistBooked