Skip to main content

Müşteri Güncelle

Müşteri bilgilerini günceller.

Endpoint

PUT /api/v1/customers/\{uuid\}
PATCH /api/v1/customers/\{uuid\}

Authentication

Bu endpoint authentication gerektirir.

Header: Authorization: Bearer \{token\}

Permission

  • customers.update - Tüm müşterileri güncelleme
  • customers.update.own - Sadece kendi müşterilerini güncelleme

Request

Headers

HeaderDeğerZorunlu
AuthorizationBearer \{token\}Evet
Content-Typeapplication/jsonEvet

Path Parameters

ParametreTipZorunluAçıklama
uuidstringEvetMüşteri UUID'si

Request Body

ParametreTipZorunluAçıklama
company_namestringHayırŞirket adı
legal_namestringHayırYasal ad
tax_numberstringHayırVergi numarası
emailstringHayırE-posta adresi
phonestringHayırTelefon numarası
organization_idintegerHayırOrganizasyon ID'si
is_activebooleanHayırAktif durumu

Example Request

{
"company_name": "Örnek Şirket Updated",
"email": "info+updated@ornek.com",
"is_active": true
}

Response

Success Response (200 OK)

{
"id": 1,
"uuid": "550e8400-e29b-41d4-a716-446655440000",
"company_name": "Örnek Şirket Updated",
"legal_name": "Örnek Şirket Ltd.",
"email": "info+updated@ornek.com",
"is_active": true,
"updated_at": "2025-11-20T12:00:00.000000Z"
}

Error Responses

404 Not Found

{
"message": "Not Found"
}

403 Forbidden

{
"message": "Forbidden"
}

Code Examples

cURL

curl -X PATCH https://api.example.com/api/v1/customers/550e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer \{token\}" \
-H "Content-Type: application/json" \
-d '{
"company_name": "Örnek Şirket Updated",
"email": "info+updated@ornek.com"
}'

Notes

  • .own permission'ı olan kullanıcılar sadece kendi müşterilerini güncelleyebilir
  • PUT tüm alanları günceller, PATCH sadece gönderilen alanları günceller