Overview
This endpoint allows users to register a new parking spot in the system.
Authentication
Request Body
Unique spot number or identifier
Building section or location description
Response
Created parking spot object
Unique spot identifier (UUID)
Spot number or identifier
ID of the spot owner (authenticated user)
Building section or location
Whether the spot has been verified by admin (always false on creation)
Spot creation timestamp (ISO 8601)
Spot last update timestamp (ISO 8601)
Example Request
curl -X POST "https://harbor-parking.vercel.app/api/parking-spots" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"spot_number": "A-15",
"building_section": "Level 2 Parking Garage"
}'
Example Response
{
"spot": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"spot_number": "A-15",
"owner_id": "456e7890-e89b-12d3-a456-426614174001",
"building_section": "Level 2 Parking Garage",
"is_verified": false,
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}
}