Müşteri Detaylarını Güncelle
Müşteri detaylarını günceller.
Endpoint
PUT /api/v1/customers/\{uuid\}/details
PATCH /api/v1/customers/\{uuid\}/details
Authentication
Bu endpoint authentication gerektirir.
Header: Authorization: Bearer \{token\}
Permission
customer.details.update- Tüm müşteri detaylarını güncellemecustomer.details.update.own- Sadece kendi müşteri detaylarını güncelleme
Request
Headers
| Header | Değer | Zorunlu |
|---|---|---|
Authorization | Bearer \{token\} | Evet |
Content-Type | application/json | Evet |
Path Parameters
| Parametre | Tip | Zorunlu | Açıklama |
|---|---|---|---|
uuid | string | Evet | Müşteri UUID'si |
Request Body
| Parametre | Tip | Zorunlu | Açıklama |
|---|---|---|---|
annual_revenue | number | Hayır | Yıllık gelir |
annual_revenue_currency | string | Hayır | Yıllık gelir para birimi |
employee_count | integer | Hayır | Çalışan sayısı |
industry | string | Hayır | Sektör |
website | string | Hayır | Web sitesi |
address | string | Hayır | Adres |
is_active | boolean | Hayır | Aktif durumu |
Example Request
{
"annual_revenue": 2000000,
"annual_revenue_currency": "USD",
"employee_count": 100,
"industry": "Technology",
"website": "https://example.com"
}
Response
Success Response (200 OK)
{
"id": 1,
"customer_id": 1,
"annual_revenue": 2000000,
"annual_revenue_currency": "USD",
"annual_revenue_converted": 60000000,
"annual_revenue_currency_converted": "TRY",
"employee_count": 100,
"industry": "Technology",
"website": "https://example.com",
"is_active": true,
"updated_at": "2025-11-20T12:00:00.000000Z"
}
Error Responses
404 Not Found
{
"message": "Customer not found"
}
403 Forbidden
{
"message": "Forbidden"
}
Code Examples
cURL
curl -X PATCH https://api.example.com/api/v1/customers/550e8400-e29b-41d4-a716-446655440000/details \
-H "Authorization: Bearer \{token\}" \
-H "Content-Type: application/json" \
-d '{
"annual_revenue": 2000000,
"annual_revenue_currency": "USD",
"employee_count": 100
}'
Notes
- Müşteri detayı yoksa otomatik olarak oluşturulur
- Yıllık gelir kullanıcının para birimi tercihine göre dönüştürülür
PUTtüm alanları günceller,PATCHsadece gönderilen alanları günceller
Related Endpoints
- Müşteri Detaylarını Getir - Müşteri detaylarını getir
- Müşteri Detaylarını Sil - Müşteri detaylarını sil