Update Damage Status
Update the status of a damage report.
Endpoint
INFO
PUT /api/v1/dashboard/damages/{damage}/status
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 |
|---|---|---|---|
status | string | Yes | New status |
notes | string | No | Status change notes |
Example Request
bash
curl -X PUT https://api.daakey.com/api/v1/dashboard/damages/1/status \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {token}" \
-d '{
"status": "assessing",
"notes": "Sent for assessment at body shop"
}'Response
Success (200)
json
{
"success": true,
"message": "Damage status updated",
"data": {
"id": 1,
"status": "assessing",
"history": [
{
"action": "status_changed",
"from": "reported",
"to": "assessing",
"notes": "Sent for assessment at body shop",
"user": "Admin User",
"timestamp": "2024-01-15T12:00:00Z"
}
],
"updated_at": "2024-01-15T12:00:00Z"
},
"request_id": "uuid",
"timestamp": "2024-01-01T00:00:00.000Z"
}Status Transitions
| From | To |
|---|---|
reported | assessing, resolved |
assessing | repairing, resolved |
repairing | resolved |