Kullanıcı Profil Detayları
Kullanıcı profil detaylarını görüntüleme ve güncelleme.
Endpoint
GET /api/v1/user/details
Authentication
Bu endpoint authentication gerektirir.
Header: Authorization: Bearer \{token\}
Request
Headers
| Header | Değer | Zorunlu |
|---|---|---|
Authorization | Bearer \{token\} | Evet |
Query Parameters
Yok
Response
Success Response (200 OK)
{
"id": 1,
"user_id": 1,
"first_name": "John",
"last_name": "Doe",
"phone": "+90 555 000 00 00",
"country": "TR",
"city": "Istanbul",
"address": "Example Street 123",
"is_active": true,
"created_at": "2025-11-20T12:00:00.000000Z",
"updated_at": "2025-11-20T12:00:00.000000Z"
}
Error Responses
401 Unauthorized
{
"message": "Unauthenticated"
}
403 Forbidden
{
"message": "Forbidden"
}
Code Examples
cURL
curl -X GET https://api.example.com/api/v1/user/details \
-H "Authorization: Bearer \{token\}"
JavaScript (Fetch)
const response = await fetch('https://api.example.com/api/v1/user/details', {
method: 'GET',
headers: {
'Authorization': `Bearer ${token}`,
},
});
const detail = await response.json();
console.log(detail.first_name);
Notes
- Kullanıcı sadece kendi profil detaylarını görüntüleyebilir (
.ownpermission) - Profil detayı yoksa
nulldöner
Related Endpoints
- Update Details - Profil detaylarını güncelle