Skip to main content
DELETE
/
api
/
parking-spots
/
{id}
Delete Parking Spot
curl --request DELETE \
  --url https://harbor-parking.vercel.app/api/parking-spots/{id}
{
  "message": "Parking spot deleted successfully",
  "deleted_spot_id": "123e4567-e89b-12d3-a456-426614174000"
}

Overview

This endpoint allows spot owners to permanently delete their parking spot from the system.
This action is irreversible. All associated availabilities and claims will also be deleted.

Authentication

Path Parameters

id
string
required
Unique identifier of the parking spot to delete

Response

message
string
required
Confirmation message
deleted_spot_id
string
required
ID of the deleted parking spot

Example Request

curl -X DELETE "https://harbor-parking.vercel.app/api/parking-spots/123e4567-e89b-12d3-a456-426614174000" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json"

Example Response

{
  "message": "Parking spot deleted successfully",
  "deleted_spot_id": "123e4567-e89b-12d3-a456-426614174000"
}

Error Responses

{
  "error": "You can only delete your own parking spots"
}