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,
"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",
"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",
"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",
"injury_severity": "moderate",
"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 case has EDR data
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.)
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
injury_severitystringSeverity level
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