Skip to main content

The Case Object

A Case represents a legal case with all associated data including vehicles, occupants, accident information, and generated reports.

Object Structure​

{
"id": "case_abc123def456",
"name": "Smith v. Johnson",
"plaintiff_name": "John Smith",
"defendant_name": "Bob Johnson",
"attorney_name": "Jane Doe, Esq.",
"side": "plaintiff",
"has_edr": false,
"has_tcr": true,
"tcr_file_id": "file_tcr001",
"tcr": {
"id": "file_tcr001",
"name": "TCR_1.pdf",
"size": 248312,
"type": "application/pdf",
"category": "tcr_document",
"url": "https://storage.silentwitness.ai/...",
"uploaded_at": "2024-01-15T11:00:00Z"
},
"account_id": "acc_xyz789",
"organization_id": "org_abc123",
"status": "active",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T14:45:00Z",

"accident": {
"description": "Rear-end collision at red light",
"date": "2024-01-10",
"time": "14:30",
"location": "123 Main St, Los Angeles, CA"
},

"vehicles": [
{
"id": "veh_abc123",
"role": "plaintiff",
"make": "Toyota",
"model": "Camry",
"year": "2020",
"crash_parameters": { ... }
}
],

"occupants": [
{
"id": "occ_abc123",
"name": "John Smith",
"age": 45,
"position": "driver"
}
],

"report": {
"id": "rpt_xyz789",
"status": "completed",
"pdf_url": "https://..."
}
}

Attributes​

Core Fields​

AttributeTypeDescription
idstringUnique identifier with case_ prefix
namestringCase name or title (e.g., "Smith v. Johnson")
plaintiff_namestringPlaintiff name (injured party)
defendant_namestringDefendant name (at-fault party)
attorney_namestringAttorney name handling the case
sidestringWhich party the attorney represents: plaintiff or defense
has_edrbooleanWhether any vehicle on the case has an EDR file linked. Computed live from the vehicles — not a cached value.
has_tcrbooleanWhether the case has a Traffic Collision Report (TCR) uploaded.
tcr_file_idstring | nullID of the most-recently-uploaded TCR file, or null if none. Virtual field derived from the files table — upload a file with file_category=tcr_document to set it.
tcrobject | nullExpanded TCR file object (id, name, size, type, category, url, uploaded_at). null if no TCR is uploaded.
account_idstringAccount that owns this case
organization_idstringOrganization associated with the case (optional)
statusstringCase status: active, archived, deleted
created_atstringISO 8601 timestamp of creation
updated_atstringISO 8601 timestamp of last update

Nested Objects​

AttributeTypeDescription
accidentobjectAccident information (see below)
vehiclesarrayList of Vehicle objects
occupantsarrayList of Occupant objects
reportobjectLatest Report summary (null if none)

Accident Object​

AttributeTypeDescription
descriptionstringDetailed narrative of the accident
datestringDate of accident in YYYY-MM-DD format
timestringTime of accident in HH:MM format
locationstringAddress or description of accident location