Remove a vehicle from the fleet
DELETE/company/vehicles/:id
Endpoint to permanently delete a vehicle from the company's fleet. This action cannot be undone and will delete all data associated with the vehicle.
Requirements:
- Administrator permissions
- Valid JWT token
Considerations:
- Vehicles associated with active operations cannot be deleted
- Vehicle images will be deleted from storage
Request
Responses
- 200
- 401
- 404
- 409
Vehicle successfully removed.
Unauthorized. The JWT token is invalid, has expired, or lacks administrator permissions. A valid token must be included in the Authorization header: Bearer {token}
Vehicle not found. The provided ID does not correspond to any existing vehicle or has already been deleted.
Conflict. The vehicle cannot be deleted because it is associated with active operations.
Operations must be canceled or completed first.