Update Profile
Update the authenticated user's profile information.
Endpoint
Authentication
Required (User role)
Request Body
Content-Type: multipart/form-data
Form Fields
| Field | Type | Required | Description |
|---|---|---|---|
first_name |
string | No | User's first name |
last_name |
string | No | User's last name |
phone |
string | No | User's phone number |
profile_photo |
file | No | Profile photo image |
Response
Success (200 OK)
{
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"phone": "+994501234567",
"profile_photo": "https://...",
"preferred_language": "AZERBAIJANI",
"role": "1",
"created": "2025-01-15T10:30:00Z"
}
Error Responses
User Not Found (404)
Validation Error (400)
If phone is provided and invalid:
Example Request
curl -X PUT "https://api.luxmart.site/v1/accounts/user/site/" \
-H "Authorization: Token your_access_token" \
-F "first_name=John" \
-F "last_name=Doe" \
-F "phone=+994501234567" \
-F "profile_photo=@/path/to/image.jpg"
Notes
- Only provided fields are updated
- Profile photo is uploaded to S3
- Phone number is validated if provided
- Email cannot be changed via this endpoint