Darstellung
Nutzer
Admins und Fahrer.
| Endpunkt | Anfrage |
|---|---|
| Nutzer des Mandanten auflisten | GET /v1/users |
| Admin oder Fahrer per E-Mail einladen | POST /v1/users/invitations |
| Nutzer ändern | PATCH /v1/users/{id} |
| Nutzer entfernen | DELETE /v1/users/{id} |
Nutzer des Mandanten auflisten GET
http
GET /v1/usersAnmeldung: 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. |
role | Query | string | – | Rolle: admin (Verwaltung) oder driver (Fahrer-App). Werte: admin, driver. |
status | Query | string | – | Werte: invited, active, disabled. |
Beispiel
bash
curl -sS --fail-with-body "https://api.tourblick.de/v1/users?role=driver" \
-H "Authorization: Bearer $TOURBLICK_API_KEY"js
const res = await fetch('https://api.tourblick.de/v1/users?role=driver', {
headers: {
Authorization: `Bearer ${process.env.TOURBLICK_API_KEY}`,
},
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
const userList = await res.json();
console.log(userList);Antwort
200 Erfolgreich · Liste von User (data, next_cursor)
json
{
"data": [
{
"id": "8c3f2e40-5d6f-4071-8c1d-2e3f4a5b6c7d",
"tenant_id": "6a1f0c2e-3b4d-4e5f-8a9b-0c1d2e3f4a5b",
"email": "max.fahrer@example.com",
"display_name": "Max Fahrer",
"roles": [
"driver"
],
"status": "active",
"mfa_enabled": false,
"last_login_at": "2026-11-24T06:02:00.000Z",
"created_at": "2026-11-01T10:00:00.000Z",
"updated_at": "2026-11-24T06:02: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.
Admin oder Fahrer per E-Mail einladen POST
http
POST /v1/users/invitationsAnmeldung: API-Schlüssel oder Sitzung eines Admins (mehr)
Anfrage
Body als JSON (Content-Type: application/json). Einladung per E-Mail.
| Feld | Typ | Pflicht | Beschreibung |
|---|---|---|---|
email | string (email) | ja | Länge höchstens 320 Zeichen. |
display_name | string | – | Länge 1–120 Zeichen. |
roles | array<string> | ja | Mindestens eine Rolle. Werte: admin, driver. Anzahl mindestens 1 Einträge. |
Beispiel
bash
curl -sS --fail-with-body -X POST "https://api.tourblick.de/v1/users/invitations" \
-H "Authorization: Bearer $TOURBLICK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "max.fahrer@example.com",
"display_name": "Max Fahrer",
"roles": [
"driver"
]
}'js
const res = await fetch('https://api.tourblick.de/v1/users/invitations', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.TOURBLICK_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
email: 'max.fahrer@example.com',
display_name: 'Max Fahrer',
roles: ['driver'],
}),
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
const user = await res.json();
console.log(user);Antwort
201 Angelegt · Schema User
json
{
"id": "8c3f2e40-5d6f-4071-8c1d-2e3f4a5b6c7d",
"tenant_id": "6a1f0c2e-3b4d-4e5f-8a9b-0c1d2e3f4a5b",
"email": "max.fahrer@example.com",
"display_name": "Max Fahrer",
"roles": [
"driver"
],
"status": "active",
"mfa_enabled": false,
"last_login_at": "2026-11-24T06:02:00.000Z",
"created_at": "2026-11-01T10:00:00.000Z",
"updated_at": "2026-11-24T06:02: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.
Nutzer ändern (Name, Rollen, sperren) PATCH
http
PATCH /v1/users/{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 $USER_ID. |
Anfrage
Body als JSON (Content-Type: application/json). Der Body ist optional.
| Feld | Typ | Pflicht | Beschreibung |
|---|---|---|---|
display_name | string | – | Länge 1–120 Zeichen. |
roles | array<string> | – | Mindestens eine Rolle. Werte: admin, driver. Anzahl mindestens 1 Einträge. |
status | string | – | Werte: active, disabled. |
Beispiel
Vorher setzen: USER_ID (Shell-Variable bzw. Umgebungsvariable, siehe Platzhalter).
bash
curl -sS --fail-with-body -X PATCH "https://api.tourblick.de/v1/users/$USER_ID" \
-H "Authorization: Bearer $TOURBLICK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"display_name": "Max Fahrer (Springer)",
"roles": [
"driver"
]
}'js
const userId = process.env.USER_ID;
const res = await fetch(`https://api.tourblick.de/v1/users/${userId}`, {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.TOURBLICK_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
display_name: 'Max Fahrer (Springer)',
roles: ['driver'],
}),
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
const user = await res.json();
console.log(user);Antwort
200 Erfolgreich · Schema User
json
{
"id": "8c3f2e40-5d6f-4071-8c1d-2e3f4a5b6c7d",
"tenant_id": "6a1f0c2e-3b4d-4e5f-8a9b-0c1d2e3f4a5b",
"email": "max.fahrer@example.com",
"display_name": "Max Fahrer",
"roles": [
"driver"
],
"status": "active",
"mfa_enabled": false,
"last_login_at": "2026-11-24T06:02:00.000Z",
"created_at": "2026-11-01T10:00:00.000Z",
"updated_at": "2026-11-24T06:02: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.
Nutzer entfernen DELETE
http
DELETE /v1/users/{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 $USER_ID. |
Beispiel
Vorher setzen: USER_ID (Shell-Variable bzw. Umgebungsvariable, siehe Platzhalter).
bash
curl -sS --fail-with-body -X DELETE "https://api.tourblick.de/v1/users/$USER_ID" \
-H "Authorization: Bearer $TOURBLICK_API_KEY"js
const userId = process.env.USER_ID;
const res = await fetch(`https://api.tourblick.de/v1/users/${userId}`, {
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.