Darstellung
Webhooks
Webhooks und Zustellprotokoll.
| Endpunkt | Anfrage |
|---|---|
| Webhooks auflisten | GET /v1/webhooks |
| Webhook anlegen | POST /v1/webhooks |
| Webhook abrufen | GET /v1/webhooks/{id} |
| Webhook ändern | PATCH /v1/webhooks/{id} |
| Webhook löschen | DELETE /v1/webhooks/{id} |
| Geheimnis des Webhooks erneuern | POST /v1/webhooks/{id}/rotate-secret |
| Testereignis senden | POST /v1/webhooks/{id}/test |
| Zustellprotokoll eines Webhooks | GET /v1/webhooks/{id}/deliveries |
| Zustellung erneut versuchen | POST /v1/webhook-deliveries/{id}/retry |
Webhooks auflisten GET
http
GET /v1/webhooksAnmeldung: API-Schlüssel oder Sitzung eines Admins (mehr)
Beispiel
bash
curl -sS --fail-with-body "https://api.tourblick.de/v1/webhooks" \
-H "Authorization: Bearer $TOURBLICK_API_KEY"js
const res = await fetch('https://api.tourblick.de/v1/webhooks', {
headers: {
Authorization: `Bearer ${process.env.TOURBLICK_API_KEY}`,
},
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
const webhookList = await res.json();
console.log(webhookList);Antwort
200 Erfolgreich · Schema WebhookList
json
{
"data": [
{
"id": "e29584a6-b3c5-46d7-a273-8e9fa0b1c2d3",
"url": "https://shop.example.com/hooks/tourblick",
"events": [
"tour.started",
"stop.next",
"stop.completed"
],
"active": true,
"description": "Shop-Benachrichtigungen",
"created_at": "2026-11-24T08:15:00.000Z",
"updated_at": "2026-11-24T08:15:00.000Z"
}
]
}Fehler
| Status | Code | Bedeutung |
|---|---|---|
| 401 | unauthorized | Nicht angemeldet |
| 403 | forbidden | Keine Berechtigung |
| 429 | rate_limited | Zu viele Anfragen |
| sonst | internal | Fehler (Format siehe Error) |
Format und Codes: Fehler.
Webhook anlegen (Geheimnis nur in dieser Antwort) POST
http
POST /v1/webhooksAnmeldung: API-Schlüssel oder Sitzung eines Admins (mehr)
Anfrage
Body als JSON (Content-Type: application/json).
| Feld | Typ | Pflicht | Beschreibung |
|---|---|---|---|
url | string (uri) | ja | |
events | array<string> | ja | Werte: tour.started, stop.link_created, stop.next, stop.completed, tour.finished. Anzahl mindestens 1 Einträge. |
active | boolean | – | |
description | string | null | – | Länge höchstens 500 Zeichen. |
Beispiel
bash
curl -sS --fail-with-body -X POST "https://api.tourblick.de/v1/webhooks" \
-H "Authorization: Bearer $TOURBLICK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://ihre-firma.de/tourblick/webhook",
"events": [
"tour.started",
"stop.next",
"stop.completed",
"tour.finished"
],
"description": "Shop-Benachrichtigungen"
}'js
const res = await fetch('https://api.tourblick.de/v1/webhooks', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.TOURBLICK_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
url: 'https://ihre-firma.de/tourblick/webhook',
events: ['tour.started', 'stop.next', 'stop.completed', 'tour.finished'],
description: 'Shop-Benachrichtigungen',
}),
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
const webhookWithSecret = await res.json();
console.log(webhookWithSecret);Antwort
201 Angelegt · Schema WebhookWithSecret
json
{
"id": "e29584a6-b3c5-46d7-a273-8e9fa0b1c2d3",
"url": "https://shop.example.com/hooks/tourblick",
"events": [
"tour.started",
"stop.next",
"stop.completed"
],
"active": true,
"description": "Shop-Benachrichtigungen",
"created_at": "2026-11-24T08:15:00.000Z",
"updated_at": "2026-11-24T08:15:00.000Z"
}Fehler
| Status | Code | Bedeutung |
|---|---|---|
| 401 | unauthorized | Nicht angemeldet |
| 403 | forbidden | Keine Berechtigung |
| 422 | validation_failed | Eingabe ungültig |
| 429 | rate_limited | Zu viele Anfragen |
| sonst | internal | Fehler (Format siehe Error) |
Format und Codes: Fehler.
Webhook abrufen GET
http
GET /v1/webhooks/{id}Anmeldung: API-Schlüssel oder Sitzung eines Admins (mehr)
Parameter
| Name | Ort | Typ | Pflicht | Beschreibung |
|---|---|---|---|---|
id | Pfad | string (uuid) | ja | ID der Ressource. Im Beispiel $WEBHOOK_ID. |
Beispiel
Vorher setzen: WEBHOOK_ID (Shell-Variable bzw. Umgebungsvariable, siehe Platzhalter).
bash
curl -sS --fail-with-body "https://api.tourblick.de/v1/webhooks/$WEBHOOK_ID" \
-H "Authorization: Bearer $TOURBLICK_API_KEY"js
const webhookId = process.env.WEBHOOK_ID;
const res = await fetch(`https://api.tourblick.de/v1/webhooks/${webhookId}`, {
headers: {
Authorization: `Bearer ${process.env.TOURBLICK_API_KEY}`,
},
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
const webhook = await res.json();
console.log(webhook);Antwort
200 Erfolgreich · Schema Webhook
json
{
"id": "e29584a6-b3c5-46d7-a273-8e9fa0b1c2d3",
"url": "https://shop.example.com/hooks/tourblick",
"events": [
"tour.started",
"stop.next",
"stop.completed"
],
"active": true,
"description": "Shop-Benachrichtigungen",
"created_at": "2026-11-24T08:15:00.000Z",
"updated_at": "2026-11-24T08:15:00.000Z"
}Fehler
| Status | Code | Bedeutung |
|---|---|---|
| 401 | unauthorized | Nicht angemeldet |
| 403 | forbidden | Keine Berechtigung |
| 404 | not_found | Nicht gefunden |
| 422 | validation_failed | Eingabe ungültig |
| 429 | rate_limited | Zu viele Anfragen |
| sonst | internal | Fehler (Format siehe Error) |
Format und Codes: Fehler.
Webhook ändern PATCH
http
PATCH /v1/webhooks/{id}Anmeldung: API-Schlüssel oder Sitzung eines Admins (mehr)
Parameter
| Name | Ort | Typ | Pflicht | Beschreibung |
|---|---|---|---|---|
id | Pfad | string (uuid) | ja | ID der Ressource. Im Beispiel $WEBHOOK_ID. |
Anfrage
Body als JSON (Content-Type: application/json). Der Body ist optional.
| Feld | Typ | Pflicht | Beschreibung |
|---|---|---|---|
url | string (uri) | – | |
events | array<string> | – | Werte: tour.started, stop.link_created, stop.next, stop.completed, tour.finished. Anzahl mindestens 1 Einträge. |
active | boolean | – | |
description | string | null | – | Länge höchstens 500 Zeichen. |
Beispiel
Vorher setzen: WEBHOOK_ID (Shell-Variable bzw. Umgebungsvariable, siehe Platzhalter).
bash
curl -sS --fail-with-body -X PATCH "https://api.tourblick.de/v1/webhooks/$WEBHOOK_ID" \
-H "Authorization: Bearer $TOURBLICK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"events": [
"tour.started",
"tour.finished"
],
"active": true
}'js
const webhookId = process.env.WEBHOOK_ID;
const res = await fetch(`https://api.tourblick.de/v1/webhooks/${webhookId}`, {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.TOURBLICK_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
events: ['tour.started', 'tour.finished'],
active: true,
}),
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
const webhook = await res.json();
console.log(webhook);Antwort
200 Erfolgreich · Schema Webhook
json
{
"id": "e29584a6-b3c5-46d7-a273-8e9fa0b1c2d3",
"url": "https://shop.example.com/hooks/tourblick",
"events": [
"tour.started",
"stop.next",
"stop.completed"
],
"active": true,
"description": "Shop-Benachrichtigungen",
"created_at": "2026-11-24T08:15:00.000Z",
"updated_at": "2026-11-24T08:15:00.000Z"
}Fehler
| Status | Code | Bedeutung |
|---|---|---|
| 401 | unauthorized | Nicht angemeldet |
| 403 | forbidden | Keine Berechtigung |
| 404 | not_found | Nicht gefunden |
| 422 | validation_failed | Eingabe ungültig |
| 429 | rate_limited | Zu viele Anfragen |
| sonst | internal | Fehler (Format siehe Error) |
Format und Codes: Fehler.
Webhook löschen DELETE
http
DELETE /v1/webhooks/{id}Anmeldung: API-Schlüssel oder Sitzung eines Admins (mehr)
Parameter
| Name | Ort | Typ | Pflicht | Beschreibung |
|---|---|---|---|---|
id | Pfad | string (uuid) | ja | ID der Ressource. Im Beispiel $WEBHOOK_ID. |
Beispiel
Vorher setzen: WEBHOOK_ID (Shell-Variable bzw. Umgebungsvariable, siehe Platzhalter).
bash
curl -sS --fail-with-body -X DELETE "https://api.tourblick.de/v1/webhooks/$WEBHOOK_ID" \
-H "Authorization: Bearer $TOURBLICK_API_KEY"js
const webhookId = process.env.WEBHOOK_ID;
const res = await fetch(`https://api.tourblick.de/v1/webhooks/${webhookId}`, {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.TOURBLICK_API_KEY}`,
},
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
console.log(res.status); // 204Antwort
204 Erfolgreich, kein Inhalt
Fehler
| Status | Code | Bedeutung |
|---|---|---|
| 401 | unauthorized | Nicht angemeldet |
| 403 | forbidden | Keine Berechtigung |
| 404 | not_found | Nicht gefunden |
| 422 | validation_failed | Eingabe ungültig |
| 429 | rate_limited | Zu viele Anfragen |
| sonst | internal | Fehler (Format siehe Error) |
Format und Codes: Fehler.
Geheimnis des Webhooks erneuern POST
http
POST /v1/webhooks/{id}/rotate-secretAnmeldung: API-Schlüssel oder Sitzung eines Admins (mehr)
Parameter
| Name | Ort | Typ | Pflicht | Beschreibung |
|---|---|---|---|---|
id | Pfad | string (uuid) | ja | ID der Ressource. Im Beispiel $WEBHOOK_ID. |
Beispiel
Vorher setzen: WEBHOOK_ID (Shell-Variable bzw. Umgebungsvariable, siehe Platzhalter).
bash
curl -sS --fail-with-body -X POST "https://api.tourblick.de/v1/webhooks/$WEBHOOK_ID/rotate-secret" \
-H "Authorization: Bearer $TOURBLICK_API_KEY"js
const webhookId = process.env.WEBHOOK_ID;
const res = await fetch(`https://api.tourblick.de/v1/webhooks/${webhookId}/rotate-secret`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.TOURBLICK_API_KEY}`,
},
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
const webhookWithSecret = await res.json();
console.log(webhookWithSecret);Antwort
200 Erfolgreich · Schema WebhookWithSecret
json
{
"id": "e29584a6-b3c5-46d7-a273-8e9fa0b1c2d3",
"url": "https://shop.example.com/hooks/tourblick",
"events": [
"tour.started",
"stop.next",
"stop.completed"
],
"active": true,
"description": "Shop-Benachrichtigungen",
"created_at": "2026-11-24T08:15:00.000Z",
"updated_at": "2026-11-24T08:15:00.000Z"
}Fehler
| Status | Code | Bedeutung |
|---|---|---|
| 401 | unauthorized | Nicht angemeldet |
| 403 | forbidden | Keine Berechtigung |
| 404 | not_found | Nicht gefunden |
| 422 | validation_failed | Eingabe ungültig |
| 429 | rate_limited | Zu viele Anfragen |
| sonst | internal | Fehler (Format siehe Error) |
Format und Codes: Fehler.
Testereignis senden POST
http
POST /v1/webhooks/{id}/testAnmeldung: API-Schlüssel oder Sitzung eines Admins (mehr)
Parameter
| Name | Ort | Typ | Pflicht | Beschreibung |
|---|---|---|---|---|
id | Pfad | string (uuid) | ja | ID der Ressource. Im Beispiel $WEBHOOK_ID. |
Anfrage
Body als JSON (Content-Type: application/json). Der Body ist optional.
| Feld | Typ | Pflicht | Beschreibung |
|---|---|---|---|
event_type | string | – | Standard tour.started. Werte: tour.started, stop.link_created, stop.next, stop.completed, tour.finished. |
Beispiel
Vorher setzen: WEBHOOK_ID (Shell-Variable bzw. Umgebungsvariable, siehe Platzhalter).
bash
curl -sS --fail-with-body -X POST "https://api.tourblick.de/v1/webhooks/$WEBHOOK_ID/test" \
-H "Authorization: Bearer $TOURBLICK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"event_type": "tour.started"
}'js
const webhookId = process.env.WEBHOOK_ID;
const res = await fetch(`https://api.tourblick.de/v1/webhooks/${webhookId}/test`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.TOURBLICK_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
event_type: 'tour.started',
}),
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
const webhookDelivery = await res.json();
console.log(webhookDelivery);Antwort
200 Erfolgreich · Schema WebhookDelivery
json
{
"id": "f3a695b7-c4d6-47e8-b384-9fa0b1c2d3e4",
"webhook_id": "e29584a6-b3c5-46d7-a273-8e9fa0b1c2d3",
"event_id": "04b7a6c8-d5e7-48f9-8495-a0b1c2d3e4f5",
"event_type": "stop.next",
"payload": {},
"status": "succeeded",
"attempts": 1,
"next_attempt_at": null,
"last_status_code": 200,
"last_error": null,
"delivered_at": "2026-11-24T08:15:00.000Z",
"created_at": "2026-11-24T08:15:00.000Z"
}Fehler
| Status | Code | Bedeutung |
|---|---|---|
| 401 | unauthorized | Nicht angemeldet |
| 403 | forbidden | Keine Berechtigung |
| 404 | not_found | Nicht gefunden |
| 422 | validation_failed | Eingabe ungültig |
| 429 | rate_limited | Zu viele Anfragen |
| sonst | internal | Fehler (Format siehe Error) |
Format und Codes: Fehler.
Zustellprotokoll eines Webhooks GET
http
GET /v1/webhooks/{id}/deliveriesAnmeldung: API-Schlüssel oder Sitzung eines Admins (mehr)
Parameter
| Name | Ort | Typ | Pflicht | Beschreibung |
|---|---|---|---|---|
id | Pfad | string (uuid) | ja | ID der Ressource. Im Beispiel $WEBHOOK_ID. |
limit | Query | integer | – | Anzahl Einträge (Standard 50, höchstens 500). Bereich 1–500. |
cursor | Query | string | – | Cursor aus next_cursor der vorigen Seite. Länge mindestens 1 Zeichen. |
status | Query | string | – | Werte: pending, succeeded, failed. |
event_type | Query | string | – | Werte: tour.started, stop.link_created, stop.next, stop.completed, tour.finished. |
Beispiel
Vorher setzen: WEBHOOK_ID (Shell-Variable bzw. Umgebungsvariable, siehe Platzhalter).
bash
curl -sS --fail-with-body "https://api.tourblick.de/v1/webhooks/$WEBHOOK_ID/deliveries?status=failed&limit=20" \
-H "Authorization: Bearer $TOURBLICK_API_KEY"js
const webhookId = process.env.WEBHOOK_ID;
const res = await fetch(`https://api.tourblick.de/v1/webhooks/${webhookId}/deliveries?status=failed&limit=20`, {
headers: {
Authorization: `Bearer ${process.env.TOURBLICK_API_KEY}`,
},
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
const webhookDeliveryPage = await res.json();
console.log(webhookDeliveryPage);Antwort
200 Erfolgreich · Liste von WebhookDelivery (data, next_cursor)
json
{
"data": [
{
"id": "f3a695b7-c4d6-47e8-b384-9fa0b1c2d3e4",
"webhook_id": "e29584a6-b3c5-46d7-a273-8e9fa0b1c2d3",
"event_id": "04b7a6c8-d5e7-48f9-8495-a0b1c2d3e4f5",
"event_type": "stop.next",
"payload": {},
"status": "succeeded",
"attempts": 1,
"next_attempt_at": null,
"last_status_code": 200,
"last_error": null,
"delivered_at": "2026-11-24T08:15:00.000Z",
"created_at": "2026-11-24T08:15:00.000Z"
}
],
"next_cursor": null
}Fehler
| Status | Code | Bedeutung |
|---|---|---|
| 401 | unauthorized | Nicht angemeldet |
| 403 | forbidden | Keine Berechtigung |
| 404 | not_found | Nicht gefunden |
| 422 | validation_failed | Eingabe ungültig |
| 429 | rate_limited | Zu viele Anfragen |
| sonst | internal | Fehler (Format siehe Error) |
Format und Codes: Fehler.
Zustellung erneut versuchen POST
http
POST /v1/webhook-deliveries/{id}/retryAnmeldung: API-Schlüssel oder Sitzung eines Admins (mehr)
Parameter
| Name | Ort | Typ | Pflicht | Beschreibung |
|---|---|---|---|---|
id | Pfad | string (uuid) | ja | ID der Ressource. Im Beispiel $DELIVERY_ID. |
Beispiel
Vorher setzen: DELIVERY_ID (Shell-Variable bzw. Umgebungsvariable, siehe Platzhalter).
bash
curl -sS --fail-with-body -X POST "https://api.tourblick.de/v1/webhook-deliveries/$DELIVERY_ID/retry" \
-H "Authorization: Bearer $TOURBLICK_API_KEY"js
const deliveryId = process.env.DELIVERY_ID;
const res = await fetch(`https://api.tourblick.de/v1/webhook-deliveries/${deliveryId}/retry`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.TOURBLICK_API_KEY}`,
},
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
const webhookDelivery = await res.json();
console.log(webhookDelivery);Antwort
200 Erfolgreich · Schema WebhookDelivery
json
{
"id": "f3a695b7-c4d6-47e8-b384-9fa0b1c2d3e4",
"webhook_id": "e29584a6-b3c5-46d7-a273-8e9fa0b1c2d3",
"event_id": "04b7a6c8-d5e7-48f9-8495-a0b1c2d3e4f5",
"event_type": "stop.next",
"payload": {},
"status": "succeeded",
"attempts": 1,
"next_attempt_at": null,
"last_status_code": 200,
"last_error": null,
"delivered_at": "2026-11-24T08:15:00.000Z",
"created_at": "2026-11-24T08:15:00.000Z"
}Fehler
| Status | Code | Bedeutung |
|---|---|---|
| 401 | unauthorized | Nicht angemeldet |
| 403 | forbidden | Keine Berechtigung |
| 404 | not_found | Nicht gefunden |
| 422 | validation_failed | Eingabe ungültig |
| 429 | rate_limited | Zu viele Anfragen |
| sonst | internal | Fehler (Format siehe Error) |
Format und Codes: Fehler.
Ereignisse
Aufbau der gesendeten Ereignisse: Webhook-Ereignisse.