Webhook'lar
Webhook'u güncelle
Bir webhook’u değiştir, devre dışı bırak veya etkinleştir
PATCH
/
api
/
v1
/
webhooks
/
{id}
curl --request PATCH \
--url https://anivahealth.com/api/v1/webhooks/4a6c8e0f-2b4d-4f6a-8c0e-2a4c6e8f0b1d \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"status": "enabled"
}'
{
"id": "4a6c8e0f-2b4d-4f6a-8c0e-2a4c6e8f0b1d",
"url": "https://partner.example.com/webhooks/aniva",
"description": "Production",
"enabled_events": [
"appointment.confirmed",
"appointment.results.completed",
"home_kit_order.results.completed"
],
"alert_emails": ["ops@partner.example.com"],
"status": "enabled",
"disabled_at": null,
"disabled_reason": null,
"failing_since": null,
"previous_secret_expires_at": null,
"created_at": "2026-10-15T08:00:00.000Z",
"updated_at": "2026-10-16T07:30:00.000Z"
}
{
"error": "Webhook not found"
}
{
"error": "Aniva disabled this endpoint. Contact Aniva to enable it."
}
Bir webhook’u değiştir. Yalnızca değiştirmek istediğin alanları gönder. Devre dışı bırakılmış bir webhook’u
tekrar başlatmak için
status: "enabled" gönder. Hata bildirimleri bölümüne bak.
webhooks_manage kapsamını gerektirir.İstek
Yol parametreleri
Gövde parametreleri
Yeni HTTPS URL’si. Oluştur ile aynı kurallar.
Yanıt
Başarılı olduğunda API, güncellenmiş webhook ile200 OK döndürür.
Bu webhook’un aldığı olay türleri.
* tüm türler anlamına gelir.Webhook’un neden devre dışı bırakıldığı. Bkz. Hata bildirimleri. Etkin durumdayken
null.Mevcut başarısızlık serisinin başladığı ISO 8601 UTC zamanı. Son teslimat başarılı olduğunda
null.Önceki gizli anahtarın imzalamayı durduracağı ISO 8601 UTC zamanı. Anahtar döndürme devam etmiyorken
null.Hata yanıtları
| Durum | Açıklama |
|---|---|
400 | Geçersiz istek. error mesajına bak. |
401 | Geçersiz API anahtarı. |
403 | API anahtarı yok veya API anahtarında webhooks_manage kapsamı yok. |
404 | Webhook bulunamadı veya başka bir API anahtarına ait. |
409 | Aniva’nın devre dışı bıraktığı bir webhook için status: "enabled". Etkinleştirmek için Aniva ile iletişime geç. |
500 | İç sunucu hatası. |
curl --request PATCH \
--url https://anivahealth.com/api/v1/webhooks/4a6c8e0f-2b4d-4f6a-8c0e-2a4c6e8f0b1d \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"status": "enabled"
}'
{
"id": "4a6c8e0f-2b4d-4f6a-8c0e-2a4c6e8f0b1d",
"url": "https://partner.example.com/webhooks/aniva",
"description": "Production",
"enabled_events": [
"appointment.confirmed",
"appointment.results.completed",
"home_kit_order.results.completed"
],
"alert_emails": ["ops@partner.example.com"],
"status": "enabled",
"disabled_at": null,
"disabled_reason": null,
"failing_since": null,
"previous_secret_expires_at": null,
"created_at": "2026-10-15T08:00:00.000Z",
"updated_at": "2026-10-16T07:30:00.000Z"
}
{
"error": "Webhook not found"
}
{
"error": "Aniva disabled this endpoint. Contact Aniva to enable it."
}
⌘I
curl --request PATCH \
--url https://anivahealth.com/api/v1/webhooks/4a6c8e0f-2b4d-4f6a-8c0e-2a4c6e8f0b1d \
--header 'x-api-key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"status": "enabled"
}'
{
"id": "4a6c8e0f-2b4d-4f6a-8c0e-2a4c6e8f0b1d",
"url": "https://partner.example.com/webhooks/aniva",
"description": "Production",
"enabled_events": [
"appointment.confirmed",
"appointment.results.completed",
"home_kit_order.results.completed"
],
"alert_emails": ["ops@partner.example.com"],
"status": "enabled",
"disabled_at": null,
"disabled_reason": null,
"failing_since": null,
"previous_secret_expires_at": null,
"created_at": "2026-10-15T08:00:00.000Z",
"updated_at": "2026-10-16T07:30:00.000Z"
}
{
"error": "Webhook not found"
}
{
"error": "Aniva disabled this endpoint. Contact Aniva to enable it."
}