Edit Units
Endpoint used to edit the information of school units in your institution 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}' \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "<string>", "groups": [1, 2] }'Response Example
Section titled “Response Example”{ "success": true, "data": { "id": 1, "name": "<string>", "urlSlug": "<string>", "contractNumber": "<string>", "tags": [], "taxId": "<string>", "groups": [{ "id": 1, "name": "<string>" }], "subgroups": [], "specialties": [], "colorScheme": { "primary": "<string>", "secondary": "<string>", "buttonText": "<string>" }, "social": { "facebook": "<string>", "youtube": "<string>", "instagram": "<string>" }, "location": { "street": "<string>", "number": "<string>", "additionalDetails": "<string>", "district": "<string>", "city": "<string>", "state": "<string>", "zipCode": "<string>" }, "features": { "enableTeacherRegistration": true, "enableStudentRegistration": true, "enableGoogleLogin": false, "enableLoginByDocument": false, "enableLoginByEmail": true, "enableForum": true, "enableViewCounter": true, "enableRating": true, "isPartOfProgram": false, "enableReviews": true, "showSchoolIconInMenu": true, "showIconDetails": true, "replicateInstitutionMenuLinks": false, "displaySchoolAccessButton": true }, "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 unit to be edited. | Yes |
Body Parameters
Section titled “Body Parameters”| Parameter | Type | Description | Required |
|---|---|---|---|
name | string | Name of the unit to be edited. Maximum of 255 characters. | No |
contractNumber | string | Unit contract number. Must be unique. Maximum of 50 characters. | No |
tags | array | Array of strings with maximum of 10 elements, containing tags related to the school. | No |
taxId | string | Unit’s CNPJ (Brazilian tax ID). Must be a valid CNPJ. | No |
groups | number[] | Array containing group identifiers (Level 1 filters) of the institution. | No |
subgroups | number[] | Array containing subgroup identifiers (Level 2 filters) of the institution. | No |
specialties | number[] | Array containing specialty identifiers (Level 3 filters) of the institution. | No |
colorScheme | object | Object containing the color values to be used for the unit. | No |
location | object | Object containing the unit’s location data. | No |
features | object | Object containing the unit’s settings. | No |
Response description
Section titled “Response description”| Key | Type | Description |
|---|---|---|
success | boolean | Indicates if the request was successful. |
data | object | Details of the edited educational unit. |
data.id | number | Unique identifier of the unit. |
data.name | string | Name of the unit. |
data.urlSlug | string | URL slug of the unit. |
data.contractNumber | string | Contract number associated with the unit. |
data.tags | array | Tags associated with the unit. |
data.taxId | string | Tax identification number (CNPJ). |
data.groups | array | List of groups associated with the unit. |
data.subgroups | array | List of subgroups associated with the unit. |
data.specialties | array | List of specialties associated with the unit. |
data.colorScheme | object | Color scheme configuration. |
data.social | object | Social media information. |
data.location | object | Location details of the unit. |
data.features | object | Enabled features for the unit. |
data.createdAt | string | Date and time the unit was created. |
data.updatedAt | string | Date and time the unit 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.