Ana içeriğe geç

Webhook URL ayarı

Hesap düzeyinde bildirim webhook adresini kaydetmek veya güncellemek için bu endpoint kullanılır. Aynı URL ile updateOrCreate mantığı çalışır.

İstek

POST /api/helpers/settings-webhook
Accept: application/json
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

İstek gövdesi

AlanTipZorunluAçıklama
webhook_urlstringEvetGeçerli https:// (veya uygun şema) URL.

Örnek istekler

<?php
$body = ['webhook_url' => 'https://ornek.com/fatura-webhook'];
$ch = curl_init('https://app.faturaentegrator.com/api/helpers/settings-webhook');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => json_encode($body),
CURLOPT_HTTPHEADER => ['Accept: application/json', 'Authorization: Bearer YOUR_API_KEY', 'Content-Type: application/json'],
CURLOPT_RETURNTRANSFER => true,
]);
curl_exec($ch);
$code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

Başarılı işlemde HTTP 200 ve boş gövde dönebilir.