{
    "openapi": "3.1.0",
    "info": {
        "title": "FlowTime API",
        "version": "v1",
        "description": "REST API für Zeiterfassung mit Timer-Steuerung, Projektmanagement und Statistiken. Perfekt für Time-Tracking-Apps, Abrechnungssysteme und Produktivitätsanalysen."
    },
    "servers": [
        {
            "url": "https://api.flowsuite.one",
            "description": "FlowSuite API"
        }
    ],
    "security": [
        {
            "bearerAuth": []
        }
    ],
    "tags": [
        {
            "name": "timer",
            "description": "Timer-Steuerung"
        },
        {
            "name": "entries",
            "description": "Zeiteinträge"
        },
        {
            "name": "projects",
            "description": "Projekte"
        },
        {
            "name": "reports",
            "description": "Kontext, Berichte und Suche"
        },
        {
            "name": "statistics",
            "description": "Statistiken"
        },
        {
            "name": "working-hours",
            "description": "Arbeitszeiten"
        },
        {
            "name": "members",
            "description": "Mitglieder"
        },
        {
            "name": "absences",
            "description": "Abwesenheiten"
        },
        {
            "name": "app",
            "description": "Team-Status und Arbeitsort"
        },
        {
            "name": "shifts",
            "description": "Schichtplanung"
        }
    ],
    "paths": {
        "/flowtime/timer/status": {
            "get": {
                "operationId": "timer-status",
                "summary": "Timer-Status abrufen",
                "description": "Ruft den aktuellen Timer-Status ab. Zeigt an, ob ein Timer läuft und wie lange. Läuft kein Timer, ist \"is_tracking\" false und \"timer\" null. \"timer.source\" nennt die Herkunft (api, app, app_offline, geofence oder null für Web). Das Feld \"timer.entry_type\" (work|break) und \"timer.state\" (working|on_break) zeigen im Modus \"Einfache Zeiterfassung\" an, ob gerade gearbeitet oder pausiert wird.",
                "tags": [
                    "timer"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "is_tracking": true,
                                        "timer": {
                                            "uuid": "6f1e2a3b-...",
                                            "entry_type": "work",
                                            "state": "working",
                                            "description": "Feature-Entwicklung",
                                            "project": {
                                                "uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                                "name": "Website Redesign",
                                                "client_name": "Musterfirma GmbH"
                                            },
                                            "starts_at": "2024-01-15T09:00:00+00:00",
                                            "elapsed_seconds": 3600,
                                            "elapsed_formatted": "01:00:00",
                                            "source": "app"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/timer/start": {
            "post": {
                "operationId": "timer-start",
                "summary": "Timer starten",
                "description": "Startet einen neuen Timer. Läuft bereits ein Timer, wird dieser NICHT ersetzt: Die API antwortet mit HTTP 409 und liefert im Feld \"data.active_timer_uuid\" die UUID des bereits laufenden Timers zurück. Stoppen oder Abbrechen Sie den aktiven Timer zuerst, bevor Sie einen neuen starten. Breaking Change: Das frühere numerische Feld \"project_id\" wird nicht mehr akzeptiert (Validierungsfehler); das Projekt wird ausschließlich über \"project_uuid\" angegeben. Im Modus \"Einfache Zeiterfassung\" sind \"description\" und \"project_uuid\" nicht erlaubt (HTTP 422), denn der Start entspricht dem Einstempeln.",
                "tags": [
                    "timer"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": false,
                                    "error": "A timer is already running",
                                    "code": "timer_running",
                                    "data": {
                                        "active_timer_uuid": "6f1e2a3b-..."
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "description": {
                                        "type": "string",
                                        "description": "Beschreibung der Tätigkeit (max. 500 Zeichen). Im Modus \"Einfache Zeiterfassung\" nicht erlaubt."
                                    },
                                    "project_uuid": {
                                        "type": "string",
                                        "description": "UUID des zugehörigen Projekts (teamgebunden). Im Modus \"Einfache Zeiterfassung\" nicht erlaubt."
                                    },
                                    "occurred_at": {
                                        "type": "string",
                                        "description": "Zeitpunkt der Stempelung, ISO 8601 mit Offset (z. B. 2026-11-22T08:15:00+01:00), für offline oder per Standort erfasste Stempel. Höchstens 30 Sekunden in der Zukunft, höchstens 24 Stunden zurück, nicht vor dem Beginn des offenen Eintrags und ohne offenen Eintrag nicht vor dem Ende des letzten (HTTP 422, code occurred_at_out_of_range). Standard: Serverzeit."
                                    },
                                    "client_request_id": {
                                        "type": "string",
                                        "description": "UUID als Idempotenz-Schlüssel je Benutzer. Eine Wiederholung liefert das erste Ergebnis mit \"replayed\": true, ohne erneut zu stempeln. Derselbe Schlüssel für eine andere Aktion: HTTP 409, code client_request_conflict."
                                    },
                                    "source": {
                                        "type": "string",
                                        "description": "Herkunft: api, app, app_offline oder geofence. Standard api für API-Keys, app für App-Tokens. app_offline und geofence erscheinen im Web als Hinweis am Eintrag."
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/timer/stop": {
            "post": {
                "operationId": "timer-stop",
                "summary": "Timer stoppen",
                "description": "Stoppt den aktuell laufenden Timer und speichert den Zeiteintrag. Im Projekt-Modus müssen Projekt und Beschreibung gesetzt sein (HTTP 400). Im Modus \"Einfache Zeiterfassung\" (Ausstempeln) entfallen beide Anforderungen; das gilt auch für eine laufende Pause, die dadurch beendet wird (Gehen aus der Pause). Wie bei Start und Update sind \"description\"/\"project_uuid\" dort nicht erlaubt (HTTP 422). HTTP 409, wenn sich der Status zwischenzeitlich geändert hat (z. B. parallel gestartete Pause).",
                "tags": [
                    "timer"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Timer stopped successfully",
                                    "data": {
                                        "uuid": "6f1e2a3b-...",
                                        "description": "Bug-Fixing",
                                        "project": {
                                            "uuid": "9d2f4c1a-...",
                                            "name": "Website Redesign",
                                            "client_name": "Musterfirma GmbH"
                                        },
                                        "starts_at": "2024-01-15T09:00:00+00:00",
                                        "ends_at": "2024-01-15T10:30:00+00:00",
                                        "seconds": 5400,
                                        "duration_formatted": "01:30:00",
                                        "source": "api"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "description": {
                                        "type": "string",
                                        "description": "Beschreibung (nur Projekt-Modus)."
                                    },
                                    "project_uuid": {
                                        "type": "string",
                                        "description": "UUID des Projekts (nur Projekt-Modus, teamgebunden)."
                                    },
                                    "occurred_at": {
                                        "type": "string",
                                        "description": "Zeitpunkt der Stempelung, ISO 8601 mit Offset (z. B. 2026-11-22T08:15:00+01:00), für offline oder per Standort erfasste Stempel. Höchstens 30 Sekunden in der Zukunft, höchstens 24 Stunden zurück, nicht vor dem Beginn des offenen Eintrags und ohne offenen Eintrag nicht vor dem Ende des letzten (HTTP 422, code occurred_at_out_of_range). Standard: Serverzeit."
                                    },
                                    "client_request_id": {
                                        "type": "string",
                                        "description": "UUID als Idempotenz-Schlüssel je Benutzer. Eine Wiederholung liefert das erste Ergebnis mit \"replayed\": true, ohne erneut zu stempeln. Derselbe Schlüssel für eine andere Aktion: HTTP 409, code client_request_conflict."
                                    },
                                    "source": {
                                        "type": "string",
                                        "description": "Herkunft: api, app, app_offline oder geofence. Standard api für API-Keys, app für App-Tokens. app_offline und geofence erscheinen im Web als Hinweis am Eintrag."
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/timer": {
            "put": {
                "operationId": "timer-update",
                "summary": "Laufenden Timer aktualisieren",
                "description": "Aktualisiert den aktuell laufenden Timer (Beschreibung oder Projekt ändern). Breaking Change: Das frühere numerische Feld \"project_id\" wird nicht mehr akzeptiert; das Projekt wird ausschließlich über \"project_uuid\" angegeben. Im Modus \"Einfache Zeiterfassung\" (und bei laufender Pause) sind \"description\"/\"project_uuid\" nicht erlaubt (HTTP 422), nur \"starts_at\" bleibt änderbar.",
                "tags": [
                    "timer"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "description": {
                                        "type": "string",
                                        "description": "Neue Beschreibung"
                                    },
                                    "project_uuid": {
                                        "type": "string",
                                        "description": "UUID des neuen Projekts (teamgebunden)"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "timer-cancel",
                "summary": "Timer abbrechen",
                "description": "Bricht den aktuell laufenden Timer ab, ohne die Zeit zu speichern. Eine laufende Pause kann nicht abgebrochen werden (HTTP 409). Sie muss beendet werden (\"Pause beenden\") oder es wird ausgestempelt.",
                "tags": [
                    "timer"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/timer/break/start": {
            "post": {
                "operationId": "timer-break-start",
                "summary": "Pause starten",
                "description": "Nur im Modus \"Einfache Zeiterfassung\" (sonst HTTP 409). Schließt den laufenden Arbeits-Eintrag und öffnet atomar einen Pausen-Eintrag (entry_type=break). Pausen zählen nie als Arbeitszeit. HTTP 404 ohne laufenden Timer, HTTP 409 wenn bereits pausiert.",
                "tags": [
                    "timer"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Break started successfully",
                                    "data": {
                                        "uuid": "6f1e2a3b-...",
                                        "entry_type": "break",
                                        "state": "on_break",
                                        "starts_at": "2026-09-01T12:00:00+00:00",
                                        "source": "app"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "occurred_at": {
                                        "type": "string",
                                        "description": "Zeitpunkt der Stempelung, ISO 8601 mit Offset (z. B. 2026-11-22T08:15:00+01:00), für offline oder per Standort erfasste Stempel. Höchstens 30 Sekunden in der Zukunft, höchstens 24 Stunden zurück, nicht vor dem Beginn des offenen Eintrags und ohne offenen Eintrag nicht vor dem Ende des letzten (HTTP 422, code occurred_at_out_of_range). Standard: Serverzeit."
                                    },
                                    "client_request_id": {
                                        "type": "string",
                                        "description": "UUID als Idempotenz-Schlüssel je Benutzer. Eine Wiederholung liefert das erste Ergebnis mit \"replayed\": true, ohne erneut zu stempeln. Derselbe Schlüssel für eine andere Aktion: HTTP 409, code client_request_conflict."
                                    },
                                    "source": {
                                        "type": "string",
                                        "description": "Herkunft: api, app, app_offline oder geofence. Standard api für API-Keys, app für App-Tokens. app_offline und geofence erscheinen im Web als Hinweis am Eintrag."
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/timer/break/stop": {
            "post": {
                "operationId": "timer-break-stop",
                "summary": "Pause beenden",
                "description": "Nur im Modus \"Einfache Zeiterfassung\" (sonst HTTP 409). Schließt den laufenden Pausen-Eintrag und öffnet atomar einen neuen Arbeits-Eintrag. HTTP 404 ohne laufenden Timer, HTTP 409 wenn nicht pausiert.",
                "tags": [
                    "timer"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Break ended successfully",
                                    "data": {
                                        "uuid": "7a2b3c4d-...",
                                        "entry_type": "work",
                                        "state": "working",
                                        "starts_at": "2026-09-01T12:30:00+00:00",
                                        "source": "app"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "occurred_at": {
                                        "type": "string",
                                        "description": "Zeitpunkt der Stempelung, ISO 8601 mit Offset (z. B. 2026-11-22T08:15:00+01:00), für offline oder per Standort erfasste Stempel. Höchstens 30 Sekunden in der Zukunft, höchstens 24 Stunden zurück, nicht vor dem Beginn des offenen Eintrags und ohne offenen Eintrag nicht vor dem Ende des letzten (HTTP 422, code occurred_at_out_of_range). Standard: Serverzeit."
                                    },
                                    "client_request_id": {
                                        "type": "string",
                                        "description": "UUID als Idempotenz-Schlüssel je Benutzer. Eine Wiederholung liefert das erste Ergebnis mit \"replayed\": true, ohne erneut zu stempeln. Derselbe Schlüssel für eine andere Aktion: HTTP 409, code client_request_conflict."
                                    },
                                    "source": {
                                        "type": "string",
                                        "description": "Herkunft: api, app, app_offline oder geofence. Standard api für API-Keys, app für App-Tokens. app_offline und geofence erscheinen im Web als Hinweis am Eintrag."
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/entries": {
            "get": {
                "operationId": "entries-list",
                "summary": "Zeiteinträge auflisten",
                "description": "Ruft alle Zeiteinträge mit optionalen Filtern ab. Jeder Eintrag trägt \"source\" (null für Web und FlowAI, sonst api, app, app_offline oder geofence).",
                "tags": [
                    "entries"
                ],
                "parameters": [
                    {
                        "name": "start_date",
                        "in": "query",
                        "required": false,
                        "description": "Startdatum (YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "end_date",
                        "in": "query",
                        "required": false,
                        "description": "Enddatum (YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "project_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Filter nach Projekt-UUID",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "user_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Die eigene UUID ist für jedes FlowTime-Mitglied erlaubt und grenzt auf die eigenen Einträge ein. Nur für Teaminhaber (oder Mitglieder mit FlowTime-Vollzugriff): Einträge eines bestimmten Nutzers (UUID) filtern. Mitglieder mit dem Sub-Recht \"berichte\" sehen team-weite Einträge, ohne dieses Recht nur die eigenen.",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "entry_type",
                        "in": "query",
                        "required": false,
                        "description": "Filter nach Eintragstyp: \"work\" oder \"break\" (Modus \"Einfache Zeiterfassung\")",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "Maximale Anzahl der Einträge (1-500, Standard: 50)",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "offset",
                        "in": "query",
                        "required": false,
                        "description": "Offset für Pagination",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "entries-create",
                "summary": "Zeiteintrag erstellen",
                "description": "Erstellt einen manuellen Zeiteintrag (ohne Timer). Start- und Endzeitpunkt sind Pflicht; die Dauer wird serverseitig aus der Differenz berechnet. Breaking Change: Das frühere numerische Feld \"project_id\" wird nicht mehr akzeptiert; das Projekt wird ausschließlich über \"project_uuid\" angegeben. Im Modus \"Einfache Zeiterfassung\" gilt ein anderer Vertrag: \"description\" und \"project_uuid\" sind dort NICHT erlaubt, stattdessen kann optional \"entry_type\" (work|break, Standard: work) gesetzt werden. Validierungsfehler dieses Endpunkts (auch die Modus-Verbote) antworten mit HTTP 400 und {\"success\": false, \"errors\": {...}}.",
                "tags": [
                    "entries"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "description": {
                                        "type": "string",
                                        "description": "Bedingt: Pflicht im Projekt-Modus (max. 500 Zeichen); im Modus \"Einfache Zeiterfassung\" nicht erlaubt (HTTP 400)."
                                    },
                                    "project_uuid": {
                                        "type": "string",
                                        "description": "Bedingt: Pflicht im Projekt-Modus (Projekt-UUID, muss zum Team gehören); im Modus \"Einfache Zeiterfassung\" nicht erlaubt (HTTP 400)."
                                    },
                                    "starts_at": {
                                        "type": "string",
                                        "description": "Startzeitpunkt (ISO 8601)"
                                    },
                                    "ends_at": {
                                        "type": "string",
                                        "description": "Endzeitpunkt (ISO 8601), muss nach starts_at liegen"
                                    },
                                    "entry_type": {
                                        "type": "string",
                                        "description": "Nur im Modus \"Einfache Zeiterfassung\": \"work\" oder \"break\" (Standard: work). Im Projekt-Modus nicht erlaubt (HTTP 400)."
                                    }
                                },
                                "required": [
                                    "starts_at",
                                    "ends_at"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/entries/{uuid}": {
            "get": {
                "operationId": "entries-show",
                "summary": "Zeiteintrag abrufen",
                "description": "Ruft einen einzelnen Zeiteintrag mit allen Details ab, einschließlich \"source\" (Herkunft wie bei der Liste).",
                "tags": [
                    "entries"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "entries-update",
                "summary": "Zeiteintrag aktualisieren",
                "description": "Aktualisiert einen bestehenden Zeiteintrag. Breaking Change: Das frühere numerische Feld \"project_id\" wird nicht mehr akzeptiert; das Projekt wird ausschließlich über \"project_uuid\" angegeben. Feldvalidierung antwortet mit HTTP 400. Stempeluhr-Einträge (Pausen, Einträge im Modus \"Einfache Zeiterfassung\" sowie abgeschlossene Anwesenheitseinträge ohne Projekt und Beschreibung) akzeptieren weder \"description\" noch \"project_uuid\" (HTTP 422), nur Start- und Endzeit sind änderbar; \"entry_type\" ist unveränderlich. Ein laufender Eintrag (Timer oder Pause) kann hier nicht bearbeitet werden (HTTP 409), dafür PUT /flowtime/timer verwenden.",
                "tags": [
                    "entries"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "description": {
                                        "type": "string",
                                        "description": "Beschreibung"
                                    },
                                    "project_uuid": {
                                        "type": "string",
                                        "description": "Projekt-UUID (teamgebunden)"
                                    },
                                    "starts_at": {
                                        "type": "string",
                                        "description": "Startzeitpunkt (ISO 8601)"
                                    },
                                    "ends_at": {
                                        "type": "string",
                                        "description": "Endzeitpunkt (ISO 8601)"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "entries-delete",
                "summary": "Zeiteintrag löschen",
                "description": "Löscht einen Zeiteintrag unwiderruflich. Ein laufender Eintrag (Timer oder Pause) kann hier nicht gelöscht werden (HTTP 409), dafür die Timer-Endpunkte (Stoppen/Abbrechen) verwenden.",
                "tags": [
                    "entries"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/projects": {
            "get": {
                "operationId": "projects-list",
                "summary": "Projekte auflisten",
                "description": "Listet die aktiven Projekte des Teams auf, auf die der Benutzer buchen darf. Inhaber sehen alle aktiven Projekte. Mitglieder sehen öffentliche Projekte und solche, für die sie freigeschaltet sind, versteckte nie. Inhaber und Mitglieder mit dem FlowTime-Unterrecht „Projekte“ erhalten das volle Objekt (is_public, is_billable, billable_rate, currency; Inhaber zusätzlich budget). Mitglieder ohne dieses Unterrecht erhalten dieselbe buchbare Liste nur mit uuid, name, client_name und color_code, damit sie einen Projekt-Timer beenden können (POST /flowtime/timer/stop). Projekt-Details (GET /flowtime/projects/{uuid}) bleiben dem Unterrecht vorbehalten, Anlegen und Bearbeiten wie bisher dem Inhaber (sonst HTTP 403).",
                "tags": [
                    "projects"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "9d2f4c1a-7b3e-4f8a-9c5d-1e6a8b0c2d4f",
                                            "name": "Website Redesign",
                                            "client_name": "Musterfirma GmbH",
                                            "color_code": "#3B82F6",
                                            "is_public": true,
                                            "is_billable": false,
                                            "billable_rate": null,
                                            "currency": "EUR"
                                        }
                                    ],
                                    "count": 1
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "projects-create",
                "summary": "Projekt anlegen",
                "description": "Erstellt ein neues Projekt (nur Teaminhaber oder Mitglieder mit FlowTime-Vollzugriff; alle anderen erhalten 403). Breaking Change: Der Kunde wird über client_uuid übergeben; das frühere numerische Feld client_id wird nicht mehr akzeptiert (Validierungsfehler). Nur im Projektmodus verfügbar; im Modus \"Einfache Zeiterfassung\" antwortet der Endpunkt mit HTTP 409 und dem Fehlercode mode_mismatch.",
                "tags": [
                    "projects"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Projektname (max. 255 Zeichen)"
                                    },
                                    "client_uuid": {
                                        "type": "string",
                                        "description": "UUID des CRM-Kunden, der zum Team gehören muss"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Projektbeschreibung"
                                    },
                                    "color_code": {
                                        "type": "string",
                                        "description": "Hex-Farbe (z.B. #10B981, Standard: #3B82F6)"
                                    },
                                    "is_public": {
                                        "type": "boolean",
                                        "description": "Für alle Teammitglieder sichtbar (Standard: true)"
                                    },
                                    "is_billable": {
                                        "type": "boolean",
                                        "description": "Projekt ist abrechenbar (Standard: false)"
                                    },
                                    "billable_rate": {
                                        "type": "number",
                                        "description": "Stundensatz für die Abrechnung; Pflicht, wenn is_billable true ist (sonst Validierungsfehler mit HTTP 400), ohne Angabe Standard 0"
                                    },
                                    "currency": {
                                        "type": "string",
                                        "description": "Währungscode nach ISO 4217 (3 Zeichen, Standard: Team-Währung)"
                                    }
                                },
                                "required": [
                                    "name",
                                    "client_uuid"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/projects/{uuid}": {
            "get": {
                "operationId": "projects-show",
                "summary": "Projekt-Details abrufen",
                "description": "Ruft Details eines einzelnen Projekts ab, inklusive Zeitstatistiken. Das Projekt wird über seine UUID adressiert; numerische IDs werden nicht mehr akzeptiert (HTTP 404).",
                "tags": [
                    "projects"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "projects-update",
                "summary": "Projekt aktualisieren",
                "description": "Aktualisiert ein bestehendes Projekt (nur Teaminhaber oder Mitglieder mit FlowTime-Vollzugriff; alle anderen erhalten 403). Das Projekt wird über seine UUID adressiert; numerische IDs werden nicht mehr akzeptiert (HTTP 404). Nur im Projektmodus verfügbar; im Modus \"Einfache Zeiterfassung\" antwortet der Endpunkt mit HTTP 409 und dem Fehlercode mode_mismatch.",
                "tags": [
                    "projects"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Projektname (max. 255 Zeichen)"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Projektbeschreibung"
                                    },
                                    "status": {
                                        "type": "string",
                                        "description": "Projektstatus: active oder archived"
                                    },
                                    "color_code": {
                                        "type": "string",
                                        "description": "Hex-Farbe (z.B. #10B981)"
                                    },
                                    "is_public": {
                                        "type": "boolean",
                                        "description": "Für alle Teammitglieder sichtbar"
                                    },
                                    "is_hidden": {
                                        "type": "boolean",
                                        "description": "Projekt in Listen ausblenden"
                                    },
                                    "is_billable": {
                                        "type": "boolean",
                                        "description": "Projekt ist abrechenbar"
                                    },
                                    "billable_rate": {
                                        "type": "number",
                                        "description": "Stundensatz für die Abrechnung; null wird als 0 gespeichert"
                                    },
                                    "currency": {
                                        "type": "string",
                                        "description": "Währungscode nach ISO 4217 (3 Zeichen)"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "projects-delete",
                "summary": "Projekt löschen",
                "description": "Entfernt ein Projekt aus FlowTime (nur Teaminhaber oder Mitglieder mit FlowTime-Vollzugriff; alle anderen erhalten 403). Wie in der Weboberfläche muss das Projekt zuvor archiviert sein, sonst antwortet die Schnittstelle mit HTTP 409 und dem Fehler project_not_archived. Ein Projekt, auf das noch Zeiteinträge gebucht sind, bleibt erhalten und antwortet mit HTTP 409 und dem Fehler project_has_entries, damit gebuchte Stunden ihr Projekt nie verlieren. Gelöscht wird nur die FlowTime-Seite des Projekts; der Kundenprojekt-Datensatz in FlowCRM bleibt unberührt.",
                "tags": [
                    "projects"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Project deleted successfully"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/projects/{uuid}/permissions": {
            "put": {
                "operationId": "projects-permissions",
                "summary": "Projekt-Berechtigungen setzen",
                "description": "Legt fest, welche Teammitglieder Zugriff auf ein privates Projekt haben (nur Teaminhaber oder Mitglieder mit FlowTime-Vollzugriff; alle anderen erhalten 403). Die übergebene Liste ersetzt die bestehenden Berechtigungen vollständig. Nur Nutzer, die zum Team gehören, werden übernommen. Nur im Projektmodus verfügbar; im Modus \"Einfache Zeiterfassung\" antwortet der Endpunkt mit HTTP 409 und dem Fehlercode mode_mismatch.",
                "tags": [
                    "projects"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "user_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Liste der Nutzer-UUIDs, die Zugriff erhalten sollen",
                                        "properties": {
                                            "*": {
                                                "type": "string",
                                                "description": "Einzelne Nutzer-UUID (gültiges UUID-Format)"
                                            }
                                        }
                                    }
                                },
                                "required": [
                                    "user_uuids"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/context": {
            "get": {
                "operationId": "flowtime-context",
                "summary": "Modul-Kontext abrufen",
                "description": "Liefert das Arbeitszeitmodell des Teams, die eigenen Sub-Rechte, die Arbeitszeitvorgaben und den Zustand der Stempeluhr. Ein Client braucht das vor dem ersten Schreibzugriff: im Modus \"Einfache Zeiterfassung\" trägt ein Eintrag weder Projekt noch Beschreibung, und die Schicht-Endpunkte stehen nur bereit, wenn das Team die Schichtplanung eingeschaltet hat. Der Zustand der Stempeluhr ist einer von clocked_out, clocked_in, on_break oder inactive. Ist der Überstunden-Schalter des Teams aus, fehlen in working_hours die Sollstunden weekly_hours und daily_hours.",
                "tags": [
                    "reports"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "mode": "stamp_clock",
                                        "simple_mode": true,
                                        "shifts_enabled": false,
                                        "rights": {
                                            "owner": true,
                                            "reports": true,
                                            "team_reports": true,
                                            "projects": true,
                                            "logs": true,
                                            "shifts": false,
                                            "shift_planning": false
                                        },
                                        "working_hours": {
                                            "weekly_hours": "40.00",
                                            "working_days": [
                                                1,
                                                2,
                                                3,
                                                4,
                                                5
                                            ],
                                            "daily_hours": {
                                                "1": 8,
                                                "2": 8,
                                                "3": 8,
                                                "4": 8,
                                                "5": 8
                                            },
                                            "track_overtime": true
                                        },
                                        "stamp_clock": {
                                            "state": "clocked_in",
                                            "running_entry_uuid": "11aa22bb-...",
                                            "running_since": "2026-09-21T08:02:00+02:00"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/search": {
            "get": {
                "operationId": "flowtime-search",
                "summary": "Datensätze durchsuchen",
                "description": "Durchsucht die FlowTime-Datensätze einer Art. Die Sichtbarkeit folgt den Rechten des Schlüssels: ohne Berichtsrechte erscheinen nur die eigenen Zeiteinträge, Projekte nur mit dem Sub-Recht projekte, Kunden nur für den Teaminhaber. Eine Art, die der Schlüssel nicht erreicht, antwortet mit HTTP 403 und dem Fehler record_type_not_available.",
                "tags": [
                    "reports"
                ],
                "parameters": [
                    {
                        "name": "type",
                        "in": "query",
                        "required": true,
                        "description": "Art des Datensatzes: entry, project, client, member, shift_plan, shift_type oder shift_template",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "q",
                        "in": "query",
                        "required": false,
                        "description": "Suchbegriff; trifft den Namen des Datensatzes, bei Mitgliedern zusätzlich die Mailadresse",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "from",
                        "in": "query",
                        "required": false,
                        "description": "Nur für type=entry: frühestes Startdatum (YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "required": false,
                        "description": "Nur für type=entry: spätestes Startdatum (YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "user_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Nur für type=entry: grenzt auf die Einträge einer Person ein; fremde Personen erfordern das Sub-Recht teamberichte",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitenzahl, ab 1",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite, 1-200 (Standard 50)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "11aa22bb-...",
                                            "user_uuid": "e5f6a7b8-...",
                                            "user_name": "Anna",
                                            "project_uuid": "8b7a6f5e-...",
                                            "project_name": "Relaunch",
                                            "client_name": "Muster GmbH",
                                            "description": "Konzept",
                                            "starts_at": "2026-09-21T08:00:00+02:00",
                                            "ends_at": "2026-09-21T09:30:00+02:00",
                                            "seconds": 5400,
                                            "is_running": false,
                                            "is_stamp": false,
                                            "entry_type": "work",
                                            "source": null
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 50,
                                        "total": 1,
                                        "last_page": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/reports/{report}": {
            "get": {
                "operationId": "reports-detailed",
                "summary": "Detailbericht abrufen",
                "description": "Liefert einen der vier Berichte. Der Pfadabschnitt report ist detailed, team, overtime oder logs. detailed gibt die abgeschlossenen Arbeitseinträge eines Zeitraums seitenweise zurück (Standard ist der laufende Monat) und akzeptiert from, to und user_uuid. team liefert je Teammitglied die Monatsauswertung und akzeptiert year und month. overtime gibt den Überstundensaldo der laufenden Woche zurück, standardmäßig den eigenen; eine fremde user_uuid ist dem Teaminhaber vorbehalten. Ist der Überstunden-Schalter des Teams aus, fehlt bei overtime der Schlüssel data, und im team-Bericht fehlen target_hours und overtime_reduction_hours; werden für die Person keine Überstunden erfasst, sind diese Werte null. logs gibt die Protokollzeilen des Moduls seitenweise zurück.",
                "tags": [
                    "reports"
                ],
                "parameters": [
                    {
                        "name": "report",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "from",
                        "in": "query",
                        "required": false,
                        "description": "Nur detailed: Beginn des Zeitraums (YYYY-MM-DD), Standard Monatsbeginn",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "required": false,
                        "description": "Nur detailed: Ende des Zeitraums (YYYY-MM-DD), Standard heute",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "year",
                        "in": "query",
                        "required": false,
                        "description": "Nur team: Jahr der Auswertung, Standard laufendes Jahr",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "month",
                        "in": "query",
                        "required": false,
                        "description": "Nur team: Monat der Auswertung (1-12), Standard laufender Monat",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "user_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Für detailed und overtime: die Person, deren Zahlen gemeint sind",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Für detailed und logs: Seitenzahl, ab 1",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Für detailed und logs: Einträge pro Seite, 1-200 (Standard 50)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "11aa22bb-...",
                                            "user_uuid": "e5f6a7b8-...",
                                            "user_name": "Anna",
                                            "project_uuid": "8b7a6f5e-...",
                                            "project_name": "Relaunch",
                                            "client_name": "Muster GmbH",
                                            "description": "Konzept",
                                            "starts_at": "2026-09-21T08:00:00+02:00",
                                            "ends_at": "2026-09-21T09:30:00+02:00",
                                            "seconds": 5400,
                                            "is_running": false,
                                            "is_stamp": false,
                                            "entry_type": "work",
                                            "source": null
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 50,
                                        "total": 1,
                                        "last_page": 1
                                    },
                                    "report": "detailed",
                                    "from": "2026-09-01",
                                    "to": "2026-09-21"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/stats/today": {
            "get": {
                "operationId": "stats-today",
                "summary": "Tagesauswertung",
                "description": "Aggregierte Auswertung der heute erfassten Zeiten des Benutzers, einschließlich Pausen und Aufschlüsselung nach Projekt (data.by_project, adressiert über project_uuid).",
                "tags": [
                    "statistics"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "date": "2026-09-21",
                                        "total_seconds": 5400,
                                        "total_hours": 1.5,
                                        "total_formatted": "01:30:00",
                                        "break_seconds": 0,
                                        "entries_count": 1,
                                        "is_tracking": false,
                                        "by_project": [
                                            {
                                                "project_uuid": "8b7a6f5e-...",
                                                "project_name": "Relaunch",
                                                "client_name": "Muster GmbH",
                                                "seconds": 5400,
                                                "entries_count": 1
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/stats/week": {
            "get": {
                "operationId": "stats-week",
                "summary": "Wochenauswertung",
                "description": "Aggregierte Auswertung der laufenden Woche mit täglicher Aufschlüsselung und Projekt-Anteilen.",
                "tags": [
                    "statistics"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "week_start": "2026-09-21",
                                        "week_end": "2026-09-27",
                                        "total_seconds": 5400,
                                        "total_hours": 1.5,
                                        "total_formatted": "01:30:00",
                                        "break_seconds": 0,
                                        "entries_count": 1,
                                        "by_day": [
                                            {
                                                "date": "2026-09-21",
                                                "day_name": "Monday",
                                                "seconds": 5400,
                                                "hours": 1.5
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/working-hours/status": {
            "get": {
                "operationId": "working-hours-status",
                "summary": "Arbeitszeit-Status abrufen",
                "description": "Ruft die aktuelle Arbeitszeit-Bilanz des angemeldeten Nutzers ab (Tages-, Wochen- und Monatsbilanz sowie Überstunden-Saldo). Der Saldo in \"overtime_balance\" wird bei jedem Aufruf aus den erfassten Zeiten, dem Soll und den Korrekturen berechnet und nicht aus einem gespeicherten Wert gelesen. Ein Team mit ausgeschalteter Überstundenerfassung und ebenso ein Mitglied, für das keine Überstunden erfasst werden, erhält nur \"configured\" (false) und \"message\"; Einstellungen, Soll- und Saldofelder erscheinen dann gar nicht und sind nicht null. Dieselbe Form gilt, wenn keine Arbeitszeiten konfiguriert sind. Die Einstellungen können trotzdem weiterhin geschrieben werden.",
                "tags": [
                    "working-hours"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "configured": true,
                                        "settings": {
                                            "weekly_hours": "40.00",
                                            "working_days": [
                                                1,
                                                2,
                                                3,
                                                4,
                                                5,
                                                6,
                                                7
                                            ],
                                            "daily_hours": null,
                                            "track_overtime": true
                                        },
                                        "overtime_balance": {
                                            "minutes": -1123,
                                            "hours": -18.72,
                                            "formatted": "-18:43"
                                        },
                                        "today": {
                                            "date": "2026-09-23",
                                            "day_name": "Mittwoch",
                                            "is_working_day": true,
                                            "day_kind": "regular",
                                            "day_label": null,
                                            "target_seconds": 7714,
                                            "target_hours": 2.14,
                                            "target_formatted": "02:08",
                                            "actual_seconds": 0,
                                            "actual_hours": 0,
                                            "actual_formatted": "00:00",
                                            "difference_seconds": -7714,
                                            "difference_formatted": "-02:08",
                                            "remaining_seconds": 7714,
                                            "remaining_formatted": "02:08",
                                            "is_complete": false,
                                            "percentage": 0,
                                            "has_active_timer": false
                                        },
                                        "this_week": {
                                            "week_start": "2026-09-21",
                                            "week_end": "2026-09-27",
                                            "target_seconds": 48856,
                                            "target_hours": 13.57,
                                            "target_formatted": "13:34",
                                            "actual_seconds": 64800,
                                            "actual_hours": 18,
                                            "actual_formatted": "18:00",
                                            "difference_seconds": 15944,
                                            "difference_hours": 4.43,
                                            "difference_formatted": "+04:25",
                                            "percentage": 132.6,
                                            "is_over_target": true,
                                            "has_active_timer": false
                                        },
                                        "this_month": {
                                            "month": "2026-09",
                                            "month_name": "September 2026",
                                            "target_seconds": 460276,
                                            "target_hours": 127.85,
                                            "actual_seconds": 97200,
                                            "actual_hours": 27,
                                            "difference_seconds": -363076,
                                            "difference_hours": -100.85,
                                            "difference_formatted": "-100:51",
                                            "working_days_count": 23,
                                            "percentage": 21.1,
                                            "has_active_timer": false
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/working-hours/settings": {
            "put": {
                "operationId": "working-hours-settings",
                "summary": "Arbeitszeit-Einstellungen ändern",
                "description": "Veraltet, an seine Stelle tritt PUT /members/{user_uuid}. Ändert die Arbeitszeit-Einstellungen eines Teammitglieds (nur Teaminhaber oder Mitglieder mit FlowTime-Vollzugriff; alle anderen erhalten 403). Das Zielmitglied wird über \"user_uuid\" im Body identifiziert. Nur übergebene Felder werden aktualisiert. Der Endpoint schreibt über dieselbe Logik wie der Mitglieder-Endpoint und antwortet deshalb in dessen Form; nicht mehr unterstützte Felder werden hier stillschweigend ignoriert. Jede Antwort trägt die Kopfzeilen \"Deprecation: true\" und \"Sunset\".",
                "tags": [
                    "working-hours"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Member updated successfully",
                                    "data": {
                                        "user_uuid": "9d3c6a2e-5b1f-4f7a-8c2d-1e4b7a9f0c35",
                                        "weekly_hours": "32.00",
                                        "working_days": [
                                            1,
                                            2,
                                            3,
                                            4,
                                            5,
                                            6,
                                            7
                                        ],
                                        "daily_hours": null,
                                        "track_overtime": true,
                                        "compensation": {
                                            "type": "hourly",
                                            "hourly_rate": null,
                                            "monthly_salary": null,
                                            "currency": null,
                                            "valid_from": "2026-09-23"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "user_uuid": {
                                        "type": "string",
                                        "description": "UUID des Zielmitglieds"
                                    },
                                    "weekly_hours": {
                                        "type": "number",
                                        "description": "Wochenstunden (0-168)"
                                    },
                                    "working_days": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Arbeitstage als Zahlen 1-7 (Mo-So), mindestens ein Tag, jeder Tag höchstens einmal"
                                    },
                                    "daily_hours": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Sollstunden pro Tag (0-24)"
                                    },
                                    "track_overtime": {
                                        "type": "boolean",
                                        "description": "Überstunden erfassen; bei Angabe true oder false, nicht null"
                                    }
                                },
                                "required": [
                                    "user_uuid"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/working-hours/overtime/adjust": {
            "post": {
                "operationId": "working-hours-overtime-adjust",
                "summary": "Überstunden-Saldo anpassen",
                "description": "Passt den Überstunden-Saldo eines Teammitglieds an (nur Teaminhaber oder Mitglieder mit FlowTime-Vollzugriff; alle anderen erhalten 403). Mit \"mode\" wird der Wert entweder addiert (add, Standard) oder absolut gesetzt (set). Der resultierende Saldo wird serverseitig auf die zulässigen Grenzen begrenzt.",
                "tags": [
                    "working-hours"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "user_uuid": {
                                        "type": "string",
                                        "description": "UUID des Zielmitglieds"
                                    },
                                    "minutes": {
                                        "type": "integer",
                                        "description": "Anzahl Minuten (bei mode=add Delta, bei mode=set Zielwert)"
                                    },
                                    "mode": {
                                        "type": "string",
                                        "description": "add (addieren, Standard) oder set (absolut setzen)"
                                    },
                                    "reason": {
                                        "type": "string",
                                        "description": "Begründung für den Audit-Trail (max. 500 Zeichen)"
                                    }
                                },
                                "required": [
                                    "user_uuid",
                                    "minutes"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/working-hours/history": {
            "get": {
                "operationId": "working-hours-history",
                "summary": "Arbeitszeit-Verlauf abrufen",
                "description": "Ruft den tagesweisen Arbeitszeit-Verlauf ab. Standardmäßig die aktuelle Woche des angemeldeten Nutzers. Teaminhaber und Mitglieder mit FlowTime-Vollzugriff können über \"user_uuid\" den Verlauf eines anderen Mitglieds abrufen. Der Zeitraum ist auf maximal 31 Tage begrenzt. \"summary\" fasst Soll und Ist der angefragten Tage zusammen; \"overtime_balance\" ist davon getrennt der laufende Überstunden-Saldo zum heutigen Tag, bei jedem Aufruf berechnet. Ein Team mit ausgeschalteter Überstundenerfassung und ebenso ein Mitglied, für das keine Überstunden erfasst werden, erhält nur \"configured\" (false) und eine leere Tagesliste; maßgeblich ist das abgefragte Mitglied. Zeitraum, Zusammenfassung und Saldo erscheinen dann gar nicht und sind nicht null. Die Einstellungen können trotzdem weiterhin geschrieben werden.",
                "tags": [
                    "working-hours"
                ],
                "parameters": [
                    {
                        "name": "start_date",
                        "in": "query",
                        "required": false,
                        "description": "Startdatum (YYYY-MM-DD, Standard: Wochenanfang)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "end_date",
                        "in": "query",
                        "required": false,
                        "description": "Enddatum (YYYY-MM-DD, muss >= start_date sein)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "user_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Nur für Teaminhaber (oder Mitglieder mit FlowTime-Vollzugriff): Verlauf eines bestimmten Nutzers",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "configured": true,
                                        "period": {
                                            "start_date": "2026-09-22",
                                            "end_date": "2026-09-22"
                                        },
                                        "summary": {
                                            "target_hours": 5.71,
                                            "actual_hours": 9,
                                            "difference_hours": 3.29
                                        },
                                        "overtime_balance": {
                                            "minutes": -1123,
                                            "hours": -18.72,
                                            "formatted": "-18:43"
                                        },
                                        "days": [
                                            {
                                                "date": "2026-09-22",
                                                "day_name": "Dienstag",
                                                "is_working_day": true,
                                                "day_kind": "regular",
                                                "day_label": null,
                                                "target_seconds": 20571,
                                                "target_hours": 5.71,
                                                "target_formatted": "05:42",
                                                "actual_seconds": 32400,
                                                "actual_hours": 9,
                                                "actual_formatted": "09:00",
                                                "difference_seconds": 11829,
                                                "difference_formatted": "+03:17",
                                                "remaining_seconds": 0,
                                                "remaining_formatted": "00:00",
                                                "is_complete": true,
                                                "percentage": 157.5,
                                                "has_active_timer": false
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/members": {
            "get": {
                "operationId": "members-index",
                "summary": "Mitglieder auflisten",
                "description": "Listet alle Mitglieder des Teams mit Arbeitszeit, Vergütung, Urlaubskontingent und Überstundensaldo (nur Teaminhaber oder Mitglieder mit FlowTime-Vollzugriff; alle anderen erhalten 403). Die Vergütung ist die zum Stichtag gültige Zeile der Vergütungshistorie; ist für ein Mitglied keine Zeile hinterlegt, stehen alle Werte des Blocks als null in der Antwort, nie als 0. Der Urlaubsblock gilt für das Jahr des Stichtags, der Überstundenblock ist der Saldo bis zum Stichtag. Kann FlowTime einen Wert nicht berechnen, etwa für ein Mitglied ohne FlowTime-Zugang, steht er als null im Block. Werden für ein Mitglied keine Überstunden erfasst (track_overtime false), sind alle Werte seines Überstundenblocks null. Hat das Team die Überstunden ausgeschaltet, fehlen in jedem Eintrag die Felder data.*.overtime, data.*.working_time.weekly_hours und data.*.working_time.daily_hours vollständig; Arbeitstage, track_overtime, Vergütung und Urlaub bleiben.",
                "tags": [
                    "members"
                ],
                "parameters": [
                    {
                        "name": "date",
                        "in": "query",
                        "required": false,
                        "description": "Stichtag (YYYY-MM-DD), Standard: heute",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite (1-200, Standard 50)",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seite (ab 1)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "user_uuid": "44ad890b-f7f3-4154-8b38-83261195e475",
                                            "name": "Max Mustermann",
                                            "working_time": {
                                                "weekly_hours": "40.00",
                                                "working_days": [
                                                    1,
                                                    2,
                                                    3,
                                                    4,
                                                    5
                                                ],
                                                "daily_hours": {
                                                    "1": 8,
                                                    "2": 8,
                                                    "3": 8,
                                                    "4": 8,
                                                    "5": 8
                                                },
                                                "track_overtime": true
                                            },
                                            "compensation": {
                                                "type": "hourly",
                                                "hourly_rate": 25.5,
                                                "monthly_salary": null,
                                                "currency": "EUR",
                                                "valid_from": "2026-09-23"
                                            },
                                            "vacation": {
                                                "year": 2026,
                                                "has_contingent": true,
                                                "entitlement": 30,
                                                "carryover": 2.5,
                                                "taken": 12,
                                                "planned": 5,
                                                "requested": 2,
                                                "remaining": 13.5
                                            },
                                            "overtime": {
                                                "minutes": 450,
                                                "hours": 7.5,
                                                "formatted": "+07:30"
                                            }
                                        }
                                    ],
                                    "meta": {
                                        "total": 1,
                                        "per_page": 50,
                                        "current_page": 1,
                                        "last_page": 1,
                                        "date": "2026-09-23"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/members/{user_uuid}": {
            "put": {
                "operationId": "members-update",
                "summary": "Mitglied bearbeiten",
                "description": "Ändert die Arbeitszeit und die Vergütung eines Teammitglieds (nur Teaminhaber oder Mitglieder mit FlowTime-Vollzugriff; alle anderen erhalten 403). Das Mitglied wird über die UUID im Pfad adressiert. Nur übergebene Felder werden aktualisiert; Tagesstunden bleiben nur für ausgewählte Arbeitstage erhalten. Eine Vergütungsänderung wird mit Gültigkeitsdatum in der Vergütungshistorie festgehalten; eine zweite Änderung am selben Tag ersetzt die Zeile dieses Tages, statt eine weitere anzulegen. Die Antwort enthält den heute gültigen Vergütungsblock. Validierungsfehler werden mit HTTP 422 beantwortet.",
                "tags": [
                    "members"
                ],
                "parameters": [
                    {
                        "name": "user_uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Member updated successfully",
                                    "data": {
                                        "user_uuid": "9d3c6a2e-5b1f-4f7a-8c2d-1e4b7a9f0c35",
                                        "weekly_hours": "32.00",
                                        "working_days": [
                                            1,
                                            2,
                                            3,
                                            4
                                        ],
                                        "daily_hours": {
                                            "1": 8,
                                            "2": 8,
                                            "3": 8,
                                            "4": 8
                                        },
                                        "track_overtime": true,
                                        "compensation": {
                                            "type": "monthly",
                                            "hourly_rate": null,
                                            "monthly_salary": 4200,
                                            "currency": "EUR",
                                            "valid_from": "2026-09-23"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "weekly_hours": {
                                        "type": "number",
                                        "description": "Wochenstunden (0-168)"
                                    },
                                    "working_days": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Arbeitstage als Zahlen 1-7 (Mo-So), mindestens ein Tag, jeder Tag höchstens einmal"
                                    },
                                    "daily_hours": {
                                        "type": "object",
                                        "description": "Sollstunden pro Arbeitstag (0-24), Schlüssel ist der Wochentag 1-7"
                                    },
                                    "track_overtime": {
                                        "type": "boolean",
                                        "description": "Überstunden erfassen; bei Angabe true oder false, nicht null"
                                    },
                                    "compensation_type": {
                                        "type": "string",
                                        "description": "Vergütungsart: hourly (Stundensatz) oder monthly (Monatsgehalt); bei Angabe nicht null"
                                    },
                                    "hourly_rate": {
                                        "type": "number",
                                        "description": "Stundensatz (0 bis 999999.99). Bei der Vergütungsart hourly erforderlich, sofern kein Stundensatz gespeichert ist; bei monthly wird er nicht gespeichert"
                                    },
                                    "monthly_salary": {
                                        "type": "number",
                                        "description": "Monatsgehalt (0 bis 999999.99). Bei der Vergütungsart monthly erforderlich, sofern kein Monatsgehalt gespeichert ist; bei hourly wird es nicht gespeichert"
                                    },
                                    "currency": {
                                        "type": "string",
                                        "description": "Währung als dreistelliger Code, zum Beispiel EUR; ohne Angabe bleibt die bisherige Währung"
                                    },
                                    "valid_from": {
                                        "type": "string",
                                        "format": "date",
                                        "description": "Gültig ab (YYYY-MM-DD), Standard: heute. Das Datum darf nicht in der Zukunft liegen, höchstens 118 Monate vor dem laufenden Monat (ab dessen Monatsersten) und nicht vor dem Beginn der letzten Zeile der Vergütungshistorie mit einem anderen Betrag; jede dieser Grenzen wird mit HTTP 422 abgewiesen. Ein Datum gleich diesem Beginn ersetzt die Zeile. Spätere Zeilen ohne Betrag (etwa die Zeile ab dem Eintrittstag) oder mit genau der neuen Vergütung werden ersetzt."
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/holidays": {
            "get": {
                "operationId": "holidays-index",
                "summary": "Feiertage abrufen",
                "description": "Gibt die gesetzlichen Feiertage in Deutschland für ein Jahr zurück, aufsteigend nach Datum. Es handelt sich um Stammdaten, die für alle Teams identisch sind; abrufen kann sie jedes Mitglied mit FlowTime-Zugriff. Mit state erhalten Sie die bundesweiten Feiertage und die des angegebenen Bundeslands.",
                "tags": [
                    "members"
                ],
                "parameters": [
                    {
                        "name": "year",
                        "in": "query",
                        "required": false,
                        "description": "Jahr (1990-2100), Standard: laufendes Jahr",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "state",
                        "in": "query",
                        "required": false,
                        "description": "Bundesland als Kürzel (BW, BY, BE, BB, HB, HH, HE, MV, NI, NW, RP, SL, SN, ST, SH, TH). DE liefert nur die bundesweiten Feiertage; ein anderes Kürzel wird mit HTTP 422 abgewiesen. Ohne Angabe werden alle Feiertage des Jahres geliefert.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "date": "2026-01-01",
                                            "state": "DE",
                                            "name": "Neujahr",
                                            "source": "feiertage-api.de"
                                        },
                                        {
                                            "date": "2026-01-06",
                                            "state": "BY",
                                            "name": "Heilige Drei Könige",
                                            "source": "feiertage-api.de"
                                        },
                                        {
                                            "date": "2026-12-25",
                                            "state": "DE",
                                            "name": "1. Weihnachtstag",
                                            "source": "feiertage-api.de"
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/absences": {
            "get": {
                "operationId": "absences-index",
                "summary": "Abwesenheiten auflisten",
                "description": "Listet Abwesenheiten des Teams, absteigend nach erstem Tag. Mitglieder erhalten nur ihre eigenen Einträge. Ein Zeitraum aus from und to liefert jede Abwesenheit, die mindestens einen Tag darin hat.",
                "tags": [
                    "absences"
                ],
                "parameters": [
                    {
                        "name": "from",
                        "in": "query",
                        "required": false,
                        "description": "Beginn des Zeitraums (YYYY-MM-DD)",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "to",
                        "in": "query",
                        "required": false,
                        "description": "Ende des Zeitraums (YYYY-MM-DD), nicht vor from",
                        "schema": {
                            "type": "string",
                            "format": "date"
                        }
                    },
                    {
                        "name": "type",
                        "in": "query",
                        "required": false,
                        "description": "vacation, sick, overtime_reduction oder business_trip",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "requested, approved, rejected oder cancelled",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "user_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Nur Abwesenheiten dieses Mitglieds (Teaminhaber; Mitglieder nur mit der eigenen UUID)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite (1-200, Standard 50)",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seite (ab 1)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "8f2b4c1e-3d5a-4e6f-9a7b-2c1d0e9f8a76",
                                            "user_uuid": "44ad890b-f7f3-4154-8b38-83261195e475",
                                            "user_name": "Max Mustermann",
                                            "type": "vacation",
                                            "starts_on": "2026-09-28",
                                            "ends_on": "2026-09-30",
                                            "half_day_start": "none",
                                            "half_day_end": "none",
                                            "hours": null,
                                            "status": "approved",
                                            "note": "Sommerurlaub",
                                            "decided_by_uuid": "a57b92df-c5e3-4e64-81f0-4dcfddba105c",
                                            "decided_at": "2026-09-23T17:03:49+02:00",
                                            "decision_note": null,
                                            "created_at": "2026-09-23T17:03:49+02:00",
                                            "updated_at": "2026-09-23T17:03:49+02:00"
                                        }
                                    ],
                                    "meta": {
                                        "total": 1,
                                        "per_page": 50,
                                        "current_page": 1,
                                        "last_page": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "absences-store",
                "summary": "Abwesenheit anlegen",
                "description": "Legt eine Abwesenheit an. Ohne user_uuid ist es ein eigener Antrag oder eine eigene Meldung, mit user_uuid trägt der Teaminhaber die Abwesenheit für ein Mitglied ein. Der Status wird von FlowTime gesetzt; status und Entscheidungsfelder dürfen nicht mitgeschickt werden. warnings enthält Hinweise für den Teaminhaber (zum Beispiel eine Überschneidung), die das Speichern nicht verhindern. Für ein Mitglied ohne FlowTime-Zugang lässt sich keine Abwesenheit anlegen, auch nicht durch den Teaminhaber (HTTP 422, Fehler am Feld user_uuid). Antwort HTTP 201.",
                "tags": [
                    "absences"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Absence created successfully",
                                    "data": {
                                        "uuid": "8f2b4c1e-3d5a-4e6f-9a7b-2c1d0e9f8a76",
                                        "user_uuid": "44ad890b-f7f3-4154-8b38-83261195e475",
                                        "user_name": "Max Mustermann",
                                        "type": "vacation",
                                        "starts_on": "2026-09-28",
                                        "ends_on": "2026-09-30",
                                        "half_day_start": "none",
                                        "half_day_end": "none",
                                        "hours": null,
                                        "status": "approved",
                                        "note": "Sommerurlaub",
                                        "decided_by_uuid": "a57b92df-c5e3-4e64-81f0-4dcfddba105c",
                                        "decided_at": "2026-09-23T17:03:49+02:00",
                                        "decision_note": null,
                                        "created_at": "2026-09-23T17:03:49+02:00",
                                        "updated_at": "2026-09-23T17:03:49+02:00"
                                    },
                                    "warnings": []
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "user_uuid": {
                                        "type": "string",
                                        "description": "Mitglied des Teams (nur Teaminhaber); ohne Angabe gilt die Abwesenheit für Sie selbst"
                                    },
                                    "type": {
                                        "type": "string",
                                        "description": "vacation, sick, overtime_reduction oder business_trip"
                                    },
                                    "starts_on": {
                                        "type": "string",
                                        "format": "date",
                                        "description": "Erster Tag (YYYY-MM-DD)"
                                    },
                                    "ends_on": {
                                        "type": "string",
                                        "format": "date",
                                        "description": "Letzter Tag (YYYY-MM-DD), nicht vor starts_on; Pflicht außer bei overtime_reduction (ein einzelner Tag)"
                                    },
                                    "half_day_start": {
                                        "type": "string",
                                        "description": "Halber Tag am ersten Tag: none, am oder pm (Standard none)"
                                    },
                                    "half_day_end": {
                                        "type": "string",
                                        "description": "Halber Tag am letzten Tag: none, am oder pm (Standard none)"
                                    },
                                    "hours": {
                                        "type": "number",
                                        "description": "Stunden, nur und dann Pflicht bei overtime_reduction (größer 0, höchstens 24, in Viertelstunden)"
                                    },
                                    "note": {
                                        "type": "string",
                                        "description": "Notiz (max. 500 Zeichen)"
                                    }
                                },
                                "required": [
                                    "type",
                                    "starts_on"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/absences/balance": {
            "get": {
                "operationId": "absences-balance",
                "summary": "Urlaubs- und Überstundensaldo abrufen",
                "description": "Gibt das Urlaubskontingent eines Jahres und den aktuellen Überstundensaldo eines Mitglieds zurück, so wie FlowTime sie berechnet. Ein Mitglied kann nur die eigenen Zahlen abrufen; eine fremde user_uuid liefert 403. Fremde Zahlen sehen nur der Teaminhaber und Mitglieder mit FlowTime-Vollzugriff, das Recht auf Teamberichte reicht dafür nicht. Ein Mitglied eines fremden Teams liefert 404. Der Urlaubsblock gilt für das angefragte Jahr, der Überstundenblock ist der laufende Saldo bis heute. Hat das Team die Überstunden ausgeschaltet, fehlt der Block data.overtime vollständig in der Antwort; der Urlaubsblock bleibt. Kann FlowTime einen Wert nicht berechnen, steht er als null im Block. Werden für das Mitglied keine Überstunden erfasst, sind alle Werte des Überstundenblocks null; für ein Mitglied ohne FlowTime-Zugang gilt das für beide Blöcke, genau wie in GET /members. entitlement und remaining sind null, solange für das Mitglied kein Urlaubsanspruch hinterlegt ist.",
                "tags": [
                    "absences"
                ],
                "parameters": [
                    {
                        "name": "user_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Mitglied des Teams; ohne Angabe gelten die eigenen Zahlen (fremde Mitglieder nur für Teaminhaber und Mitglieder mit FlowTime-Vollzugriff)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "year",
                        "in": "query",
                        "required": false,
                        "description": "Jahr des Urlaubskontingents (2000-2100, Standard: laufendes Jahr)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "user_uuid": "44ad890b-f7f3-4154-8b38-83261195e475",
                                        "year": 2026,
                                        "vacation": {
                                            "has_contingent": true,
                                            "entitlement": 30,
                                            "carryover": 2.5,
                                            "taken": 12,
                                            "planned": 5,
                                            "requested": 2,
                                            "remaining": 13.5
                                        },
                                        "overtime": {
                                            "minutes": 450,
                                            "hours": 7.5,
                                            "formatted": "+07:30"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/absences/{uuid}": {
            "get": {
                "operationId": "absences-show",
                "summary": "Abwesenheit abrufen",
                "description": "Gibt eine Abwesenheit zurück. Mitglieder erhalten nur eigene Abwesenheiten; jede andere UUID liefert 404.",
                "tags": [
                    "absences"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "8f2b4c1e-3d5a-4e6f-9a7b-2c1d0e9f8a76",
                                        "user_uuid": "44ad890b-f7f3-4154-8b38-83261195e475",
                                        "user_name": "Max Mustermann",
                                        "type": "vacation",
                                        "starts_on": "2026-09-28",
                                        "ends_on": "2026-09-30",
                                        "half_day_start": "none",
                                        "half_day_end": "none",
                                        "hours": null,
                                        "status": "approved",
                                        "note": "Sommerurlaub",
                                        "decided_by_uuid": "a57b92df-c5e3-4e64-81f0-4dcfddba105c",
                                        "decided_at": "2026-09-23T17:03:49+02:00",
                                        "decision_note": null,
                                        "created_at": "2026-09-23T17:03:49+02:00",
                                        "updated_at": "2026-09-23T17:03:49+02:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "absences-update",
                "summary": "Abwesenheit ändern",
                "description": "Ändert eine Abwesenheit (nur Teaminhaber oder Mitglieder mit FlowTime-Vollzugriff; alle anderen erhalten 403). Nur übergebene Felder werden geändert. Der Status, die Entscheidungsfelder und das Mitglied lassen sich hier nicht ändern.",
                "tags": [
                    "absences"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Absence updated successfully",
                                    "data": {
                                        "uuid": "8f2b4c1e-3d5a-4e6f-9a7b-2c1d0e9f8a76",
                                        "user_uuid": "44ad890b-f7f3-4154-8b38-83261195e475",
                                        "user_name": "Max Mustermann",
                                        "type": "vacation",
                                        "starts_on": "2026-09-28",
                                        "ends_on": "2026-09-30",
                                        "half_day_start": "none",
                                        "half_day_end": "none",
                                        "hours": null,
                                        "status": "approved",
                                        "note": "Sommerurlaub an der Ostsee",
                                        "decided_by_uuid": "a57b92df-c5e3-4e64-81f0-4dcfddba105c",
                                        "decided_at": "2026-09-23T17:03:49+02:00",
                                        "decision_note": null,
                                        "created_at": "2026-09-23T17:03:49+02:00",
                                        "updated_at": "2026-09-23T17:03:49+02:00"
                                    },
                                    "warnings": []
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "description": "vacation, sick, overtime_reduction oder business_trip"
                                    },
                                    "starts_on": {
                                        "type": "string",
                                        "format": "date",
                                        "description": "Erster Tag (YYYY-MM-DD)"
                                    },
                                    "ends_on": {
                                        "type": "string",
                                        "format": "date",
                                        "description": "Letzter Tag (YYYY-MM-DD)"
                                    },
                                    "half_day_start": {
                                        "type": "string",
                                        "description": "none, am oder pm"
                                    },
                                    "half_day_end": {
                                        "type": "string",
                                        "description": "none, am oder pm"
                                    },
                                    "hours": {
                                        "type": "number",
                                        "description": "Stunden bei overtime_reduction (größer 0, höchstens 24, in Viertelstunden); bei Angabe nicht null, ohne Angabe unverändert"
                                    },
                                    "note": {
                                        "type": "string",
                                        "description": "Notiz (max. 500 Zeichen)"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "absences-destroy",
                "summary": "Abwesenheit löschen",
                "description": "Löscht eine Abwesenheit (nur Teaminhaber oder Mitglieder mit FlowTime-Vollzugriff; alle anderen erhalten 403). Die Abwesenheit wird archiviert, ihre Entscheidung bleibt nachvollziehbar. Eine bereits gelöschte Abwesenheit liefert 404.",
                "tags": [
                    "absences"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Absence deleted successfully"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/absences/{uuid}/approve": {
            "post": {
                "operationId": "absences-approve",
                "summary": "Abwesenheit genehmigen",
                "description": "Genehmigt einen offenen Antrag (nur Teaminhaber oder Mitglieder mit FlowTime-Vollzugriff; alle anderen erhalten 403). Genehmigt werden kann nur ein Antrag im Status requested; ein bereits entschiedener Antrag liefert 409 und behält seine erste Entscheidung. Gehört die antragstellende Person nicht mehr zum Team oder hat sie keinen FlowTime-Zugang mehr, wird nicht genehmigt (HTTP 422, Fehler am Feld user_uuid); ablehnen lässt sich ein solcher Antrag weiterhin. Das Mitglied erhält eine Benachrichtigung.",
                "tags": [
                    "absences"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Absence approved successfully",
                                    "data": {
                                        "uuid": "8f2b4c1e-3d5a-4e6f-9a7b-2c1d0e9f8a76",
                                        "user_uuid": "44ad890b-f7f3-4154-8b38-83261195e475",
                                        "user_name": "Max Mustermann",
                                        "type": "vacation",
                                        "starts_on": "2026-09-28",
                                        "ends_on": "2026-09-30",
                                        "half_day_start": "none",
                                        "half_day_end": "none",
                                        "hours": null,
                                        "status": "approved",
                                        "note": "Sommerurlaub",
                                        "decided_by_uuid": "a57b92df-c5e3-4e64-81f0-4dcfddba105c",
                                        "decided_at": "2026-09-23T17:17:20+02:00",
                                        "decision_note": null,
                                        "created_at": "2026-09-23T17:03:49+02:00",
                                        "updated_at": "2026-09-23T17:17:20+02:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "decision_note": {
                                        "type": "string",
                                        "description": "Anmerkung zur Entscheidung (max. 500 Zeichen)"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/absences/{uuid}/reject": {
            "post": {
                "operationId": "absences-reject",
                "summary": "Abwesenheit ablehnen",
                "description": "Lehnt einen offenen Antrag ab (nur Teaminhaber oder Mitglieder mit FlowTime-Vollzugriff; alle anderen erhalten 403). Eine Ablehnung braucht eine Begründung, die das Mitglied in seiner Benachrichtigung liest; fehlt sie in der Anfrage des Teaminhabers oder eines Mitglieds mit FlowTime-Vollzugriff, antwortet die API mit HTTP 422. Ein bereits entschiedener Antrag liefert 409.",
                "tags": [
                    "absences"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Absence rejected successfully",
                                    "data": {
                                        "uuid": "8f2b4c1e-3d5a-4e6f-9a7b-2c1d0e9f8a76",
                                        "user_uuid": "44ad890b-f7f3-4154-8b38-83261195e475",
                                        "user_name": "Max Mustermann",
                                        "type": "vacation",
                                        "starts_on": "2026-09-28",
                                        "ends_on": "2026-09-30",
                                        "half_day_start": "none",
                                        "half_day_end": "none",
                                        "hours": null,
                                        "status": "rejected",
                                        "note": "Sommerurlaub",
                                        "decided_by_uuid": "a57b92df-c5e3-4e64-81f0-4dcfddba105c",
                                        "decided_at": "2026-09-23T17:17:20+02:00",
                                        "decision_note": "Zu dieser Zeit ist das Team unterbesetzt.",
                                        "created_at": "2026-09-23T17:03:49+02:00",
                                        "updated_at": "2026-09-23T17:17:20+02:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "decision_note": {
                                        "type": "string",
                                        "description": "Begründung der Ablehnung (max. 500 Zeichen)"
                                    }
                                },
                                "required": [
                                    "decision_note"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/absences/{uuid}/cancel": {
            "post": {
                "operationId": "absences-cancel",
                "summary": "Abwesenheit zurückziehen",
                "description": "Zieht eine eigene Abwesenheit zurück. Das ist kein Recht des Teaminhabers: Zurückziehen kann nur, wer die Abwesenheit beantragt hat, und zwar einen offenen Antrag ebenso wie eine genehmigte Abwesenheit, spätestens am Tag vor ihrem Beginn. Der Teaminhaber entfernt die Abwesenheit eines Mitglieds stattdessen über DELETE; ruft er diesen Endpunkt für ein anderes Mitglied auf, erhält er 403. Ist das Zurückziehen nicht mehr möglich, antwortet die API mit HTTP 409. Eine Begründung wird nicht mitgeschickt.",
                "tags": [
                    "absences"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Absence cancelled successfully",
                                    "data": {
                                        "uuid": "8f2b4c1e-3d5a-4e6f-9a7b-2c1d0e9f8a76",
                                        "user_uuid": "44ad890b-f7f3-4154-8b38-83261195e475",
                                        "user_name": "Max Mustermann",
                                        "type": "vacation",
                                        "starts_on": "2026-09-28",
                                        "ends_on": "2026-09-30",
                                        "half_day_start": "none",
                                        "half_day_end": "none",
                                        "hours": null,
                                        "status": "cancelled",
                                        "note": "Sommerurlaub",
                                        "decided_by_uuid": null,
                                        "decided_at": null,
                                        "decision_note": null,
                                        "created_at": "2026-09-23T17:03:49+02:00",
                                        "updated_at": "2026-09-23T17:17:20+02:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/team/status": {
            "get": {
                "operationId": "team-status",
                "summary": "Team-Status abrufen",
                "description": "Wer ist gerade eingestempelt, in Pause oder ausgestempelt. Für den Teaminhaber, Mitglieder mit FlowTime-Vollzugriff und Mitglieder mit dem Sub-Recht teamberichte; alle anderen erhalten HTTP 403 mit code team_status_denied. Es zählen nur Einträge dieses Teams. since ist der Beginn des offenen Eintrags, ausgestempelt das Ende des letzten Eintrags (oder null).",
                "tags": [
                    "app"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "user": {
                                                "uuid": "44ad890b-f7f3-4154-8b38-83261195e475",
                                                "name": "Max Mustermann",
                                                "profile_photo_url": "https://ui-avatars.com/api/?name=M+M"
                                            },
                                            "state": "clocked_in",
                                            "since": "2026-11-22T08:02:00+01:00",
                                            "project": null
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/me/location": {
            "get": {
                "operationId": "me-location-show",
                "summary": "Eigenen Arbeitsort abrufen",
                "description": "Der eigene Arbeitsort für den Standort-Hinweis der FlowTime-App im aktuellen Team. data ist null, solange keiner gesetzt ist. address ist die Adresse, die im Web eingegeben wurde, und null, wenn der Ort in der App festgelegt wurde.",
                "tags": [
                    "app"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "label": "Büro Berlin",
                                        "address": "Alexanderplatz 1, 10178 Berlin",
                                        "latitude": 52.52,
                                        "longitude": 13.405,
                                        "radius_m": 150,
                                        "mode": "reminder",
                                        "enabled": true,
                                        "updated_at": "2026-11-22T09:00:00+01:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "me-location-update",
                "summary": "Eigenen Arbeitsort setzen",
                "description": "Legt den eigenen Arbeitsort an oder ersetzt ihn (eine Zeile je Benutzer und Team). address ist optional. Wird es weggelassen und ändern sich die Koordinaten, wird eine im Web gespeicherte Adresse geleert, weil sie nicht mehr zum Ort passt.",
                "tags": [
                    "app"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "label": "Büro Berlin",
                                        "address": null,
                                        "latitude": 52.52,
                                        "longitude": 13.405,
                                        "radius_m": 150,
                                        "mode": "auto",
                                        "enabled": true,
                                        "updated_at": "2026-11-22T09:00:00+01:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "label": {
                                        "type": "string",
                                        "description": "Bezeichnung (max. 100 Zeichen)"
                                    },
                                    "address": {
                                        "type": "string",
                                        "description": "Adresse des Arbeitsorts (max. 255 Zeichen, optional, null erlaubt). Wird nur gespeichert, nicht ausgewertet."
                                    },
                                    "latitude": {
                                        "type": "number",
                                        "description": "Breitengrad (-90 bis 90)"
                                    },
                                    "longitude": {
                                        "type": "number",
                                        "description": "Längengrad (-180 bis 180)"
                                    },
                                    "radius_m": {
                                        "type": "integer",
                                        "description": "Radius in Metern (50 bis 1000)"
                                    },
                                    "mode": {
                                        "type": "string",
                                        "description": "reminder (Erinnerung) oder auto (automatisch stempeln)"
                                    },
                                    "enabled": {
                                        "type": "boolean",
                                        "description": "Aktiv"
                                    }
                                },
                                "required": [
                                    "label",
                                    "latitude",
                                    "longitude",
                                    "radius_m",
                                    "mode",
                                    "enabled"
                                ]
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "me-location-destroy",
                "summary": "Eigenen Arbeitsort entfernen",
                "description": "Entfernt den eigenen Arbeitsort. Antwortet immer mit HTTP 204 ohne Inhalt.",
                "tags": [
                    "app"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/types": {
            "get": {
                "operationId": "shifts-types-index",
                "summary": "Schichttypen auflisten",
                "description": "Listet alle Schichttypen des Teams auf.",
                "tags": [
                    "shifts"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "shifts-types-store",
                "summary": "Schichttyp anlegen",
                "description": "Erstellt einen neuen Schichttyp (erfordert Sub-Recht \"schichtplanung\", Teaminhaber oder FlowTime-Vollzugriff).",
                "tags": [
                    "shifts"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name des Schichttyps (max. 255 Zeichen)"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Beschreibung"
                                    },
                                    "color": {
                                        "type": "string",
                                        "description": "Hex-Farbe (max. 7 Zeichen)"
                                    },
                                    "icon": {
                                        "type": "string",
                                        "description": "Icon-Kennung (max. 50 Zeichen)"
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Schichttyp aktiv"
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/types/{uuid}": {
            "get": {
                "operationId": "shifts-types-show",
                "summary": "Schichttyp abrufen",
                "description": "Ruft einen einzelnen Schichttyp ab, inklusive der Anzahl seiner Vorlagen und Schichten.",
                "tags": [
                    "shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "3c2b1a09-...",
                                        "name": "Frühschicht",
                                        "short_name": "FS",
                                        "description": null,
                                        "color": "#3B82F6",
                                        "icon": null,
                                        "is_active": true,
                                        "sort_order": 0,
                                        "templates_count": 2,
                                        "shifts_count": 14,
                                        "created_at": "2026-09-14T10:00:00+02:00",
                                        "updated_at": "2026-09-14T10:00:00+02:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "shifts-types-update",
                "summary": "Schichttyp aktualisieren",
                "description": "Aktualisiert einen Schichttyp (erfordert Sub-Recht \"schichtplanung\", Teaminhaber oder FlowTime-Vollzugriff). Adressierung ausschließlich per UUID.",
                "tags": [
                    "shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name des Schichttyps (max. 255 Zeichen)"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Beschreibung"
                                    },
                                    "color": {
                                        "type": "string",
                                        "description": "Hex-Farbe im Format #RRGGBB"
                                    },
                                    "icon": {
                                        "type": "string",
                                        "description": "Icon-Kennung (max. 50 Zeichen)"
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Schichttyp aktiv"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "shifts-types-destroy",
                "summary": "Schichttyp löschen",
                "description": "Löscht einen Schichttyp (erfordert Sub-Recht \"schichtplanung\", Teaminhaber oder FlowTime-Vollzugriff). Adressierung ausschließlich per UUID.",
                "tags": [
                    "shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/templates": {
            "get": {
                "operationId": "shifts-templates-index",
                "summary": "Schichtvorlagen auflisten",
                "description": "Listet alle Schichtvorlagen des Teams auf.",
                "tags": [
                    "shifts"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "shifts-templates-store",
                "summary": "Schichtvorlage anlegen",
                "description": "Erstellt eine neue Schichtvorlage (erfordert Sub-Recht \"schichtplanung\", Teaminhaber oder FlowTime-Vollzugriff). Breaking Change: Das frühere numerische Feld \"shift_type_id\" wird nicht mehr akzeptiert; der Schichttyp wird ausschließlich über \"shift_type_uuid\" angegeben.",
                "tags": [
                    "shifts"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name der Schichtvorlage (max. 255 Zeichen)"
                                    },
                                    "shift_type_uuid": {
                                        "type": "string",
                                        "description": "UUID des Schichttyps (teamgebunden)"
                                    },
                                    "start_time": {
                                        "type": "string",
                                        "description": "Startzeit (HH:MM)"
                                    },
                                    "end_time": {
                                        "type": "string",
                                        "description": "Endzeit (HH:MM)"
                                    },
                                    "min_staff": {
                                        "type": "integer",
                                        "description": "Minimale Besetzung"
                                    },
                                    "max_staff": {
                                        "type": "integer",
                                        "description": "Maximale Besetzung (>= min_staff)"
                                    },
                                    "default_days": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Standard-Wochentage (1-7)"
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Schichtvorlage aktiv"
                                    }
                                },
                                "required": [
                                    "name",
                                    "shift_type_uuid",
                                    "start_time",
                                    "end_time"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/templates/{uuid}": {
            "get": {
                "operationId": "shifts-templates-show",
                "summary": "Schichtvorlage abrufen",
                "description": "Ruft eine einzelne Schichtvorlage samt ihrem Schichttyp ab.",
                "tags": [
                    "shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "4d3c2b1a-...",
                                        "name": "Frühdienst Werktag",
                                        "shift_type_uuid": "3c2b1a09-...",
                                        "shift_type_name": "Frühschicht",
                                        "start_time": "06:00",
                                        "end_time": "14:00",
                                        "duration_minutes": 480,
                                        "min_staff": 2,
                                        "max_staff": 4,
                                        "default_days": [
                                            1,
                                            2,
                                            3,
                                            4,
                                            5
                                        ],
                                        "is_active": true,
                                        "sort_order": 0,
                                        "created_at": "2026-09-14T10:00:00+02:00",
                                        "updated_at": "2026-09-14T10:00:00+02:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "shifts-templates-update",
                "summary": "Schichtvorlage aktualisieren",
                "description": "Aktualisiert eine Schichtvorlage (erfordert Sub-Recht \"schichtplanung\", Teaminhaber oder FlowTime-Vollzugriff). Adressierung ausschließlich per UUID. Breaking Change: Das frühere numerische Feld \"shift_type_id\" wird nicht mehr akzeptiert; der Schichttyp wird ausschließlich über \"shift_type_uuid\" angegeben.",
                "tags": [
                    "shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Name der Schichtvorlage (max. 255 Zeichen)"
                                    },
                                    "shift_type_uuid": {
                                        "type": "string",
                                        "description": "UUID des Schichttyps (teamgebunden)"
                                    },
                                    "start_time": {
                                        "type": "string",
                                        "description": "Startzeit (HH:MM)"
                                    },
                                    "end_time": {
                                        "type": "string",
                                        "description": "Endzeit (HH:MM)"
                                    },
                                    "min_staff": {
                                        "type": "integer",
                                        "description": "Minimale Besetzung"
                                    },
                                    "max_staff": {
                                        "type": "integer",
                                        "description": "Maximale Besetzung (>= min_staff)"
                                    },
                                    "default_days": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Standard-Wochentage (1-7)"
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Schichtvorlage aktiv"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "shifts-templates-destroy",
                "summary": "Schichtvorlage löschen",
                "description": "Löscht eine Schichtvorlage (erfordert Sub-Recht \"schichtplanung\", Teaminhaber oder FlowTime-Vollzugriff). Adressierung ausschließlich per UUID.",
                "tags": [
                    "shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/plans": {
            "get": {
                "operationId": "shifts-plans-index",
                "summary": "Schichtpläne auflisten",
                "description": "Listet die Schichtpläne des Teams auf.",
                "tags": [
                    "shifts"
                ],
                "parameters": [
                    {
                        "name": "status",
                        "in": "query",
                        "required": false,
                        "description": "Filtert nach Status (draft, published oder archived)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "start_date",
                        "in": "query",
                        "required": false,
                        "description": "Filtert Pläne ab diesem Datum",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "end_date",
                        "in": "query",
                        "required": false,
                        "description": "Filtert Pläne bis zu diesem Datum (muss >= start_date sein)",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "post": {
                "operationId": "shifts-plans-store",
                "summary": "Schichtplan anlegen",
                "description": "Erstellt einen neuen Schichtplan für eine Woche (erfordert Sub-Recht \"schichtplanung\", Teaminhaber oder FlowTime-Vollzugriff). Breaking Change: Das frühere numerische Feld \"shift_type_ids\" wird nicht mehr akzeptiert; die Schichttypen werden ausschließlich über \"shift_type_uuids\" angegeben.",
                "tags": [
                    "shifts"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "week_start": {
                                        "type": "string",
                                        "description": "Wochenanfang (Datum)"
                                    },
                                    "name": {
                                        "type": "string",
                                        "description": "Name des Plans (max. 255 Zeichen)"
                                    },
                                    "create_from_templates": {
                                        "type": "boolean",
                                        "description": "Plan aus Vorlagen erzeugen"
                                    },
                                    "shift_type_uuids": {
                                        "type": "array",
                                        "items": [],
                                        "description": "UUIDs der zu berücksichtigenden Schichttypen (teamgebunden)",
                                        "properties": {
                                            "*": {
                                                "type": "string",
                                                "description": "Einzelne Schichttyp-UUID"
                                            }
                                        }
                                    }
                                },
                                "required": [
                                    "week_start"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/plans/{uuid}": {
            "get": {
                "operationId": "shifts-plans-show",
                "summary": "Schichtplan-Details abrufen",
                "description": "Ruft einen einzelnen Schichtplan mit seinen Schichten ab. Adressierung ausschließlich per UUID.",
                "tags": [
                    "shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "shifts-plans-update",
                "summary": "Schichtplan ändern",
                "description": "Ändert Name und Notiz eines Schichtplans (erfordert Sub-Recht \"schichtplanung\", Teaminhaber oder FlowTime-Vollzugriff). Nur Entwürfe sind änderbar; ein veröffentlichter oder archivierter Plan antwortet mit HTTP 409 und dem Fehler plan_not_editable. Die Planwoche selbst ist unveränderlich, weil die Schichten an ihren Tagen hängen; für eine andere Woche gibt es die Kopieren-Aktion. Der Status ändert sich ausschließlich über publish und archive.",
                "tags": [
                    "shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "5e4d3c2b-...",
                                        "name": "KW 39/2026",
                                        "start_date": "2026-09-21",
                                        "end_date": "2026-09-27",
                                        "status": "draft",
                                        "notes": "Urlaubszeit",
                                        "editable": true,
                                        "published_at": null,
                                        "published_by_name": null,
                                        "shifts_count": 12,
                                        "created_at": "2026-09-14T10:00:00+02:00",
                                        "updated_at": "2026-09-14T10:00:00+02:00"
                                    },
                                    "message": "Shift plan updated successfully"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Neuer Name des Plans (max. 255 Zeichen)"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Notiz zum Plan; null leert sie"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "shifts-plans-destroy",
                "summary": "Schichtplan löschen",
                "description": "Löscht einen Schichtplan samt seinen Schichten und deren Zuweisungen (erfordert Sub-Recht \"schichtplanung\", Teaminhaber oder FlowTime-Vollzugriff). Nur Entwürfe sind löschbar: ein veröffentlichter Plan ist der Dienstplan, nach dem das Team arbeitet, ein archivierter die Aufzeichnung einer vergangenen Woche. Beide antworten mit HTTP 409 und dem Fehler plan_not_editable und werden stattdessen archiviert.",
                "tags": [
                    "shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "message": "Shift plan deleted successfully"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/plans/{uuid}/shifts": {
            "get": {
                "operationId": "shifts-plans-shifts",
                "summary": "Schichten eines Plans auflisten",
                "description": "Ruft die Schichten eines Plans seitenweise ab, optional auf einen Tag oder einen Schichttyp eingegrenzt. Die Plan-Detailansicht liefert dagegen die ganze Woche in einer Antwort.",
                "tags": [
                    "shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "date",
                        "in": "query",
                        "required": false,
                        "description": "Grenzt auf einen Tag ein (YYYY-MM-DD)",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "shift_type_uuid",
                        "in": "query",
                        "required": false,
                        "description": "Grenzt auf einen Schichttyp des Teams ein",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "page",
                        "in": "query",
                        "required": false,
                        "description": "Seitenzahl, ab 1",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "per_page",
                        "in": "query",
                        "required": false,
                        "description": "Einträge pro Seite, 1-200 (Standard 50)",
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": [
                                        {
                                            "uuid": "6f5e4d3c-...",
                                            "shift_plan_uuid": "5e4d3c2b-...",
                                            "shift_type_uuid": "3c2b1a09-...",
                                            "shift_type_name": "Frühschicht",
                                            "shift_type_color": "#3B82F6",
                                            "date": "2026-09-21",
                                            "start_time": "06:00",
                                            "end_time": "14:00",
                                            "duration_minutes": 480,
                                            "min_staff": 2,
                                            "max_staff": 4,
                                            "assigned_count": 2,
                                            "staffing_status": "ok",
                                            "notes": null,
                                            "editable": true,
                                            "assignments": [
                                                {
                                                    "uuid": "7a6f5e4d-...",
                                                    "user_uuid": "e5f6a7b8-...",
                                                    "user_name": "Anna",
                                                    "status": "confirmed",
                                                    "confirmed_at": "2026-09-15T09:00:00+02:00",
                                                    "notes": null,
                                                    "created_at": "2026-09-14T10:00:00+02:00",
                                                    "updated_at": "2026-09-14T10:00:00+02:00"
                                                }
                                            ],
                                            "created_at": "2026-09-14T10:00:00+02:00",
                                            "updated_at": "2026-09-14T10:00:00+02:00"
                                        }
                                    ],
                                    "meta": {
                                        "current_page": 1,
                                        "per_page": 50,
                                        "total": 12,
                                        "last_page": 1
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/plans/{uuid}/publish": {
            "post": {
                "operationId": "shifts-plans-publish",
                "summary": "Schichtplan veröffentlichen",
                "description": "Veröffentlicht einen Schichtplan (erfordert Sub-Recht \"schichtplanung\", Teaminhaber oder FlowTime-Vollzugriff).",
                "tags": [
                    "shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/plans/{uuid}/archive": {
            "post": {
                "operationId": "shifts-plans-archive",
                "summary": "Schichtplan archivieren",
                "description": "Archiviert einen Schichtplan (erfordert Sub-Recht \"schichtplanung\", Teaminhaber oder FlowTime-Vollzugriff).",
                "tags": [
                    "shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/plans/{uuid}/copy": {
            "post": {
                "operationId": "shifts-plans-copy",
                "summary": "Schichtplan kopieren",
                "description": "Kopiert einen Schichtplan in eine andere Woche (erfordert Sub-Recht \"schichtplanung\", Teaminhaber oder FlowTime-Vollzugriff).",
                "tags": [
                    "shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "target_week_start": {
                                        "type": "string",
                                        "description": "Ziel-Wochenstartdatum"
                                    }
                                },
                                "required": [
                                    "target_week_start"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts": {
            "post": {
                "operationId": "shifts-store",
                "summary": "Schicht anlegen",
                "description": "Erstellt eine einzelne Schicht innerhalb eines Plans (erfordert Sub-Recht \"schichtplanung\", Teaminhaber oder FlowTime-Vollzugriff). Breaking Change: Die früheren numerischen Felder \"shift_plan_id\" und \"shift_type_id\" werden nicht mehr akzeptiert; Plan und Typ werden ausschließlich über \"shift_plan_uuid\" und \"shift_type_uuid\" angegeben.",
                "tags": [
                    "shifts"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "shift_plan_uuid": {
                                        "type": "string",
                                        "description": "UUID des Schichtplans (teamgebunden)"
                                    },
                                    "shift_type_uuid": {
                                        "type": "string",
                                        "description": "UUID des Schichttyps (teamgebunden)"
                                    },
                                    "date": {
                                        "type": "string",
                                        "description": "Datum der Schicht"
                                    },
                                    "start_time": {
                                        "type": "string",
                                        "description": "Startzeit (HH:MM)"
                                    },
                                    "end_time": {
                                        "type": "string",
                                        "description": "Endzeit (HH:MM)"
                                    },
                                    "min_staff": {
                                        "type": "integer",
                                        "description": "Minimale Besetzung"
                                    },
                                    "max_staff": {
                                        "type": "integer",
                                        "description": "Maximale Besetzung (>= min_staff)"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Notizen zur Schicht"
                                    }
                                },
                                "required": [
                                    "shift_plan_uuid",
                                    "shift_type_uuid",
                                    "date",
                                    "start_time",
                                    "end_time"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/{uuid}": {
            "get": {
                "operationId": "shifts-show",
                "summary": "Schicht abrufen",
                "description": "Ruft eine einzelne Schicht mit ihren Zuweisungen und ihrem Besetzungsstand ab. Das Feld editable wiederholt die Regel der Planungsoberfläche: nur Schichten in einem Entwurf sind änderbar.",
                "tags": [
                    "shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "6f5e4d3c-...",
                                        "shift_plan_uuid": "5e4d3c2b-...",
                                        "shift_type_uuid": "3c2b1a09-...",
                                        "shift_type_name": "Frühschicht",
                                        "shift_type_color": "#3B82F6",
                                        "date": "2026-09-21",
                                        "start_time": "06:00",
                                        "end_time": "14:00",
                                        "duration_minutes": 480,
                                        "min_staff": 2,
                                        "max_staff": 4,
                                        "assigned_count": 2,
                                        "staffing_status": "ok",
                                        "notes": null,
                                        "editable": true,
                                        "assignments": [
                                            {
                                                "uuid": "7a6f5e4d-...",
                                                "user_uuid": "e5f6a7b8-...",
                                                "user_name": "Anna",
                                                "status": "confirmed",
                                                "confirmed_at": "2026-09-15T09:00:00+02:00",
                                                "notes": null,
                                                "created_at": "2026-09-14T10:00:00+02:00",
                                                "updated_at": "2026-09-14T10:00:00+02:00"
                                            }
                                        ],
                                        "created_at": "2026-09-14T10:00:00+02:00",
                                        "updated_at": "2026-09-14T10:00:00+02:00"
                                    }
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            },
            "put": {
                "operationId": "shifts-update",
                "summary": "Schicht ändern",
                "description": "Ändert eine Schicht (erfordert Sub-Recht \"schichtplanung\", Teaminhaber oder FlowTime-Vollzugriff). Nur Schichten in einem Entwurf sind änderbar, sonst HTTP 409 mit dem Fehler plan_not_editable. Das Datum muss in der Planwoche liegen, sonst HTTP 422 mit date_outside_plan_week. Eine Schicht bleibt in ihrem Plan; für eine andere Woche wird sie im Zielplan neu angelegt. Die Dauer berechnet die Schnittstelle selbst und berücksichtigt dabei Nachtschichten über Mitternacht.",
                "tags": [
                    "shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "data": {
                                        "uuid": "6f5e4d3c-...",
                                        "shift_plan_uuid": "5e4d3c2b-...",
                                        "shift_type_uuid": "3c2b1a09-...",
                                        "shift_type_name": "Frühschicht",
                                        "shift_type_color": "#3B82F6",
                                        "date": "2026-09-22",
                                        "start_time": "07:00",
                                        "end_time": "15:00",
                                        "duration_minutes": 480,
                                        "min_staff": 2,
                                        "max_staff": 4,
                                        "assigned_count": 2,
                                        "staffing_status": "ok",
                                        "notes": null,
                                        "editable": true,
                                        "assignments": [
                                            {
                                                "uuid": "7a6f5e4d-...",
                                                "user_uuid": "e5f6a7b8-...",
                                                "user_name": "Anna",
                                                "status": "confirmed",
                                                "confirmed_at": "2026-09-15T09:00:00+02:00",
                                                "notes": null,
                                                "created_at": "2026-09-14T10:00:00+02:00",
                                                "updated_at": "2026-09-14T10:00:00+02:00"
                                            }
                                        ],
                                        "created_at": "2026-09-14T10:00:00+02:00",
                                        "updated_at": "2026-09-14T10:00:00+02:00"
                                    },
                                    "message": "Shift updated successfully"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "shift_type_uuid": {
                                        "type": "string",
                                        "description": "Anderer Schichttyp des Teams"
                                    },
                                    "date": {
                                        "type": "string",
                                        "description": "Neues Datum (YYYY-MM-DD), muss in der Planwoche liegen"
                                    },
                                    "start_time": {
                                        "type": "string",
                                        "description": "Beginn im Format HH:MM"
                                    },
                                    "end_time": {
                                        "type": "string",
                                        "description": "Ende im Format HH:MM"
                                    },
                                    "min_staff": {
                                        "type": "integer",
                                        "description": "Mindestbesetzung, mindestens 1"
                                    },
                                    "max_staff": {
                                        "type": "integer",
                                        "description": "Maximalbesetzung; darf die Mindestbesetzung nicht unterschreiten, null hebt die Obergrenze auf"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Notiz zur Schicht"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "operationId": "shifts-destroy",
                "summary": "Schicht löschen",
                "description": "Löscht eine Schicht (erfordert Sub-Recht \"schichtplanung\", Teaminhaber oder FlowTime-Vollzugriff). Adressierung ausschließlich per UUID.",
                "tags": [
                    "shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/{uuid}/assign": {
            "post": {
                "operationId": "shifts-assign",
                "summary": "Nutzer einer Schicht zuweisen",
                "description": "Weist einer Schicht einen Nutzer zu (erfordert Sub-Recht \"schichtplanung\", Teaminhaber oder FlowTime-Vollzugriff).",
                "tags": [
                    "shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "user_uuid": {
                                        "type": "string",
                                        "description": "UUID des zuzuweisenden Nutzers"
                                    },
                                    "check_conflicts": {
                                        "type": "boolean",
                                        "description": "Zeitliche Konflikte prüfen"
                                    }
                                },
                                "required": [
                                    "user_uuid"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/{uuid}/assign/{userUuid}": {
            "delete": {
                "operationId": "shifts-unassign",
                "summary": "Zuweisung entfernen",
                "description": "Entfernt die Zuweisung eines Nutzers von einer Schicht (erfordert Sub-Recht \"schichtplanung\", Teaminhaber oder FlowTime-Vollzugriff).",
                "tags": [
                    "shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    },
                    {
                        "name": "userUuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/{uuid}/available-users": {
            "get": {
                "operationId": "shifts-available-users",
                "summary": "Verfügbare Nutzer für Schicht",
                "description": "Listet Nutzer, die für eine Schicht zugewiesen werden können (erfordert Sub-Recht \"schichtplanung\", Teaminhaber oder FlowTime-Vollzugriff).",
                "tags": [
                    "shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/assignments/{uuid}/confirm": {
            "post": {
                "operationId": "shifts-assignments-confirm",
                "summary": "Zuweisung bestätigen",
                "description": "Bestätigt eine eigene Schicht-Zuweisung. Steht jedem Mitglied für die eigenen Zuweisungen offen.",
                "tags": [
                    "shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/assignments/{uuid}/decline": {
            "post": {
                "operationId": "shifts-assignments-decline",
                "summary": "Zuweisung ablehnen",
                "description": "Lehnt eine eigene Schicht-Zuweisung ab. Steht jedem Mitglied für die eigenen Zuweisungen offen.",
                "tags": [
                    "shifts"
                ],
                "parameters": [
                    {
                        "name": "uuid",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "reason": {
                                        "type": "string",
                                        "description": "Begründung für die Ablehnung"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/my-shifts": {
            "get": {
                "operationId": "shifts-my-shifts",
                "summary": "Eigene Schichten abrufen",
                "description": "Ruft die eigenen Schichten des angemeldeten Nutzers ab.",
                "tags": [
                    "shifts"
                ],
                "parameters": [
                    {
                        "name": "start_date",
                        "in": "query",
                        "required": false,
                        "description": "Filtert Schichten ab diesem Datum",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "end_date",
                        "in": "query",
                        "required": false,
                        "description": "Filtert Schichten bis zu diesem Datum (muss >= start_date sein)",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/current": {
            "get": {
                "operationId": "shifts-current",
                "summary": "Aktuelle Schicht-Übersicht",
                "description": "Ruft die aktuelle Schicht-Übersicht ab.",
                "tags": [
                    "shifts"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/preferences": {
            "get": {
                "operationId": "shifts-preferences-index",
                "summary": "Eigene Verfügbarkeits-Präferenzen",
                "description": "Ruft die eigenen Verfügbarkeits-Präferenzen des angemeldeten Nutzers ab.",
                "tags": [
                    "shifts"
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/flowtime/shifts/preferences/{dayOfWeek}": {
            "put": {
                "operationId": "shifts-preferences-update",
                "summary": "Verfügbarkeits-Präferenz setzen",
                "description": "Setzt die eigene Verfügbarkeits-Präferenz für einen Wochentag (1-7). Steht jedem Mitglied für die eigenen Präferenzen offen.",
                "tags": [
                    "shifts"
                ],
                "parameters": [
                    {
                        "name": "dayOfWeek",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Erfolgreiche Antwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Fehlerantwort",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                },
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "availability": {
                                        "type": "string",
                                        "description": "Verfügbarkeit: available, preferred, unavailable oder if_needed"
                                    },
                                    "available_from": {
                                        "type": "string",
                                        "description": "Verfügbar ab (HH:MM)"
                                    },
                                    "available_until": {
                                        "type": "string",
                                        "description": "Verfügbar bis (HH:MM)"
                                    },
                                    "preferred_shift_types": {
                                        "type": "array",
                                        "items": [],
                                        "description": "Bevorzugte Schichttypen als UUIDs (teamgebunden)"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Notizen (max. 500 Zeichen)"
                                    }
                                },
                                "required": [
                                    "availability"
                                ]
                            }
                        }
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "bearerAuth": {
                "type": "http",
                "scheme": "bearer",
                "description": "API-Schlüssel (pk_… oder at_…) als Authorization: Bearer <Schlüssel>. Andere Übergabewege werden mit 401 abgelehnt."
            }
        },
        "schemas": {
            "Error": {
                "type": "object",
                "properties": {
                    "success": {
                        "type": "boolean"
                    },
                    "error": {
                        "type": "string"
                    },
                    "message": {
                        "type": "string"
                    },
                    "errors": {
                        "type": "object"
                    }
                }
            }
        }
    }
}