Overview
This endpoint allows parking spot owners to delete their availability windows.
You cannot delete an availability that has already been claimed. Cancel the associated claim first.
Authentication
Path Parameters
Unique identifier of the availability to delete
Response
ID of the deleted availability
Example Request
curl -X DELETE "https://harbor-parking.vercel.app/api/availabilities/789e0123-e89b-12d3-a456-426614174002" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json"
Example Response
{
"message": "Availability deleted successfully",
"deleted_availability_id": "789e0123-e89b-12d3-a456-426614174002"
}
Error Responses
{
"error": "Cannot delete a claimed availability. Cancel the claim first."
}