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.

Parents (padres de familia) are the guardians or legal representatives of enrolled students. A parent account can be linked to one or more students through a PadreHijo relationship that records the type of kinship (padre, madre, tutor, abuelo, or otro). Once the link is established, the parent gains a read-only portal showing grades, attendance records, the class agenda, and the anecdotario for each of their children — all scoped to the current tenant.

The PadreFamilia Model

Parent identity fields (name, email) are stored on the linked user account and surfaced through the user relationship in every API response. Contact and professional details are stored directly on the parent record.
FieldTypeDescription
idintPrimary key, auto-assigned
namestringFull name (from the linked user account)
emailstringLogin e-mail (from the linked user account)
telefonostring?Optional contact phone number
ocupacionstring?Optional occupation or profession
{
  "id": 7,
  "telefono": "0999-123-456",
  "ocupacion": "Ingeniero",
  "user": {
    "name": "Roberto Mendoza",
    "email": "rmendoza@correo.com"
  }
}

The PadreHijo Relationship Model

The PadreHijo model represents the link between a parent and a student. It is returned when calling getMisHijos(), which hits GET /padre/mis-hijos from a logged-in parent session.
FieldTypeDescription
idintStudent’s primary key
nombrestringStudent’s full name
codigo_estudiantestringStudent’s unique code
parentescostringKinship type: padre, madre, tutor, abuelo, or otro
{
  "id": 34,
  "nombre": "Carlos Mendoza",
  "codigo_estudiante": "EST-2024-001",
  "parentesco": "padre"
}

Repository Methods

The PadreFamiliaRepository class handles all HTTP communication with the API. Every method uses the injected Dio client and the /padre-familias resource path.

List Parents

GET /api/padre-familiasReturns the full list of registered parents in the current tenant.

Create Parent

POST /api/padre-familiasCreates a new parent and their linked user account in a single request.

Get Parent

GET /api/padre-familias/:idFetches a single parent record by its numeric ID.

Update Parent

PUT /api/padre-familias/:idUpdates the parent’s profile. Pass null for password to keep the existing one.

Delete Parent

DELETE /api/padre-familias/:idPermanently removes the parent and their user account from the tenant.

Assign Student

POST /api/padre-familias/asignar-estudianteLinks a student to the parent with a specified kinship type.

Get Parent's Students

GET /api/padre-familias/:id/estudiantesReturns the list of students currently linked to the given parent.

My Children (parent session)

GET /api/padre/mis-hijosReturns the children linked to the currently authenticated parent, including kinship information.

createPadre

name
string
required
Full name of the parent or guardian.
email
string
required
Login e-mail address. Must be unique across the tenant.
password
string
required
Initial password for the parent’s user account. Required only on creation.
telefono
string
Optional contact phone number.
ocupacion
string
Optional occupation or profession of the parent.
Future<PadreFamilia> createPadre({
  required String name,
  required String email,
  required String password,
  String? telefono,
  String? ocupacion,
}) async {

  final response = await _dio.post('/padre-familias', data: {
    'name': name,
    'email': email,
    'password': password,
    'telefono': telefono,
    'ocupacion': ocupacion,
  });
  return PadreFamilia.fromJson(response.data['data']);
}

updatePadre

id
int
required
Numeric ID of the parent record to update.
name
string
required
Updated full name of the parent or guardian.
email
string
required
Updated login e-mail address.
password
string
New password. Pass null to leave the existing password unchanged.
telefono
string
Updated contact phone number. Pass null to clear the field.
ocupacion
string
Updated occupation or profession. Pass null to clear the field.
Future<PadreFamilia> updatePadre({
  required int id,
  required String name,
  required String email,
  String? password,
  String? telefono,
  String? ocupacion,
}) async {
  final response = await _dio.put(
    '/padre-familias/$id',
    data: {
      "name": name,
      "email": email,
      "password": password,
      "telefono": telefono,
      "ocupacion": ocupacion,
    },
  );

  return PadreFamilia.fromJson(
    response.data["data"],
  );
}

asignarEstudiante

padre_familia_id
int
required
ID of the parent to link the student to.
estudiante_id
int
required
ID of the student to link.
parentesco
string
Kinship type. Accepted values: padre, madre, tutor, abuelo, otro. Defaults to padre when omitted.
Future<void> asignarEstudiante({
  required int padreId,
  required int estudianteId,
  String? parentesco,
}) async {

  await _dio.post(
    '/padre-familias/asignar-estudiante',
    data: {
      "padre_familia_id": padreId,
      "estudiante_id": estudianteId,
      "parentesco": parentesco,
    },
  );
}

getMisHijos

Returns the children linked to the currently authenticated parent. The response body is read from the estudiantes key and each entry is decoded into a PadreHijo object.
Future<List<PadreHijo>> getMisHijos() async {

  final response = await _dio.get(
    "/padre/mis-hijos",
  );

  final List lista =
      response.data["estudiantes"];

  return lista
      .map((e) => PadreHijo.fromJson(e))
      .toList();
}

Linking a Parent to a Student

1

Create the parent account

Navigate to /padres/create and fill in the name, e-mail, password, and optional contact fields. On success, the parent is added to the tenant directory and can log in immediately.
2

Open the assign-student screen

From the parent list, tap the Assign Student action to navigate to /padres/:id/estudiantes. The screen loads the full list of registered students from GET /api/estudiantes.
3

Select a student and kinship

Choose the student from the dropdown and select the kinship type (padre, madre, tutor, abuelo, or otro). Tap Asignar Estudiante to confirm. This calls POST /api/padre-familias/asignar-estudiante.
4

Parent sees their child's data

After the link is created, the parent’s portal shows real-time data for that child: grades, attendance records, the class agenda, and anecdotario entries.
A parent can be linked to multiple students. Repeat steps 2–3 for each additional child. Each link is independent and carries its own parentesco value.

What Parents Can See

Once a student is linked to a parent, the parent’s authenticated session gives them read-only access to the following data for each child:

Grades

All scored assessments and final grades recorded by the teacher in the gradebook for the current academic period.

Attendance

Daily attendance records showing present, absent, and late entries for every class session.

Agenda & Tasks

Homework assignments and upcoming events published by the teacher on the class agenda.

Anecdotario

Behavioral and observational notes recorded by the teacher for the student throughout the period.

Application Routes

RouteScreenDescription
/padresPadreListScreenPaginated list of all registered parents
/padres/createPadreCreateScreenForm to register a new parent
/padres/:id/editPadreEditScreenForm to edit an existing parent’s profile
/padres/:id/estudiantesPadreAsignarEstudianteScreenAssign a student to the parent with kinship type
/mis-hijosMisHijosScreenAuthenticated parent’s view of their linked children
/mis-hijos/:estudianteIdPadreDashboardScreenDashboard for a specific child’s data
password is only required when creating a parent account. When updating, leave the password field empty to keep the existing credentials unchanged. The API only includes the field in the PUT payload when a new value is explicitly provided.

Build docs developers (and LLMs) love