Events
Events are the entries that render on a calendar — hearings, JDR sessions, holidays, meetings, and manually created entries.
GET /api/events is a computed feed, not a plain table listing: it merges rows from the events table with any case activity that has in_calendar = true (e.g. confirmed hearings). There is no generic POST /api/events — manual events are created and mutated through the dedicated endpoints below, and case-driven events are created indirectly by scheduling a case activity.
The event model
- Name
id- Type
- string
- Description
Unique UUID identifier for the event.
- Name
calendar_id- Type
- string
- Description
The calendar this event belongs to.
- Name
title- Type
- string
- Description
The event's title.
- Name
type- Type
- string
- Description
One of
personal,hearing,case load,case,holiday,meeting,other.
- Name
status- Type
- string
- Description
One of
confirmed,tentative,cancelled,rescheduled,pencil-booked.
- Name
description- Type
- string | null
- Description
Free-text description.
- Name
location- Type
- string | null
- Description
Where the event takes place, e.g. a courtroom name for hearings.
- Name
start- Type
- timestamp
- Description
Start date/time (
start_aton the underlying model).
- Name
end- Type
- timestamp | null
- Description
End date/time (
end_aton the underlying model).
- Name
all_day- Type
- boolean
- Description
Whether this is an all-day event (typical for holidays).
- Name
case_record_id- Type
- string | null
- Description
The case record this event relates to, for case/hearing events.
- Name
case_activity_id- Type
- string | null
- Description
The case activity this event was generated from, for case/hearing events.
List events
Retrieve the merged event feed for the authenticated user's calendars, plus any in-calendar case activities on cases they have access to.
Request
curl https://your-domain.com/api/events \
-H "Accept: application/json" \
-H "X-XSRF-TOKEN: {token}" \
--cookie "cms_admin_session={session}"
Response
{
"data": [
{
"id": "e5f6a7b8-c9d0-1234-ef56-7890abcdef12",
"title": "Hearing - Dela Cruz vs. Santos",
"type": "hearing",
"status": "confirmed",
"start": "2026-03-05T09:00:00+00:00",
"end": "2026-03-05T10:00:00+00:00",
"all_day": false,
"case_record_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"case_activity_id": "e5f6a7b8-c9d0-1234-ef56-7890abcdef12"
}
]
}
Add a case hearing to the calendar
Create one or more manual hearing entries on a branch's calendar for a case.
Required attributes
- Name
data.hearings- Type
- array
- Description
Array of hearing rows. Each requires
type; other fields (start_at,end_at,location) are optional per row.
Request
curl -X POST https://your-domain.com/api/events/add-case-hearing-calendar \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "X-XSRF-TOKEN: {token}" \
--cookie "cms_admin_session={session}" \
-d '{
"data": {
"hearings": [
{"type": "Pre-Trial Conference", "start_at": "2026-03-05T09:00:00+00:00", "location": "Branch 12 Courtroom"}
]
}
}'
Response
{
"data": [
{
"id": "d4c3b2a1-0f9e-8d7c-d4c3-b2a10f9e8d7c",
"title": "Pre-Trial Conference",
"type": "hearing",
"status": "confirmed",
"start": "2026-03-05T09:00:00+00:00"
}
]
}
Validate a holiday
Check whether a given date falls on a registered holiday, before scheduling a hearing.
Required attributes
- Name
date- Type
- date
- Description
The date to check.
Request
curl -X POST https://your-domain.com/api/events/validate_holiday \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "X-XSRF-TOKEN: {token}" \
--cookie "cms_admin_session={session}" \
-d '{"date": "2026-04-09"}'
Response
{
"data": {
"is_holiday": true,
"name": "Araw ng Kagitingan"
}
}
Update a manual event
Update a manually created event's details.
Path parameters
- Name
events- Type
- string
- Description
The UUID of the event to update.
Request
curl -X PUT https://your-domain.com/api/events/d4c3b2a1-0f9e-8d7c-d4c3-b2a10f9e8d7c/edit-manual-event \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "X-XSRF-TOKEN: {token}" \
--cookie "cms_admin_session={session}" \
-d '{"start_at": "2026-03-06T09:00:00+00:00", "status": "rescheduled"}'
Response
{
"data": {
"id": "d4c3b2a1-0f9e-8d7c-d4c3-b2a10f9e8d7c",
"start": "2026-03-06T09:00:00+00:00",
"status": "rescheduled"
}
}
Delete a manual event
Delete a manually created event.
Path parameters
- Name
events- Type
- string
- Description
The UUID of the event to delete.
Request
curl -X DELETE https://your-domain.com/api/events/d4c3b2a1-0f9e-8d7c-d4c3-b2a10f9e8d7c/delete-manual-event \
-H "Accept: application/json" \
-H "X-XSRF-TOKEN: {token}" \
--cookie "cms_admin_session={session}"
Response
{
"message": "Event deleted successfully."
}