> ## Documentation Index
> Fetch the complete documentation index at: https://docs.steerai.autos/llms.txt
> Use this file to discover all available pages before exploring further.

# Damage Assessment API

> Comprehensive damage severity analysis and repair cost estimation

## POST /v1/inspections/damage-assessment

Advanced AI-powered damage assessment that combines visual inspection data with repair cost databases to provide accurate damage severity ratings and repair estimates.

### Request

```bash theme={null}
curl -X POST "https://api.steerai.autos/v1/inspections/damage-assessment" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "vehicle_id": "veh_1234567890abcdef",
    "inspection_id": "vis_1234567890abcdef",
    "damages": [
      {
        "damage_id": "dmg_front_bumper_001",
        "type": "scratch",
        "location": "front_bumper",
        "severity": "minor"
      },
      {
        "damage_id": "dmg_rear_door_left_002",
        "type": "dent",
        "location": "rear_door_left",
        "severity": "moderate"
      }
    ],
    "assessment_options": {
      "include_repair_timeline": true,
      "include_part_prices": true,
      "labor_rate_region": "US_CALIFORNIA",
      "currency": "USD"
    }
  }'
```

### Request Body

| Field                                        | Type    | Required | Description                                          |
| -------------------------------------------- | ------- | -------- | ---------------------------------------------------- |
| `vehicle_id`                                 | string  | Yes      | Vehicle identifier                                   |
| `inspection_id`                              | string  | No       | Related visual inspection ID                         |
| `damages`                                    | array   | Yes      | Array of damage objects to assess                    |
| `damages[].damage_id`                        | string  | Yes      | Unique damage identifier                             |
| `damages[].type`                             | string  | Yes      | Damage type                                          |
| `damages[].location`                         | string  | Yes      | Vehicle part affected                                |
| `damages[].severity`                         | string  | No       | Initial severity estimate                            |
| `assessment_options.include_repair_timeline` | boolean | No       | Include repair time estimates (default: true)        |
| `assessment_options.include_part_prices`     | boolean | No       | Include OEM/aftermarket part pricing (default: true) |
| `assessment_options.labor_rate_region`       | string  | No       | Geographic region for labor rates                    |
| `assessment_options.currency`                | string  | No       | Currency for pricing (default: USD)                  |

### Supported Regions

| Region Code     | Description     | Avg Labor Rate   |
| --------------- | --------------- | ---------------- |
| `US_CALIFORNIA` | California, USA | \$150-200/hr     |
| `US_TEXAS`      | Texas, USA      | \$100-150/hr     |
| `US_NORTHEAST`  | Northeast USA   | \$125-175/hr     |
| `US_MIDWEST`    | Midwest USA     | \$90-140/hr      |
| `EU_GERMANY`    | Germany         | €80-120/hr       |
| `EU_UK`         | United Kingdom  | £70-100/hr       |
| `EU_FRANCE`     | France          | €70-100/hr       |
| `ASIA_JAPAN`    | Japan           | ¥8,000-12,000/hr |
| `ASIA_CHINA`    | China           | ¥400-800/hr      |

### Response

```json theme={null}
{
  "status": "success",
  "data": {
    "assessment_id": "asmt_1234567890abcdef",
    "vehicle_id": "veh_1234567890abcdef",
    "inspection_id": "vis_1234567890abcdef",
    "created_at": "2024-01-15T12:00:00Z",
    "assessed_damages": [
      {
        "damage_id": "dmg_front_bumper_001",
        "type": "scratch",
        "location": "front_bumper",
        "severity": "minor",
        "severity_score": 2.5,
        "impact_assessment": {
          "structural": "none",
          "cosmetic": "minor",
          "safety": "none",
          "affects_value": true,
          "value_reduction_percentage": 1.2
        },
        "repair_options": [
          {
            "option": "paint_touch_up",
            "description": "Professional paint touch-up and blending",
            "recommended": true,
            "repair_type": "cosmetic",
            "parts_required": [
              {
                "part": "paint_materials",
                "type": "consumable",
                "oem_price": 75,
                "aftermarket_price": 50,
                "currency": "USD"
              }
            ],
            "labor": {
              "hours": 1.5,
              "rate_per_hour": 150,
              "total": 225,
              "currency": "USD"
            },
            "total_cost": {
              "parts": 75,
              "labor": 225,
              "total": 300,
              "currency": "USD"
            },
            "timeline": {
              "estimated_days": 1,
              "description": "Same-day repair possible"
            }
          },
          {
            "option": "bumper_replacement",
            "description": "Complete bumper replacement and paint",
            "recommended": false,
            "repair_type": "replacement",
            "parts_required": [
              {
                "part": "front_bumper_cover",
                "part_number": "52119-12345",
                "type": "body_part",
                "oem_price": 450,
                "aftermarket_price": 250,
                "currency": "USD"
              },
              {
                "part": "paint_and_materials",
                "type": "consumable",
                "oem_price": 200,
                "aftermarket_price": 150,
                "currency": "USD"
              }
            ],
            "labor": {
              "hours": 4.0,
              "rate_per_hour": 150,
              "total": 600,
              "currency": "USD"
            },
            "total_cost": {
              "parts": 650,
              "labor": 600,
              "total": 1250,
              "currency": "USD"
            },
            "timeline": {
              "estimated_days": 3,
              "description": "Includes paint curing time"
            }
          }
        ],
        "recommended_repair": {
          "option": "paint_touch_up",
          "min_cost": 250,
          "max_cost": 350,
          "estimated_cost": 300,
          "currency": "USD"
        }
      },
      {
        "damage_id": "dmg_rear_door_left_002",
        "type": "dent",
        "location": "rear_door_left",
        "severity": "moderate",
        "severity_score": 5.8,
        "impact_assessment": {
          "structural": "minor",
          "cosmetic": "moderate",
          "safety": "none",
          "affects_value": true,
          "value_reduction_percentage": 3.5
        },
        "repair_options": [
          {
            "option": "pdr_and_paint",
            "description": "Paintless dent removal with touch-up",
            "recommended": true,
            "repair_type": "pdr",
            "parts_required": [
              {
                "part": "paint_materials",
                "type": "consumable",
                "oem_price": 150,
                "aftermarket_price": 100,
                "currency": "USD"
              }
            ],
            "labor": {
              "hours": 3.5,
              "rate_per_hour": 150,
              "total": 525,
              "currency": "USD"
            },
            "total_cost": {
              "parts": 150,
              "labor": 525,
              "total": 675,
              "currency": "USD"
            },
            "timeline": {
              "estimated_days": 1,
              "description": "1-day repair typical"
            }
          },
          {
            "option": "panel_replacement",
            "description": "Replace door panel and repaint",
            "recommended": false,
            "repair_type": "replacement",
            "parts_required": [
              {
                "part": "rear_door_shell",
                "part_number": "67003-98765",
                "type": "body_part",
                "oem_price": 850,
                "aftermarket_price": 500,
                "currency": "USD"
              },
              {
                "part": "paint_and_materials",
                "type": "consumable",
                "oem_price": 250,
                "aftermarket_price": 175,
                "currency": "USD"
              }
            ],
            "labor": {
              "hours": 6.5,
              "rate_per_hour": 150,
              "total": 975,
              "currency": "USD"
            },
            "total_cost": {
              "parts": 1100,
              "labor": 975,
              "total": 2075,
              "currency": "USD"
            },
            "timeline": {
              "estimated_days": 5,
              "description": "Includes panel fitting and paint"
            }
          }
        ],
        "recommended_repair": {
          "option": "pdr_and_paint",
          "min_cost": 600,
          "max_cost": 800,
          "estimated_cost": 675,
          "currency": "USD"
        }
      }
    ],
    "summary": {
      "total_damages_assessed": 2,
      "overall_severity": "moderate",
      "overall_severity_score": 4.15,
      "total_value_reduction_percentage": 4.7,
      "repair_cost_summary": {
        "recommended_repairs_total": {
          "min": 850,
          "max": 1150,
          "estimated": 975,
          "currency": "USD"
        },
        "all_repairs_range": {
          "min": 850,
          "max": 3325,
          "currency": "USD"
        }
      },
      "repair_timeline": {
        "estimated_total_days": 2,
        "can_repair_simultaneously": true
      },
      "impact_on_vehicle_value": {
        "estimated_market_value": 25000,
        "value_reduction": 1175,
        "adjusted_value": 23825,
        "currency": "USD"
      }
    },
    "reports": {
      "pdf_url": "https://reports.steerai.autos/asmt_1234567890abcdef.pdf",
      "json_url": "https://api.steerai.autos/v1/inspections/damage-assessment/asmt_1234567890abcdef/report"
    }
  },
  "meta": {
    "request_id": "req_asmt_xyz123",
    "processing_time": 2.456,
    "labor_rate_used": 150,
    "currency": "USD",
    "region": "US_CALIFORNIA"
  }
}
```

### Response Fields

| Field                          | Type   | Description                                       |
| ------------------------------ | ------ | ------------------------------------------------- |
| `assessment_id`                | string | Unique assessment identifier                      |
| `severity_score`               | float  | Numerical severity (0-10, 10 = total loss)        |
| `impact_assessment.structural` | string | `none`, `minor`, `moderate`, `severe`, `critical` |
| `impact_assessment.cosmetic`   | string | `none`, `minor`, `moderate`, `severe`             |
| `impact_assessment.safety`     | string | `none`, `minor`, `moderate`, `severe`, `critical` |
| `value_reduction_percentage`   | float  | Percentage reduction in vehicle value             |
| `repair_options[].repair_type` | string | `cosmetic`, `pdr`, `replacement`, `structural`    |

### Severity Scoring

<AccordionGroup>
  <Accordion icon="1" title="Minor (0-3)">
    **Characteristics:**
    • Surface-level damage only
    • No structural impact
    • Cosmetic concerns
    • Easy and inexpensive to repair

    **Examples:**
    • Light scratches
    • Small paint chips
    • Minor scuffs
  </Accordion>

  <Accordion icon="2" title="Moderate (3-6)">
    **Characteristics:**
    • Visible damage affecting appearance
    • Minor structural concern
    • Moderate repair complexity
    • Noticeable value impact

    **Examples:**
    • Dents requiring PDR
    • Deep scratches through primer
    • Cracked bumpers
    • Minor panel misalignment
  </Accordion>

  <Accordion icon="3" title="Severe (6-8)">
    **Characteristics:**
    • Significant damage
    • Structural integrity affected
    • Complex repairs required
    • Major value reduction

    **Examples:**
    • Damaged frame sections
    • Multiple panel replacement needed
    • Suspension damage
    • Major collision damage
  </Accordion>

  <Accordion icon="4" title="Critical (8-10)">
    **Characteristics:**
    • Extensive damage
    • Safety systems compromised
    • Potential total loss
    • Repair cost approaches vehicle value

    **Examples:**
    • Severe frame damage
    • Airbag deployment
    • Flood/fire damage
    • Multiple system failures
  </Accordion>
</AccordionGroup>

### Repair Types

| Type             | Description                       | Typical Cost Range | Timeline  |
| ---------------- | --------------------------------- | ------------------ | --------- |
| **Cosmetic**     | Surface-level repairs, paint work | \$100-500          | 1-2 days  |
| **PDR**          | Paintless dent removal            | \$200-800          | 1-2 days  |
| **Panel Repair** | Body panel repair and refinish    | \$500-2000         | 2-5 days  |
| **Replacement**  | Part replacement                  | \$800-5000+        | 3-7 days  |
| **Structural**   | Frame/structural repairs          | \$2000-15000+      | 1-4 weeks |

### Error Responses

#### 400 Bad Request

```json theme={null}
{
  "status": "error",
  "error": {
    "code": "INVALID_DAMAGE_DATA",
    "message": "Damage location 'invalid_part' is not recognized",
    "type": "validation_error",
    "field": "damages[0].location"
  }
}
```

#### 404 Not Found

```json theme={null}
{
  "status": "error",
  "error": {
    "code": "INSPECTION_NOT_FOUND",
    "message": "The specified inspection_id does not exist",
    "type": "not_found_error",
    "field": "inspection_id"
  }
}
```

### Vehicle Parts Reference

<CardGroup cols={3}>
  <Card title="Exterior Panels" icon="car-side">
    • front\_bumper
    • rear\_bumper
    • hood
    • roof
    • trunk\_lid
    • front\_fender\_left
    • front\_fender\_right
    • front\_door\_left
    • front\_door\_right
    • rear\_door\_left
    • rear\_door\_right
    • quarter\_panel\_left
    • quarter\_panel\_right
  </Card>

  <Card title="Glass & Lights" icon="lightbulb">
    • windshield
    • rear\_window
    • side\_window\_fl
    • side\_window\_fr
    • side\_window\_rl
    • side\_window\_rr
    • headlight\_left
    • headlight\_right
    • taillight\_left
    • taillight\_right
    • fog\_light\_left
    • fog\_light\_right
  </Card>

  <Card title="Mechanical" icon="gears">
    • engine
    • transmission
    • suspension\_fl
    • suspension\_fr
    • suspension\_rl
    • suspension\_rr
    • exhaust\_system
    • fuel\_system
    • cooling\_system
    • brake\_system
  </Card>
</CardGroup>

### Advanced Features

<Tip>
  **Cost Optimization:** Request both OEM and aftermarket part pricing to provide repair options at different price points. Aftermarket parts can reduce costs by 30-50%.
</Tip>

### Integration Example

Combine visual inspection with damage assessment:

```python theme={null}
import requests

# Step 1: Create visual inspection
visual_response = requests.post(
    "https://api.steerai.autos/v1/inspections/visual",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={
        "vehicle_id": "veh_123",
        "images": [...]
    }
)
visual_id = visual_response.json()["data"]["inspection_id"]

# Step 2: Get detected damages
damages = visual_response.json()["data"]["results"]["damages"]

# Step 3: Assess damages with cost estimates
assessment_response = requests.post(
    "https://api.steerai.autos/v1/inspections/damage-assessment",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={
        "vehicle_id": "veh_123",
        "inspection_id": visual_id,
        "damages": damages,
        "assessment_options": {
            "include_part_prices": True,
            "labor_rate_region": "US_CALIFORNIA"
        }
    }
)

print(f"Total repair cost: ${assessment_response.json()['data']['summary']['repair_cost_summary']['recommended_repairs_total']['estimated']}")
```

### Webhooks

```json theme={null}
{
  "event": "damage_assessment.completed",
  "timestamp": "2024-01-15T12:00:05Z",
  "data": {
    "assessment_id": "asmt_1234567890abcdef",
    "vehicle_id": "veh_1234567890abcdef",
    "damages_assessed": 2,
    "overall_severity": "moderate",
    "estimated_repair_cost": 975,
    "value_reduction_percentage": 4.7,
    "report_url": "https://reports.steerai.autos/asmt_1234567890abcdef.pdf"
  }
}
```

<Warning>
  **Estimate Accuracy:** Repair cost estimates are based on regional averages and parts databases. Actual costs may vary by ±20% depending on specific shop rates and parts availability.
</Warning>
