Resolve Damage
Mark a damage report as resolved.
Endpoint
INFO
PUT /api/v1/dashboard/damages/{damage}/resolve
Headers
| Header | Value | Required |
|---|---|---|
Content-Type | application/json | Yes |
Accept | application/json | Yes |
Authorization | Bearer {token} | Yes |
Path Parameters
| Parameter | Type | Description |
|---|---|---|
damage | integer | Damage report ID |
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
actual_cost | decimal | Yes | Actual repair cost |
notes | string | No | Resolution notes |
Example Request
bash
curl -X PUT https://api.daakey.com/api/v1/dashboard/damages/1/resolve \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-d '{
"actual_cost": 225.00,
"notes": "Repaired at ABC Body Shop, invoice #12345"
}'Response
Success (200)
json
{
"success": true,
"message": "Damage resolved",
"data": {
"id": 1,
"status": "resolved",
"repair": {
"estimated_cost": 250.00,
"actual_cost": 225.00,
"notes": "Repaired at ABC Body Shop, invoice #12345",
"resolved_at": "2024-01-18T14:00:00Z",
"resolved_by": {
"id": 1,
"name": "Admin User"
}
},
"updated_at": "2024-01-18T14:00:00Z"
},
"request_id": "uuid",
"timestamp": "2024-01-01T00:00:00.000Z"
}Notes
- Resolving updates the vehicle status if it was in maintenance
- The actual cost is recorded for reporting purposes