Overview
The Calendar API provides endpoints for retrieving available time slots and creating calendar events for booked virtual classes. Events are automatically integrated with Google Calendar and include Google Meet conference links.Get Calendar Events
Retrieve upcoming calendar events to display available time slots for class booking.Endpoint
Response
Array of calendar events with start time, end time, and status
Example Request
Example Response
Error Responses
Create Calendar Event
Create a Google Calendar event with Google Meet link after successful payment. This endpoint is typically called by the webhook handler after payment confirmation.Endpoint
Authentication
Requires admin-level OAuth2 refresh token stored in the database.Request Body
Mercado Pago preference ID linking the payment to the virtual class
Response
Whether the calendar event was created successfully
Success message: “Event created successfully”
Example Request
Example Response
Error Responses
Implementation Details
Event Creation Flow
Google Calendar Configuration
The calendar event includes:- Summary: Class type and learning focus
- Description: Detailed class information
- Conference: Google Meet link automatically generated
- Timezone: America/Argentina/Buenos_Aires
- Attendees: Student email address
- Reminders: Email notification 60 minutes before start
Environment Variables
Google Calendar ID where events are created
Google OAuth2 client ID
Google OAuth2 client secret
OAuth2 redirect URI configured in Google Cloud Console
Admin email address with calendar access
Related Resources
Virtual Classes
Learn about the class booking system
Payment System
Understand the payment flow that triggers calendar events
Calendar Integration
Detailed guide on Google Calendar setup
Calendar Setup
Admin configuration for Google Calendar