Skip to main content

Leave, work from home and holidays

Plan section 2.4 · Screens S30–S36. Missed-punch requests are on the Attendance page; overtime and the other types are on Other applications.

All application types work the same way: list (POST GetAll… with the filter object), create/edit (POST CreateOrUpdate…, id: null creates), view (GET …?id=), delete while pending. Create/edit/approve rules: Server rules.

Apply-leave flow (S32)​

  1. Leave types and leave balance for the balance strip and the type picker.
  2. Approver: the employee's leader is approverId in Employee/GetEmployeeWithCode. If the tenant setting isLockApproverSelection is on, show it read-only; otherwise allow picking from Employee/GetAllApprovableEmployees.
  3. Save the leave with status 0.
  4. Refresh my leave list and the balance.

My leave applications​

POST/api/LeaveApplication/GetAllLeaveApplications
Bearer tokenEmployee and team leaderP1Screens: S30

Leave applications in a date range. For a team leader the list includes the team's applications too (server rules); for "My requests" keep only rows where employee.id is the signed-in employee. Use the Approvals inbox for the team.

  • applicationStatus: -1/null all, 0 Pending, 1 Approved, 2 Rejected.
  • fromDate/toDate filter by the leave dates (null = no limit). There is no paging, so always send a range.
  • requestDays is computed by the server (half days possible).
  • leaveStatusType is the status as text; leaveStatus is the number.

Request

JSON body:

TransactionApplicationDto

Field (JSON name)Type
tenantIdinteger | null
idinteger | null
employeeCodeinteger | null
employeeIdsinteger[]
companyIdsinteger[]
mobileNostring
fromDatestring (date-time) | null
toDatestring (date-time) | null
fromMonthstring
toMonthstring
genderstring
branchIdsinteger[]
departmentIdsinteger[]
designationIdsinteger[]
approverIdsinteger[]
employeeStatusinteger | null
applicationStatusinteger | null
locationIdsinteger[]
employee_Typeinteger | null
financialYearstring[]
slabTypeIdinteger[]
itMethodIdinteger[]
categoryIdinteger | null
locationstring | null
isAssignboolean | null
joinDatestring | null
curl -X POST "$BASE_URL/LeaveApplication/GetAllLeaveApplications" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"tenantId": 1,
"id": 1045,
"employeeCode": 1,
"employeeIds": null,
"companyIds": [
1
],
"mobileNo": "9876544821",
"fromDate": "2026-10-01T00:00:00",
"toDate": "2026-12-31T00:00:00",
"fromMonth": "202610",
"toMonth": "202610",
"gender": "string",
"branchIds": [
1
],
"departmentIds": [
1
],
"designationIds": [
1
],
"approverIds": [
1
],
"employeeStatus": 1,
"applicationStatus": -1,
"locationIds": [
1
],
"employee_Type": 1,
"financialYear": [
"2026-2027"
],
"slabTypeId": [
1
],
"itMethodId": [
1
],
"categoryId": 1,
"location": "string",
"isAssign": false,
"joinDate": "string"
}'

Response

HTTP 200 with the standard envelope. responseData is LeaveApplicationDto[].

An array of LeaveApplicationDto objects

Field (JSON name)Type
idinteger
employeeEmployeeSummaryDto
approverEmployeeSummaryDto
leaveRequestDatestring (date-time)
leaveTypeLeaveDto
fromDateTimestring (date-time)
toDateTimestring (date-time)
leaveReasonstring
requestDaysnumber
leaveStatusTransactionStatus (enum)0 = Pending1 = Approved2 = Rejected
leaveStatusTypestring
Example response
{
"isSuccess": true,
"responseData": [
{
"id": 1045,
"employee": {
"id": 1045,
"empName": "Priya Sharma",
"empCode": 1,
"userId": 87,
"displayName": "Priya Sharma"
},
"approver": {
"id": 1045,
"empName": "Priya Sharma",
"empCode": 1,
"userId": 87,
"displayName": "Priya Sharma"
},
"leaveRequestDate": "2026-11-23T00:00:00",
"leaveType": {
"id": 1045,
"leaveName": "Casual Leave",
"shortCode": "string",
"leaveMaxMinutes": 1,
"isActive": true,
"isPaid": true,
"monthlyEarn": 1,
"isShowBalance": false,
"maxCarryForward": 1,
"isEncashLeave": false,
"yearlyEarn": 1,
"isForContract": false
},
"fromDateTime": "2026-12-01T00:00:00",
"toDateTime": "2026-12-02T00:00:00",
"leaveReason": "Forgot to punch out, left at 6:45 PM",
"requestDays": 2,
"leaveStatus": 0,
"leaveStatusType": "string"
}
],
"errorCode": 0,
"errorMessage": null,
"errorTitle": ""
}

Errors

  • HTTP 401 missing or expired token (see token expiry).
  • HTTP 500 unhandled server exception (HTML/text body, not JSON).

Source: HRMS.WebAPI/Controllers/LeaveApplicationController.cs → LeaveApplicationService.GetAllLeaveApplications · returns LeaveApplicationDto[]

Leave detail​

GET/api/LeaveApplication/GetLeaveApplication
Bearer tokenEmployee and team leaderP1Screens: S35

One leave application by id (query string). Own and team records only.

Request

ParameterInTypeRequired
idquery stringintegeryes
curl -X GET "$BASE_URL/LeaveApplication/GetLeaveApplication?id=1045" \
-H "Authorization: Bearer $TOKEN"

Response

HTTP 200 with the standard envelope. responseData is LeaveApplicationDto.

LeaveApplicationDto

Field (JSON name)Type
idinteger
employeeEmployeeSummaryDto
approverEmployeeSummaryDto
leaveRequestDatestring (date-time)
leaveTypeLeaveDto
fromDateTimestring (date-time)
toDateTimestring (date-time)
leaveReasonstring
requestDaysnumber
leaveStatusTransactionStatus (enum)0 = Pending1 = Approved2 = Rejected
leaveStatusTypestring
Example response
{
"isSuccess": true,
"responseData": {
"id": 1045,
"employee": {
"id": 1045,
"empName": "Priya Sharma",
"empCode": 1,
"userId": 87,
"displayName": "Priya Sharma"
},
"approver": {
"id": 1045,
"empName": "Priya Sharma",
"empCode": 1,
"userId": 87,
"displayName": "Priya Sharma"
},
"leaveRequestDate": "2026-11-23T00:00:00",
"leaveType": {
"id": 1045,
"leaveName": "Casual Leave",
"shortCode": "string",
"leaveMaxMinutes": 1,
"isActive": true,
"isPaid": true,
"monthlyEarn": 1,
"isShowBalance": false,
"maxCarryForward": 1,
"isEncashLeave": false,
"yearlyEarn": 1,
"isForContract": false
},
"fromDateTime": "2026-12-01T00:00:00",
"toDateTime": "2026-12-02T00:00:00",
"leaveReason": "Forgot to punch out, left at 6:45 PM",
"requestDays": 2,
"leaveStatus": 0,
"leaveStatusType": "string"
},
"errorCode": 0,
"errorMessage": null,
"errorTitle": ""
}

Errors

  • isSuccess: false · errorCode 1 “You can't view or delete this application.”
  • isSuccess: false · errorCode 1 “Request Forbidden, Can't access proper Company.”
  • HTTP 401 missing or expired token (see token expiry).
  • HTTP 500 unhandled server exception (HTML/text body, not JSON).

On these errors responseData is null. Show errorMessage to the user as-is.

Source: HRMS.WebAPI/Controllers/LeaveApplicationController.cs → LeaveApplicationService.GetLeaveApplicationById · returns LeaveApplicationDto

Apply or edit leave​

POST/api/LeaveApplication/CreateOrUpdateLeaveApplication
Bearer tokenEmployee and team leaderP1Screens: S32, S35
  • id: null applies; an existing id edits (or resubmits) it.
  • fromDateTime/toDateTime are date-times, so half days are possible (for example 09:30 to 13:30). Send IST wall-clock time without an offset.
  • leaveStatus: always 0 from the app.
  • approverId: the approver's employee id (see the flow above).
  • The server computes requestDays and does not check the balance (that check is commented out in the service). Warn the user in the app when the request exceeds the balance (S32 "0.5 day will be unpaid").
  • Overlapping a non-rejected leave: Leave Application already exist!

Request

JSON body:

CreateOrUpdateLeaveApplicationDto

Field (JSON name)Type
idinteger | null
employeeIdinteger
approverIdinteger | null
leaveTypeIdinteger
fromDateTimestring (date-time)
toDateTimestring (date-time)
leaveReasonstring
leaveStatusTransactionStatus (enum)0 = Pending1 = Approved2 = Rejected
curl -X POST "$BASE_URL/LeaveApplication/CreateOrUpdateLeaveApplication" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": null,
"employeeId": 142,
"approverId": 96,
"leaveTypeId": 3,
"fromDateTime": "2026-12-01T09:30:00",
"toDateTime": "2026-12-02T18:30:00",
"leaveReason": "Cousin'\''s engagement in Vadodara",
"leaveStatus": 0
}'

Response

HTTP 200 with the standard envelope. responseData is LeaveApplicationDto.

LeaveApplicationDto

Field (JSON name)Type
idinteger
employeeEmployeeSummaryDto
approverEmployeeSummaryDto
leaveRequestDatestring (date-time)
leaveTypeLeaveDto
fromDateTimestring (date-time)
toDateTimestring (date-time)
leaveReasonstring
requestDaysnumber
leaveStatusTransactionStatus (enum)0 = Pending1 = Approved2 = Rejected
leaveStatusTypestring
Example response
{
"isSuccess": true,
"responseData": {
"id": 1052,
"employee": {
"id": 1045,
"empName": "Priya Sharma",
"empCode": 1,
"userId": 87,
"displayName": "Priya Sharma"
},
"approver": {
"id": 1045,
"empName": "Priya Sharma",
"empCode": 1,
"userId": 87,
"displayName": "Priya Sharma"
},
"leaveRequestDate": "2026-11-23T00:00:00",
"leaveType": {
"id": 1045,
"leaveName": "Casual Leave",
"shortCode": "string",
"leaveMaxMinutes": 1,
"isActive": true,
"isPaid": true,
"monthlyEarn": 1,
"isShowBalance": false,
"maxCarryForward": 1,
"isEncashLeave": false,
"yearlyEarn": 1,
"isForContract": false
},
"fromDateTime": "2026-12-01T00:00:00",
"toDateTime": "2026-12-02T00:00:00",
"leaveReason": "Forgot to punch out, left at 6:45 PM",
"requestDays": 2,
"leaveStatus": 0,
"leaveStatusType": "Pending"
},
"errorCode": 0,
"errorMessage": null,
"errorTitle": ""
}

Errors

  • isSuccess: false · errorCode 1 “You can't create or change applications for this employee.”
  • isSuccess: false · errorCode 1 “This application is already approved or rejected. Only an approver can change it.”
  • isSuccess: false · errorCode 1 “Request Forbidden, Can't access proper Company.”
  • isSuccess: false · errorCode 1 “Leave Application Not Found.”
  • isSuccess: false · errorCode 1 “You do not have sufficient balance to add this leave!”
  • isSuccess: false · errorCode 1 “Leave Application already exist!”
  • HTTP 401 missing or expired token (see token expiry).
  • HTTP 500 unhandled server exception (HTML/text body, not JSON).

On these errors responseData is null. Show errorMessage to the user as-is.

Source: HRMS.WebAPI/Controllers/LeaveApplicationController.cs → LeaveApplicationService.CreateOrUpdateLeaveApplication · returns LeaveApplicationDto

Withdraw leave​

DELETE/api/LeaveApplication/DeleteLeaveApplication/{id}
Bearer tokenEmployee and team leaderP1Screens: S35

Deletes the application. Offer Withdraw only while it is Pending (S35); the server allows deleting own and team records.

Request

ParameterInTypeRequired
idpathintegeryes
curl -X DELETE "$BASE_URL/LeaveApplication/DeleteLeaveApplication/1052" \
-H "Authorization: Bearer $TOKEN"

Response

HTTP 200 with the standard envelope. responseData is boolean.

Type: boolean

Example response
{
"isSuccess": true,
"responseData": false,
"errorCode": 0,
"errorMessage": null,
"errorTitle": ""
}

Errors

  • isSuccess: false · errorCode 1 “You can't view or delete this application.”
  • isSuccess: false · errorCode 1 “Request Forbidden, Can't access proper Company.”
  • isSuccess: false · errorCode 1 “Leave Application Not Found.”
  • HTTP 401 missing or expired token (see token expiry).
  • HTTP 500 unhandled server exception (HTML/text body, not JSON).

On these errors responseData is false. Show errorMessage to the user as-is.

Source: HRMS.WebAPI/Controllers/LeaveApplicationController.cs → LeaveApplicationService.DeleteLeaveApplicationById · returns boolean

Leave balance​

POST/api/Report/GetLeaveBalanceDetails
Bearer tokenEmployee and team leaderP1Screens: S32, S33

The signed-in employee's balance per leave type: openLeave (opening), earnLeave (earned), enjoyLeave (taken), encashLeave, lapseLeave, balanceLeave.

  • Always for the current calendar year and month: the stored procedure ignores the date and month filters (gap G3).
  • Self-only, even for team leaders (gap G2).

Request

JSON body:

TransactionApplicationDto

Field (JSON name)Type
tenantIdinteger | null
idinteger | null
employeeCodeinteger | null
employeeIdsinteger[]
companyIdsinteger[]
mobileNostring
fromDatestring (date-time) | null
toDatestring (date-time) | null
fromMonthstring
toMonthstring
genderstring
branchIdsinteger[]
departmentIdsinteger[]
designationIdsinteger[]
approverIdsinteger[]
employeeStatusinteger | null
applicationStatusinteger | null
locationIdsinteger[]
employee_Typeinteger | null
financialYearstring[]
slabTypeIdinteger[]
itMethodIdinteger[]
categoryIdinteger | null
locationstring | null
isAssignboolean | null
joinDatestring | null
curl -X POST "$BASE_URL/Report/GetLeaveBalanceDetails" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"tenantId": 1,
"id": 1045,
"employeeCode": 1,
"employeeIds": null,
"companyIds": [
1
],
"mobileNo": "9876544821",
"fromDate": "2026-12-01T00:00:00",
"toDate": "2026-12-02T00:00:00",
"fromMonth": "202610",
"toMonth": "202610",
"gender": "string",
"branchIds": [
1
],
"departmentIds": [
1
],
"designationIds": [
1
],
"approverIds": [
1
],
"employeeStatus": 1,
"applicationStatus": 1,
"locationIds": [
1
],
"employee_Type": 1,
"financialYear": [
"2026-2027"
],
"slabTypeId": [
1
],
"itMethodId": [
1
],
"categoryId": 1,
"location": "string",
"isAssign": false,
"joinDate": "string"
}'

Response

HTTP 200 with the standard envelope. responseData is LeaveBalanceDetailsDto[].

An array of LeaveBalanceDetailsDto objects

Field (JSON name)Type
employeeEmployeeSummaryDto
empLegalNamestring
calenderYearstring
fromMonthstring (date-time) | null
toMonthstring (date-time) | null
leaveTypeIdinteger
leaveNamestring
openLeavenumber
earnLeavenumber
enjoyLeavenumber
encashLeavenumber
lapseLeavenumber
balanceLeavenumber
Example response
{
"isSuccess": true,
"responseData": [
{
"employee": {
"id": 1045,
"empName": "Priya Sharma",
"empCode": 1,
"userId": 87,
"displayName": "Priya Sharma"
},
"empLegalName": "Priya Sharma",
"calenderYear": "string",
"fromMonth": "2026-12-01T00:00:00",
"toMonth": "2026-12-02T00:00:00",
"leaveTypeId": 1,
"leaveName": "Casual Leave",
"openLeave": 1,
"earnLeave": 1,
"enjoyLeave": 1,
"encashLeave": 4.5,
"lapseLeave": 4.5,
"balanceLeave": 4.5
}
],
"errorCode": 0,
"errorMessage": null,
"errorTitle": ""
}

Errors

  • HTTP 401 missing or expired token (see token expiry).
  • HTTP 500 unhandled server exception (HTML/text body, not JSON).

Source: HRMS.WebAPI/Controllers/ReportController.cs → ReportService.GetLeaveBalanceDetails · returns LeaveBalanceDetailsDto[]

Holiday list​

POST/api/HolidayApplication/GetAllHolidayApplications
Bearer tokenEmployee and team leaderP1Screens: S10, S36

The company holiday calendar (not "holiday working"): each row has fromDate, toDate, isPaid and holiday (holidayName). Use it for the Holidays screen (S36). It covers the user's companies; send the year as fromDate/toDate.

Request

JSON body:

TransactionApplicationDto

Field (JSON name)Type
tenantIdinteger | null
idinteger | null
employeeCodeinteger | null
employeeIdsinteger[]
companyIdsinteger[]
mobileNostring
fromDatestring (date-time) | null
toDatestring (date-time) | null
fromMonthstring
toMonthstring
genderstring
branchIdsinteger[]
departmentIdsinteger[]
designationIdsinteger[]
approverIdsinteger[]
employeeStatusinteger | null
applicationStatusinteger | null
locationIdsinteger[]
employee_Typeinteger | null
financialYearstring[]
slabTypeIdinteger[]
itMethodIdinteger[]
categoryIdinteger | null
locationstring | null
isAssignboolean | null
joinDatestring | null
curl -X POST "$BASE_URL/HolidayApplication/GetAllHolidayApplications" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"tenantId": 1,
"id": 1045,
"employeeCode": 1,
"employeeIds": [
1
],
"companyIds": [
1
],
"mobileNo": "9876544821",
"fromDate": "2026-01-01T00:00:00",
"toDate": "2026-12-31T00:00:00",
"fromMonth": "202610",
"toMonth": "202610",
"gender": "string",
"branchIds": [
1
],
"departmentIds": [
1
],
"designationIds": [
1
],
"approverIds": [
1
],
"employeeStatus": 1,
"applicationStatus": 1,
"locationIds": [
1
],
"employee_Type": 1,
"financialYear": [
"2026-2027"
],
"slabTypeId": [
1
],
"itMethodId": [
1
],
"categoryId": 1,
"location": "string",
"isAssign": false,
"joinDate": "string"
}'

Response

HTTP 200 with the standard envelope. responseData is HolidayApplicationDto[].

An array of HolidayApplicationDto objects

Field (JSON name)Type
idinteger
fromDatestring (date-time)
toDatestring (date-time)
holidayHolidayDto
isPaidboolean
Example response
{
"isSuccess": true,
"responseData": [
{
"id": 1045,
"fromDate": "2026-12-01T00:00:00",
"toDate": "2026-12-02T00:00:00",
"holiday": {
"id": 1045,
"holidayName": "Christmas",
"isActive": true
},
"isPaid": true
}
],
"errorCode": 0,
"errorMessage": null,
"errorTitle": ""
}

Errors

  • isSuccess: false · errorCode 1 “Request Forbidden,Cant Access Proper Company!”
  • HTTP 401 missing or expired token (see token expiry).
  • HTTP 500 unhandled server exception (HTML/text body, not JSON).

On these errors responseData is null. Show errorMessage to the user as-is.

Source: HRMS.WebAPI/Controllers/HolidayApplicationController.cs → HolidayApplicationService.GetAllHolidayApplications · returns HolidayApplicationDto[]

Holiday names​

GET/api/HolidayName/GetActiveHolidayNames
Bearer tokenEmployee and team leaderP3

The list of holiday names only (no dates). The app normally does not need it: the holiday list already includes each name.

Request

No parameters and no body.

curl -X GET "$BASE_URL/HolidayName/GetActiveHolidayNames" \
-H "Authorization: Bearer $TOKEN"

Response

HTTP 200 with the standard envelope. responseData is HolidayDto[].

An array of HolidayDto objects

Field (JSON name)Type
idinteger
holidayNamestring
isActiveboolean
Example response
{
"isSuccess": true,
"responseData": [
{
"id": 1045,
"holidayName": "Christmas",
"isActive": true
}
],
"errorCode": 0,
"errorMessage": null,
"errorTitle": ""
}

Errors

  • HTTP 401 missing or expired token (see token expiry).
  • HTTP 500 unhandled server exception (HTML/text body, not JSON).

Source: HRMS.WebAPI/Controllers/HolidayNameController.cs → HolidayService.GetActiveHolidayNames · returns HolidayDto[]

My work-from-home requests​

POST/api/WorkFromHome/GetAllWorkFromHomeData
Bearer tokenEmployee and team leaderP1Screens: S30

Same rules as my leave list: team leaders also get their team's requests; filter by employee.id for "My requests".

Request

JSON body:

TransactionApplicationDto

Field (JSON name)Type
tenantIdinteger | null
idinteger | null
employeeCodeinteger | null
employeeIdsinteger[]
companyIdsinteger[]
mobileNostring
fromDatestring (date-time) | null
toDatestring (date-time) | null
fromMonthstring
toMonthstring
genderstring
branchIdsinteger[]
departmentIdsinteger[]
designationIdsinteger[]
approverIdsinteger[]
employeeStatusinteger | null
applicationStatusinteger | null
locationIdsinteger[]
employee_Typeinteger | null
financialYearstring[]
slabTypeIdinteger[]
itMethodIdinteger[]
categoryIdinteger | null
locationstring | null
isAssignboolean | null
joinDatestring | null
curl -X POST "$BASE_URL/WorkFromHome/GetAllWorkFromHomeData" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"tenantId": 1,
"id": 1045,
"employeeCode": 1,
"employeeIds": null,
"companyIds": [
1
],
"mobileNo": "9876544821",
"fromDate": "2026-10-01T00:00:00",
"toDate": "2026-12-31T00:00:00",
"fromMonth": "202610",
"toMonth": "202610",
"gender": "string",
"branchIds": [
1
],
"departmentIds": [
1
],
"designationIds": [
1
],
"approverIds": [
1
],
"employeeStatus": 1,
"applicationStatus": -1,
"locationIds": [
1
],
"employee_Type": 1,
"financialYear": [
"2026-2027"
],
"slabTypeId": [
1
],
"itMethodId": [
1
],
"categoryId": 1,
"location": "string",
"isAssign": false,
"joinDate": "string"
}'

Response

HTTP 200 with the standard envelope. responseData is WorkFromHomeDto[].

An array of WorkFromHomeDto objects

Field (JSON name)Type
idinteger
employeeEmployeeSummaryDto
approverEmployeeSummaryDto
fromDateTimestring (date-time)
toDateTimestring (date-time)
workFromHomeRequestDatestring (date-time)
reasonstring
statusTransactionStatus (enum)0 = Pending1 = Approved2 = Rejected
Example response
{
"isSuccess": true,
"responseData": [
{
"id": 1045,
"employee": {
"id": 1045,
"empName": "Priya Sharma",
"empCode": 1,
"userId": 87,
"displayName": "Priya Sharma"
},
"approver": {
"id": 1045,
"empName": "Priya Sharma",
"empCode": 1,
"userId": 87,
"displayName": "Priya Sharma"
},
"fromDateTime": "2026-12-01T00:00:00",
"toDateTime": "2026-12-02T00:00:00",
"workFromHomeRequestDate": "2026-12-01T00:00:00",
"reason": "Forgot to punch out, left at 6:45 PM",
"status": 0
}
],
"errorCode": 0,
"errorMessage": null,
"errorTitle": ""
}

Errors

  • HTTP 401 missing or expired token (see token expiry).
  • HTTP 500 unhandled server exception (HTML/text body, not JSON).

Source: HRMS.WebAPI/Controllers/WorkFromHomeController.cs → WorkFromHomeService.GetAllWorkFromHomeData · returns WorkFromHomeDto[]

Work-from-home detail​

GET/api/WorkFromHome/GetWorkFromHomeById
Bearer tokenEmployee and team leaderP1Screens: S35

One request by id (query string).

Request

ParameterInTypeRequired
idquery stringintegeryes
curl -X GET "$BASE_URL/WorkFromHome/GetWorkFromHomeById?id=211" \
-H "Authorization: Bearer $TOKEN"

Response

HTTP 200 with the standard envelope. responseData is WorkFromHomeDto.

WorkFromHomeDto

Field (JSON name)Type
idinteger
employeeEmployeeSummaryDto
approverEmployeeSummaryDto
fromDateTimestring (date-time)
toDateTimestring (date-time)
workFromHomeRequestDatestring (date-time)
reasonstring
statusTransactionStatus (enum)0 = Pending1 = Approved2 = Rejected
Example response
{
"isSuccess": true,
"responseData": {
"id": 1045,
"employee": {
"id": 1045,
"empName": "Priya Sharma",
"empCode": 1,
"userId": 87,
"displayName": "Priya Sharma"
},
"approver": {
"id": 1045,
"empName": "Priya Sharma",
"empCode": 1,
"userId": 87,
"displayName": "Priya Sharma"
},
"fromDateTime": "2026-12-01T00:00:00",
"toDateTime": "2026-12-02T00:00:00",
"workFromHomeRequestDate": "2026-12-01T00:00:00",
"reason": "Forgot to punch out, left at 6:45 PM",
"status": 0
},
"errorCode": 0,
"errorMessage": null,
"errorTitle": ""
}

Errors

  • isSuccess: false · errorCode 1 “You can't view or delete this application.”
  • isSuccess: false · errorCode 1 “Request Forbidden, Can't access proper Company.”
  • HTTP 401 missing or expired token (see token expiry).
  • HTTP 500 unhandled server exception (HTML/text body, not JSON).

On these errors responseData is null. Show errorMessage to the user as-is.

Source: HRMS.WebAPI/Controllers/WorkFromHomeController.cs → WorkFromHomeService.GetWorkFromHomeById · returns WorkFromHomeDto

Request or edit work from home​

POST/api/WorkFromHome/CreateOrUpdateWorkFromHome
Bearer tokenEmployee and team leaderP1Screens: S34
  • status: always 0 from the app.
  • approverId: as for leave.
  • Clocking in on a WFH day still uses clock in (the employee will usually be outside the office geofence, so the punch takes the tenant default status).

Request

JSON body:

CreateOrUpdateWorkFromDto

Field (JSON name)Type
idinteger | null
employeeIdinteger
approverIdinteger | null
fromDateTimestring (date-time)
toDateTimestring (date-time)
reasonstring
statusTransactionStatus (enum)0 = Pending1 = Approved2 = Rejected
curl -X POST "$BASE_URL/WorkFromHome/CreateOrUpdateWorkFromHome" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"id": null,
"employeeId": 142,
"approverId": 96,
"fromDateTime": "2026-11-26T09:30:00",
"toDateTime": "2026-11-27T18:30:00",
"reason": "Waiting for the broadband technician",
"status": 0
}'

Response

HTTP 200 with the standard envelope. responseData is WorkFromHomeDto.

WorkFromHomeDto

Field (JSON name)Type
idinteger
employeeEmployeeSummaryDto
approverEmployeeSummaryDto
fromDateTimestring (date-time)
toDateTimestring (date-time)
workFromHomeRequestDatestring (date-time)
reasonstring
statusTransactionStatus (enum)0 = Pending1 = Approved2 = Rejected
Example response
{
"isSuccess": true,
"responseData": {
"id": 212,
"employee": {
"id": 1045,
"empName": "Priya Sharma",
"empCode": 1,
"userId": 87,
"displayName": "Priya Sharma"
},
"approver": {
"id": 1045,
"empName": "Priya Sharma",
"empCode": 1,
"userId": 87,
"displayName": "Priya Sharma"
},
"fromDateTime": "2026-12-01T00:00:00",
"toDateTime": "2026-12-02T00:00:00",
"workFromHomeRequestDate": "2026-12-01T00:00:00",
"reason": "Forgot to punch out, left at 6:45 PM",
"status": 0
},
"errorCode": 0,
"errorMessage": null,
"errorTitle": ""
}

Errors

  • isSuccess: false · errorCode 1 “You can't create or change applications for this employee.”
  • isSuccess: false · errorCode 1 “This application is already approved or rejected. Only an approver can change it.”
  • isSuccess: false · errorCode 1 “Request Forbidden, Can't access proper Company.”
  • isSuccess: false · errorCode 1 “Work From Home Data Not Found.”
  • isSuccess: false · errorCode 1 “Work From Home Data already exist!”
  • HTTP 401 missing or expired token (see token expiry).
  • HTTP 500 unhandled server exception (HTML/text body, not JSON).

On these errors responseData is null. Show errorMessage to the user as-is.

Source: HRMS.WebAPI/Controllers/WorkFromHomeController.cs → WorkFromHomeService.CreateOrUpdateWorkFromHome · returns WorkFromHomeDto

Withdraw work from home​

DELETE/api/WorkFromHome/DeleteWorkFromHomeById/{id}
Bearer tokenEmployee and team leaderP1Screens: S35

Deletes the request. Offer it only while Pending.

Request

ParameterInTypeRequired
idpathintegeryes
curl -X DELETE "$BASE_URL/WorkFromHome/DeleteWorkFromHomeById/212" \
-H "Authorization: Bearer $TOKEN"

Response

HTTP 200 with the standard envelope. responseData is boolean.

Type: boolean

Example response
{
"isSuccess": true,
"responseData": false,
"errorCode": 0,
"errorMessage": null,
"errorTitle": ""
}

Errors

  • isSuccess: false · errorCode 1 “You can't view or delete this application.”
  • isSuccess: false · errorCode 1 “Request Forbidden, Can't access proper Company.”
  • isSuccess: false · errorCode 1 “Work From Home Not Found.”
  • HTTP 401 missing or expired token (see token expiry).
  • HTTP 500 unhandled server exception (HTML/text body, not JSON).

On these errors responseData is false. Show errorMessage to the user as-is.

Source: HRMS.WebAPI/Controllers/WorkFromHomeController.cs → WorkFromHomeService.DeleteWorkFromHomeById · returns boolean