Azure DevOps HR & Payroll Management API
Welcome to the central backend services gateway. Engineered with ASP.NET Core 8.0, Entity Framework Core, SQL Server, and Azure DevOps RBAC token exchange. Powering Leave Management, Approvals, Attendance Tracking, Payroll Runs, and Daily Reports with 7:00 PM EOD reminder status.
🔐 Zero PAT Exposure
Azure DevOps Personal Access Tokens are exchanged in memory over TLS for signed JWT tokens with mapped PayrollManager and Employee roles.
⏱️ Attendance Hours Linkage
Payroll runs compute net hours worked minus breaks directly from biometric and clock-in sessions recorded in the attendance module.
📊 Progressive Tax Rules & Payslips
Automated salary component breakdown (Basic, HRA, Medical, PF, Tax Withholding) with tamper-proof payslip generation for employees.
// Sample Azure DevOps Payroll Payslip Contract:
{
"isSuccess": true,
"statusCode": 200,
"message": "Payslip retrieved successfully",
"result": {
"employeeId": "usr_9981",
"azureEmail": "developer@devhub.in",
"period": "2026-10",
"baseSalary": 85000.00,
"allowances": { "HRA": 25000.00, "Medical": 5000.00 },
"deductions": { "PF": 4500.00, "TaxWithholding": 7200.00 },
"netPayable": 103300.00,
"status": "Processed"
}
}
// Postman Execution & Troubleshooting Guide:
1. Import HR Management API.postman_collection.json and HR_Management_Environment.postman_environment.json into Postman.
2. Dynamic Port Discovery: Active at https://payroll.aithtec.com (Environment download below auto-injects this URL).
3. Content-Type: Set to application/json (or text/plain with JSON body, both are accepted).
4. Azure DevOps TFS: Supports https://devhubserver.devhub.in/DevhubProjects with self-signed SSL certificate bypass and auto-fallback.
5. Run POST /api/auth/ado-login with your PAT to auto-populate {{authToken}} across all 37 requests.
6. Run Folder 7: Daily Reports to submit daily tasks and verify the 7:00 PM EOD reminder.
Production API Modules Overview
All endpoints enforce uniform response envelopes, role authorization, and comprehensive validation.
Module 1
Authentication & ADO Identity
Exchanges Azure DevOps PATs for JWT Bearer tokens with mapped security roles.
POST /api/auth/ado-login
GET /api/auth/me
Module 2
Leave Requests Module
Submit leaves, calculate annual balances (Vacation, Sick, Personal), and cancellations.
POST /api/leaves
GET /api/leaves/balance
GET /api/leaves
Module 3
Leave Approvals (Strict RBAC)
Approval workflow for Managers and HR with audit logging and balance restoration on rejection.
GET /api/approvals/pending
POST /api/approvals/{id}/action
Module 4
Admin Broadcast Announcements
Organization-wide announcements targeted by Role or Department with read receipt receipts.
GET /api/broadcasts/active
POST /api/broadcasts
Module 5
Attendance & Biometrics
Daily clock-in/out, multi-session break recording, real-time status tracking, and regularization.
POST /api/attendance/clock-in
POST /api/attendance/break
GET /api/attendance/session
POST /api/attendance/clock-out
Module 6
Payroll Configuration & Processing
Salary structures, tax rules, financial period runs, and employee payslips.
GET /api/payroll/components
POST /api/payroll/employee
POST /api/payroll/periods/{id}/calculate
GET /api/payroll/periods/{id}/payslip
Module 7 • NEW FEATURE
Daily Work Reports & 7:00 PM End-of-Day (EOD) Reminder
Strict Present-Day Rule: Submissions for yesterday or earlier trigger immediate HTTP 400 Bad Request rejection. Supports multi-task reporting with Azure DevOps Task IDs, start/end times, hours worked, completed/pending activities, testing status, blockers, and tomorrow's plan.
7:00 PM (19:00) EOD Indicator: Live status indicator for employees and managers checking whether 7:00 PM has arrived, if today's report was submitted, and links directly with employee attendance clock-in records.
POST /api/daily-reports (Submit today multi-task report; back-dates strictly rejected)
GET /api/daily-reports/eod-status (7:00 PM EOD reminder & attendance clock-in linkage)
GET /api/daily-reports/today (Retrieve today submitted report for current user)
GET /api/daily-reports/{id} (Get individual report with tasks & activities)
GET /api/daily-reports?pageNumber=1&pageSize=20 (Historic paged reports)