Overview
The Calendar Events API manages the system’s calendar of active business days. This calendar is used throughout the sistema to calculate response deadlines for solicitudes, ensuring that weekends and holidays are properly excluded from business day calculations.Base Route
All endpoints are prefixed with:Calendar System
The calendar system maintains a record of active business days in theCalendario table. When calculating deadlines for solicitudes:
- DAI (Derecho de Acceso a la Información): 10 business days
- ARCO (Acceso, Rectificación, Cancelación, Oposición): 20 business days
- With Ampliación: Deadlines are doubled (20 or 40 business days)
- Weekends (Saturday and Sunday)
- Días inhábiles (manually configured non-working days)
Endpoints
Get Active Days
fecha(DateTime): The dateactivo(boolean): Whether the day is active for business
Save Active Days
Usage Notes
Calendar Behavior
- Duplicate Prevention: The system checks if a date already exists before creating a new entry, preventing duplicates.
- Partial Updates: The endpoint processes each day individually, so if some dates already exist, only new dates will be added.
- No Deletion: This endpoint only adds new calendar entries; it does not delete or update existing ones.
Integration with Deadlines
The calendar is consulted during:- Initial solicitud creation to calculate
FechaLimiteRespuesta10diasorFechaLimiteRespuesta20dias - Recalculation of deadlines when días inhábiles are added or removed (see Calendar Deadlines)
Business Day Calculation Logic
When calculating a deadline from a start date:- Start from
FechaInicio - For each day:
- Skip if it’s Saturday or Sunday
- Skip if it’s in the
DiaInhabilManualtable - Otherwise, count it as 1 business day
- Continue until required business days are reached
- Add 23:59:59 to the final date for end-of-day deadline
Example
If a DAI solicitud starts on March 10, 2026 (Monday) with no ampliación:- Required: 10 business days
- March 10 (Mon): Start date (not counted)
- March 11-14 (Tue-Fri): 4 days
- March 15-16 (Sat-Sun): Skipped
- March 17-20 (Mon-Thu): 4 days
- March 21 (Fri): 1 day
- March 24 (Mon): 1 day (10th business day)
- Deadline: March 24, 2026 23:59:59