Student Enrollments
Endpoint used to retrieve the existing enrollments for a specific student in Toolzz LMS.
Request Example
Section titled “Request Example”curl --request GET \ --url 'https://kong.api.toolzz.com.br/api/users/courses?by=email&value=student@example.com' \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "institution_code": "myinstitution" }'Response Example
Section titled “Response Example”{ "data": { "id": 1, "uuid": "<string>", "name": "<string>", "email": "<string>", "cpf": "<string>", "enrollment_start_date": "<string>", "enrollment_end_date": "<string>", "created_at": "<string>", "updated_at": "<string>", "ultima_atividade": "<string>", "school": { "id": 1, "titulo": "<string>" }, "address": { "id": 1, "address_id": 1, "cep": "<string>", "uf": "<string>", "cidade": "<string>", "bairro": "<string>", "logradouro": "<string>", "numero": "<string>", "complemento": "<string>" }, "custom_form": [ { "enunciado": "<string>", "pergunta_id": 1, "resposta": "<string>" } ], "institution": [ { "id": 1, "subdomain": "<string>", "titulo": "<string>" } ] }}Warning: The
enrollment_start_datewill be ignored for courses that do not use this configuration. Only applicable to specific platform components.
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 (Query)
Section titled “URL Parameters (Query)”| Parameter | Type | Description | Required |
|---|---|---|---|
by | string | Can be "email" or "id". | Yes |
value | string | Value according to the by option. Can be a user’s email or ID. | Yes |
Body Parameters
Section titled “Body Parameters”| Parameter | Type | Description | Required |
|---|---|---|---|
institution_code | string | Your institution subdomain, as it appears in the original URL. | Yes |
Response description
Section titled “Response description”| Key | Type | Description |
|---|---|---|
data | object | User profile details. |
data.id | number | Unique identifier of the user. |
data.uuid | string | Universal unique identifier (UUID) of the user. |
data.name | string | Full name of the user. |
data.email | string | User email address. |
data.cpf | string | CPF. |
data.enrollment_start_date | string | Student enrollment start date (YYYY-MM-DD format). Ignored if the course does not support this parameter. |
data.enrollment_end_date | string | Student enrollment end date (YYYY-MM-DD format). Stored as matriculas.data_validade. |
data.created_at | string | Date and time the user was created. |
data.updated_at | string | Date and time of the last profile update. |
data.ultima_atividade | string | Date and time of the user’s last activity. |
data.school | object | School information. |
data.school.id | number | Unique identifier of the school. |
data.school.titulo | string | School name. |
data.address | object | User address details. |
data.address.cep | string | ZIP code. |
data.address.uf | string | State abbreviation. |
data.address.cidade | string | City name. |
data.address.bairro | string | Neighborhood name. |
data.address.logradouro | string | Street name. |
data.address.numero | string | Residence or apartment number. |
data.address.complemento | string | Address complement. |
data.custom_form | array | List of custom questions and answers. |
data.institution | array | List of institutions associated with the user. |
Validations
Section titled “Validations”If enrollment_end_date is earlier than enrollment_start_date, the request will be rejected with the following error:
{ "error": "End date cannot be previous to Start date"}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.