Skip to main content

1. API Purpose

The Academic Calendar API provides a single source of truth for the school’s annual events. It helps parents and staff stay aligned on important dates, reducing scheduling conflicts and missed milestones.

2. Endpoint Definition


3. Authentication Flow

Standard Bearer JWT validation. Access is school-specific (skole_id). Staff require specific RBAC permission to manage the calendar.

4. Request Structure

GET /parent-app/academic-events

Headers:

GET /web-app/academic-calendar

Query Parameters:

POST /web-app/academic-calendar

Request Body:

PUT /teachers-app/academic-calendar/:id

Request Body:

DELETE /teachers-app/academic-calendar/:id

URL Parameters:

POST /web-app/bulk-import-academic-calendar-json

Request Body:

5. Response Structure

Success: Parent Event View (200 OK)

Route: GET /parent-app/academic-events

Success: Staff Calendar List (200 OK)

Route: GET /teachers-app/academic-calendar

Success: Event Created (201 Created)

Route: POST /{module}/academic-calendar

Success: Event Updated (200 OK)

Route: PUT /teachers-app/academic-calendar/:id

Success: Event Deleted (200 OK)

Route: DELETE /teachers-app/academic-calendar/:id

Success: Admin Event Dashboard (200 OK)

Route: GET /web-app/academic-calendar

Success: Bulk Import JSON (200 OK)

Route: POST /web-app/bulk-import-academic-calendar-json

6. Error Responses


7. Security Considerations

  • Scoping: Enforced via skole_id.
  • RBAC: Only staff with calendar.manage permission can create or edit events.

8. Token Usage


9. Token Refresh

N/A.

10. Logout / Session Invalidation

N/A.

11. Usage Example (cURL)


12. Notes / Special Behaviors

  • Multi-day Events: If event_to_date is different from event_from_date, the mobile app displays the event as a span across the calendar.
  • Color Coding: Similar to the Noticeboard, event types trigger specific UI highlights (e.g., Red for exam, Green for holiday).