GET /v1/trials/availability

List Trial Availability

Query parameters

  • where object

    Filter conditions

    Hide where attribute Show where attribute object
    • classId object

      Filter by Class ID

      Hide classId attribute Show classId attribute object
      • in array[string]

        Filter by ID in array

Responses

  • 422 application/json

    Validation error

    Hide response attributes Show response attributes object
    • statusCode number Required

      Status Code

    • messages array[string] Required

      List of error messages

    • exception object

      Exception

  • 200 application/json

    List collection response

    Hide response attributes Show response attributes object
    • status string Required

      Values are available, trials-globally-disabled, trials-disabled-for-class, no-lesson-thus-no-trial, or no-spaces-remaining.

    • spacesRemaining integer | null Required

      Number of spaces remaining (null = unlimited)

    • lesson object Required

      Lesson schema

      Hide lesson attributes Show lesson attributes object
      • companyId string

        Company ID

      • classId string Required

        Class ID

      • date string(date) Required
      • startTime string Required
      • endTime string Required
      • status string Required

        Values are active or inactive.

      • holidays array[object] Required

        Holiday schema

        Hide holidays attributes Show holidays attributes object
        • id string Required

          id

        • companyId string Required

          Company ID

        • name string Required

          Name

        • startAt string(date) Required

          Start At

        • endAt string(date) Required

          End At

        • createdAt string(date-time)

          Created at date

        • updatedAt string(date-time)

          Updated at date

      • adjustments array[object] Required

        Lesson Adjustment schema

        Hide adjustments attributes Show adjustments attributes object
        • id string Required

          Lesson adjustment ID

        • classId string Required

          Class ID

        • companyId string Required

          Company ID

        • reason string Required

          Values are cancelled-lesson, cancelled-class, changed-date, additional-lesson, or delayed-start-class.

        • type string Required

          Values are addition or deduction.

        • startAt string(date)

          Start date

        • endAt string(date)

          End date

        • time string | null Required

          Time

  • 403 application/json

    Not authorized

    Hide response attributes Show response attributes object

    Error schema

    • statusCode number Required

      Status Code

    • messages array[string] Required

      List of error messages

    • exception object

      Exception

GET /v1/trials/availability
curl \
 --request GET 'https://api.classmanager.io/v1/trials/availability'
Response examples (422)
{
  "statusCode": 42.0,
  "messages": [
    "string"
  ],
  "exception": {}
}
Response examples (200)
[
  {
    "status": "available",
    "spacesRemaining": 10,
    "lesson": {
      "companyId": "co_xxxxxxxxxxxxxxxxxxxxxxxxxx",
      "classId": "cls_xxxxxxxxxxxxxxxxxxxxxxxxxx",
      "date": "2022-01-01",
      "startTime": "13:30",
      "endTime": "14:30",
      "status": "active",
      "holidays": [
        {
          "id": "hol_xxxxxxxxxxx",
          "companyId": "co_123123123123",
          "name": "Christmas",
          "startAt": "2023-12-25",
          "endAt": "2023-12-25",
          "createdAt": "2023-12-05 14:30:41",
          "updatedAt": "2023-12-05 14:30:41"
        }
      ],
      "adjustments": [
        {
          "id": "lsad_xxxxxxxxxxxxxxxxxxxxxxxxxx",
          "classId": "cls_xxxxxxxxxxxxxxxxxxxxxxxxxx",
          "companyId": "co_xxxxxxxxxxxxxxxxxxxxxxxxxx",
          "reason": "cancelled-lesson",
          "type": "addition",
          "startAt": "2024-03-20",
          "endAt": "2024-03-20",
          "time": "21:30"
        }
      ]
    }
  }
]
Response examples (403)
{
  "statusCode": 42.0,
  "messages": [
    "string"
  ],
  "exception": {}
}