Create Class

POST /classes

Create class

application/json

Body Required

  • class object Required

    If an Academic Year ID is not provided it will default to the current Academic Year

    Hide class attributes Show class attributes object
    • name string Required

      The name of the class

    • description string

      Optional class description

    • academicYearId string(uuid)

      Academic Year UUID.

Responses

  • 201 application/json

    Class created successfully.

    Hide response attribute Show response attribute object
    • class object Required
      Hide class attributes Show class attributes object
      • classId string(uuid) Required

        Class UUID.

      • name string Required

        The name of the class

      • description string

        Optional class description

      • academicYearId string(uuid) Required

        Academic Year UUID.

  • 400

    Invalid request.

  • 401

    Invalid authentication credentials

  • 403

    Not authorised to access this resource

  • 409

    Class already exists.

POST /classes
curl \
 --request POST 'https://connect.century.tech/api/v1/classes' \
 --header "x-api-key: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"class":{"name":"Algebra 101","description":"An introductory course to Algebra","academicYearId":"dccd109a-08ca-4a18-a277-4653ba726316"}}'
Request examples
{
  "class": {
    "name": "Algebra 101",
    "description": "An introductory course to Algebra",
    "academicYearId": "dccd109a-08ca-4a18-a277-4653ba726316"
  }
}
Response examples (201)
{
  "class": {
    "name": "Algebra 101",
    "classId": "c81fd38c-03f6-4b68-8720-84a7233e89de",
    "description": "An introductory course to Algebra",
    "academicYearId": "dccd109a-08ca-4a18-a277-4653ba726316"
  }
}