🔗 Webhooks instellen

Leer hoe je webhooks instelt om automatisch notificaties te ontvangen bij P2000 meldingen. Met HMAC-SHA256 verificatie.

Wat zijn webhooks?

Webhooks zijn HTTP callbacks die automatisch worden aangeroepen wanneer een incident matcht met je automation filters. 112radar.nl stuurt een POST request naar een URL die jij opgeeft, met de volledige incident data als JSON payload.

Webhook aanmaken

  1. Ga naar InstellingenAutomations
  2. Klik op Nieuwe automation
  3. Kies als actie-type Webhook
  4. Vul de Webhook URL in (het adres waar je de data wilt ontvangen)
  5. Optioneel: vul een Webhook secret in voor HMAC-SHA256 verificatie
  6. Stel je filters in (discipline, regio, prioriteit, etc.)
  7. Klik op Opslaan

Payload formaat

Elke webhook ontvangt een JSON payload met het volgende formaat:

{
  "event": "after_enrichment",
  "incident": {
    "id": 1023456,
    "body": "P 1 BLB-01 Brand woning Kerkstraat Amsterdam",
    "disciplines": ["Brandweer"],
    "priority": 1,
    "city": "Amsterdam",
    "street": "Kerkstraat",
    "lat": 52.3676,
    "lng": 4.9041,
    "vehicles": [...],
    "status": "active",
    "first_message_at": "2026-03-31T10:15:00+02:00"
  },
  "automation_id": 42,
  "timestamp": "2026-03-31T10:15:01Z"
}

HMAC-SHA256 verificatie

Als je een webhook secret hebt ingesteld, bevat elke request een X-Webhook-Signature header. Verifieer deze om te garanderen dat de request van 112radar.nl komt:

$signature = hash_hmac('sha256', $requestBody, $webhookSecret);
$isValid = hash_equals($signature, $receivedSignature);

Retry beleid

Als je server niet bereikbaar is (non-2xx response), wordt de webhook maximaal 5 keer herhaald met exponentieel oplopende intervallen (1 min, 5 min, 30 min, 2 uur, 12 uur).