Skip to content

API — Payroll

The HTTP surface of the monthly pay run and everything that feeds it — timesheets and leave, advances and loans, and overtime. TimesheetController is much larger than PayrollController because the whole leave subsystem lives on it.

See Payroll module, Payroll flow and Leave Management.

97 actions across 4 controllers

Routing, the permission model, response kinds and error behaviour are described once in the API Overview. Unless a row says otherwise the route is /{Controller}/{Action}, id is a GUID string, and a Details page is a full View while Manage* / Create fragments are PartialViews loaded into a modal.

PayrollController

The monthly payroll run — generation, the per-employee detail lines, the Allocator → Finance Manager → Country Director chain, and the bank-transfer exports.

Source: NKO.Main/NKO.Main/Controllers/PayrollController.cs · route prefix: /Payroll · 18 actions · 0 ungated

Route Verb Parameters Permission Returns
/Payroll/ContextActions POST string id, int operationType, int userType, string idText, decimal? ExchangeRate PayrollDetails Redirect
/Payroll/Create GET — PayrollCreate View
/Payroll/Create POST Payroll model PayrollCreate View / JSON
/Payroll/Details GET string id, int? filterBranch, int? pdf, string msg, int? page, int? userFilter, int? departmentId, int? positionId, int? subBranchId, int? projectId, string sortOrder PayrollDetails View
/Payroll/Export GET string id, int? pdf PayrollExport Redirect
/Payroll/ExportAllocations GET string id, int? filterBranch, int? userFilter, int? departmentId, int? positionId, int? subBranchId, int? projectId, string sortOrder PayrollDetails Redirect
/Payroll/ExportMin GET string id PayrollTransferData Redirect
/Payroll/ExportPayroll GET — PayrollExport View
/Payroll/ExportPayroll POST int month, int year PayrollExport View
/Payroll/GetUserCodes GET string search GetUsers JSON
/Payroll GET string sortOrder, int? page, int? statusFilter PayrollIndex View
/Payroll/Navigation GET string payrollGuid, int userId, string side, int month, int year AllocationsIndex JSON
/Payroll/PayrollEmployees GET string payrollGuid, string search PayrollDetails JSON
/Payroll/Reset GET string id PayrollCreate Redirect
/Payroll/TransferData GET — PayrollTransferData View
/Payroll/TransferData POST PartnersContributionMain model, IFormFile file PayrollTransferData View
/Payroll/TransferFinanceData GET string id PayrollTransferData View
/Payroll/TransferFinanceData POST Payroll model, IFormFile file PayrollTransferData View

TimesheetController

Timesheets and the whole leave subsystem: leave requests, balances, the Manager → HR (→ GM) chain, and the attendance-linked exports.

Source: NKO.Main/NKO.Main/Controllers/TimesheetController.cs · route prefix: /Timesheet · 52 actions · 0 ungated

Route Verb Parameters Permission Returns
/Timesheet/ApproveCondition POST int id, int type TimesheetLeaveDetails JSON
/Timesheet/AttendanceCalendar GET List<int> Users, List<int> NKOProfiles TimesheetLeaves View
/Timesheet/CompleteLeave GET string id, string msg TimesheetEditLeave View / Redirect
/Timesheet/CompleteLeave POST Leave model TimesheetEditLeave View / Redirect
/Timesheet/ContextActions POST string id, int operationType, int userType, string idText, int? CashReceivedById TimesheetDetails Redirect
/Timesheet/Create GET — TimesheetCreate View
/Timesheet/Create POST Timesheet model TimesheetCreate View / Redirect
/Timesheet/CreateAttachment GET string id, int? fileType TimesheetCreateLeave PartialView
/Timesheet/CreateAttachment POST string attachedFiles, string Description, string id, int? FileTypeId TimesheetCreateLeave JSON
/Timesheet/CreateLeave GET int? absentId, bool? IsJustification, int? day, int? month, int? year, string FromTime, string ToTime, bool? allDay, int? delay TimesheetCreateLeave View
/Timesheet/CreateLeave POST Leave model, DateTime? fromDate1, string fromTime1, string toTime1 TimesheetCreateLeave View / Redirect
/Timesheet/CreateLeaveBalance GET — UserIndex View
/Timesheet/CreateLeaveBalance POST LeaveBalanceCreateVM model UserIndex View / JSON
/Timesheet/CreateMonth GET — TimesheetCreateMonth PartialView
/Timesheet/CreateMonth POST PartnersContributionMain model TimesheetCreateMonth PartialView / JSON
/Timesheet/Delete GET string id TimesheetDetails PartialView / Redirect
/Timesheet/Delete POST Timesheet timesheet TimesheetDetails JSON / Redirect
/Timesheet/DeleteAttachment GET string id TimesheetCreateLeave Redirect
/Timesheet/DeleteFiles POST int id TimesheetCreateLeave JSON
/Timesheet/DeleteLeave GET string id TimesheetLeaveDetails PartialView / Redirect
/Timesheet/DeleteLeave POST Leave leave TimesheetLeaveDetails JSON / Redirect
/Timesheet/Details GET string id, int? pdf, string msg TimesheetDetails View / Redirect
/Timesheet/Edit POST Timesheet model TimesheetEdit Redirect
/Timesheet/EditInvoice POST Timesheet model TimesheetEditInvoice Redirect
/Timesheet/EditLeave GET string id, string msg TimesheetEditLeave View
/Timesheet/EditLeave POST Leave model, DateTime? fromDate1, string fromTime1, string toTime1 TimesheetEditLeave View / Redirect
/Timesheet/ExportLeaves GET int? month, int? year, int? status UserIndex Redirect
/Timesheet/ExportPayroll GET — TimesheetTransferData View
/Timesheet/ExportPayroll POST int month, int year HumanResourceExportUsers View
/Timesheet/ExportSR GET int? id TimesheetExportSR View
/Timesheet/ExportSR POST int? projectId, int? monthId, bool isAll TimesheetExportSR View
/Timesheet/ExportUserLeaves GET — UserIndex Redirect
/Timesheet/GetAttachment GET int leaveId TimesheetCreateLeave JSON
/Timesheet/GetLeaveBalance GET int userId, int leaveTypeId, bool isTwin, bool isFirstDead TimesheetCreateLeave JSON
/Timesheet/GetLeaveTypes GET bool isHourly TimesheetCreateLeave JSON
/Timesheet/GetToDate GET string startDate, int count TimesheetCreateLeave JSON
/Timesheet/GetUserCodes GET string search ProjectCreate JSON
/Timesheet/ImportCurrentData GET — UserIndex View
/Timesheet/ImportCurrentData POST LeaveBalanceImportVM model, bool replaceData, IFormFile file UserIndex View
/Timesheet/ImportData GET — UserIndex View
/Timesheet/ImportData POST LeaveBalanceImportVM model, bool replaceData, IFormFile file UserIndex View
/Timesheet GET int? filterYear, int? filterMonth, int? statusFilter, int? page, string sortOrder, int? userFilter TimesheetIndex View
/Timesheet/LeaveContextActions POST string id, int operationType, int userType, string idText, string idCancelText, int substituteUserId, string PIN TimesheetLeaveDetails Redirect / Forbid
/Timesheet/LeaveCopy GET string id TimesheetLeaveDetails Redirect
/Timesheet/LeaveDetails GET string id, string msg, int? pdf TimesheetLeaveDetails View / Redirect
/Timesheet/Leaves GET string search, string sortOrder, int? filterYear, string searchString, string currentFilter, string ScurrentFilter, int? filterMonth, int? filterStatus, DateTime? filterDate, int? page, int? filterType, int? userFilter, int? waitingForFilter, int? filterNo TimesheetLeaves View
/Timesheet/ProjectsRatio GET int? filterYear, int? filterMonth, int? page TimesheetProjectsRatio View
/Timesheet/RatioDetails GET int? id TimesheetRatioDetails PartialView
/Timesheet/TransferData GET — TimesheetTransferData View
/Timesheet/TransferData POST PartnersContributionMain model, bool replaceData, IFormFile file TimesheetTransferData View
/Timesheet/TransferLeaves GET — TimesheetLeaves View
/Timesheet/UploadFiles POST int id, string desc TimesheetCreateLeave JSON

AdvanceController

Advance and loan requests, their repayment schedule, and the Ordinary / Emergency cash boxes.

Source: NKO.Main/NKO.Main/Controllers/AdvanceController .cs · route prefix: /Advance · 13 actions · 0 ungated

Route Verb Parameters Permission Returns
/Advance/AdvanceCopy GET string id AdvanceDetails Redirect
/Advance/CashBoxTransaction GET int? page, int? filterStatus, bool? isEmergent, string sortOrder AdvanceCashBoxTransaction View
/Advance/Complete GET string id AdvanceCreate View / Redirect
/Advance/Complete POST AppUserAdvance model AdvanceCreate View / Redirect
/Advance/ContextActions POST string id, int operationType, int userType, string idText, string idCancelText, string PIN, List<int> guarantorsList AdvanceDetails Redirect / Forbid
/Advance/DeleteAdvance GET string id AdvanceEdit PartialView / Redirect
/Advance/DeleteAdvance POST AppUserAdvance appUserAdvance AdvanceEdit JSON / Redirect
/Advance/Details GET string id, int? filterBranch, int? pdf, string msg, int? page AdvanceDetails View
/Advance GET string search, string sortOrder, int? filterYear, string searchString, string currentFilter, string ScurrentFilter, int? filterMonth, int? filterStatus, int? page, bool? isAdvance, int? userFilter, int? filterNo AdvanceIndex View
/Advance/Manage GET string id AdvanceCreate View
/Advance/Manage POST AppUserAdvance model AdvanceCreate View / Redirect
/Advance/SetAsPaid GET string id AdvanceCashBoxTransaction PartialView / Redirect
/Advance/SetAsPaid POST AppUserAdvance appUserAdvance AdvanceCashBoxTransaction JSON

OvertimeController

Overtime requests, the hour/amount calculation and the approval chain.

Source: NKO.Main/NKO.Main/Controllers/OvertimeController.cs · route prefix: /Overtime · 14 actions · 0 ungated

Route Verb Parameters Permission Returns
/Overtime/Complete GET string id OvertimeCreate View
/Overtime/Complete POST AppUserOvertime model, bool IsTrue OvertimeCreate View / Redirect
/Overtime/ContextActions POST string id, int operationType, int userType, string idText, string idCancelText, bool IsEmergent, decimal? FinDisclosure, string PIN OvertimeDetails Redirect / Forbid
/Overtime/Create GET string id OvertimeCreate View
/Overtime/Create POST AppUserOvertime model, List<AppUserOvertimeDates> AppUserOvertimeDates OvertimeCreate View / Redirect
/Overtime/Delete GET string id OvertimeCreate PartialView / Redirect
/Overtime/Delete POST AppUserOvertime appUserAdvance OvertimeCreate JSON / Redirect
/Overtime/Details GET string id, int? filterBranch, int? pdf, string msg, int? page OvertimeDetails View
/Overtime/Edit GET string id OvertimeCreate View
/Overtime/Edit POST AppUserOvertime model, bool IsTrue OvertimeCreate View / Redirect
/Overtime/GetOvertimeDates GET string id OvertimeCreate JSON
/Overtime GET OvertimeFilters filters OvertimeIndex View
/Overtime/OverTimeCopy GET string id OvertimeCreate Redirect
/Overtime/UploadFiles POST int id, string desc OvertimeCreate JSON