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

# Dienstreisen auflisten



## OpenAPI

````yaml GET /employees/{employee}/business_trips
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}/business_trips:
    get:
      tags:
        - Abwesenheiten
      summary: GET /rest/employees/{employee}/business_trips
      operationId: tenant.employees.business_trips.index
      parameters:
        - name: employee
          in: path
          required: true
          description: The employee ID
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Array of `LeaveRequestResource`
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/LeaveRequestResource'
                required:
                  - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
components:
  schemas:
    LeaveRequestResource:
      type: object
      properties:
        id:
          type: string
        employee_id:
          type: string
        employee_name:
          type: string
        type:
          type: string
        is_half_day:
          type: boolean
        absence_type:
          $ref: '#/components/schemas/AbsenceTypeResource'
        status:
          type: string
        start_date:
          type: string
        end_date:
          type: string
        business_days:
          type: number
        calculated_days:
          type: number
        valuation_mode:
          type: string
        days:
          type: string
        valued_total:
          type:
            - string
            - 'null'
        bucket_allocation:
          type: string
        reason:
          type: string
        substitute:
          type:
            - object
            - 'null'
          properties:
            id:
              type: string
            name:
              type: string
          required:
            - id
            - name
        substitute_status:
          type: string
        substitute_responded_at:
          type: string
        decided_by:
          type: string
        decided_by_name:
          type:
            - string
            - 'null'
        decided_at:
          type: string
        decision_note:
          type: string
        created_at:
          type: string
        updated_at:
          type: string
        can_withdraw:
          type: string
        withdraw_blocked_reason:
          type: string
      required:
        - id
        - employee_id
        - type
        - is_half_day
        - status
        - start_date
        - end_date
        - business_days
        - calculated_days
        - valuation_mode
        - reason
        - substitute_status
        - substitute_responded_at
        - decided_by
        - decided_at
        - decision_note
        - created_at
        - updated_at
        - can_withdraw
        - withdraw_blocked_reason
      title: LeaveRequestResource
    AbsenceTypeResource:
      type: object
      properties:
        id:
          type: string
        slug:
          type: string
        name:
          type: string
        color:
          type: string
        icon:
          type: string
        is_system:
          type: string
        category:
          type: string
        unit:
          type: string
        half_day_allowed:
          type: string
        affects_vacation:
          type: string
        target_work_factor:
          type: number
        working_time_flag:
          type: string
        requires_approval:
          type: string
        is_paid:
          type: string
        certificate_required:
          type: string
        certificate_deadline_days:
          type: string
        substitute_option:
          type: string
        count_weekdays_only:
          type: string
        is_active:
          type: string
        sort_order:
          type: string
      required:
        - id
        - slug
        - name
        - color
        - icon
        - is_system
        - category
        - unit
        - half_day_allowed
        - affects_vacation
        - target_work_factor
        - working_time_flag
        - requires_approval
        - is_paid
        - certificate_required
        - certificate_deadline_days
        - substitute_option
        - count_weekdays_only
        - is_active
        - sort_order
      title: AbsenceTypeResource
  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

````