{"openapi":"3.0.3","info":{"title":"Agent Data API","version":"2.0.0","description":"API layer providing structured HR and IT data for AI agents. Authenticate via x-api-key header."},"servers":[{"url":"/api","description":"Current deployment"}],"components":{"securitySchemes":{"ApiKey":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"Meta":{"type":"object","properties":{"source":{"type":"string","enum":["postgres"]},"count":{"type":"integer"},"timestamp":{"type":"string","format":"date-time"},"limit":{"type":"integer"},"offset":{"type":"integer"},"total":{"type":"integer"}}},"Error":{"type":"object","properties":{"success":{"type":"boolean","example":false},"error":{"type":"object","properties":{"code":{"type":"string","example":"NOT_FOUND"},"message":{"type":"string","example":"Resource not found"}}}}},"Employee":{"type":"object","required":["id","firstName","lastName","email","department","role","location","employmentType","startDate","status"],"properties":{"id":{"type":"string","example":"emp-001"},"firstName":{"type":"string","example":"Sarah"},"lastName":{"type":"string","example":"Müller"},"email":{"type":"string","format":"email","example":"s.mueller@example.com"},"department":{"type":"string","example":"Engineering"},"role":{"type":"string","example":"Senior Developer"},"location":{"type":"string","example":"Berlin"},"employmentType":{"type":"string","enum":["full-time","part-time","contractor","intern"]},"startDate":{"type":"string","format":"date","example":"2022-03-01"},"managerId":{"type":"string","nullable":true,"example":"emp-005"},"status":{"type":"string","enum":["active","inactive","on-leave"]}}},"Department":{"type":"object","required":["id","name","headId","employeeCount","budget","location"],"properties":{"id":{"type":"string","example":"dept-001"},"name":{"type":"string","example":"Engineering"},"headId":{"type":"string","example":"emp-005"},"employeeCount":{"type":"integer","example":12},"budget":{"type":"number","example":500000},"location":{"type":"string","example":"Berlin"}}},"Policy":{"type":"object","required":["id","title","category","summary","details","lastUpdated","applicableTo"],"properties":{"id":{"type":"string","example":"pol-001"},"title":{"type":"string","example":"Vacation Policy"},"category":{"type":"string","enum":["vacation","sick-leave","remote-work","working-hours","conduct","benefits"]},"summary":{"type":"string"},"details":{"type":"string"},"lastUpdated":{"type":"string","format":"date","example":"2026-01-15"},"applicableTo":{"type":"string","enum":["all","full-time","part-time","contractor"]}}},"TimeEntry":{"type":"object","required":["id","employeeId","date","hoursPlanned","hoursBooked","status"],"properties":{"id":{"type":"string","example":"te-001"},"employeeId":{"type":"string","example":"emp-001"},"date":{"type":"string","format":"date","example":"2026-05-04"},"startTime":{"type":"string","pattern":"^\\d{2}:\\d{2}$","nullable":true,"example":"09:00"},"endTime":{"type":"string","pattern":"^\\d{2}:\\d{2}$","nullable":true,"example":"17:30"},"breakStart":{"type":"string","pattern":"^\\d{2}:\\d{2}$","nullable":true,"example":"12:00"},"breakEnd":{"type":"string","pattern":"^\\d{2}:\\d{2}$","nullable":true,"example":"12:30"},"hoursPlanned":{"type":"number","minimum":0,"maximum":24,"example":8},"hoursBooked":{"type":"number","minimum":0,"maximum":24,"example":8},"status":{"type":"string","enum":["complete","partial","missing"]},"note":{"type":"string","nullable":true,"example":null}}},"TimeCorrection":{"type":"object","required":["id","employeeId","date","correctionType","status","createdAt"],"properties":{"id":{"type":"string","example":"tc-001"},"employeeId":{"type":"string","example":"emp-002"},"date":{"type":"string","format":"date","example":"2026-05-13"},"timeEntryId":{"type":"string","nullable":true,"example":"te-021"},"correctionType":{"type":"string","enum":["START","END","BREAK","FULL","OTHER"]},"startTime":{"type":"string","pattern":"^\\d{2}:\\d{2}$","nullable":true,"example":"10:00"},"endTime":{"type":"string","pattern":"^\\d{2}:\\d{2}$","nullable":true,"example":null},"breakStart":{"type":"string","pattern":"^\\d{2}:\\d{2}$","nullable":true,"example":null},"breakEnd":{"type":"string","pattern":"^\\d{2}:\\d{2}$","nullable":true,"example":null},"otherDetail":{"type":"string","nullable":true,"example":null},"comment":{"type":"string","nullable":true,"example":"vergessen"},"status":{"type":"string","enum":["pending","approved","rejected"]},"reviewedBy":{"type":"string","nullable":true,"example":null},"reviewedAt":{"type":"string","format":"date-time","nullable":true,"example":null},"createdAt":{"type":"string","format":"date-time","example":"2026-05-14T09:00:00Z"}}},"TimeOffRequest":{"type":"object","required":["id","employeeId","type","startDate","endDate","status","reason"],"properties":{"id":{"type":"string","example":"tor-001"},"employeeId":{"type":"string","example":"emp-001"},"type":{"type":"string","enum":["vacation","sick","parental","personal","other"]},"startDate":{"type":"string","format":"date","example":"2026-06-01"},"endDate":{"type":"string","format":"date","example":"2026-06-07"},"status":{"type":"string","enum":["pending","approved","rejected","cancelled"]},"reason":{"type":"string","example":"Annual leave"},"reviewedBy":{"type":"string","nullable":true,"example":null},"reviewedAt":{"type":"string","format":"date-time","nullable":true,"example":null}}},"TimeOffBalance":{"type":"object","required":["employeeId","year","entitlementDays","usedDays","pendingDays","remainingDays"],"properties":{"employeeId":{"type":"string","example":"emp-001"},"year":{"type":"integer","example":2026},"entitlementDays":{"type":"number","example":25},"usedDays":{"type":"number","example":5},"pendingDays":{"type":"number","example":3},"remainingDays":{"type":"number","example":17}}},"Payslip":{"type":"object","required":["id","employeeId","year","month","grossSalary","netSalary","incomeTax","socialContributions","bonus","deductions","issuedAt"],"properties":{"id":{"type":"string","example":"pay-001"},"employeeId":{"type":"string","example":"emp-001"},"year":{"type":"integer","example":2026},"month":{"type":"integer","minimum":1,"maximum":12,"example":5},"grossSalary":{"type":"number","example":5000},"netSalary":{"type":"number","example":3200},"incomeTax":{"type":"number","example":1200},"socialContributions":{"type":"number","example":600},"bonus":{"type":"number","example":0},"deductions":{"type":"number","example":0},"issuedAt":{"type":"string","format":"date-time","example":"2026-05-31T12:00:00Z"}}},"HiringPosition":{"type":"object","required":["id","title","department","status","openedAt","targetStartDate","location"],"properties":{"id":{"type":"string","example":"pos-001"},"title":{"type":"string","example":"Senior Backend Engineer"},"department":{"type":"string","example":"Engineering"},"status":{"type":"string","enum":["open","in-progress","filled","cancelled"]},"openedAt":{"type":"string","format":"date","example":"2026-03-01"},"targetStartDate":{"type":"string","format":"date","example":"2026-07-01"},"location":{"type":"string","example":"Berlin"}}},"HiringCandidate":{"type":"object","required":["id","positionId","name","email","stage","appliedAt","updatedAt"],"properties":{"id":{"type":"string","example":"cand-001"},"positionId":{"type":"string","example":"pos-001"},"name":{"type":"string","example":"Max Mustermann"},"email":{"type":"string","format":"email","example":"max@example.com"},"stage":{"type":"string","enum":["applied","screening","interview","offer","hired","rejected"]},"appliedAt":{"type":"string","format":"date-time","example":"2026-03-15T10:00:00Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-04-01T14:00:00Z"},"notes":{"type":"string","nullable":true,"example":null}}},"HiringData":{"type":"object","required":["positions","candidates"],"properties":{"positions":{"type":"array","items":{"$ref":"#/components/schemas/HiringPosition"}},"candidates":{"type":"array","items":{"$ref":"#/components/schemas/HiringCandidate"}}}},"ITAsset":{"type":"object","required":["id","type","name","serialNumber","status","purchaseDate","warrantyExpiry","notes"],"properties":{"id":{"type":"string","example":"asset-001"},"type":{"type":"string","enum":["laptop","monitor","phone","tablet","keyboard","mouse","headset","docking-station"]},"name":{"type":"string","example":"MacBook Pro 14"},"serialNumber":{"type":"string","example":"C02XY1234"},"assignedToEmployeeId":{"type":"string","nullable":true,"example":"emp-001"},"status":{"type":"string","enum":["available","assigned","in-repair","retired"]},"purchaseDate":{"type":"string","format":"date","example":"2023-06-01"},"warrantyExpiry":{"type":"string","format":"date","example":"2026-06-01"},"notes":{"type":"string","example":""}}},"ITTicket":{"type":"object","required":["id","title","description","priority","status","createdByEmployeeId","createdAt","updatedAt"],"properties":{"id":{"type":"string","example":"ticket-001"},"title":{"type":"string","example":"VPN not connecting"},"description":{"type":"string","example":"Cannot connect to corporate VPN from home office."},"priority":{"type":"string","enum":["low","medium","high","critical"]},"status":{"type":"string","enum":["open","in-progress","resolved","closed"]},"createdByEmployeeId":{"type":"string","example":"emp-003"},"assignedTo":{"type":"string","nullable":true,"example":"emp-010"},"createdAt":{"type":"string","format":"date-time","example":"2026-05-10T08:00:00Z"},"updatedAt":{"type":"string","format":"date-time","example":"2026-05-10T09:00:00Z"},"resolvedAt":{"type":"string","format":"date-time","nullable":true,"example":null}}},"SoftwareLicense":{"type":"object","required":["id","name","category","licenseType","seatsTotal","seatsUsed","owner","renewalDate","monthlyCost"],"properties":{"id":{"type":"string","example":"sw-001"},"name":{"type":"string","example":"Microsoft 365"},"category":{"type":"string","enum":["communication","development","design","productivity","security","analytics","cloud"]},"licenseType":{"type":"string","enum":["per-seat","enterprise","open-source","freemium"]},"seatsTotal":{"type":"integer","example":100},"seatsUsed":{"type":"integer","example":87},"owner":{"type":"string","example":"IT Department"},"renewalDate":{"type":"string","format":"date","example":"2027-01-01"},"monthlyCost":{"type":"number","example":2175}}},"AccessRequest":{"type":"object","required":["id","employeeId","system","accessLevel","status","requestedAt","justification"],"properties":{"id":{"type":"string","example":"ar-001"},"employeeId":{"type":"string","example":"emp-004"},"system":{"type":"string","example":"Jira"},"accessLevel":{"type":"string","enum":["read","read-write","admin","owner"]},"status":{"type":"string","enum":["pending","approved","rejected","revoked"]},"requestedAt":{"type":"string","format":"date-time","example":"2026-05-01T10:00:00Z"},"approvedBy":{"type":"string","nullable":true,"example":"emp-005"},"justification":{"type":"string","example":"Required for project management"}}},"CreateTimeEntryRequest":{"type":"object","required":["employeeId","date","hoursPlanned"],"properties":{"employeeId":{"type":"string","example":"emp-001"},"date":{"type":"string","format":"date","example":"2026-05-20"},"startTime":{"type":"string","pattern":"^\\d{2}:\\d{2}$","nullable":true,"example":"09:00"},"endTime":{"type":"string","pattern":"^\\d{2}:\\d{2}$","nullable":true,"example":"17:30"},"breakStart":{"type":"string","pattern":"^\\d{2}:\\d{2}$","nullable":true,"example":"12:00"},"breakEnd":{"type":"string","pattern":"^\\d{2}:\\d{2}$","nullable":true,"example":"12:30"},"hoursPlanned":{"type":"number","minimum":0,"maximum":24,"example":8},"note":{"type":"string","nullable":true,"example":"Client meeting ran long"}}},"UpdateTimeEntryRequest":{"type":"object","properties":{"startTime":{"type":"string","pattern":"^\\d{2}:\\d{2}$","nullable":true,"example":"09:00"},"endTime":{"type":"string","pattern":"^\\d{2}:\\d{2}$","nullable":true,"example":"17:30"},"breakStart":{"type":"string","pattern":"^\\d{2}:\\d{2}$","nullable":true,"example":"12:00"},"breakEnd":{"type":"string","pattern":"^\\d{2}:\\d{2}$","nullable":true,"example":"12:30"},"hoursPlanned":{"type":"number","minimum":0,"maximum":24},"note":{"type":"string","nullable":true}}},"CreateTimeCorrectionRequest":{"type":"object","required":["employeeId","date","correctionType"],"properties":{"employeeId":{"type":"string","example":"emp-002"},"date":{"type":"string","format":"date","example":"2026-05-13"},"correctionType":{"type":"string","enum":["START","END","BREAK","FULL","OTHER"],"example":"START"},"startTime":{"type":"string","pattern":"^\\d{2}:\\d{2}$","nullable":true,"example":"10:00"},"endTime":{"type":"string","pattern":"^\\d{2}:\\d{2}$","nullable":true,"example":null},"breakStart":{"type":"string","pattern":"^\\d{2}:\\d{2}$","nullable":true,"example":null},"breakEnd":{"type":"string","pattern":"^\\d{2}:\\d{2}$","nullable":true,"example":null},"otherDetail":{"type":"string","nullable":true,"example":null},"comment":{"type":"string","nullable":true,"example":"vergessen"}}},"CreateTimeOffRequest":{"type":"object","required":["employeeId","type","startDate","endDate","reason"],"properties":{"employeeId":{"type":"string","example":"emp-001"},"type":{"type":"string","enum":["vacation","sick","personal","parental","other"]},"startDate":{"type":"string","format":"date","example":"2026-06-01"},"endDate":{"type":"string","format":"date","example":"2026-06-07"},"reason":{"type":"string","example":"Annual leave"}}},"HealthResponse":{"type":"object","required":["status","service","dataSource","timestamp","version"],"properties":{"status":{"type":"string","example":"ok"},"service":{"type":"string","example":"API App for Sample Data"},"dataSource":{"type":"string","example":"postgres"},"timestamp":{"type":"string","format":"date-time"},"version":{"type":"string","example":"1.0.0"}}},"EmployeeResponse":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/Employee"},"meta":{"$ref":"#/components/schemas/Meta"}}},"TimeEntryResponse":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/TimeEntry"},"meta":{"$ref":"#/components/schemas/Meta"}}},"TimeCorrectionResponse":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/TimeCorrection"},"meta":{"$ref":"#/components/schemas/Meta"}}},"TimeOffRequestResponse":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/TimeOffRequest"},"meta":{"$ref":"#/components/schemas/Meta"}}},"PayslipResponse":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/Payslip"},"meta":{"$ref":"#/components/schemas/Meta"}}},"ITAssetResponse":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/ITAsset"},"meta":{"$ref":"#/components/schemas/Meta"}}},"EmployeesResponse":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/Employee"}},"meta":{"$ref":"#/components/schemas/Meta"},"resultCount":{"type":"integer","description":"Anzahl Elemente in data","example":10},"firstItemId":{"type":"string","nullable":true,"description":"ID des ersten Elements","example":"emp-001"},"displayListText":{"type":"string","description":"Lesbarer Hinweistext für Copilot Studio","example":"10 results"}}},"DepartmentsResponse":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/Department"}},"meta":{"$ref":"#/components/schemas/Meta"},"resultCount":{"type":"integer","description":"Anzahl Elemente in data","example":5},"firstItemId":{"type":"string","nullable":true,"description":"ID des ersten Elements","example":"dept-001"},"displayListText":{"type":"string","description":"Lesbarer Hinweistext für Copilot Studio","example":"5 results"}}},"PoliciesResponse":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/Policy"}},"meta":{"$ref":"#/components/schemas/Meta"},"resultCount":{"type":"integer","description":"Anzahl Elemente in data","example":6},"firstItemId":{"type":"string","nullable":true,"description":"ID des ersten Elements","example":"pol-001"},"displayListText":{"type":"string","description":"Lesbarer Hinweistext für Copilot Studio","example":"6 results"}}},"TimeEntriesResponse":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/TimeEntry"}},"meta":{"$ref":"#/components/schemas/Meta"},"resultCount":{"type":"integer","description":"Anzahl Elemente in data","example":20},"firstItemId":{"type":"string","nullable":true,"description":"ID des ersten Elements","example":"te-001"},"displayListText":{"type":"string","description":"Lesbarer Hinweistext für Copilot Studio","example":"20 results"}}},"MissingTimeEntriesResponse":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/TimeEntry"}},"meta":{"$ref":"#/components/schemas/Meta"},"resultCount":{"type":"integer","description":"Anzahl Elemente in data","example":3},"firstItemId":{"type":"string","nullable":true,"description":"ID des ersten Elements","example":"te-021"},"displayListText":{"type":"string","description":"Lesbarer Hinweistext für Copilot Studio","example":"3 results"}}},"TimeCorrectionsResponse":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/TimeCorrection"}},"meta":{"$ref":"#/components/schemas/Meta"},"resultCount":{"type":"integer","description":"Anzahl Elemente in data","example":4},"firstItemId":{"type":"string","nullable":true,"description":"ID des ersten Elements","example":"tc-001"},"displayListText":{"type":"string","description":"Lesbarer Hinweistext für Copilot Studio","example":"4 results"}}},"TimeOffRequestsResponse":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/TimeOffRequest"}},"meta":{"$ref":"#/components/schemas/Meta"},"resultCount":{"type":"integer","description":"Anzahl Elemente in data","example":8},"firstItemId":{"type":"string","nullable":true,"description":"ID des ersten Elements","example":"tor-001"},"displayListText":{"type":"string","description":"Lesbarer Hinweistext für Copilot Studio","example":"8 results"}}},"TimeOffBalancesResponse":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/TimeOffBalance"}},"meta":{"$ref":"#/components/schemas/Meta"},"resultCount":{"type":"integer","description":"Anzahl Elemente in data","example":10},"firstItemId":{"type":"string","nullable":true,"description":"ID des ersten Elements (null, da TimeOffBalance keine id hat)","example":null},"displayListText":{"type":"string","description":"Lesbarer Hinweistext für Copilot Studio","example":"10 results"}}},"PayslipsResponse":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/Payslip"}},"meta":{"$ref":"#/components/schemas/Meta"},"resultCount":{"type":"integer","description":"Anzahl Elemente in data","example":12},"firstItemId":{"type":"string","nullable":true,"description":"ID des ersten Elements","example":"pay-001"},"displayListText":{"type":"string","description":"Lesbarer Hinweistext für Copilot Studio","example":"12 results"}}},"HiringDataResponse":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#/components/schemas/HiringData"},"meta":{"$ref":"#/components/schemas/Meta"}}},"ITAssetsResponse":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/ITAsset"}},"meta":{"$ref":"#/components/schemas/Meta"},"resultCount":{"type":"integer","description":"Anzahl Elemente in data","example":15},"firstItemId":{"type":"string","nullable":true,"description":"ID des ersten Elements","example":"asset-001"},"displayListText":{"type":"string","description":"Lesbarer Hinweistext für Copilot Studio","example":"15 results"}}},"ITTicketsResponse":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/ITTicket"}},"meta":{"$ref":"#/components/schemas/Meta"},"resultCount":{"type":"integer","description":"Anzahl Elemente in data","example":8},"firstItemId":{"type":"string","nullable":true,"description":"ID des ersten Elements","example":"ticket-001"},"displayListText":{"type":"string","description":"Lesbarer Hinweistext für Copilot Studio","example":"8 results"}}},"SoftwareLicensesResponse":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/SoftwareLicense"}},"meta":{"$ref":"#/components/schemas/Meta"},"resultCount":{"type":"integer","description":"Anzahl Elemente in data","example":10},"firstItemId":{"type":"string","nullable":true,"description":"ID des ersten Elements","example":"sw-001"},"displayListText":{"type":"string","description":"Lesbarer Hinweistext für Copilot Studio","example":"10 results"}}},"AccessRequestsResponse":{"type":"object","required":["success","data","meta"],"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"$ref":"#/components/schemas/AccessRequest"}},"meta":{"$ref":"#/components/schemas/Meta"},"resultCount":{"type":"integer","description":"Anzahl Elemente in data","example":6},"firstItemId":{"type":"string","nullable":true,"description":"ID des ersten Elements","example":"ar-001"},"displayListText":{"type":"string","description":"Lesbarer Hinweistext für Copilot Studio","example":"6 results"}}}}},"security":[{"ApiKey":[]}],"paths":{"/health":{"get":{"operationId":"getHealth","summary":"Health check","tags":["System"],"security":[],"responses":{"200":{"description":"Service is healthy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}},"/hr/employees":{"get":{"operationId":"listEmployees","summary":"List employees","tags":["HR – Employees"],"parameters":[{"name":"department","in":"query","schema":{"type":"string"}},{"name":"status","in":"query","schema":{"type":"string","enum":["active","inactive","on-leave"]}},{"name":"location","in":"query","schema":{"type":"string"}},{"name":"employmentType","in":"query","schema":{"type":"string","enum":["full-time","part-time","contractor","intern"]}},{"name":"q","in":"query","schema":{"type":"string"},"description":"Full-text search on name, email, role"},{"name":"limit","in":"query","schema":{"type":"integer","default":50}},{"name":"offset","in":"query","schema":{"type":"integer","default":0}}],"responses":{"200":{"description":"List of employees","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeesResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/hr/employees/{id}":{"get":{"operationId":"getEmployee","summary":"Get employee by ID","tags":["HR – Employees"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Employee detail","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/hr/departments":{"get":{"operationId":"listDepartments","summary":"List departments","tags":["HR – Org"],"responses":{"200":{"description":"List of departments","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DepartmentsResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/hr/policies":{"get":{"operationId":"listPolicies","summary":"List HR policies","tags":["HR – Org"],"parameters":[{"name":"category","in":"query","schema":{"type":"string","enum":["vacation","sick-leave","remote-work","working-hours","conduct","benefits"]}},{"name":"applicableTo","in":"query","schema":{"type":"string","enum":["all","full-time","part-time","contractor"]}}],"responses":{"200":{"description":"List of HR policies","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PoliciesResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/hr/time-entries":{"get":{"operationId":"listTimeEntries","summary":"List time entries","tags":["HR – Time"],"parameters":[{"name":"employeeId","in":"query","schema":{"type":"string"}},{"name":"status","in":"query","schema":{"type":"string","enum":["complete","partial","missing"]}},{"name":"date","in":"query","schema":{"type":"string","format":"date"},"description":"Exact date (YYYY-MM-DD)"},{"name":"dateFrom","in":"query","schema":{"type":"string","format":"date"}},{"name":"dateTo","in":"query","schema":{"type":"string","format":"date"}},{"name":"limit","in":"query","schema":{"type":"integer","default":50}},{"name":"offset","in":"query","schema":{"type":"integer","default":0}}],"responses":{"200":{"description":"List of time entries","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimeEntriesResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createTimeEntry","summary":"Book a time entry","description":"Book a time entry using clock times. hoursBooked and status are derived automatically from startTime/endTime/breakStart/breakEnd. Leave clock times null for a missing booking.","tags":["HR – Time"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTimeEntryRequest"}}}},"responses":{"201":{"description":"Time entry created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimeEntryResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Employee not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/hr/time-entries/{id}":{"patch":{"operationId":"updateTimeEntry","summary":"Update a time entry","description":"Update a time entry. Only provide fields that should change. hoursBooked and status are recomputed automatically from the resulting clock times.","tags":["HR – Time"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTimeEntryRequest"}}}},"responses":{"200":{"description":"Updated time entry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimeEntryResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/hr/time-entries/missing":{"get":{"operationId":"listMissingTimeEntries","summary":"List missing or partial time entries","tags":["HR – Time"],"parameters":[{"name":"employeeId","in":"query","schema":{"type":"string"}},{"name":"dateFrom","in":"query","schema":{"type":"string","format":"date"}},{"name":"dateTo","in":"query","schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"List of missing/partial entries","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MissingTimeEntriesResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/hr/time-corrections":{"get":{"operationId":"listTimeCorrections","summary":"List time correction requests","tags":["HR – Time"],"parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["pending","approved","rejected"]}},{"name":"employeeId","in":"query","schema":{"type":"string"}},{"name":"correctionType","in":"query","schema":{"type":"string","enum":["START","END","BREAK","FULL","OTHER"]}},{"name":"date","in":"query","schema":{"type":"string","format":"date"},"description":"Exact date (YYYY-MM-DD)"},{"name":"limit","in":"query","schema":{"type":"integer","default":50}},{"name":"offset","in":"query","schema":{"type":"integer","default":0}}],"responses":{"200":{"description":"List of time correction requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimeCorrectionsResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createTimeCorrection","summary":"Submit a time correction request","description":"Fix existing times, back-fill missing times, or add a completely missing booking. Automatically linked to that day's booking (timeEntryId) when one exists; otherwise timeEntryId is null. Status is set to pending.","tags":["HR – Time"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTimeCorrectionRequest"}}}},"responses":{"201":{"description":"Time correction request created with status pending","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimeCorrectionResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Employee not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/hr/time-off":{"get":{"operationId":"listTimeOffRequests","summary":"List time-off requests","tags":["HR – Time Off"],"parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["pending","approved","rejected","cancelled"]}},{"name":"type","in":"query","schema":{"type":"string","enum":["vacation","sick","parental","personal","other"]}},{"name":"employeeId","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","default":50}},{"name":"offset","in":"query","schema":{"type":"integer","default":0}}],"responses":{"200":{"description":"List of time-off requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimeOffRequestsResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createTimeOffRequest","summary":"Submit a time-off request","tags":["HR – Time Off"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTimeOffRequest"}}}},"responses":{"201":{"description":"Time-off request created with status pending","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimeOffRequestResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Employee not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/hr/time-off/balance":{"get":{"operationId":"listTimeOffBalances","summary":"List time-off balances","tags":["HR – Time Off"],"parameters":[{"name":"employeeId","in":"query","schema":{"type":"string"}},{"name":"year","in":"query","schema":{"type":"integer","example":2026}}],"responses":{"200":{"description":"List of time-off balances","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimeOffBalancesResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/hr/payslips":{"get":{"operationId":"listPayslips","summary":"List payslips","tags":["HR – Payroll"],"parameters":[{"name":"employeeId","in":"query","schema":{"type":"string"}},{"name":"year","in":"query","schema":{"type":"integer","example":2026}},{"name":"month","in":"query","schema":{"type":"integer","minimum":1,"maximum":12}},{"name":"limit","in":"query","schema":{"type":"integer","default":50}},{"name":"offset","in":"query","schema":{"type":"integer","default":0}}],"responses":{"200":{"description":"List of payslips","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayslipsResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/hr/payslips/{id}":{"get":{"operationId":"getPayslip","summary":"Get payslip by ID","tags":["HR – Payroll"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Payslip detail","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayslipResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/hr/hiring":{"get":{"operationId":"listHiringData","summary":"List open positions and candidates","tags":["HR – Hiring"],"parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["open","on-hold","closed","filled"]}},{"name":"department","in":"query","schema":{"type":"string"}},{"name":"positionId","in":"query","schema":{"type":"string"}},{"name":"stage","in":"query","schema":{"type":"string","enum":["applied","screening","interview","offer","hired","rejected"]}}],"responses":{"200":{"description":"Positions and candidates","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HiringDataResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/it/assets":{"get":{"operationId":"listITAssets","summary":"List IT assets","tags":["IT – Assets"],"parameters":[{"name":"type","in":"query","schema":{"type":"string","enum":["laptop","monitor","phone","tablet","keyboard","mouse","headset","docking-station"]}},{"name":"status","in":"query","schema":{"type":"string","enum":["available","assigned","in-repair","retired"]}},{"name":"assignedTo","in":"query","schema":{"type":"string"},"description":"Filter by employee ID"},{"name":"limit","in":"query","schema":{"type":"integer","default":50}},{"name":"offset","in":"query","schema":{"type":"integer","default":0}}],"responses":{"200":{"description":"List of IT assets","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ITAssetsResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/it/assets/{id}":{"get":{"operationId":"getITAsset","summary":"Get asset by ID","tags":["IT – Assets"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Asset detail","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ITAssetResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/it/tickets":{"get":{"operationId":"listITTickets","summary":"List IT support tickets","tags":["IT – Tickets"],"parameters":[{"name":"priority","in":"query","schema":{"type":"string","enum":["low","medium","high","critical"]}},{"name":"status","in":"query","schema":{"type":"string","enum":["open","in-progress","resolved","closed"]}},{"name":"assignedTo","in":"query","schema":{"type":"string"}},{"name":"createdBy","in":"query","schema":{"type":"string"}},{"name":"q","in":"query","schema":{"type":"string"},"description":"Search in title and description"},{"name":"limit","in":"query","schema":{"type":"integer","default":50}},{"name":"offset","in":"query","schema":{"type":"integer","default":0}}],"responses":{"200":{"description":"List of IT tickets","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ITTicketsResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/it/software":{"get":{"operationId":"listSoftwareLicenses","summary":"List software and licenses","tags":["IT – Software"],"parameters":[{"name":"category","in":"query","schema":{"type":"string"}},{"name":"licenseType","in":"query","schema":{"type":"string"}},{"name":"hasSeats","in":"query","schema":{"type":"boolean"},"description":"Only software with available seats"}],"responses":{"200":{"description":"List of software","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SoftwareLicensesResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/it/access-requests":{"get":{"operationId":"listAccessRequests","summary":"List access requests","tags":["IT – Access"],"parameters":[{"name":"status","in":"query","schema":{"type":"string","enum":["pending","approved","rejected","revoked"]}},{"name":"employeeId","in":"query","schema":{"type":"string"}},{"name":"system","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","default":50}},{"name":"offset","in":"query","schema":{"type":"integer","default":0}}],"responses":{"200":{"description":"List of access requests","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessRequestsResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}