Skip to content

Damage Images

Manage images for a damage report.

Add Image

Upload a new image to a damage report.

Endpoint

INFO

POST /api/v1/dashboard/damages/{damage}/images

Headers

HeaderValueRequired
Content-Typemultipart/form-dataYes
Acceptapplication/jsonYes
AuthorizationBearer {token}Yes

Request Body

ParameterTypeRequiredDescription
imagefileYesImage file (JPEG, PNG)

Example Request

bash
curl -X POST https://api.daakey.com/api/v1/dashboard/damages/1/images \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}" \
  -F "image=@/path/to/damage-photo.jpg"

Success Response (201)

json
{
  "success": true,
  "message": "Image added",
  "data": {
    "id": 3,
    "url": "https://api.daakey.com/storage/damages/1/image3.jpg",
    "uploaded_at": "2024-01-15T12:00:00Z"
  },
  "request_id": "uuid",
  "timestamp": "2024-01-01T00:00:00.000Z"
}

Remove Image

Remove an image from a damage report.

Endpoint

INFO

DELETE /api/v1/dashboard/damages/{damage}/images/{image}

Path Parameters

ParameterTypeDescription
damageintegerDamage report ID
imageintegerImage ID

Example Request

bash
curl -X DELETE https://api.daakey.com/api/v1/dashboard/damages/1/images/3 \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}"

Success Response (200)

json
{
  "success": true,
  "message": "Image removed",
  "data": null,
  "request_id": "uuid",
  "timestamp": "2024-01-01T00:00:00.000Z"
}

Notes

  • Maximum 10 images per damage report
  • Maximum file size: 5MB
  • Accepted formats: JPEG, PNG

Daakey Car Sharing Platform