Overview
The Institutions API allows you to manage educational institutions, including their contact information, academic year configuration, and institutional details.
Endpoints
Method Endpoint Description GET /api/institutionsList all institutions POST /api/institutionsCreate a new institution GET /api/institutions/{id}Get a specific institution PUT /api/institutions/{id}Update an institution DELETE /api/institutions/{id}Delete an institution
List All Institutions
curl -X GET "https://api.example.com/api/institutions" \
-H "Accept: application/json" \
-H "Authorization: Bearer YOUR_TOKEN"
Response
Indicates if the request was successful
Response message in Spanish
Array of institution objects Unique identifier for the institution
Physical address of the institution
URL to the institution’s logo image
Current academic year (e.g., 2026)
Academic year start date (YYYY-MM-DD)
Academic year end date (YYYY-MM-DD)
Record creation timestamp
Record last update timestamp
{
"success" : true ,
"message" : "Instituciones listadas con éxito" ,
"data" : [
{
"id" : 1 ,
"nombre" : "Instituto Educativo San Martín" ,
"direccion" : "Av. Principal 123, Lima" ,
"telefono" : "+51 1 234 5678" ,
"email" : "[email protected] " ,
"logo_url" : "https://example.com/logos/sanmartin.png" ,
"anio_academico" : 2026 ,
"fecha_inicio" : "2026-03-01" ,
"fecha_fin" : "2026-12-20" ,
"created_at" : "2026-03-05T10:30:00.000000Z" ,
"updated_at" : "2026-03-05T10:30:00.000000Z"
}
]
}
Create Institution
curl -X POST "https://api.example.com/api/institutions" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"nombre": "Colegio Nacional Bolognesi",
"direccion": "Jr. Bolognesi 456, Arequipa",
"telefono": "+51 54 123456",
"email": "[email protected] ",
"logo_url": "https://example.com/logos/bolognesi.png",
"anio_academico": 2026,
"fecha_inicio": "2026-03-15",
"fecha_fin": "2026-12-15"
}'
Request Parameters
Physical address of the institution
URL to the institution’s logo image. Can be null.
Academic year (e.g., 2026). Must be a valid year number.
Academic year start date in YYYY-MM-DD format
Academic year end date in YYYY-MM-DD format
Response
{
"success" : true ,
"message" : "Institución creada con éxito" ,
"data" : {
"id" : 2 ,
"nombre" : "Colegio Nacional Bolognesi" ,
"direccion" : "Jr. Bolognesi 456, Arequipa" ,
"telefono" : "+51 54 123456" ,
"email" : "[email protected] " ,
"logo_url" : "https://example.com/logos/bolognesi.png" ,
"anio_academico" : 2026 ,
"fecha_inicio" : "2026-03-15" ,
"fecha_fin" : "2026-12-15" ,
"created_at" : "2026-03-05T11:15:00.000000Z" ,
"updated_at" : "2026-03-05T11:15:00.000000Z"
}
}
Get Institution
GET /api/institutions/{id}
curl -X GET "https://api.example.com/api/institutions/1" \
-H "Accept: application/json" \
-H "Authorization: Bearer YOUR_TOKEN"
Path Parameters
The unique identifier of the institution
Response
{
"success" : true ,
"message" : "Institución obtenida con éxito" ,
"data" : {
"id" : 1 ,
"nombre" : "Instituto Educativo San Martín" ,
"direccion" : "Av. Principal 123, Lima" ,
"telefono" : "+51 1 234 5678" ,
"email" : "[email protected] " ,
"logo_url" : "https://example.com/logos/sanmartin.png" ,
"anio_academico" : 2026 ,
"fecha_inicio" : "2026-03-01" ,
"fecha_fin" : "2026-12-20" ,
"created_at" : "2026-03-05T10:30:00.000000Z" ,
"updated_at" : "2026-03-05T10:30:00.000000Z"
}
}
Update Institution
PUT /api/institutions/{id}
curl -X PUT "https://api.example.com/api/institutions/1" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN" \
-d '{
"nombre": "Instituto Educativo San Martín de Porres",
"direccion": "Av. Principal 123, Lima",
"telefono": "+51 1 234 5679",
"email": "[email protected] ",
"logo_url": "https://example.com/logos/sanmartin-new.png",
"anio_academico": 2026,
"fecha_inicio": "2026-03-01",
"fecha_fin": "2026-12-20"
}'
Path Parameters
The unique identifier of the institution to update
Request Parameters
All parameters from the Create endpoint apply. You can send partial updates.
Physical address of the institution
URL to the institution’s logo image
Academic year start date (YYYY-MM-DD)
Academic year end date (YYYY-MM-DD)
Response
{
"success" : true ,
"message" : "Institución actualizada con éxito" ,
"data" : {
"id" : 1 ,
"nombre" : "Instituto Educativo San Martín de Porres" ,
"direccion" : "Av. Principal 123, Lima" ,
"telefono" : "+51 1 234 5679" ,
"email" : "[email protected] " ,
"logo_url" : "https://example.com/logos/sanmartin-new.png" ,
"anio_academico" : 2026 ,
"fecha_inicio" : "2026-03-01" ,
"fecha_fin" : "2026-12-20" ,
"created_at" : "2026-03-05T10:30:00.000000Z" ,
"updated_at" : "2026-03-05T14:20:00.000000Z"
}
}
Delete Institution
DELETE /api/institutions/{id}
curl -X DELETE "https://api.example.com/api/institutions/1" \
-H "Accept: application/json" \
-H "Authorization: Bearer YOUR_TOKEN"
Path Parameters
The unique identifier of the institution to delete
Response
{
"success" : true ,
"message" : "Institución eliminada con éxito" ,
"data" : null
}
Deleting an institution will cascade delete all associated users and registrations due to foreign key constraints.