Query parameters

  • page number

    Current page

  • pageSize number

    Number of items per page

  • selectAll boolean

    Determines if all items are selected

  • where object

    App\Classes\Enrolments\Models\Enrolment Filters: 0, 1, 2

    Hide where attributes Show where attributes object
  • sort object

    App\Classes\Enrolments\Models\Enrolment Sorting by

Responses

  • 200 application/json

    Paginated response

    Hide response attributes Show response attributes object
    • data array[object] Required

      Enrolment with related adjustments

      Hide data attributes Show data attributes object
      • enrolment object Required

        Enrolment schema

        Hide enrolment attributes Show enrolment attributes object
        • id string Required

          Enrolment ID

        • companyId string Required

          Company ID

        • classId string Required

          Class ID

        • studentId string Required

          Student ID

        • startAt string(date) | null Required

          Start At

        • endAt string(date) | null Required

          End At

      • adjustments array[object] Required

        Enrolment adjustments

        Enrolment Adjustment schema

        Hide adjustments attributes Show adjustments attributes object
        • id string Required

          Enrolment adjustment ID

        • classId string Required

          Class ID

        • studentId string Required

          Student ID

        • companyId string Required

          Company ID

        • reason string Required

          Values are make-up-lesson, delayed-start-enrolment, or cancelled-enrolment.

        • type string Required

          Values are addition or deduction.

        • startAt string(date) Required

          Start date

        • endAt string(date) Required

          End date

        • time string(time) | null Required

          Time

    • pagination object Required

      Pagination schema

      Hide pagination attributes Show pagination attributes object
      • total integer Required

        Total number of items

      • count integer Required

        Number of items on this page

      • perPage integer

        Number of items per page

      • currentPage integer

        Current page number

      • totalPages integer

        Total number of pages

  • 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/enrolments/
curl \
 --request GET 'https://localhost/v1/enrolments/'
Response examples (200)
{
  "data": [
    {
      "enrolment": {
        "id": "enr_xxxxxxxxxxxxxxxxxxxxxxxxxx",
        "companyId": "co_xxxxxxxxxxxxxxxxxxxxxxxxxx",
        "classId": "cls_xxxxxxxxxxxxxxxxxxxxxxxxxx",
        "studentId": "stu_xxxxxxxxxxxxxxxxxxxxxxxxxx",
        "startAt": "2023-12-05",
        "endAt": "2023-12-05"
      },
      "adjustments": [
        {
          "id": "enad_xxxxxxxxxxxxxxxxxxxxxxxxxx",
          "classId": "cls_xxxxxxxxxxxxxxxxxxxxxxxxxx",
          "studentId": "stu_xxxxxxxxxxxxxxxxxxxxxxxxxx",
          "companyId": "co_xxxxxxxxxxxxxxxxxxxxxxxxxx",
          "reason": "make-up-lesson",
          "type": "addition",
          "startAt": "2023-12-05",
          "endAt": "2023-12-05",
          "time": "23:15"
        }
      ]
    }
  ],
  "pagination": {
    "total": 15,
    "count": 10,
    "perPage": 10,
    "currentPage": 1,
    "totalPages": 2
  }
}
Response examples (403)
{
  "statusCode": 42.0,
  "messages": [
    "string"
  ],
  "exception": {}
}