Darstellung
Stopps
Stopps anlegen (einzeln und gesammelt), ändern, sortieren, umhängen.
| Endpunkt | Anfrage |
|---|---|
| Stopps auflisten | GET /v1/stops |
| Stopps einer Tour in Reihenfolge | GET /v1/tours/{id}/stops |
| Stopp in einer Tour anlegen | POST /v1/tours/{id}/stops |
| Stopps gesammelt anlegen | POST /v1/tours/{id}/stops/bulk |
| Stopp abrufen | GET /v1/stops/{id} |
| Stopp ändern | PATCH /v1/stops/{id} |
| Stopp löschen | DELETE /v1/stops/{id} |
| Reihenfolge der Stopps festlegen | PUT /v1/tours/{id}/stops/order |
| Stopps in eine andere Tour verschieben | POST /v1/stops/move |
Stopps auflisten (Filter nach Tour und Geokodierung) GET
http
GET /v1/stopsAnmeldung: API-Schlüssel oder Sitzung eines Admins (mehr)
Parameter
| Name | Ort | Typ | Pflicht | Beschreibung |
|---|---|---|---|---|
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. |
tour_id | Query | string (uuid) | – | Nur Stopps dieser Tour. |
unassigned | Query | string | – | true = nur Stopps ohne Tour. Werte: true, false. |
geocode_status | Query | string | – | uncertain und failed erscheinen in der Verwaltung zur Korrektur. Werte: pending, ok, uncertain, failed, manual. |
status | Query | string | – | Werte: open, completed. |
external_ref | Query | string | – |
Beispiel
bash
curl -sS --fail-with-body "https://api.tourblick.de/v1/stops?geocode_status=uncertain&limit=50" \
-H "Authorization: Bearer $TOURBLICK_API_KEY"js
const res = await fetch('https://api.tourblick.de/v1/stops?geocode_status=uncertain&limit=50', {
headers: {
Authorization: `Bearer ${process.env.TOURBLICK_API_KEY}`,
},
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
const stopPage = await res.json();
console.log(stopPage);Antwort
200 Erfolgreich · Liste von Stop (data, next_cursor)
Beispiel-Antwort
json
{
"data": [
{
"id": "bf625173-8092-43a4-bf40-5b6c7d8e9fa0",
"tenant_id": "6a1f0c2e-3b4d-4e5f-8a9b-0c1d2e3f4a5b",
"tour_id": "ae514062-7f81-4293-ae3f-4a5b6c7d8e9f",
"first_name": "Anna",
"last_name": "Schmidt",
"company": null,
"address_line": "Invalidenstraße 50",
"postal_code": "10557",
"city": "Berlin",
"country": "DE",
"lat": 52.5251,
"lng": 13.3694,
"geocode_status": "ok",
"geocode_quality": 0.97,
"email": "anna.schmidt@example.com",
"phone": "+4915112345678",
"external_ref": "B-100234",
"notes": "Hinterhaus, 2. OG",
"time_window_start": null,
"time_window_end": null,
"sequence": 1,
"fixed": false,
"status": "open",
"completed_at": null,
"tracking_url": null,
"created_at": "2026-11-24T08:15:00.000Z",
"updated_at": "2026-11-24T08:15:00.000Z"
}
],
"next_cursor": null
}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.
Stopps einer Tour in Reihenfolge GET
http
GET /v1/tours/{id}/stopsAnmeldung: API-Schlüssel oder Sitzung eines Admins (mehr)
Parameter
| Name | Ort | Typ | Pflicht | Beschreibung |
|---|---|---|---|---|
id | Pfad | string (uuid) | ja | ID der Ressource. Im Beispiel $TOUR_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. |
Beispiel
Vorher setzen: TOUR_ID (Shell-Variable bzw. Umgebungsvariable, siehe Platzhalter).
bash
curl -sS --fail-with-body "https://api.tourblick.de/v1/tours/$TOUR_ID/stops?limit=100" \
-H "Authorization: Bearer $TOURBLICK_API_KEY"js
const tourId = process.env.TOUR_ID;
const res = await fetch(`https://api.tourblick.de/v1/tours/${tourId}/stops?limit=100`, {
headers: {
Authorization: `Bearer ${process.env.TOURBLICK_API_KEY}`,
},
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
const stopPage = await res.json();
console.log(stopPage);Antwort
200 Erfolgreich · Liste von Stop (data, next_cursor)
Beispiel-Antwort
json
{
"data": [
{
"id": "bf625173-8092-43a4-bf40-5b6c7d8e9fa0",
"tenant_id": "6a1f0c2e-3b4d-4e5f-8a9b-0c1d2e3f4a5b",
"tour_id": "ae514062-7f81-4293-ae3f-4a5b6c7d8e9f",
"first_name": "Anna",
"last_name": "Schmidt",
"company": null,
"address_line": "Invalidenstraße 50",
"postal_code": "10557",
"city": "Berlin",
"country": "DE",
"lat": 52.5251,
"lng": 13.3694,
"geocode_status": "ok",
"geocode_quality": 0.97,
"email": "anna.schmidt@example.com",
"phone": "+4915112345678",
"external_ref": "B-100234",
"notes": "Hinterhaus, 2. OG",
"time_window_start": null,
"time_window_end": null,
"sequence": 1,
"fixed": false,
"status": "open",
"completed_at": null,
"tracking_url": null,
"created_at": "2026-11-24T08:15:00.000Z",
"updated_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.
Stopp in einer Tour anlegen POST
http
POST /v1/tours/{id}/stopsBei laufender Tour entsteht sofort der Tracking-Link (Webhook stop.link_created).
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 $TOUR_ID. |
Anfrage
Body als JSON (Content-Type: application/json).
| Feld | Typ | Pflicht | Beschreibung |
|---|---|---|---|
first_name | string | null | – | Länge höchstens 120 Zeichen. |
last_name | string | null | – | Länge höchstens 120 Zeichen. |
company | string | null | – | Länge höchstens 200 Zeichen. |
address_line | string | ja | Länge 1–300 Zeichen. |
postal_code | string | ja | Länge 1–20 Zeichen. |
city | string | ja | Länge 1–120 Zeichen. |
country | string | – | Standard DE. Muster ^[A-Z]{2}$. |
lat | number | null | – | Mit lat/lng entfällt die Geokodierung (manual). Bereich -90–90. |
lng | number | null | – | Bereich -180–180. |
email | string (email) | null | – | Länge höchstens 320 Zeichen. |
phone | string | null | – | Telefonnummer im Format E.164. Muster ^\+[1-9]\d{6,14}$. |
external_ref | string | null | – | Länge höchstens 200 Zeichen. |
notes | string | null | – | Länge höchstens 2.000 Zeichen. |
time_window_start | string (date-time) | null | – | Zeitpunkt (ISO 8601). |
time_window_end | string (date-time) | null | – | Zeitpunkt (ISO 8601). |
fixed | boolean | – | |
sequence | integer | – | Gewünschte Position; ohne Angabe ans Ende. Bereich mindestens 1. |
Beispiel
Vorher setzen: TOUR_ID (Shell-Variable bzw. Umgebungsvariable, siehe Platzhalter).
bash
curl -sS --fail-with-body -X POST "https://api.tourblick.de/v1/tours/$TOUR_ID/stops" \
-H "Authorization: Bearer $TOURBLICK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"first_name": "Anna",
"last_name": "Schmidt",
"address_line": "Venloer Straße 151",
"postal_code": "50672",
"city": "Köln",
"country": "DE",
"email": "anna.schmidt@example.com",
"phone": "+4922112345678",
"external_ref": "B-100234",
"notes": "Hinterhaus, 2. OG"
}'js
const tourId = process.env.TOUR_ID;
const res = await fetch(`https://api.tourblick.de/v1/tours/${tourId}/stops`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.TOURBLICK_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
first_name: 'Anna',
last_name: 'Schmidt',
address_line: 'Venloer Straße 151',
postal_code: '50672',
city: 'Köln',
country: 'DE',
email: 'anna.schmidt@example.com',
phone: '+4922112345678',
external_ref: 'B-100234',
notes: 'Hinterhaus, 2. OG',
}),
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
const stop = await res.json();
console.log(stop);Antwort
201 Angelegt · Schema Stop
Beispiel-Antwort
json
{
"id": "bf625173-8092-43a4-bf40-5b6c7d8e9fa0",
"tenant_id": "6a1f0c2e-3b4d-4e5f-8a9b-0c1d2e3f4a5b",
"tour_id": "ae514062-7f81-4293-ae3f-4a5b6c7d8e9f",
"first_name": "Anna",
"last_name": "Schmidt",
"company": null,
"address_line": "Invalidenstraße 50",
"postal_code": "10557",
"city": "Berlin",
"country": "DE",
"lat": 52.5251,
"lng": 13.3694,
"geocode_status": "ok",
"geocode_quality": 0.97,
"email": "anna.schmidt@example.com",
"phone": "+4915112345678",
"external_ref": "B-100234",
"notes": "Hinterhaus, 2. OG",
"time_window_start": null,
"time_window_end": null,
"sequence": 1,
"fixed": false,
"status": "open",
"completed_at": null,
"tracking_url": null,
"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.
Stopps gesammelt anlegen (mit Fehlerbericht je Zeile) POST
http
POST /v1/tours/{id}/stops/bulkAnmeldung: API-Schlüssel oder Sitzung eines Admins (mehr)
Parameter
| Name | Ort | Typ | Pflicht | Beschreibung |
|---|---|---|---|---|
id | Pfad | string (uuid) | ja | ID der Ressource. Im Beispiel $TOUR_ID. |
Anfrage
Body als JSON (Content-Type: application/json).
| Feld | Typ | Pflicht | Beschreibung |
|---|---|---|---|
stops | array<object> | ja | Anzahl 1–1.000 Einträge. |
stops[].first_name | string | null | – | Länge höchstens 120 Zeichen. |
stops[].last_name | string | null | – | Länge höchstens 120 Zeichen. |
stops[].company | string | null | – | Länge höchstens 200 Zeichen. |
stops[].address_line | string | ja | Länge 1–300 Zeichen. |
stops[].postal_code | string | ja | Länge 1–20 Zeichen. |
stops[].city | string | ja | Länge 1–120 Zeichen. |
stops[].country | string | – | Standard DE. Muster ^[A-Z]{2}$. |
stops[].lat | number | null | – | Mit lat/lng entfällt die Geokodierung (manual). Bereich -90–90. |
stops[].lng | number | null | – | Bereich -180–180. |
stops[].email | string (email) | null | – | Länge höchstens 320 Zeichen. |
stops[].phone | string | null | – | Telefonnummer im Format E.164. Muster ^\+[1-9]\d{6,14}$. |
stops[].external_ref | string | null | – | Länge höchstens 200 Zeichen. |
stops[].notes | string | null | – | Länge höchstens 2.000 Zeichen. |
stops[].time_window_start | string (date-time) | null | – | Zeitpunkt (ISO 8601). |
stops[].time_window_end | string (date-time) | null | – | Zeitpunkt (ISO 8601). |
stops[].fixed | boolean | – | |
stops[].sequence | integer | – | Gewünschte Position; ohne Angabe ans Ende. Bereich mindestens 1. |
atomic | boolean | – | true = alles oder nichts; Standard false (gültige Zeilen werden angelegt). |
Beispiel
Vorher setzen: TOUR_ID (Shell-Variable bzw. Umgebungsvariable, siehe Platzhalter).
bash
curl -sS --fail-with-body -X POST "https://api.tourblick.de/v1/tours/$TOUR_ID/stops/bulk" \
-H "Authorization: Bearer $TOURBLICK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"stops": [
{
"first_name": "Anna",
"last_name": "Schmidt",
"address_line": "Venloer Straße 151",
"postal_code": "50672",
"city": "Köln",
"country": "DE",
"email": "anna.schmidt@example.com",
"phone": "+4922112345678",
"external_ref": "B-100234",
"notes": "Hinterhaus, 2. OG"
},
{
"company": "Café Ehrenfeld",
"address_line": "Aachener Straße 1",
"postal_code": "50674",
"city": "Köln",
"country": "DE",
"email": "bestellung@example.com",
"external_ref": "B-100235",
"time_window_start": "2026-11-25T08:00:00+01:00",
"time_window_end": "2026-11-25T10:00:00+01:00"
}
],
"atomic": false
}'js
const tourId = process.env.TOUR_ID;
const res = await fetch(`https://api.tourblick.de/v1/tours/${tourId}/stops/bulk`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.TOURBLICK_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
stops: [
{
first_name: 'Anna',
last_name: 'Schmidt',
address_line: 'Venloer Straße 151',
postal_code: '50672',
city: 'Köln',
country: 'DE',
email: 'anna.schmidt@example.com',
phone: '+4922112345678',
external_ref: 'B-100234',
notes: 'Hinterhaus, 2. OG',
},
{
company: 'Café Ehrenfeld',
address_line: 'Aachener Straße 1',
postal_code: '50674',
city: 'Köln',
country: 'DE',
email: 'bestellung@example.com',
external_ref: 'B-100235',
time_window_start: '2026-11-25T08:00:00+01:00',
time_window_end: '2026-11-25T10:00:00+01:00',
},
],
atomic: false,
}),
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
const stopsBulkResult = await res.json();
console.log(stopsBulkResult);Antwort
200 Erfolgreich · Schema StopsBulkResult
Beispiel-Antwort
json
{
"created_count": 1,
"failed_count": 1,
"results": [
{
"index": 0,
"status": "created",
"stop": {
"id": "bf625173-8092-43a4-bf40-5b6c7d8e9fa0",
"tenant_id": "6a1f0c2e-3b4d-4e5f-8a9b-0c1d2e3f4a5b",
"tour_id": "ae514062-7f81-4293-ae3f-4a5b6c7d8e9f",
"first_name": "Anna",
"last_name": "Schmidt",
"company": null,
"address_line": "Invalidenstraße 50",
"postal_code": "10557",
"city": "Berlin",
"country": "DE",
"lat": 52.5251,
"lng": 13.3694,
"geocode_status": "ok",
"geocode_quality": 0.97,
"email": "anna.schmidt@example.com",
"phone": "+4915112345678",
"external_ref": "B-100234",
"notes": "Hinterhaus, 2. OG",
"time_window_start": null,
"time_window_end": null,
"sequence": 1,
"fixed": false,
"status": "open",
"completed_at": null,
"tracking_url": null,
"created_at": "2026-11-24T08:15:00.000Z",
"updated_at": "2026-11-24T08:15:00.000Z"
}
},
{
"index": 1,
"status": "failed",
"errors": [
{
"field": "postal_code",
"message": "PLZ fehlt"
}
]
}
]
}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.
Stopp abrufen GET
http
GET /v1/stops/{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 $STOP_ID. |
Beispiel
Vorher setzen: STOP_ID (Shell-Variable bzw. Umgebungsvariable, siehe Platzhalter).
bash
curl -sS --fail-with-body "https://api.tourblick.de/v1/stops/$STOP_ID" \
-H "Authorization: Bearer $TOURBLICK_API_KEY"js
const stopId = process.env.STOP_ID;
const res = await fetch(`https://api.tourblick.de/v1/stops/${stopId}`, {
headers: {
Authorization: `Bearer ${process.env.TOURBLICK_API_KEY}`,
},
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
const stop = await res.json();
console.log(stop);Antwort
200 Erfolgreich · Schema Stop
Beispiel-Antwort
json
{
"id": "bf625173-8092-43a4-bf40-5b6c7d8e9fa0",
"tenant_id": "6a1f0c2e-3b4d-4e5f-8a9b-0c1d2e3f4a5b",
"tour_id": "ae514062-7f81-4293-ae3f-4a5b6c7d8e9f",
"first_name": "Anna",
"last_name": "Schmidt",
"company": null,
"address_line": "Invalidenstraße 50",
"postal_code": "10557",
"city": "Berlin",
"country": "DE",
"lat": 52.5251,
"lng": 13.3694,
"geocode_status": "ok",
"geocode_quality": 0.97,
"email": "anna.schmidt@example.com",
"phone": "+4915112345678",
"external_ref": "B-100234",
"notes": "Hinterhaus, 2. OG",
"time_window_start": null,
"time_window_end": null,
"sequence": 1,
"fixed": false,
"status": "open",
"completed_at": null,
"tracking_url": null,
"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.
Stopp ändern PATCH
http
PATCH /v1/stops/{id}Erledigte Stopps sind gesperrt (locked).
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 $STOP_ID. |
Anfrage
Body als JSON (Content-Type: application/json). Der Body ist optional. Erledigte Stopps sind gesperrt; Adressänderung löst neue Geokodierung aus.
| Feld | Typ | Pflicht | Beschreibung |
|---|---|---|---|
first_name | string | null | – | Länge höchstens 120 Zeichen. |
last_name | string | null | – | Länge höchstens 120 Zeichen. |
company | string | null | – | Länge höchstens 200 Zeichen. |
address_line | string | – | Länge 1–300 Zeichen. |
postal_code | string | – | Länge 1–20 Zeichen. |
city | string | – | Länge 1–120 Zeichen. |
country | string | – | Standard DE. Muster ^[A-Z]{2}$. |
lat | number | null | – | Mit lat/lng entfällt die Geokodierung (manual). Bereich -90–90. |
lng | number | null | – | Bereich -180–180. |
email | string (email) | null | – | Länge höchstens 320 Zeichen. |
phone | string | null | – | Telefonnummer im Format E.164. Muster ^\+[1-9]\d{6,14}$. |
external_ref | string | null | – | Länge höchstens 200 Zeichen. |
notes | string | null | – | Länge höchstens 2.000 Zeichen. |
time_window_start | string (date-time) | null | – | Zeitpunkt (ISO 8601). |
time_window_end | string (date-time) | null | – | Zeitpunkt (ISO 8601). |
fixed | boolean | – |
Beispiel
Vorher setzen: STOP_ID (Shell-Variable bzw. Umgebungsvariable, siehe Platzhalter).
bash
curl -sS --fail-with-body -X PATCH "https://api.tourblick.de/v1/stops/$STOP_ID" \
-H "Authorization: Bearer $TOURBLICK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"notes": "Bitte beim Nachbarn abgeben",
"phone": "+4922198765432"
}'js
const stopId = process.env.STOP_ID;
const res = await fetch(`https://api.tourblick.de/v1/stops/${stopId}`, {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.TOURBLICK_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
notes: 'Bitte beim Nachbarn abgeben',
phone: '+4922198765432',
}),
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
const stop = await res.json();
console.log(stop);Antwort
200 Erfolgreich · Schema Stop
Beispiel-Antwort
json
{
"id": "bf625173-8092-43a4-bf40-5b6c7d8e9fa0",
"tenant_id": "6a1f0c2e-3b4d-4e5f-8a9b-0c1d2e3f4a5b",
"tour_id": "ae514062-7f81-4293-ae3f-4a5b6c7d8e9f",
"first_name": "Anna",
"last_name": "Schmidt",
"company": null,
"address_line": "Invalidenstraße 50",
"postal_code": "10557",
"city": "Berlin",
"country": "DE",
"lat": 52.5251,
"lng": 13.3694,
"geocode_status": "ok",
"geocode_quality": 0.97,
"email": "anna.schmidt@example.com",
"phone": "+4915112345678",
"external_ref": "B-100234",
"notes": "Hinterhaus, 2. OG",
"time_window_start": null,
"time_window_end": null,
"sequence": 1,
"fixed": false,
"status": "open",
"completed_at": null,
"tracking_url": null,
"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 |
| 423 | locked | Gesperrt, z. B. erledigter Stopp |
| 429 | rate_limited | Zu viele Anfragen |
| sonst | internal | Fehler (Format siehe Error) |
Format und Codes: Fehler.
Stopp löschen DELETE
http
DELETE /v1/stops/{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 $STOP_ID. |
Beispiel
Vorher setzen: STOP_ID (Shell-Variable bzw. Umgebungsvariable, siehe Platzhalter).
bash
curl -sS --fail-with-body -X DELETE "https://api.tourblick.de/v1/stops/$STOP_ID" \
-H "Authorization: Bearer $TOURBLICK_API_KEY"js
const stopId = process.env.STOP_ID;
const res = await fetch(`https://api.tourblick.de/v1/stops/${stopId}`, {
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.
Reihenfolge der Stopps festlegen PUT
http
PUT /v1/tours/{id}/stops/orderÄndert sich dadurch der nächste Stopp einer laufenden Tour, wird stop.next neu ausgelöst.
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 $TOUR_ID. |
Anfrage
Body als JSON (Content-Type: application/json).
| Feld | Typ | Pflicht | Beschreibung |
|---|---|---|---|
stop_ids | array<string (uuid)> | ja | Alle offenen Stopps der Tour in neuer Reihenfolge; erledigte bleiben gesperrt. Anzahl mindestens 1 Einträge. |
Beispiel
Vorher setzen: TOUR_ID, OTHER_STOP_ID, STOP_ID (Shell-Variable bzw. Umgebungsvariable, siehe Platzhalter).
bash
curl -sS --fail-with-body -X PUT "https://api.tourblick.de/v1/tours/$TOUR_ID/stops/order" \
-H "Authorization: Bearer $TOURBLICK_API_KEY" \
-H "Content-Type: application/json" \
-d @- <<JSON
{
"stop_ids": [
"$OTHER_STOP_ID",
"$STOP_ID"
]
}
JSONjs
const tourId = process.env.TOUR_ID;
const otherStopId = process.env.OTHER_STOP_ID;
const stopId = process.env.STOP_ID;
const res = await fetch(`https://api.tourblick.de/v1/tours/${tourId}/stops/order`, {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.TOURBLICK_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
stop_ids: [otherStopId, stopId],
}),
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
const stopList = await res.json();
console.log(stopList);Antwort
200 Erfolgreich · Schema StopList
Beispiel-Antwort
json
{
"data": [
{
"id": "bf625173-8092-43a4-bf40-5b6c7d8e9fa0",
"tenant_id": "6a1f0c2e-3b4d-4e5f-8a9b-0c1d2e3f4a5b",
"tour_id": "ae514062-7f81-4293-ae3f-4a5b6c7d8e9f",
"first_name": "Anna",
"last_name": "Schmidt",
"company": null,
"address_line": "Invalidenstraße 50",
"postal_code": "10557",
"city": "Berlin",
"country": "DE",
"lat": 52.5251,
"lng": 13.3694,
"geocode_status": "ok",
"geocode_quality": 0.97,
"email": "anna.schmidt@example.com",
"phone": "+4915112345678",
"external_ref": "B-100234",
"notes": "Hinterhaus, 2. OG",
"time_window_start": null,
"time_window_end": null,
"sequence": 1,
"fixed": false,
"status": "open",
"completed_at": null,
"tracking_url": null,
"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.
Stopps in eine andere Tour verschieben (auch mehrere) POST
http
POST /v1/stops/moveErledigte Stopps sind gesperrt. Ein Stopp aus einer laufenden in eine geplante Tour behält seinen Link (Zustand rescheduled).
Anmeldung: API-Schlüssel oder Sitzung eines Admins (mehr)
Anfrage
Body als JSON (Content-Type: application/json).
| Feld | Typ | Pflicht | Beschreibung |
|---|---|---|---|
stop_ids | array<string (uuid)> | ja | Anzahl 1–1.000 Einträge. |
target_tour_id | string (uuid) | null | ja | Zieltour; null = aus der Tour lösen. |
position | integer | – | Einfügeposition in der Zieltour (ab 1); ohne Angabe ans Ende. Bereich mindestens 1. |
Beispiel
Vorher setzen: STOP_ID, TARGET_TOUR_ID (Shell-Variable bzw. Umgebungsvariable, siehe Platzhalter).
bash
curl -sS --fail-with-body -X POST "https://api.tourblick.de/v1/stops/move" \
-H "Authorization: Bearer $TOURBLICK_API_KEY" \
-H "Content-Type: application/json" \
-d @- <<JSON
{
"stop_ids": [
"$STOP_ID"
],
"target_tour_id": "$TARGET_TOUR_ID",
"position": 1
}
JSONjs
const stopId = process.env.STOP_ID;
const targetTourId = process.env.TARGET_TOUR_ID;
const res = await fetch('https://api.tourblick.de/v1/stops/move', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.TOURBLICK_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
stop_ids: [stopId],
target_tour_id: targetTourId,
position: 1,
}),
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
const stopMoveResult = await res.json();
console.log(stopMoveResult);Antwort
200 Erfolgreich · Schema StopMoveResult
Beispiel-Antwort
json
{
"data": [
{
"id": "bf625173-8092-43a4-bf40-5b6c7d8e9fa0",
"tenant_id": "6a1f0c2e-3b4d-4e5f-8a9b-0c1d2e3f4a5b",
"tour_id": "ae514062-7f81-4293-ae3f-4a5b6c7d8e9f",
"first_name": "Anna",
"last_name": "Schmidt",
"company": null,
"address_line": "Invalidenstraße 50",
"postal_code": "10557",
"city": "Berlin",
"country": "DE",
"lat": 52.5251,
"lng": 13.3694,
"geocode_status": "ok",
"geocode_quality": 0.97,
"email": "anna.schmidt@example.com",
"phone": "+4915112345678",
"external_ref": "B-100234",
"notes": "Hinterhaus, 2. OG",
"time_window_start": null,
"time_window_end": null,
"sequence": 1,
"fixed": false,
"status": "open",
"completed_at": null,
"tracking_url": null,
"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.