Skip to main content

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

Vehicle successfully removed.