Case Filing
Case Filing is the guided, multi-step workflow that Counsel and public Users go through to file a new case.
Case Filing is not a separate database model — it's an alternate write-path onto Case Records. POST /api/case-filing/save-information creates or updates a CaseRecord in draft/occ_pending status and upserts the associated plaintiff/defendant/counsel party rows, rather than writing to a dedicated case_filings table.
The case filing flow
A filing is built up over three calls, each of which can be repeated as the filer moves back and forth between steps of the form:
POST /api/case-filing/save-information— creates the case record and its core details, plaintiffs, and defendants.POST /api/case-filing/save-case-attachment— attaches supporting documents to the case.POST /api/case-filing/save-case-evidence— attaches evidence to the case.
At any point, GET /api/case-filing/{caseId} retrieves the current draft state so the filer's form can be re-populated.
Save case information
Creates a new case record (or updates an existing draft, if case_id is included) along with its plaintiffs and defendants. Uses the same field-level validation as creating a case record, with two differences: party_type is always forced to Petitioner, and case_number is not required (it's only required/validated when the requester is BCC/OCC staff).
Required attributes
- Name
case_title- Type
- string
- Description
Title of the case.
- Name
case_category- Type
- string
- Description
The
codeof an existing case category.
- Name
case_type- Type
- string
- Description
The
codeof an existing case type.
- Name
court_level- Type
- string
- Description
The
codeof an existing court level.
- Name
court_station- Type
- string
- Description
The
codeof an existing court station.
- Name
court_type- Type
- string
- Description
The
codeof an existing court type.
- Name
plaintiffs- Type
- array
- Description
Array of plaintiff objects. Required, at least one. Each requires
classification(Individual,Juridical, orGovernment Agency) plus name/contact fields.
Optional attributes
- Name
case_id- Type
- string
- Description
Include to update an existing draft case record instead of creating a new one.
- Name
defendants- Type
- array
- Description
Array of defendant objects, same shape as
plaintiffs.
- Name
counsel_email- Type
- string
- Description
The filer's counsel of record's email, if represented by counsel.
Request
curl -X POST https://your-domain.com/api/case-filing/save-information \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "X-XSRF-TOKEN: {token}" \
--cookie "cms_admin_session={session}" \
-d '{
"case_title": "Juan Dela Cruz vs. Pedro Santos",
"case_category": "CIV",
"case_type": "COLL-SUM",
"court_level": "RTC",
"court_station": "QC-RTC",
"court_type": "RTC",
"plaintiffs": [
{"classification": "Individual", "first_name": "Juan", "last_name": "Dela Cruz", "email": "juan@example.com"}
],
"defendants": [
{"classification": "Individual", "first_name": "Pedro", "last_name": "Santos"}
]
}'
Response
{
"data": {
"id": "c3d4e5f6-a7b8-9012-cdef-ab3456789012",
"case_title": "JUAN DELA CRUZ VS. PEDRO SANTOS",
"status": "draft",
"party_type": "Petitioner",
"created_at": "2026-02-20T10:30:00+00:00",
"updated_at": "2026-02-20T10:30:00+00:00"
}
}
Retrieve a case filing draft
Retrieve the current state of a case filing in progress, including its parties and attachments so far.
Path parameters
- Name
caseId- Type
- string
- Description
The UUID of the case record being filed.
Request
curl https://your-domain.com/api/case-filing/c3d4e5f6-a7b8-9012-cdef-ab3456789012 \
-H "Accept: application/json" \
-H "X-XSRF-TOKEN: {token}" \
--cookie "cms_admin_session={session}"
Response
{
"data": {
"id": "c3d4e5f6-a7b8-9012-cdef-ab3456789012",
"case_title": "JUAN DELA CRUZ VS. PEDRO SANTOS",
"status": "draft",
"plaintiffs": [{"first_name": "Juan", "last_name": "Dela Cruz"}],
"case_defendants": [{"first_name": "Pedro", "last_name": "Santos"}]
}
}
Save case attachment
Upload a supporting document (complaint, annex, etc.) to a case being filed.
Required attributes
- Name
case_id- Type
- string
- Description
The UUID of the case record.
- Name
file- Type
- file
- Description
The document file to upload.
Request
curl -X POST https://your-domain.com/api/case-filing/save-case-attachment \
-H "Accept: application/json" \
-H "X-XSRF-TOKEN: {token}" \
--cookie "cms_admin_session={session}" \
-F "case_id=c3d4e5f6-a7b8-9012-cdef-ab3456789012" \
-F "file=@/path/to/complaint.pdf"
Response
{
"message": "Attachment saved successfully."
}
Save case evidence
Attach a piece of evidence to a case being filed. See Case Evidence for the full evidence model.
Required attributes
- Name
case_id- Type
- string
- Description
The UUID of the case record.
- Name
exhibit- Type
- string
- Description
The exhibit label, e.g.
"Exhibit A".
- Name
description- Type
- string
- Description
Description of the evidence.
Request
curl -X POST https://your-domain.com/api/case-filing/save-case-evidence \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "X-XSRF-TOKEN: {token}" \
--cookie "cms_admin_session={session}" \
-d '{
"case_id": "c3d4e5f6-a7b8-9012-cdef-ab3456789012",
"exhibit": "Exhibit A",
"description": "Promissory note dated 2025-01-15"
}'
Response
{
"message": "Evidence saved successfully."
}