Overview
This endpoint allows authenticated users to update their profile information such as full name, apartment number, and phone number.
Authentication
Request Body
User’s apartment number in the building
Response
Updated user profile information
Unique profile identifier (UUID)
User’s full name (optional)
User’s apartment number in the building
User’s phone number (optional)
Whether the user has been approved by a building administrator
Whether the user has administrator privileges
Profile last update timestamp (ISO 8601)
Example Request
curl -X PUT "https://harbor-parking.vercel.app/api/profile" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"full_name": "John Doe",
"apartment_number": "12A",
"phone_number": "+1234567890"
}'
Example Response
{
"profile": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"email": "john.doe@example.com",
"full_name": "John Doe",
"apartment_number": "12A",
"phone_number": "+1234567890",
"is_approved": true,
"is_admin": false,
"updated_at": "2024-01-15T10:30:00Z"
}
}