> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stampfactory.eu/llms.txt
> Use this file to discover all available pages before exploring further.

# Dashboard-Daten



## OpenAPI

````yaml GET /dashboard
openapi: 3.1.0
info:
  title: Stampfactory API
  version: 1.0.0
  description: >-
    REST API für die Stampfactory Zeiterfassungs- und
    Personalverwaltungsplattform.


    ## Basis-URL


    Jeder Mandant hat eine eigene Subdomain: `https://{tenant}.stamp.eu/rest/…`.

    Custom Domains werden unterstützt; der Pfad-Präfix ist immer `/rest`.

    Authentifizierung über `POST /rest/login` (Bearer-Token, Laravel Sanctum).


    ## Datenformate (verbindlich, ADR 0005)


    | Typ | Format | Beispiel |

    |---|---|---|

    | Dauer (Anzeige) | String `HH:MM:SS.mmm`, Feldname ohne Suffix |
    `"08:00:00.000"` |

    | Dauer (Rohwert) | Integer Millisekunden, Feldname mit Suffix `_ms` |
    `28800000` |

    | Datum | ISO 8601 (`YYYY-MM-DD`) | `"2026-07-25"` |

    | Fachliche Zeitstempel (Stempelungen, Korrekturen) | ISO 8601 in
    Mandanten-Zeitzone | `"2026-07-25T08:00:00+02:00"` |

    | Technische Metadaten (`created_at`, `updated_at`) | ISO 8601 UTC |
    `"2026-07-25T06:00:00+00:00"` |

    | IDs | UUID bzw. TypeID-String | `"9d3f…"` |

    | Arbeitszeit-Flags | Integer-Bitmaske (`flags`), Bits siehe
    `WorkingTimeFlag` | `512` = Feiertag |

    | Monats-Perioden | `YYYY-MM` | `"2026-07"` |


    ## Responses


    Erfolgs-Responses liefern die fachliche Payload unter `data`

    (dokumentierte Ausnahmen: `POST /rest/terminal/{code}` und `/rest/mobile`).

    Listen sind, wo paginiert, im Laravel-Paginator-Format (`data` + `links` +
    `meta`).


    ## Fehlerformat


    Alle Fehler (4xx/5xx) folgen einem einheitlichen Envelope:


    ```json

    {
      "request_id": "…",
      "timestamp": "2026-07-25T06:00:00Z",
      "message": "Menschlich lesbare Meldung",
      "field_errors": { "feld": ["Meldung"] },
      "errors": [{ "title": "…", "detail": "…", "type": "https://docs.stampfactory.eu/errors#…", "_meta": { } }]
    }

    ```


    `field_errors` erscheint bei Validierungsfehlern (422). Endpoint-spezifische

    Zusatzdaten (z. B. `warnings`, `earliest`, `code`) stehen kanonisch in

    `errors[0]._meta`; Top-Level-Duplikate sind eine
    Übergangs-Kompatibilitätsschicht.

    Die `type`-URLs verlinken auf die Fehlerdokumentation.
servers:
  - url: https://{tenant}.stamp.eu/rest
    description: Production
    variables:
      tenant:
        default: demo
        description: Subdomain des Mandanten
security:
  - http: []
paths:
  /dashboard:
    get:
      tags:
        - Sonstiges
      operationId: tenant.dashboard
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  kpis:
                    type: object
                    properties:
                      employees:
                        type: integer
                        minimum: 0
                      present:
                        type: integer
                      absent:
                        type: integer
                      open_tasks:
                        type: integer
                    required:
                      - employees
                      - present
                      - absent
                      - open_tasks
                  inbox:
                    anyOf:
                      - type: array
                        items: {}
                      - type: array
                        items:
                          type: string
                        minItems: 0
                        maxItems: 0
                        additionalItems: false
                  live:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                        avatar_url:
                          type: string
                        unit:
                          type: string
                        department:
                          type: string
                        clocked_in_at:
                          type:
                            - string
                            - 'null'
                        duration_minutes:
                          type:
                            - integer
                            - 'null'
                      required:
                        - id
                        - name
                        - avatar_url
                        - unit
                        - department
                        - clocked_in_at
                        - duration_minutes
                  team_status:
                    type:
                      - object
                      - 'null'
                    properties:
                      missing_clockin:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                            avatar_url:
                              type: string
                            delay_minutes:
                              anyOf:
                                - type: integer
                                - type: integer
                                  enum:
                                    - 0
                            shift_start:
                              type:
                                - string
                                - 'null'
                          required:
                            - id
                            - name
                            - avatar_url
                            - delay_minutes
                            - shift_start
                      clocked_in:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                            avatar_url:
                              type: string
                            clocked_in_at:
                              type:
                                - string
                                - 'null'
                            duration_minutes:
                              type:
                                - integer
                                - 'null'
                          required:
                            - id
                            - name
                            - avatar_url
                            - clocked_in_at
                            - duration_minutes
                      not_in_office:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                            avatar_url:
                              type: string
                            leave_type:
                              type: string
                            until:
                              type: string
                          required:
                            - id
                            - name
                            - avatar_url
                            - leave_type
                            - until
                    required:
                      - missing_clockin
                      - clocked_in
                      - not_in_office
                  absences:
                    type: object
                    properties:
                      holidays:
                        type: string
                      upcoming:
                        type: string
                    required:
                      - holidays
                      - upcoming
                  vacation:
                    type:
                      - object
                      - 'null'
                    properties:
                      total:
                        type: number
                      used:
                        type: number
                      remaining:
                        type: number
                    required:
                      - total
                      - used
                      - remaining
                  birthdays:
                    type: array
                    items: {}
                  mood_summary:
                    type: array
                    items:
                      type: object
                      properties:
                        date:
                          type: string
                        average_rating:
                          type:
                            - number
                            - 'null'
                        count:
                          anyOf:
                            - type: integer
                            - type: integer
                              enum:
                                - 0
                      required:
                        - date
                        - average_rating
                        - count
                  employee:
                    type: object
                    properties:
                      timer:
                        type: object
                        properties:
                          clocked_in:
                            type: boolean
                          last_event_timestamp:
                            type:
                              - string
                              - 'null'
                          today_work_seconds:
                            type: integer
                          today_pause_seconds:
                            type: integer
                          target_duration_seconds:
                            type: integer
                          weekly_target_seconds:
                            type: integer
                          weekly_seconds:
                            type: integer
                        required:
                          - clocked_in
                          - last_event_timestamp
                          - today_work_seconds
                          - today_pause_seconds
                          - target_duration_seconds
                          - weekly_target_seconds
                          - weekly_seconds
                      week_overview:
                        type: array
                        items:
                          type: object
                          properties:
                            date:
                              type: string
                            weekday:
                              type: string
                            actual_seconds:
                              type: integer
                            target_seconds:
                              type: integer
                          required:
                            - date
                            - weekday
                            - actual_seconds
                            - target_seconds
                      overtime:
                        type: object
                        properties:
                          balance_seconds:
                            type: integer
                          earned_month_seconds:
                            type: integer
                          compensated_month_seconds:
                            type: integer
                          year_month:
                            type: string
                        required:
                          - balance_seconds
                          - earned_month_seconds
                          - compensated_month_seconds
                          - year_month
                      my_requests:
                        type: array
                        items:
                          type: object
                          additionalProperties: {}
                      mood_history:
                        type:
                          - array
                          - 'null'
                        items:
                          type: object
                          properties:
                            date:
                              type: string
                            rating:
                              type: string
                          required:
                            - date
                            - rating
                    required:
                      - timer
                      - week_overview
                      - overtime
                      - my_requests
                      - mood_history
                  attendance:
                    type: object
                    properties:
                      rate:
                        type: number
                      trend:
                        type: number
                      heatmap:
                        type: array
                        items:
                          type: object
                          properties:
                            weekday:
                              type: integer
                            hour:
                              type: integer
                            value:
                              type: number
                          required:
                            - weekday
                            - hour
                            - value
                    required:
                      - rate
                      - trend
                      - heatmap
                  clock_channels_today:
                    type: object
                    properties:
                      terminal:
                        type: integer
                      mobile:
                        type: integer
                    required:
                      - terminal
                      - mobile
                  today_overview:
                    type: array
                    items:
                      type: object
                      properties:
                        employee_id:
                          type: string
                        code:
                          type: string
                        name:
                          type: string
                        department:
                          type: string
                        status:
                          type: string
                          const: absent
                        clock_in:
                          type:
                            - string
                            - 'null'
                        clock_out:
                          type:
                            - string
                            - 'null'
                      required:
                        - employee_id
                        - code
                        - name
                        - department
                        - status
                        - clock_in
                        - clock_out
                  intraday_today:
                    anyOf:
                      - type: array
                        items:
                          type: object
                          properties:
                            hour:
                              type: integer
                              const: 6
                            count:
                              anyOf:
                                - type: integer
                                - type: integer
                                  enum:
                                    - 0
                          required:
                            - hour
                            - count
                      - type: array
                        items:
                          type: object
                          properties:
                            hour:
                              type: integer
                              const: 6
                            count:
                              type: integer
                          required:
                            - hour
                            - count
                  compliance_week:
                    type: object
                    properties:
                      count:
                        type: integer
                      employees:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            name:
                              type: string
                          required:
                            - id
                            - name
                    required:
                      - count
                      - employees
                  next_holiday:
                    type:
                      - object
                      - 'null'
                    properties:
                      date:
                        type: string
                      name:
                        type: string
                      half_day:
                        type: boolean
                    required:
                      - date
                      - name
                      - half_day
                  vacation_expiry_risk:
                    type: array
                    items:
                      type: object
                      properties:
                        employee_id:
                          type: string
                        name:
                          type: string
                        remaining_days:
                          type: number
                        expires_at:
                          type: string
                      required:
                        - employee_id
                        - name
                        - remaining_days
                        - expires_at
                  shift_coverage_today:
                    type: object
                    properties:
                      units:
                        type: array
                        items:
                          type: object
                          properties:
                            unit_id:
                              type: string
                            name:
                              type:
                                - string
                                - 'null'
                            assigned:
                              type: integer
                            required:
                              type: integer
                            open:
                              type: integer
                          required:
                            - unit_id
                            - name
                            - assigned
                            - required
                            - open
                    required:
                      - units
                required:
                  - kpis
                  - inbox
                  - live
                  - team_status
                  - absences
                  - vacation
                  - birthdays
                  - mood_summary
                  - employee
                  - attendance
                  - clock_channels_today
                  - today_overview
                  - intraday_today
                  - compliance_week
                  - next_holiday
                  - vacation_expiry_risk
                  - shift_coverage_today
        '401':
          $ref: '#/components/responses/AuthenticationException'
components:
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
  securitySchemes:
    http:
      type: http
      description: Bearer-Token, erhalten über den Login-Endpunkt (POST /rest/login).
      scheme: bearer

````