Ana içeriğe geç

Müşteri güncelleme

Mevcut bir müşteri kaydını güncellemek için bu endpoint kullanılır. PATCH ile yalnızca değiştirmek istediğiniz alanları gönderirsiniz.

İstek

PATCH /api/customers/{id}
Accept: application/json
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

İstek gövdesi alanları

PATCH ile yalnızca güncellemek istediğiniz alanları gönderin. Tüm alanlar isteğe bağlıdır.

AlanTipAçıklama
typestringperson | company
tax_numberstringVKN/TCKN (10–11 hane)
tax_officestringVergi dairesi
titlestringTüzel ünvan
namestringAd
surnamestringSoyad
phonestringTelefon
emailstringE-posta
countrystringÜlke
postcodestringPosta kodu
citystringİl
districtstringİlçe
addressstringAçık adres
ibanstringIBAN

Örnek istekler

<?php
$body = ['name' => 'Mehmet', 'surname' => 'DEMİR', 'phone' => '5321234567', 'email' => 'musteri@example.com', 'country' => 'TÜRKİYE', 'postcode' => '16010', 'city' => 'BURSA', 'district' => 'YENİŞEHİR', 'address' => 'Cumhuriyet Mh. No:12', 'tax_number' => '', 'tax_office' => ''];
$ch = curl_init('https://app.faturaentegrator.com/api/customers/1');
curl_setopt_array($ch, [CURLOPT_CUSTOMREQUEST => 'PATCH', CURLOPT_POSTFIELDS => json_encode($body), CURLOPT_HTTPHEADER => ['Accept: application/json', 'Authorization: Bearer YOUR_API_KEY', 'Content-Type: application/json'], CURLOPT_RETURNTRANSFER => true]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);