Calendar API
Base URL
All URLs referenced in the documentation have the following base:
https://api.meetandrock.com/v1/dev
Calendar Management
Endpoints for managing calendars
List Calendars
Retrieve all calendars for the project
curl -X GET "https://api.meetandrock.com/v1/dev/calendar" \
-H "Authorization: Bearer YOUR_API_KEY"
Response:
{
"success": true,
"data": [
{
"id": "uuid",
"name": "string",
"color": "string",
"project_id": "uuid",
"user_id": "uuid",
"createdAt": "datetime",
"updatedAt": "datetime",
"createdBy": {
"id": "uuid",
"first_name": "string",
"last_name": "string",
"email": "string"
}
}
]
}Create Calendar
Create a new calendar
curl -X POST "https://api.meetandrock.com/v1/dev/calendar" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "My Calendar",
"color": "#FF5733"
}'
Response:
{
"success": true,
"data": {
"id": "uuid",
"name": "My Calendar",
"color": "#FF5733",
"project_id": "uuid",
"user_id": "uuid",
"createdAt": "datetime",
"updatedAt": "datetime"
}
}Delete Calendar
Delete a calendar (cannot delete if it has events)
curl -X DELETE "https://api.meetandrock.com/v1/dev/calendar/:calendarId" \
-H "Authorization: Bearer YOUR_API_KEY"
Response:
{
"success": true,
"message": "Calendar deleted successfully"
}Calendar Slots
Endpoints for managing calendar booking slots
Create Calendar Slot
Create a new calendar slot for booking
curl -X POST "https://api.meetandrock.com/v1/dev/calendar/slots" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "Consultation Slot",
"description": "30-minute consultation",
"duration": 30,
"start_date": "2024-01-15T09:00:00Z",
"end_date": "2024-01-15T17:00:00Z",
"repetition": "every working day",
"calendar_id": "uuid"
}'
Response:
{
"success": true,
"data": {
"id": "uuid",
"title": "Consultation Slot",
"description": "30-minute consultation",
"duration": 30,
"start_date": "2024-01-15T09:00:00Z",
"end_date": "2024-01-15T17:00:00Z",
"repetition": "every working day",
"token": "uuid",
"booking_url": "https://app.meetandrock.com/booking/uuid",
"project_id": "uuid",
"created_by": "uuid",
"createdAt": "datetime",
"updatedAt": "datetime"
}
}Repetition options: only today, every day, every working day, every weekend, every monday, every tuesday, every wednesday, every thursday, every friday, every saturday, every sunday
Duration: Must be between 15 and 480 minutes (15 minutes to 8 hours)
Calendar Events
Endpoints for retrieving calendar events
Get Calendar Events
Retrieve calendar events with optional filtering
curl -X GET "https://api.meetandrock.com/v1/dev/calendar/events?viewType=week&date=2024-01-15&calendarId=uuid" \
-H "Authorization: Bearer YOUR_API_KEY"
Query Parameters:
- viewType: day | week | month (default: week)
- date: ISO date string (default: current date)
- calendarId: Optional calendar ID to filter events
Response:
{
"success": true,
"data": [
{
"id": "uuid",
"title": "string",
"description": "string",
"start_date": "datetime",
"end_date": "datetime",
"event_type": "string",
"repetition": "string",
"calendar": {
"id": "uuid",
"name": "string",
"color": "string"
},
"createdBy": {
"id": "uuid",
"first_name": "string",
"last_name": "string",
"email": "string"
}
}
]
}Error Responses
400 Bad Request
{
"message": "Invalid request parameters"
}
401 Unauthorized
{
"message": "Invalid or missing API key"
}
404 Not Found
{
"message": "Calendar not found"
}
500 Internal Server Error
{
"message": "Calendar create failed"
}
400 Bad Request (when deleting calendar with events)
{
"success": false,
"message": "Cannot delete calendar with existing events"
}