> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anivahealth.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Vypísať doručenia

> Vypísať pokusy o doručenie webhooku

Vypíše doručenia jedného webhooku od najnovších, s každým pokusom a HTTP statusom, ktorým tvoj
endpoint odpovedal.

> [!NOTE]
>
> Vyžaduje scope `webhooks_manage`.

## Požiadavka

### Parametre cesty

**id** `string` *required*

Identifikátor webhooku (UUID).

### Parametre dopytu

**status** `string`

Len doručenia v tomto stave: `pending`, `succeeded`, `failed` alebo `cancelled`.

**limit** `integer` (default: 20)

Maximálny počet vrátených doručení, od 1 do 100.

**before** `string`

ID doručenia tohto webhooku. Pošli posledné `id` zo stránky, ak chceš získať ďalšiu.

## Odpoveď

Pri úspechu API vráti `200 OK`.

**data** `object[]` *required*

Doručenia, od najnovších.

**doručenie**

**id** `string` *required*

Identifikátor doručenia (UUID). Jedno doručenie odošle jednu udalosť jednému webhooku.

**event** `object` *required*

Udalosť presne tak, ako bola odoslaná v tele požiadavky. Pozri [Payload](https://docs.anivahealth.com/sk/concepts/webhooks.md#payload).

**status** `string` *required*

`pending`, `succeeded`, `failed` (všetky pokusy zlyhali alebo endpoint odpovedal `410 Gone`) alebo
`cancelled` (webhook bol vypnutý, kým doručenie čakalo).

**attempt\_count** `integer` *required*

Doteraz vykonané pokusy. Opätovné odoslanie začína znova od `0`.

**next\_attempt\_at** `string`

Čas ďalšieho pokusu v ISO 8601 UTC. `null`, keď nie je naplánovaný žiadny pokus.

**last\_attempt\_at** `string`

Čas posledného pokusu v ISO 8601 UTC. Môže byť `null`.

**last\_response\_status** `integer`

HTTP status posledného pokusu. `null`, keď neprišla žiadna odpoveď, napríklad pri vypršaní časového limitu.

**last\_error** `string`

Sieťová chyba alebo status a začiatok tela odpovede. `null` po úspechu.

**attempts** `object[]` *required*

Posledných 20 pokusov, od najstarších. Každý obsahuje `at`, `status` (HTTP status alebo `null`),
`duration_ms` a `error`.

**created\_at** `string` *required*

Čas v ISO 8601 UTC, kedy bolo doručenie vytvorené.

**has\_more** `boolean` *required*

`true`, keď existujú staršie doručenia. Pošli posledné `id` ako `before`, ak ich chceš získať.

## Chybové odpovede

| Stav | Popis |
| - | - |
| `400` | Neplatná požiadavka, alebo `before` nie je doručenie tohto webhooku. Pozri správu `error`. |
| `401` | Chýbajúci alebo neplatný API kľúč. |
| `403` | Tvoj API kľúč nemá rozsah `webhooks_manage`. |
| `404` | Webhook sa nenašiel alebo patrí inému API kľúču. |
| `500` | Interná chyba servera. |

```bash cURL theme={null}
curl --request GET \
  --url https://anivahealth.com/api/v1/webhooks/4a6c8e0f-2b4d-4f6a-8c0e-2a4c6e8f0b1d/deliveries \
  --header 'x-api-key: YOUR_API_KEY'
```

```json 200 theme={null}
{
  "data": [
    {
      "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": "succeeded",
      "attempt_count": 2,
      "next_attempt_at": null,
      "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"
    }
  ],
  "has_more": false
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.