> ## 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.

# Compliance einer Person

> Returns aggregated ArbZG compliance data for a single employee.



## OpenAPI

````yaml GET /employees/{employee}/compliance/{start}/{end}
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:
  /employees/{employee}/compliance/{start}/{end}:
    get:
      tags:
        - Sonstiges
      summary: GET /rest/employees/{employee}/compliance/{start}/{end}
      description: Returns aggregated ArbZG compliance data for a single employee.
      operationId: tenant.employees.compliance.show
      parameters:
        - name: employee
          in: path
          required: true
          description: The employee ID
          schema:
            type: string
            format: uuid
        - name: start
          in: path
          required: true
          schema:
            type: string
        - name: end
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  employee_id:
                    type: string
                  period:
                    type: object
                    properties:
                      start:
                        type: string
                      end:
                        type: string
                    required:
                      - start
                      - end
                  summary:
                    type: object
                    properties:
                      days_over_10h:
                        type: integer
                      days_over_8h:
                        type: integer
                      rest_period_violations:
                        type: integer
                      continuous_work_violations:
                        type: integer
                      night_work_days:
                        type: integer
                      night_work_total_ms:
                        type: integer
                      night_worker_limit_violations:
                        type: integer
                      total_violation_days:
                        type: integer
                    required:
                      - days_over_10h
                      - days_over_8h
                      - rest_period_violations
                      - continuous_work_violations
                      - night_work_days
                      - night_work_total_ms
                      - night_worker_limit_violations
                      - total_violation_days
                  weekly_hours:
                    type: array
                    items:
                      type: object
                      properties:
                        week:
                          type: string
                        net_work_ms:
                          type: string
                        exceeded:
                          type: boolean
                      required:
                        - week
                        - net_work_ms
                        - exceeded
                  rolling_average:
                    type: object
                    properties:
                      period_weeks:
                        type: integer
                      average_weekly_hours_ms:
                        type: integer
                      limit_ms:
                        type: string
                      exceeded:
                        type: boolean
                    required:
                      - period_weeks
                      - average_weekly_hours_ms
                      - limit_ms
                      - exceeded
                  night_work:
                    type: object
                    properties:
                      total_ms:
                        type: integer
                      monthly:
                        type: array
                        items:
                          type: object
                          properties:
                            month:
                              type: string
                            night_ms:
                              type: string
                            days:
                              type: string
                          required:
                            - month
                            - night_ms
                            - days
                      is_night_worker:
                        type: string
                      classification_reason:
                        type: string
                    required:
                      - total_ms
                      - monthly
                      - is_night_worker
                      - classification_reason
                  sunday_holiday_work:
                    type: object
                    properties:
                      worked_sundays:
                        type: integer
                      free_sundays:
                        type: string
                      total_sundays:
                        type: integer
                      free_sundays_minimum:
                        type: integer
                      free_sundays_ok:
                        type: string
                      worked_holidays:
                        type: integer
                      worked_sunday_dates:
                        type: array
                        items:
                          type: string
                      worked_holiday_dates:
                        type: array
                        items:
                          type: string
                    required:
                      - worked_sundays
                      - free_sundays
                      - total_sundays
                      - free_sundays_minimum
                      - free_sundays_ok
                      - worked_holidays
                      - worked_sunday_dates
                      - worked_holiday_dates
                required:
                  - employee_id
                  - period
                  - summary
                  - weekly_hours
                  - rolling_average
                  - night_work
                  - sunday_holiday_work
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
components:
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ModelNotFoundException:
      description: Not found
      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

````