Edit Classes
Endpoint used to change the code and title of a class, as well as associate it with groups, subgroups, and specialties in Toolzz LMS.
Warning: This endpoint will only work correctly if the domain of your institution is manually provided in the URL. Otherwise, the endpoint may fail or return a validation error.
Request Example
Section titled “Request Example”curl --request PUT \ --url 'https://{your-institution-domain}/api/v1/schools/{schoolId}/classrooms/{classroomId}' \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "title": "<string>", "code": "<string>", "type": "FILTER", "group": [1, 2], "subgroups": [1], "specialties": [1] }'Response Example
Section titled “Response Example”{ "success": true, "data": { "id": 1, "schoolId": "<string>", "title": "<string>", "code": "<string>", "image": null, "course": null, "group": [{ "id": 1, "name": "<string>" }], "subgroups": [{ "id": 1, "name": "<string>" }], "specialties": [{ "id": 1, "name": "<string>" }], "trails": [], "contents": [], "createdAt": "<string>", "updatedAt": "<string>" }}Request description
Section titled “Request description”Access Token
Section titled “Access Token”| Parameter | Type | Description | Required |
|---|---|---|---|
Authorization | String | Access token (“Bearer” must be before the token) | Yes |
URL Parameters (Path)
Section titled “URL Parameters (Path)”| Parameter | Type | Description | Required |
|---|---|---|---|
schoolId | string | Identifier of the school to which the class to be edited is associated. | Yes |
classroomId | string | Identifier of the class to be edited. | No |
Body Parameters
Section titled “Body Parameters”| Parameter | Type | Description | Required |
|---|---|---|---|
title | string | Class title. | No |
code | string | Class code. | No |
type | enum | Type of class to be edited. FILTER: standard platform class, related to exclusive content with the same filters. EXCLUSIVE_CONTENT. | No |
group | array | ID of one or more institution groups to be linked to the class. | No |
subgroups | array | ID of one or more institution subgroups to be linked to the class. | No |
specialties | array | ID of one or more institution specialties to be linked to the class. | No |
contents | array | Content items associated with the class. | No |
Response description
Section titled “Response description”| Key | Type | Description |
|---|---|---|
success | boolean | Indicates if the request was successful. |
data | object | Details of the edited class. |
data.id | number | Unique identifier of the class. |
data.schoolId | string | Identifier of the associated school. |
data.title | string | Class title. |
data.code | string | Class code. |
data.image | string | Class image URL (may be null). |
data.course | string | Name of the associated course (may be null). |
data.group | array | List of groups associated with the class. |
data.subgroups | array | List of subgroups associated with the class. |
data.specialties | array | List of specialties associated with the class. |
data.trails | array | List of trails associated with the class. |
data.contents | array | List of content items associated with the class. |
data.createdAt | string | Date and time the class was created. |
data.updatedAt | string | Date and time the class was last updated. |
Security
Section titled “Security”To access this endpoint, it is necessary to send a valid access token through the authorization header (Authorization) of the request. Additionally, the API is protected by other security measures to safeguard user data.