Webhook'lar
Teslimatı yeniden gönder
Bir webhook teslimatını yeniden gönder
POST
/
api
/
v1
/
webhooks
/
{id}
/
deliveries
/
{delivery_id}
/
resend
curl --request POST \
--url https://anivahealth.com/api/v1/webhooks/4a6c8e0f-2b4d-4f6a-8c0e-2a4c6e8f0b1d/deliveries/7c9e1a3b-5d7f-4b2d-9e4a-6c8e0a2b4d6f/resend \
--header 'x-api-key: YOUR_API_KEY'
{
"id": "7c9e1a3b-5d7f-4b2d-9e4a-6c8e0a2b4d6f",
"event": {
"id": "0b8e6f3a-2c4d-4e7f-9a1b-3c5d7e9f1a2b",
"type": "appointment.confirmed",
"timestamp": "2026-10-15T09:12:44.512Z",
"data": {
"object": "appointment",
"id": "c9f3e2a1-7d6b-4c5e-b3a2-1f0e9d8c7b6a",
"url": "https://anivahealth.com/api/v1/appointments/c9f3e2a1-7d6b-4c5e-b3a2-1f0e9d8c7b6a",
"status": "confirmed",
"previous_status": "pending",
"status_revision": 2
}
},
"status": "pending",
"attempt_count": 0,
"next_attempt_at": "2026-10-16T10:00:00.000Z",
"last_attempt_at": "2026-10-15T09:13:06.000Z",
"last_response_status": 204,
"last_error": null,
"attempts": [
{
"at": "2026-10-15T09:13:01.000Z",
"status": 503,
"duration_ms": 412,
"error": "HTTP 503: Service Unavailable"
},
{
"at": "2026-10-15T09:13:06.000Z",
"status": 204,
"duration_ms": 88,
"error": null
}
],
"created_at": "2026-10-15T09:13:00.000Z"
}
{
"error": "Delivery not found"
}
{
"error": "An attempt is running. Try again in two minutes."
}
Durumu ne olursa olsun bir teslimatı yeniden gönder. Aniva aynı olayı aynı
webhook-id ile gönderir
ve yeniden deneme planını baştan başlatır.
webhooks_manage kapsamını gerektirir.İstek
Yol parametreleri
Teslimatları listele üzerinden alınan teslimat kimliği (UUID).
Yanıt
Başarılı olduğunda API, teslimatla birlikte202 Accepted döndürür. status değeri pending olur.
İstek gövdesinde gönderildiği haliyle olay. Veri yükü bölümüne bak.
pending, succeeded, failed (tüm denemeler başarısız oldu veya uç nokta 410 Gone yanıtını verdi) veya
cancelled (beklemedeyken webhook devre dışı bırakıldı).En eskiden başlayarak son 20 deneme. Her birinde
at, status (HTTP durumu veya null), duration_ms
ve error bulunur.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 veya teslimat bulunamadı ya da webhook başka bir API anahtarına ait. |
409 | Bu teslimat için bir deneme sürüyor: iki dakika sonra tekrar dene. Ya da webhook devre dışı: önce etkinleştir. |
500 | İç sunucu hatası. |
curl --request POST \
--url https://anivahealth.com/api/v1/webhooks/4a6c8e0f-2b4d-4f6a-8c0e-2a4c6e8f0b1d/deliveries/7c9e1a3b-5d7f-4b2d-9e4a-6c8e0a2b4d6f/resend \
--header 'x-api-key: YOUR_API_KEY'
{
"id": "7c9e1a3b-5d7f-4b2d-9e4a-6c8e0a2b4d6f",
"event": {
"id": "0b8e6f3a-2c4d-4e7f-9a1b-3c5d7e9f1a2b",
"type": "appointment.confirmed",
"timestamp": "2026-10-15T09:12:44.512Z",
"data": {
"object": "appointment",
"id": "c9f3e2a1-7d6b-4c5e-b3a2-1f0e9d8c7b6a",
"url": "https://anivahealth.com/api/v1/appointments/c9f3e2a1-7d6b-4c5e-b3a2-1f0e9d8c7b6a",
"status": "confirmed",
"previous_status": "pending",
"status_revision": 2
}
},
"status": "pending",
"attempt_count": 0,
"next_attempt_at": "2026-10-16T10:00:00.000Z",
"last_attempt_at": "2026-10-15T09:13:06.000Z",
"last_response_status": 204,
"last_error": null,
"attempts": [
{
"at": "2026-10-15T09:13:01.000Z",
"status": 503,
"duration_ms": 412,
"error": "HTTP 503: Service Unavailable"
},
{
"at": "2026-10-15T09:13:06.000Z",
"status": 204,
"duration_ms": 88,
"error": null
}
],
"created_at": "2026-10-15T09:13:00.000Z"
}
{
"error": "Delivery not found"
}
{
"error": "An attempt is running. Try again in two minutes."
}
⌘I
curl --request POST \
--url https://anivahealth.com/api/v1/webhooks/4a6c8e0f-2b4d-4f6a-8c0e-2a4c6e8f0b1d/deliveries/7c9e1a3b-5d7f-4b2d-9e4a-6c8e0a2b4d6f/resend \
--header 'x-api-key: YOUR_API_KEY'
{
"id": "7c9e1a3b-5d7f-4b2d-9e4a-6c8e0a2b4d6f",
"event": {
"id": "0b8e6f3a-2c4d-4e7f-9a1b-3c5d7e9f1a2b",
"type": "appointment.confirmed",
"timestamp": "2026-10-15T09:12:44.512Z",
"data": {
"object": "appointment",
"id": "c9f3e2a1-7d6b-4c5e-b3a2-1f0e9d8c7b6a",
"url": "https://anivahealth.com/api/v1/appointments/c9f3e2a1-7d6b-4c5e-b3a2-1f0e9d8c7b6a",
"status": "confirmed",
"previous_status": "pending",
"status_revision": 2
}
},
"status": "pending",
"attempt_count": 0,
"next_attempt_at": "2026-10-16T10:00:00.000Z",
"last_attempt_at": "2026-10-15T09:13:06.000Z",
"last_response_status": 204,
"last_error": null,
"attempts": [
{
"at": "2026-10-15T09:13:01.000Z",
"status": 503,
"duration_ms": 412,
"error": "HTTP 503: Service Unavailable"
},
{
"at": "2026-10-15T09:13:06.000Z",
"status": 204,
"duration_ms": 88,
"error": null
}
],
"created_at": "2026-10-15T09:13:00.000Z"
}
{
"error": "Delivery not found"
}
{
"error": "An attempt is running. Try again in two minutes."
}