The generation endpoint builds a complete schedule for an academic period in a single request. It fetches teacher, subject, and classroom catalogs from the upstream services (or uses the IDs you provide), then slots each subject into a compatible day/time block while respecting each teacher’sDocumentation 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.
turno (shift) and any registered disponibilidad (availability) records. Subjects that cannot be placed are reported in materias_sin_asignar.
Base URL: http://localhost:8004Requires:
Authorization: Bearer <token> with rol: ADMIN
Request body
ID of the academic period to generate schedules for. Must exist before calling this endpoint.
Duration of each time slot in minutes. Must be greater than 0. Slots are tiled from
hora_inicio_jornada to hora_fin_jornada.Start of the school day in
HH:MM format. Must be earlier than hora_fin_jornada.End of the school day in
HH:MM format.Days of the week to include. At least one day is required. Accepted values (case-insensitive):
LUNES, MARTES, MIERCOLES, JUEVES, VIERNES, SABADO.Restrict generation to these teacher IDs. If omitted or empty, all teachers from the usuarios service are used.
Restrict generation to these subject IDs. If omitted or empty, all subjects from the materias service are used.
Restrict generation to these classroom IDs. If omitted or empty, all classrooms from the aulas service are used.
Response
- 200 — success
- 400 — validation error
- 403 — forbidden
- 502 — upstream error
The period ID that was passed in the request.
Schedule entries that were successfully created. Each item has the same shape as a
HorarioRead from the CRUD endpoints, including resolved catalog names.IDs of subjects that could not be placed — for example because no compatible teacher/classroom/slot combination was available.
Informational messages from the generation engine (e.g., reasons a subject was skipped).
Example
Constraint rules
The generator respects two types of constraints:
- Turno (shift): A teacher with
turno: MATUTINOcan only be assigned to slots within 07:00–14:00. A teacher withturno: VESPERTINOis restricted to 15:00–22:00. Teachers withturno: AMBOSmay be placed in either range. - Disponibilidad: If a teacher has explicit availability records, the generator checks those records and avoids placing them outside their available windows.
materias_sin_asignar with an explanation in mensajes.