Skip to main content

Get Case

Retrieves a single case by its ID, including vehicles with crash parameters, occupants, accident information, and report status. This endpoint follows Stripe-style API conventions with consistent snake_case naming and nested objects.

Endpoint​

GET /api/cases/:id

Authentication​

Requires API Key authentication.

Path Parameters​

ParameterTypeRequiredDescription
idstringYesCase ID

Response​

Returns the complete case object with all related data nested appropriately.

{
"success": true,
"data": {
"case": {
"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",
"vin": "4T1B11HK5LU123456",
"type": "sedan",
"airbag_deployed": "yes",
"deployed_airbags": ["driver_frontal", "driver_knee"],
"edr_file_id": null,
"image_file_ids": ["file_img1", "file_img2"],
"crash_parameters": {
"delta_v_min": 8.5,
"delta_v_max": 12.3,
"delta_v_method": "ml",
"pdof_degrees": 180,
"crash_pulse_min_ms": 12,
"crash_pulse_max_ms": 100,
"calculated_at": "2024-01-15T12:00:00Z"
}
},
{
"id": "veh_def456",
"role": "defendant",
"make": "Ford",
"model": "F-150",
"year": "2019",
"type": "truck",
"airbag_deployed": "no",
"deployed_airbags": [],
"crash_parameters": null
}
],

"occupants": [
{
"id": "occ_abc123",
"name": "John Smith",
"age": 45,
"gender": "male",
"height_inches": 70,
"weight_lbs": 180,
"position": "driver",
"alleged_injuries": ["cervical_spine", "lumbar_spine"],
"seatbelt_worn": true,
"airbag_deployed": "yes",
"pre_existing_conditions": "None"
}
],

"report": {
"id": "rpt_xyz789",
"status": "completed",
"type": "technical_report",
"pdf_url": "https://storage.silentwitness.ai/reports/rpt_xyz789.pdf",
"docx_url": "https://storage.silentwitness.ai/reports/rpt_xyz789.docx",
"created_at": "2024-01-15T14:00:00Z"
}
},

"invoice": {
"id": "inv_xyz789",
"amount": 299.00,
"status": "pending"
}
}
}

Response Fields​

Case Object​

FieldTypeDescription
idstringUnique case identifier
namestringCase name
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 uploaded (file_category=tcr_document).
tcr_file_idstring | nullID of the most-recently-uploaded TCR file on this case, or null if none. Virtual field derived from the files table.
tcrobject | nullExpanded TCR file object (id, name, size, type, category, url, uploaded_at). null if no TCR is uploaded.
account_idstringAccount ID
organization_idstringOrganization ID (if set)
statusstringCase status
created_atstringCreation timestamp (ISO 8601)
updated_atstringLast update timestamp (ISO 8601)
accidentobjectAccident information (see below)
vehiclesarrayVehicles with crash parameters
occupantsarrayOccupants for biomechanics analysis
reportobjectReport status and download URLs (null if not generated)

Accident Object​

FieldTypeDescription
descriptionstringDetailed accident description
datestringDate of accident (YYYY-MM-DD)
timestringTime of accident (HH:MM)
locationstringAccident location

Vehicle Object​

FieldTypeDescription
idstringVehicle ID
rolestringplaintiff or defendant
makestringManufacturer (e.g., Toyota, Ford)
modelstringModel name
yearstringModel year
vinstringVehicle Identification Number
typestringVehicle type (sedan, suv, truck, etc.)
airbag_deployedstringVehicle-level summary status: yes, no, partial, or unknown
deployed_airbagsarraySpecific deployed airbag detail codes. Empty array means no details were captured or the summary status is no/unknown.
edr_file_idstringEDR file ID (null if not uploaded)
image_file_idsarrayDamage photo file IDs
crash_parametersobjectComputed crash analysis data (null if not calculated)

Crash Parameters Object​

Contains computed crash analysis data for the vehicle. This is null until delta-v calculation completes.

FieldTypeDescription
delta_v_minnumberDelta-V at peak acceleration (mph)
delta_v_maxnumberFinal maximum delta-V (mph)
delta_v_methodstringCalculation method: ml, edr, vector, or hybrid
pdof_degreesnumberPrincipal Direction of Force (degrees)
crash_pulse_min_msnumberTime at peak acceleration (milliseconds)
crash_pulse_max_msnumberTime at final maximum (milliseconds)
calculated_atstringTimestamp when calculated (ISO 8601)

Occupant Object​

FieldTypeDescription
idstringOccupant ID
namestringOccupant name
ageintegerAge in years
genderstringmale, female, or other
height_inchesintegerHeight in inches
weight_lbsintegerWeight in pounds
positionstringSeating position (driver, front_passenger, etc.)
alleged_injuriesarrayList of injury types
seatbelt_wornbooleanWhether seatbelt was worn
airbag_deployedstringAirbag status: yes, no, partial, unknown
pre_existing_conditionsstringPre-existing medical conditions

Report Object​

FieldTypeDescription
idstringReport ID
statusstringpending, in_progress, completed, failed
typestringReport type (e.g., technical_report)
pdf_urlstringPDF download URL (when completed)
docx_urlstringDOCX download URL (when completed)
created_atstringReport creation timestamp (ISO 8601)

Example​

curl -X GET "https://api.silentwitness.ai/api/cases/case_abc123def456" \
-H "X-API-Key: $API_KEY"

Checking Crash Parameters​

After uploading vehicle photos and triggering analysis, the crash_parameters object will be populated:

# Check if delta-v has been calculated
curl -X GET "https://api.silentwitness.ai/api/cases/case_abc123" \
-H "X-API-Key: $API_KEY" \
| jq '.data.case.vehicles[0].crash_parameters'

Example response when calculated:

{
"delta_v_min": 8.5,
"delta_v_max": 12.3,
"delta_v_method": "ml",
"pdof_degrees": 180,
"crash_pulse_min_ms": 12,
"crash_pulse_max_ms": 100,
"calculated_at": "2024-01-15T12:00:00Z"
}

Errors​

CodeDescription
401Unauthorized - Invalid or missing API key
403Forbidden - Access denied to this case
404Case not found
500Internal server error

Error Examples​

Case not found:

{
"success": false,
"error": "Case not found",
"error_code": "not_found",
"error_type": "invalid_request_error",
"request_id": "req_..."
}

Access denied (case belongs to another account):

{
"success": false,
"error": "Access denied",
"error_code": "forbidden",
"error_type": "permission_error",
"request_id": "req_..."
}