POST /v1/enrolments/

Create Enrolment

application/json

Body Required

Request for creating a new enrolment

  • studentId string Required

    Student ID

  • classId string Required

    Class ID

  • pricingPlanId string

    Pricing plan ID

  • startAt string(date) Required

    Start at

  • endAt string(date) Required

    End at

Responses

  • 200 application/json

    successful operation

    Hide response attributes Show response 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

  • 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

  • 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

POST /v1/enrolments/
curl \
 --request POST 'https://api-dev.classmanager.io/v1/enrolments/' \
 --header "Content-Type: application/json" \
 --data '[{"studentId":"stu_123123123123","classId":"cls_123123123123","pricingPlanId":"pp_123123123123","startAt":"2024-03-20","endAt":"2024-03-20"}]'
Request examples
[
  {
    "studentId": "stu_123123123123",
    "classId": "cls_123123123123",
    "pricingPlanId": "pp_123123123123",
    "startAt": "2024-03-20",
    "endAt": "2024-03-20"
  }
]
Response examples (200)
[
  {
    "id": "enr_xxxxxxxxxxxxxxxxxxxxxxxxxx",
    "companyId": "co_xxxxxxxxxxxxxxxxxxxxxxxxxx",
    "classId": "cls_xxxxxxxxxxxxxxxxxxxxxxxxxx",
    "studentId": "stu_xxxxxxxxxxxxxxxxxxxxxxxxxx",
    "startAt": "2023-12-05",
    "endAt": "2023-12-05"
  }
]
Response examples (403)
{
  "statusCode": 42.0,
  "messages": [
    "string"
  ],
  "exception": {}
}
Response examples (422)
{
  "statusCode": 42.0,
  "messages": [
    "string"
  ],
  "exception": {}
}