Delete vehicle by ID (alternative DELETE)
DELETE/truckers/vehicles/delete/:id
Alternative version of the DELETE /{id} endpoint for deleting vehicles. Functionally equivalent to DELETE /{id} but with a different route.
Parameters:
- id (required): Unique ID of the vehicle to delete (MongoDB ObjectId)
Use cases:
- Compatibility with clients requiring specific routes
- Deletion from HTML forms with predefined routes
Notes:
- Deletion is permanent and cannot be undone
- Associated S3 images will also be deleted
- Requires valid JWT authentication
Request
Responses
- 200
- 401
- 403
- 404
Vehicle successfully removed.
Unauthorized
Authorization or validation error.
Occurs when the user lacks permissions or the data is invalid.
Vehicle not found