Base URL
All API endpoints require HTTPS in production. The base URL will vary depending on your deployment environment.
API Endpoints
Authentication
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| GET | /oauth/login | Initiate OAuth login | No |
| GET | /oauth/callback | OAuth callback handler | No |
Reservations
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| POST | /api/v1/reservations | Create a new reservation | Yes |
| GET | /api/v1/reservations | Get unavailable time slots | Yes |
| DELETE | /api/v1/reservations/{id} | Cancel a reservation | Yes |
Health Check
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
| GET | /api/v1/health | Health check endpoint | No |
Health Check
The health endpoint monitors the status of critical services including database, calendar, and email systems.Business Rules
Reservation Constraints
Time Validation
- Cannot book past times
- End time must be after start time
- Bookings must be within school hours: 6:00 AM - 8:00 PM
- Maximum duration:
- Students: 4 hours
- Staff: Unlimited
- Date range queries cannot exceed 60 days
Overlap Prevention
- The system automatically checks for conflicting reservations
- Returns
409 Conflictif a time slot is already booked
Authorization Rules
- Students can only cancel their own reservations
- Staff members can cancel any reservation
Unauthorized cancellation attempts return a
403 Forbidden error.Privacy
Booking details are visible to:- The person who made the booking
- Staff members
Other users only see time slots marked as “booked” without personal details.
Email Notifications
The system automatically sends email notifications for:- Booking Confirmation – Sent immediately after successful reservation
- Cancellation Notice – Sent when a reservation is cancelled
Gmail SMTP Configuration
- Enable 2-Factor Authentication on your Google account
- Generate an App Password at myaccount.google.com/apppasswords
- Select Mail and your device
- Copy the generated 16-character password
- Use this password as:
Next Steps
Authentication Flow
Learn how OAuth authentication works
Rate Limiting
Understand API rate limits and quotas
Error Handling
Handle errors and validation issues
Endpoints
Explore all available endpoints