Documentation Index
Fetch the complete documentation index at: https://mintlify.com/iamalexis689725/cole/llms.txt
Use this file to discover all available pages before exploring further.
The Parent Portal API covers two distinct sets of functionality: school directors who manage parent accounts and link children to those accounts, and parents themselves who authenticate and access live data about each of their children — tasks, grades, attendance records, and behavioral notes. All routes are scoped to the authenticated user’s tenant, so data from one school is never visible to another.
All endpoints require a valid Sanctum bearer token obtained through the authentication flow. Role enforcement is handled by the role:director and role:padre middleware respectively.
Director-Managed Endpoints
All endpoints in this section require the authenticated user to hold the director role. Requests made with any other role will receive a 403 Forbidden response.
List All Parents
Returns all parent-family records in the current tenant, including each parent’s linked user account and their associated children.
curl example
curl -X GET https://your-domain.com/api/padre-familias \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
Sample response
[
{
"id": 1,
"user_id": 12,
"telefono": "555-1234",
"ocupacion": "Ingeniero",
"tenant_id": 1,
"user": {
"id": 12,
"name": "Carlos Ramírez",
"email": "carlos@example.com"
},
"estudiantes": [
{
"id": 3,
"codigo_estudiante": "EST-001",
"user": { "id": 15, "name": "Daniela Ramírez" },
"pivot": { "parentesco": "padre" }
}
]
}
]
Create a Parent Account
Creates a new user account with the padre role and its associated parent-family record. The user is automatically scoped to the director’s tenant.
Email address. Must be unique across the users table.
Minimum 6 characters. Stored as a bcrypt hash.
Contact phone number for the parent.
Parent’s occupation or profession.
curl example
curl -X POST https://your-domain.com/api/padre-familias \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"name": "María López",
"email": "maria@example.com",
"password": "secret123",
"telefono": "555-9876",
"ocupacion": "Médica"
}'
Sample response 201 Created
{
"message": "Padre de familia creado correctamente",
"data": {
"id": 2,
"user_id": 18,
"telefono": "555-9876",
"ocupacion": "Médica",
"tenant_id": 1,
"user": {
"id": 18,
"name": "María López",
"email": "maria@example.com"
}
}
}
Get a Single Parent
GET /api/padre-familias/{id}
Returns a single parent-family record with its linked user and children.
The ID of the parent-family record.
curl example
curl -X GET https://your-domain.com/api/padre-familias/2 \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
Update a Parent Account
PUT /api/padre-familias/{id}
Partially or fully updates a parent’s user account and profile data. All fields are optional; only the ones provided are changed.
The ID of the parent-family record to update.
Updated email address. Must remain unique.
New password. Minimum 6 characters. Pass only when changing.
curl example
curl -X PUT https://your-domain.com/api/padre-familias/2 \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"telefono": "555-0001",
"ocupacion": "Arquitecta"
}'
Sample response
{
"message": "Padre de familia actualizado correctamente",
"data": {
"id": 2,
"telefono": "555-0001",
"ocupacion": "Arquitecta",
"user": {
"id": 18,
"name": "María López",
"email": "maria@example.com"
}
}
}
Delete a Parent Account
DELETE /api/padre-familias/{id}
Removes the parent-family record, strips the padre role from the associated user, deletes all student–parent relationships from the pivot table, and deletes the user account. This operation is irreversible.
The ID of the parent-family record to delete.
curl example
curl -X DELETE https://your-domain.com/api/padre-familias/2 \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
Sample response
{
"message": "Padre de familia eliminado correctamente"
}
Link a Child to a Parent
POST /api/padre-familias/asignar-estudiante
Creates a relationship between a parent-family record and a student record. Both records must belong to the same tenant. Attempting to link a student who is already assigned to the same parent returns 409 Conflict.
The ID of the parent-family record. Must exist in the current tenant.
The ID of the student record. Must exist in the current tenant.
Relationship type. Allowed values: padre, madre, tutor, abuelo, otro.
curl example
curl -X POST https://your-domain.com/api/padre-familias/asignar-estudiante \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"padre_familia_id": 1,
"estudiante_id": 3,
"parentesco": "madre"
}'
Sample response 201 Created
{
"message": "Estudiante asignado correctamente",
"data": {
"id": 7,
"padre_familia_id": 1,
"estudiante_id": 3,
"parentesco": "madre"
}
}
List a Parent’s Children
GET /api/padre-familias/{id}/estudiantes
Returns all children linked to a given parent, along with each child’s student code and the recorded relationship type.
The ID of the parent-family record.
curl example
curl -X GET https://your-domain.com/api/padre-familias/1/estudiantes \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
Sample response
{
"padre": {
"id": 1,
"nombre": "Carlos Ramírez"
},
"estudiantes": [
{
"id": 3,
"nombre": "Daniela Ramírez",
"codigo_estudiante": "EST-001",
"parentesco": "padre"
}
]
}
Parent Portal Endpoints
All endpoints in this section require the authenticated user to hold the padre role. Each parent can only access data for the children that have been explicitly linked to their own account.
List Own Children
Returns the authenticated parent’s profile and the full list of linked children with their student codes and relationship types.
curl example
curl -X GET https://your-domain.com/api/padre/mis-hijos \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
Sample response
{
"padre": {
"id": 1,
"nombre": "Carlos Ramírez"
},
"estudiantes": [
{
"id": 3,
"nombre": "Daniela Ramírez",
"codigo_estudiante": "EST-001",
"parentesco": "padre"
},
{
"id": 7,
"nombre": "Tomás Ramírez",
"codigo_estudiante": "EST-008",
"parentesco": "padre"
}
]
}
The authenticated parent’s basic information.Internal ID of the parent-family record.
Display name of the parent, sourced from the linked user account.
Array of children linked to this parent.Internal ID of the student record.
estudiantes[].codigo_estudiante
The school-assigned student code.
Relationship type: padre, madre, tutor, abuelo, or otro.
All Pending Tasks Across Children
GET /api/padre/mis-hijos/agendas
Returns a grouped list of all agenda entries (tasks and exams) for every child linked to the authenticated parent. Each element in the array corresponds to one child and includes that child’s pending agenda items with attached files.
curl example
curl -X GET https://your-domain.com/api/padre/mis-hijos/agendas \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
Sample response
[
{
"estudiante": {
"id": 3,
"nombre": "Daniela Ramírez",
"codigo_estudiante": "EST-001"
},
"agendas": [
{
"id": 12,
"titulo": "Tarea de Matemáticas",
"descripcion": "Ejercicios del capítulo 4",
"tipo": "tarea",
"fecha_entrega": "2026-05-10",
"materia": "Matemáticas",
"archivos": [
{
"id": 5,
"nombre_original": "capitulo4.pdf",
"url": "/storage/agendas/capitulo4.pdf"
}
]
}
]
}
]
Agenda for a Specific Child
GET /api/padre/mis-hijos/{estudianteId}/agendas
Returns all agenda entries for a single child. The API verifies that the given student is actually linked to the authenticated parent before returning data; an unlinked student ID returns 403 Forbidden.
The ID of the child whose agenda you want to retrieve.
curl example
curl -X GET https://your-domain.com/api/padre/mis-hijos/3/agendas \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
Sample response
{
"estudiante": {
"id": 3,
"nombre": "Daniela Ramírez",
"codigo_estudiante": "EST-001"
},
"agendas": [
{
"id": 12,
"titulo": "Tarea de Matemáticas",
"descripcion": "Ejercicios del capítulo 4",
"tipo": "tarea",
"fecha_entrega": "2026-05-10",
"materia": "Matemáticas",
"archivos": []
}
]
}
Grades / Report Card for a Child
GET /api/padre/mis-hijos/{estudiante}/notas
Returns the full academic report card (boleta) for a child, broken down by evaluation period. Within each period, every subject is listed with its weighted average. A general average across all subjects is also calculated per period. The API verifies child ownership before returning any data.
curl example
curl -X GET https://your-domain.com/api/padre/mis-hijos/3/notas \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
Sample response
{
"estudiante": {
"id": 3,
"nombre": "Daniela Ramírez"
},
"periodos": [
{
"periodo": "Primer Quimestre",
"materias": [
{ "materia": "Matemáticas", "promedio": 8.75 },
{ "materia": "Lengua", "promedio": 9.10 }
],
"promedio_general": 8.93
},
{
"periodo": "Segundo Quimestre",
"materias": [
{ "materia": "Matemáticas", "promedio": 7.80 },
{ "materia": "Lengua", "promedio": 9.00 }
],
"promedio_general": 8.40
}
]
}
Behavioral Records (Anecdotario) for a Child
GET /api/padre/mis-hijos/{estudiante}/anecdotarios
Returns all anecdotal (behavioral observation) records filed by teachers for the given child, sorted by date descending. Each record includes the responsible teacher, the subject, and the academic period in which it was recorded.
curl example
curl -X GET https://your-domain.com/api/padre/mis-hijos/3/anecdotarios \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
Sample response
[
{
"id": 4,
"fecha": "2026-04-15",
"descripcion": "Participa activamente en clase.",
"tipo": "positivo",
"estudiante_id": 3,
"profesor": {
"user": { "name": "Prof. Ana Torres" }
},
"asignacion_docente": {
"subject": { "name": "Ciencias Naturales" }
},
"academic_period": { "nombre": "Primer Quimestre" }
}
]
Attendance Records for a Child
GET /api/padre/hijos/{estudiante}/asistencias
Returns all recorded absences (faltas) for the given child. Results can be filtered by subject name using the materia query parameter. The response also includes a deduplicated list of subjects that have at least one absence, suitable for populating a filter dropdown in a client application.
Optional. Filter absences by subject name (exact match, case-sensitive as stored).
curl example
curl -X GET "https://your-domain.com/api/padre/hijos/3/asistencias?materia=Matemáticas" \
-H "Authorization: Bearer {token}" \
-H "Accept: application/json"
Sample response
{
"materias": ["Matemáticas", "Lengua"],
"total_faltas": 2,
"faltas": [
{
"fecha": "2026-04-03",
"materia": "Matemáticas"
},
{
"fecha": "2026-03-20",
"materia": "Matemáticas"
}
]
}
Deduplicated list of subject names in which the student has at least one absence. Useful for building a subject filter UI.
Total number of absences matching the current filter (or all absences if no filter is applied).
Array of individual absence records.Date of the absence in YYYY-MM-DD format.
Subject name for the absent session.