Cases API
Cases are the central container for all crash analysis data. Each case represents a single accident with associated vehicles, occupants, accident information, files, and analysis results.
Endpoints
| Method | Endpoint | Description |
|---|---|---|
POST | /api/cases | Create case with vehicles, occupants, accident info |
GET | /api/cases/:id | Get case |
GET | /api/cases | List cases |
PUT | /api/cases/:id | Update case with vehicles, occupants, accident info |
Case Object
{
"id": "case_abc123def456",
"name": "Smith v. Johnson",
"plaintiff_name": "John Smith",
"has_edr": false,
"account_id": "acc_xyz789",
"organization_id": "org_abc123",
"analysis_type": "accident_injury",
"status": "active",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z",
"analysis_status": {
"accident_reconstruction": {
"status": "completed",
"download_url": "https://..."
},
"biomechanics_analysis": {
"status": "none"
},
"technical_report": {
"status": "processing"
}
}
}
Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique case identifier |
name | string | Case name or title |
plaintiff_name | string | Plaintiff name (injured party) |
has_edr | boolean | Whether case has EDR data |
account_id | string | Account this case belongs to |
organization_id | string | Optional organization grouping |
analysis_type | string | Analysis type: accident_only, accident_injury, delta_v_only, biomechanics_only |
status | string | Case status: active, archived |
created_at | datetime | When the case was created |
updated_at | datetime | When the case was last updated |
analysis_status | object | Status of various analyses |
Case Data
Cases can store comprehensive data about the accident:
Accident Information
| Field | Type | Description |
|---|---|---|
accident_description | string | Narrative description of the accident |
accident_date | string | Date of accident (YYYY-MM-DD) |
accident_time | string | Time of accident (HH:MM) |
accident_location | string | Location where the accident occurred |
Vehicles
Each case can have plaintiff and defendant vehicles:
| Field | Type | Description |
|---|---|---|
vehicle_maker | string | Vehicle manufacturer |
vehicle_model | string | Vehicle model |
vehicle_year | string | Vehicle year |
vehicle_vin | string | Vehicle Identification Number |
vehicle_type | string | Vehicle type (sedan, suv, truck, etc.) |
image_file_ids | string[] | Linked damage photo file IDs |
Occupants
Array of occupant data for biomechanics analysis:
| Field | Type | Description |
|---|---|---|
name | string | Occupant name |
age | integer | Age in years |
gender | string | male, female, other |
position | string | Seating position |
alleged_injuries | string[] | List of injury types |
seatbelt_worn | boolean | Seatbelt status |
Analysis Status
Each case tracks the status of multiple analysis types:
| Analysis | Description |
|---|---|
accident_reconstruction | Crash analysis with Delta-V, PDOF |
biomechanics_analysis | Injury biomechanics modeling |
technical_report | Generated technical report |
Status values: none, pending, processing, completed, failed
Next Steps
- Create a Case
- Get a Case
- Update a Case
- End-to-End Example - Complete workflow guide