Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/andrespaul123/micole-flutter/llms.txt

Use this file to discover all available pages before exploring further.

Mi Cole distinguishes three user types under a tenant: teachers (profesores), students (estudiantes), and parents (padres de familia). Each type shares a common user sub-object that holds name and email, while the type-specific record carries fields like codigo_profesor, codigo_estudiante, or telefono. All endpoints require Authorization: Bearer <token> and are scoped to the authenticated tenant.

Teachers (Profesores)

GET /api/profesores

List all teachers registered in the tenant.
curl http://<your-server>/api/profesores \
  -H "Authorization: Bearer <token>"
Response — 200 OK
[
  {
    "id": 3,
    "codigo_profesor": "PRF-001",
    "especialidad": "Matemáticas",
    "user": {
      "name": "Jorge Ramírez",
      "email": "jorge@colegio.edu"
    }
  }
]

POST /api/profesores

Create a new teacher account.
curl -X POST http://<your-server>/api/profesores \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Jorge Ramírez",
    "email": "jorge@colegio.edu",
    "password": "secure_pass",
    "codigo_profesor": "PRF-001",
    "especialidad": "Matemáticas"
  }'
name
string
required
Full name of the teacher.
email
string
required
E-mail address used for login. Must be unique within the platform.
password
string
required
Initial plain-text password for the teacher’s account.
codigo_profesor
string
required
Institutional code that uniquely identifies the teacher within the school (e.g. "PRF-001").
especialidad
string
Area of specialisation (e.g. "Matemáticas", "Lengua"). Optional.
Response — 201 Created Returns the created Profesor object inside data.

GET /api/profesores/:id

Retrieve a single teacher’s profile.
curl http://<your-server>/api/profesores/3 \
  -H "Authorization: Bearer <token>"
id
integer
required
ID of the teacher record.
Response — 200 OK Returns a Profesor object.

PUT /api/profesores/:id

Update a teacher’s profile. Only password is optional; omit it to keep the existing password.
curl -X PUT http://<your-server>/api/profesores/3 \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Jorge Ramírez M.",
    "email": "jorge.ramirez@colegio.edu",
    "codigo_profesor": "PRF-001",
    "especialidad": "Matemáticas y Física"
  }'
id
integer
required
ID of the teacher to update.
name
string
required
Updated full name.
email
string
required
Updated e-mail address.
password
string
New password. Omit this field to keep the existing password unchanged.
codigo_profesor
string
required
Updated institutional code.
especialidad
string
Updated specialisation.
Response — 200 OK Returns the updated Profesor object.

DELETE /api/profesores/:id

Remove a teacher account from the tenant.
curl -X DELETE http://<your-server>/api/profesores/3 \
  -H "Authorization: Bearer <token>"
id
integer
required
ID of the teacher to delete.
Response — 204 No Content

POST /api/profesores/asignar-materia

Assign a subject to a teacher, enabling them to be allocated to class assignments for that subject.
curl -X POST http://<your-server>/api/profesores/asignar-materia \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "profesor_id": 3,
    "subject_id": 1
  }'
profesor_id
integer
required
ID of the teacher.
subject_id
integer
required
ID of the subject to assign.
Response — 200 OK

GET /api/profesores/:id/subjects

List all subjects currently assigned to a teacher.
curl http://<your-server>/api/profesores/3/subjects \
  -H "Authorization: Bearer <token>"
id
integer
required
ID of the teacher.
Response — 200 OK Returns { "data": [ ...Subject[] ] }.

Students (Estudiantes)

GET /api/estudiantes

List all students registered in the tenant.
curl http://<your-server>/api/estudiantes \
  -H "Authorization: Bearer <token>"
Response — 200 OK
[
  {
    "id": 12,
    "codigo_estudiante": "EST-042",
    "user": {
      "name": "María González",
      "email": "maria@colegio.edu"
    }
  }
]

POST /api/estudiantes

Create a new student account.
curl -X POST http://<your-server>/api/estudiantes \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "María González",
    "email": "maria@colegio.edu",
    "password": "estudiante_pass",
    "codigo_estudiante": "EST-042"
  }'
name
string
required
Full name of the student.
email
string
required
E-mail address for the student’s login account.
password
string
required
Initial plain-text password.
codigo_estudiante
string
required
Institutional student code (e.g. "EST-042").
Response — 201 Created Returns the created Estudiante object inside data.

GET /api/estudiantes/:id

Retrieve a single student’s profile.
curl http://<your-server>/api/estudiantes/12 \
  -H "Authorization: Bearer <token>"
id
integer
required
ID of the student record.
Response — 200 OK Returns an Estudiante object.

PUT /api/estudiantes/:id

Update a student’s profile.
curl -X PUT http://<your-server>/api/estudiantes/12 \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "María González López",
    "email": "maria.gonzalez@colegio.edu",
    "codigo_estudiante": "EST-042"
  }'
id
integer
required
ID of the student to update.
name
string
required
Updated full name.
email
string
required
Updated e-mail address.
codigo_estudiante
string
required
Updated institutional student code.
password
string
New password. Omit to keep the existing password unchanged.
Response — 200 OK Returns the updated Estudiante object inside data.

DELETE /api/estudiantes/:id

Remove a student account from the tenant.
curl -X DELETE http://<your-server>/api/estudiantes/12 \
  -H "Authorization: Bearer <token>"
id
integer
required
ID of the student to delete.
Response — 204 No Content

Parents (Padres de Familia)

GET /api/padre-familias

List all parents registered in the tenant.
curl http://<your-server>/api/padre-familias \
  -H "Authorization: Bearer <token>"
Response — 200 OK
[
  {
    "id": 8,
    "telefono": "+593987654321",
    "ocupacion": "Ingeniero",
    "user": {
      "name": "Roberto González",
      "email": "roberto@example.com"
    }
  }
]

POST /api/padre-familias

Create a new parent account.
curl -X POST http://<your-server>/api/padre-familias \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Roberto González",
    "email": "roberto@example.com",
    "password": "padre_pass",
    "telefono": "+593987654321",
    "ocupacion": "Ingeniero"
  }'
name
string
required
Full name of the parent.
email
string
required
E-mail address for the parent’s login account.
password
string
required
Initial plain-text password.
telefono
string
Contact phone number. Optional.
ocupacion
string
Parent’s occupation or profession. Optional.
Response — 201 Created Returns the created PadreFamilia object inside data.

GET /api/padre-familias/:id

Retrieve a single parent’s profile.
curl http://<your-server>/api/padre-familias/8 \
  -H "Authorization: Bearer <token>"
id
integer
required
ID of the parent record.
Response — 200 OK Returns a PadreFamilia object.

PUT /api/padre-familias/:id

Update a parent’s profile.
curl -X PUT http://<your-server>/api/padre-familias/8 \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Roberto González V.",
    "email": "roberto.g@example.com",
    "telefono": "+593912345678",
    "ocupacion": "Arquitecto"
  }'
id
integer
required
ID of the parent to update.
name
string
required
Updated full name.
email
string
required
Updated e-mail address.
password
string
New password. Omit to keep the existing password unchanged.
telefono
string
Updated phone number.
ocupacion
string
Updated occupation.
Response — 200 OK Returns the updated PadreFamilia object inside data.

DELETE /api/padre-familias/:id

Remove a parent account from the tenant.
curl -X DELETE http://<your-server>/api/padre-familias/8 \
  -H "Authorization: Bearer <token>"
id
integer
required
ID of the parent to delete.
Response — 204 No Content

POST /api/padre-familias/asignar-estudiante

Link a student to a parent, recording the family relationship.
curl -X POST http://<your-server>/api/padre-familias/asignar-estudiante \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "padre_familia_id": 8,
    "estudiante_id": 12,
    "parentesco": "padre"
  }'
padre_familia_id
integer
required
ID of the parent.
estudiante_id
integer
required
ID of the student to link.
parentesco
string
Relationship label (e.g. "padre", "madre", "tutor"). Optional.
Response — 200 OK

GET /api/padre-familias/:id/estudiantes

List all students linked to a parent.
curl http://<your-server>/api/padre-familias/8/estudiantes \
  -H "Authorization: Bearer <token>"
id
integer
required
ID of the parent.
Response — 200 OK Returns { "estudiantes": [ ...Estudiante[] ] }.

GET /api/padre/mis-hijos

Authenticated parent endpoint — returns the children linked to the currently logged-in parent, including the relationship type.
curl http://<your-server>/api/padre/mis-hijos \
  -H "Authorization: Bearer <token>"
Response — 200 OK
{
  "estudiantes": [
    {
      "id": 12,
      "nombre": "María González",
      "codigo_estudiante": "EST-042",
      "parentesco": "padre"
    }
  ]
}
estudiantes
PadreHijo[]
Array of linked children.

Profesor Model

id
integer
Unique identifier for the teacher record.
codigo_profesor
string
Institutional code assigned to the teacher.
especialidad
string | null
The teacher’s area of specialisation.
name
string
Full name, read from the nested user object.
email
string
E-mail address, read from the nested user object.

Estudiante Model

id
integer
Unique identifier for the student record.
codigo_estudiante
string
Institutional code assigned to the student.
name
string
Full name, read from the nested user object.
email
string | null
E-mail address, read from the nested user object.

Build docs developers (and LLMs) love