Darstellung
Branding
Logo, Favicon, Farben.
| Endpunkt | Anfrage |
|---|---|
| Branding des Mandanten | GET /v1/branding |
| Farben und Tourblick-Hinweis ändern | PATCH /v1/branding |
| Logo hochladen | PUT /v1/branding/logo |
| Logo entfernen | DELETE /v1/branding/logo |
| Favicon hochladen | PUT /v1/branding/favicon |
| Favicon entfernen | DELETE /v1/branding/favicon |
| Logo oder Favicon eines Mandanten ausliefern | GET /v1/assets/{tenant_id}/{file} |
Branding des Mandanten GET
http
GET /v1/brandingAnmeldung: API-Schlüssel oder Sitzung eines Admins (mehr)
Beispiel
bash
curl -sS --fail-with-body "https://api.tourblick.de/v1/branding" \
-H "Authorization: Bearer $TOURBLICK_API_KEY"js
const res = await fetch('https://api.tourblick.de/v1/branding', {
headers: {
Authorization: `Bearer ${process.env.TOURBLICK_API_KEY}`,
},
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
const branding = await res.json();
console.log(branding);Antwort
200 Erfolgreich · Schema Branding
json
{
"tenant_id": "6a1f0c2e-3b4d-4e5f-8a9b-0c1d2e3f4a5b",
"name": "Bäckerei Sonnenschein",
"logo_url": "https://api.tourblick.de/v1/assets/6a1f0c2e-3b4d-4e5f-8a9b-0c1d2e3f4a5b/logo.png",
"favicon_url": null,
"primary_color": "#0F1F3D",
"accent_color": "#F26A1B",
"show_tourblick_badge": true
}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.
Farben und Tourblick-Hinweis ändern PATCH
http
PATCH /v1/brandingAnmeldung: API-Schlüssel oder Sitzung eines Admins (mehr)
Anfrage
Body als JSON (Content-Type: application/json). Der Body ist optional. Farben und Tourblick-Hinweis ändern.
| Feld | Typ | Pflicht | Beschreibung |
|---|---|---|---|
primary_color | string | – | Farbe als #RRGGBB. Muster ^#[0-9A-Fa-f]{6}$. |
accent_color | string | – | Farbe als #RRGGBB. Muster ^#[0-9A-Fa-f]{6}$. |
show_tourblick_badge | boolean | – |
Beispiel
bash
curl -sS --fail-with-body -X PATCH "https://api.tourblick.de/v1/branding" \
-H "Authorization: Bearer $TOURBLICK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"primary_color": "#1F7A4D",
"accent_color": "#F26A1B"
}'js
const res = await fetch('https://api.tourblick.de/v1/branding', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${process.env.TOURBLICK_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
primary_color: '#1F7A4D',
accent_color: '#F26A1B',
}),
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
const branding = await res.json();
console.log(branding);Antwort
200 Erfolgreich · Schema Branding
json
{
"tenant_id": "6a1f0c2e-3b4d-4e5f-8a9b-0c1d2e3f4a5b",
"name": "Bäckerei Sonnenschein",
"logo_url": "https://api.tourblick.de/v1/assets/6a1f0c2e-3b4d-4e5f-8a9b-0c1d2e3f4a5b/logo.png",
"favicon_url": null,
"primary_color": "#0F1F3D",
"accent_color": "#F26A1B",
"show_tourblick_badge": true
}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.
Logo hochladen (PNG, SVG, JPEG, WebP; höchstens 2 MB) PUT
http
PUT /v1/branding/logoAnmeldung: API-Schlüssel oder Sitzung eines Admins (mehr)
Anfrage
Body ist die Datei selbst (roh, kein Multipart), mit passendem Content-Type: image/png, image/svg+xml, image/jpeg, image/webp.
Beispiel
Die Datei logo.png liegt im aktuellen Ordner.
bash
curl -sS --fail-with-body -X PUT "https://api.tourblick.de/v1/branding/logo" \
-H "Authorization: Bearer $TOURBLICK_API_KEY" \
-H "Content-Type: image/png" \
--data-binary @logo.pngjs
import { readFile } from 'node:fs/promises';
const res = await fetch('https://api.tourblick.de/v1/branding/logo', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.TOURBLICK_API_KEY}`,
'Content-Type': 'image/png',
},
body: await readFile('logo.png'),
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
const branding = await res.json();
console.log(branding);Antwort
200 Erfolgreich · Schema Branding
json
{
"tenant_id": "6a1f0c2e-3b4d-4e5f-8a9b-0c1d2e3f4a5b",
"name": "Bäckerei Sonnenschein",
"logo_url": "https://api.tourblick.de/v1/assets/6a1f0c2e-3b4d-4e5f-8a9b-0c1d2e3f4a5b/logo.png",
"favicon_url": null,
"primary_color": "#0F1F3D",
"accent_color": "#F26A1B",
"show_tourblick_badge": true
}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.
Logo entfernen DELETE
http
DELETE /v1/branding/logoAnmeldung: API-Schlüssel oder Sitzung eines Admins (mehr)
Beispiel
bash
curl -sS --fail-with-body -X DELETE "https://api.tourblick.de/v1/branding/logo" \
-H "Authorization: Bearer $TOURBLICK_API_KEY"js
const res = await fetch('https://api.tourblick.de/v1/branding/logo', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.TOURBLICK_API_KEY}`,
},
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
const branding = await res.json();
console.log(branding);Antwort
200 Erfolgreich · Schema Branding
json
{
"tenant_id": "6a1f0c2e-3b4d-4e5f-8a9b-0c1d2e3f4a5b",
"name": "Bäckerei Sonnenschein",
"logo_url": "https://api.tourblick.de/v1/assets/6a1f0c2e-3b4d-4e5f-8a9b-0c1d2e3f4a5b/logo.png",
"favicon_url": null,
"primary_color": "#0F1F3D",
"accent_color": "#F26A1B",
"show_tourblick_badge": true
}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.
Favicon hochladen (PNG, SVG oder ICO, quadratisch) PUT
http
PUT /v1/branding/faviconTourblick erzeugt daraus alle nötigen Größen.
Anmeldung: API-Schlüssel oder Sitzung eines Admins (mehr)
Anfrage
Body ist die Datei selbst (roh, kein Multipart), mit passendem Content-Type: image/png, image/svg+xml, image/x-icon, image/vnd.microsoft.icon.
Beispiel
Die Datei favicon.png liegt im aktuellen Ordner.
bash
curl -sS --fail-with-body -X PUT "https://api.tourblick.de/v1/branding/favicon" \
-H "Authorization: Bearer $TOURBLICK_API_KEY" \
-H "Content-Type: image/png" \
--data-binary @favicon.pngjs
import { readFile } from 'node:fs/promises';
const res = await fetch('https://api.tourblick.de/v1/branding/favicon', {
method: 'PUT',
headers: {
Authorization: `Bearer ${process.env.TOURBLICK_API_KEY}`,
'Content-Type': 'image/png',
},
body: await readFile('favicon.png'),
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
const branding = await res.json();
console.log(branding);Antwort
200 Erfolgreich · Schema Branding
json
{
"tenant_id": "6a1f0c2e-3b4d-4e5f-8a9b-0c1d2e3f4a5b",
"name": "Bäckerei Sonnenschein",
"logo_url": "https://api.tourblick.de/v1/assets/6a1f0c2e-3b4d-4e5f-8a9b-0c1d2e3f4a5b/logo.png",
"favicon_url": null,
"primary_color": "#0F1F3D",
"accent_color": "#F26A1B",
"show_tourblick_badge": true
}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.
Favicon entfernen (dann aus Logo erzeugt) DELETE
http
DELETE /v1/branding/faviconAnmeldung: API-Schlüssel oder Sitzung eines Admins (mehr)
Beispiel
bash
curl -sS --fail-with-body -X DELETE "https://api.tourblick.de/v1/branding/favicon" \
-H "Authorization: Bearer $TOURBLICK_API_KEY"js
const res = await fetch('https://api.tourblick.de/v1/branding/favicon', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${process.env.TOURBLICK_API_KEY}`,
},
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
const branding = await res.json();
console.log(branding);Antwort
200 Erfolgreich · Schema Branding
json
{
"tenant_id": "6a1f0c2e-3b4d-4e5f-8a9b-0c1d2e3f4a5b",
"name": "Bäckerei Sonnenschein",
"logo_url": "https://api.tourblick.de/v1/assets/6a1f0c2e-3b4d-4e5f-8a9b-0c1d2e3f4a5b/logo.png",
"favicon_url": null,
"primary_color": "#0F1F3D",
"accent_color": "#F26A1B",
"show_tourblick_badge": true
}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.
Logo oder Favicon eines Mandanten ausliefern (öffentlich) GET
http
GET /v1/assets/{tenant_id}/{file}Anmeldung: keine (öffentlich)
Parameter
| Name | Ort | Typ | Pflicht | Beschreibung |
|---|---|---|---|---|
tenant_id | Pfad | string (uuid) | ja | ID des Mandanten. Im Beispiel $TENANT_ID. |
file | Pfad | string | ja | Dateiname, z. B. logo.png oder favicon-32.png. Muster ^[A-Za-z0-9._-]+$. Im Beispiel $ASSET_FILE. |
Beispiel
Vorher setzen: TENANT_ID, ASSET_FILE (Shell-Variable bzw. Umgebungsvariable, siehe Platzhalter).
bash
curl -sS --fail-with-body -o logo.png "https://api.tourblick.de/v1/assets/$TENANT_ID/$ASSET_FILE"js
import { writeFile } from 'node:fs/promises';
const tenantId = process.env.TENANT_ID;
const assetFile = process.env.ASSET_FILE;
const res = await fetch(`https://api.tourblick.de/v1/assets/${tenantId}/${assetFile}`);
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
await writeFile('logo.png', Buffer.from(await res.arrayBuffer()));
console.log(res.headers.get('content-type'));Antwort
200 Bilddatei (image/*)
Fehler
| Status | Code | Bedeutung |
|---|---|---|
| 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.