Skip to content

Update Vehicle

Update an existing vehicle's information.

Endpoint

INFO

PUT /api/v1/dashboard/vehicles/{vehicle}

Headers

HeaderValueRequired
Content-Typeapplication/jsonYes
Acceptapplication/jsonYes
AuthorizationBearer {token}Yes

Path Parameters

ParameterTypeDescription
vehicleintegerVehicle ID

Request Body

ParameterTypeRequiredDescription
station_idintegerNoStation ID
brandstringNoVehicle brand
modelstringNoVehicle model
yearintegerNoManufacturing year
colorstringNoVehicle color
categorystringNoVehicle category
hourly_ratedecimalNoHourly rental rate
daily_ratedecimalNoDaily rental rate
featuresarrayNoList of features
statusstringNoVehicle status

Example Request

bash
curl -X PUT https://api.daakey.com/api/v1/dashboard/vehicles/1 \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer {token}" \
  -d '{
    "hourly_rate": 18.00,
    "daily_rate": 95.00,
    "features": ["AC", "Bluetooth", "GPS", "Backup Camera", "Heated Seats"]
  }'

Response

Success (200)

json
{
  "success": true,
  "message": "Vehicle updated",
  "data": {
    "id": 1,
    "plate_number": "ABC-123",
    "pricing": {
      "hourly_rate": 18.00,
      "daily_rate": 95.00
    },
    "features": ["AC", "Bluetooth", "GPS", "Backup Camera", "Heated Seats"],
    "updated_at": "2024-01-15T00:00:00Z"
  },
  "request_id": "uuid",
  "timestamp": "2024-01-01T00:00:00.000Z"
}

Notes

  • Plate number cannot be changed
  • Changing station reassigns the vehicle

Daakey Car Sharing Platform