Abwesenheiten
Abwesenheit beantragen
Self-service: employee creates own leave request
AuthentifizierungBearer <token>
Bearer-Token, erhalten über den Login-Endpunkt (POST /rest/login).
Ort: header
Request-Body
application/json
TypeScript-Definitionen
TypeScript-Typ für request body.
Response-Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/leave_requests" \ -H "Content-Type: application/json" \ -d '{ "type": "string", "start_date": "2019-08-24T14:15:22Z", "end_date": "2019-08-24T14:15:22Z" }'{ "data": { "id": "string", "employee_id": "string", "employee_name": "string", "type": "string", "is_half_day": true, "first_day_half": true, "last_day_half": true, "absence_type": { "id": "string", "slug": "string", "name": "string", "color": "string", "icon": "string", "is_system": "string", "category": "string", "unit": "string", "half_day_allowed": "string", "affects_vacation": "string", "target_work_factor": 0, "working_time_flag": "string", "requires_approval": "string", "is_paid": "string", "certificate_required": "string", "certificate_deadline_days": "string", "substitute_option": "string", "count_weekdays_only": "string", "is_active": "string", "sort_order": "string" }, "status": "string", "start_date": "string", "end_date": "string", "business_days": 0, "calculated_days": 0, "hours": 0, "valuation_mode": "string", "days": "string", "valued_total": "string", "bucket_allocation": "string", "reason": "string", "substitute": { "id": "string", "name": "string" }, "substitute_status": "string", "substitute_responded_at": "string", "decided_by": "string", "decided_by_name": "string", "decided_at": "string", "decision_note": "string", "created_at": "string", "updated_at": "string", "can_withdraw": "string", "withdraw_blocked_reason": "string" }}Abwesenheitsanträge nach Jahr GET
Leave requests for a year, scoped to the employees the requester may see (own data for regular employees, unit + sub-units for managers, everything for admins). Absence records include health data, so cross-employee leakage must be prevented
Antrag genehmigen/ablehnen PUT
The route has no {employee} segment, so the manager middleware cannot enforce the unit scope — it is checked explicitly here.