Kullanıcı Profil Detaylarını Güncelle
Kullanıcı profil detaylarını güncelleme.
Endpoint
PUT /api/v1/user/details
Authentication
Bu endpoint authentication gerektirir.
Header: Authorization: Bearer \{token\}
Request
Headers
| Header | Değer | Zorunlu |
|---|---|---|
Authorization | Bearer \{token\} | Evet |
Content-Type | application/json | Evet |
Request Body
| Parametre | Tip | Zorunlu | Açıklama |
|---|---|---|---|
first_name | string | Hayır | Ad |
last_name | string | Hayır | Soyad |
phone | string | Hayır | Telefon |
country | string | Hayır | Ülke kodu |
city | string | Hayır | Şehir |
address | string | Hayır | Adres |
is_active | boolean | Hayır | Aktif durumu |
Example Request
{
"first_name": "Ada",
"last_name": "Lovelace",
"phone": "+90 555 000 00 00",
"country": "TR",
"city": "Istanbul",
"address": "Example Street 123"
}
Response
Success Response (200 OK)
{
"id": 1,
"user_id": 1,
"first_name": "Ada",
"last_name": "Lovelace",
"phone": "+90 555 000 00 00",
"country": "TR",
"city": "Istanbul",
"address": "Example Street 123",
"is_active": true,
"updated_at": "2025-11-20T12:00:00.000000Z"
}
Error Responses
422 Unprocessable Entity
{
"message": "The given data was invalid.",
"errors": {
"phone": ["The phone format is invalid."]
}
}
Code Examples
cURL
curl -X PUT https://api.example.com/api/v1/user/details \
-H "Authorization: Bearer \{token\}" \
-H "Content-Type: application/json" \
-d '{
"first_name": "Ada",
"last_name": "Lovelace",
"phone": "+90 555 000 00 00"
}'
Notes
- Kullanıcı sadece kendi profil detaylarını güncelleyebilir (
.ownpermission) - Profil detayı yoksa otomatik olarak oluşturulur
Related Endpoints
- Get Details - Profil detaylarını getir