Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Luisanchez0/modulo_Horario/llms.txt

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

Academic periods group schedule entries into named semesters, quarters, or any other time unit relevant to your institution. Every schedule entry must reference an existing period. The periodos endpoints live on the same horarios service instance. Base URL: http://localhost:8004

GET /periodos

Returns all academic periods. No authentication required.

Response

An array of period objects.
id
integer
Auto-assigned or explicitly provided primary key.
nombre
string
Human-readable name, e.g. "Semestre 2025-A".
tipo
string
Period type, e.g. "SEMESTRAL", "CUATRIMESTRAL".
fecha_inicio
string
Start date as a string (format as stored, e.g. "2025-01-15").
fecha_fin
string
End date as a string.
curl -s http://localhost:8004/periodos

GET /periodos/

Returns a single academic period by ID. No authentication required.

Path parameters

periodo_id
integer
required
ID of the period to retrieve.

Response

A single period object with the same shape as the list response.
curl -s http://localhost:8004/periodos/1

POST /periodos

Creates a new academic period. Requires ADMIN role.

Headers

Authorization
string
required
Bearer <token> — must decode to rol: ADMIN.

Request body

nombre
string
required
Display name of the period.
tipo
string
required
Category or type of period (free-form string, e.g. "SEMESTRAL").
fecha_inicio
string
required
Start date.
fecha_fin
string
required
End date.
id
integer
Optional explicit primary key. Returns 409 if the ID is already taken.

Response

The created period object.
curl -s -X POST http://localhost:8004/periodos \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer eyJ..." \
  -d '{
    "nombre": "Semestre 2025-B",
    "tipo": "SEMESTRAL",
    "fecha_inicio": "2025-08-01",
    "fecha_fin": "2025-12-15"
  }'

DELETE /periodos/

Deletes an academic period. The operation is blocked if any schedule entries still reference the period. Requires ADMIN role.

Path parameters

periodo_id
integer
required
ID of the period to delete.

Headers

Authorization
string
required
Bearer <token> — must decode to rol: ADMIN.

Response

Empty response body.
curl -s -X DELETE http://localhost:8004/periodos/2 \
  -H "Authorization: Bearer eyJ..."
Deleting a period that still has schedule entries returns 409. Remove all associated horario records with DELETE /horarios/{id} before deleting the period.

Build docs developers (and LLMs) love