Skip to main content

Team approvals

Plan section 2.8 · Screens S40–S42. Read Server rules → approve first.

When to show Approvals​

Show the Approvals segment (S30) only when login isApprover is true and Setting/GetAllSettings returns isLeadersCanApproveApplication: true. The server allows approve/reject only for applications of the leader's team (leader hierarchy), never the leader's own, and only with that setting on.

Inbox (S40): which lists work​

Load each type's list with applicationStatus: 0 (Pending) and drop rows where employee.id is the leader's own employee id.

TypeList endpointReturns the team?Approve/reject
LeaveLeaveApplication/GetAllLeaveApplicationsYesbelow
Work from homeWorkFromHome/GetAllWorkFromHomeDataYesbelow
OvertimeOverTimeApplication/GetAllOvertimeApplicationsYesbelow
Fuel allowanceFuelAllowanceApplication/GetAllFuelAllowanceApplicationsYesbelow
CompensationCompensationApplication/GetAllCompensationApplicationsYesbelow
Missed punchThumbApplication/GetAllThumbApplicationsNo, self only (G4)below (works by id)
ClarificationClarification/GetAllClarificationNo, self onlybelow
ResignationResignApplication/GetAllResignApplicationsNo, self onlybelow

Example inbox request for leave:

{ "employeeIds": null, "applicationStatus": 0, "fromDate": null, "toDate": null }

Approval detail (S41)​

Use the type's get-by-id call (for example LeaveApplication/GetLeaveApplication). Not available from the API: the requester's leave balance (G2) and an approver remark (G1).

Approve or reject​

All Update…Status endpoints take the same body:

{ "ids": [1045, 1046], "updateTransactionStatus": 1 }
  • ids: one or more application ids (multi-select approve sends several).
  • updateTransactionStatus: 1 Approve, 2 Reject.
  • There is no remark field (G1).
  • If any id is not allowed for the caller, the whole call fails with You can't approve or reject these applications. and nothing changes.
  • Approving overtime or fuel copies the requested hours/km into the approved value when none was set.
  • The applicant gets a notification (push + inbox).

Leave​

POST/api/LeaveApplication/UpdateLeaveApplicationStatus
Bearer tokenTeam leaderP1Screens: S40, S41

Request

JSON body:

UpdateTransactionStatusDto

Field (JSON name)Type
idsinteger[]
updateTransactionStatusTransactionStatus (enum)0 = Pending1 = Approved2 = Rejected
curl -X POST "$BASE_URL/LeaveApplication/UpdateLeaveApplicationStatus" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"ids": [
1045
],
"updateTransactionStatus": 1
}'

Response

HTTP 200 with the standard envelope. responseData is boolean.

Type: boolean

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

Errors

  • isSuccess: false · errorCode 1 “You can't approve or reject these applications.”
  • 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.UpdateLeaveApplicationStatus · returns boolean

Missed punch​

POST/api/ThumbApplication/UpdateThumbApplicationStatus
Bearer tokenTeam leaderP1Screens: S40, S41

Approving a punch also runs the attendance update for that punch. Leaders cannot list their team's punches today (G4), so this is reachable only from a notification or a known id.

Request

JSON body:

UpdateTransactionStatusDto

Field (JSON name)Type
idsinteger[]
updateTransactionStatusTransactionStatus (enum)0 = Pending1 = Approved2 = Rejected
curl -X POST "$BASE_URL/ThumbApplication/UpdateThumbApplicationStatus" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"ids": [
5532
],
"updateTransactionStatus": 1
}'

Response

HTTP 200 with the standard envelope. responseData is boolean.

Type: boolean

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

Errors

  • isSuccess: false · errorCode 1 “You can't approve or reject these applications.”
  • 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/ThumbApplicationController.cs → ThumbApplicationService.UpdateThumbApplicationStatus · returns boolean

Work from home​

POST/api/WorkFromHome/UpdateWorkFromHomeStatus
Bearer tokenTeam leaderP1Screens: S40, S41

Request

JSON body:

UpdateTransactionStatusDto

Field (JSON name)Type
idsinteger[]
updateTransactionStatusTransactionStatus (enum)0 = Pending1 = Approved2 = Rejected
curl -X POST "$BASE_URL/WorkFromHome/UpdateWorkFromHomeStatus" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"ids": [
212
],
"updateTransactionStatus": 1
}'

Response

HTTP 200 with the standard envelope. responseData is boolean.

Type: boolean

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

Errors

  • isSuccess: false · errorCode 1 “You can't approve or reject these applications.”
  • 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.UpdateWorkFromHomeStatus · returns boolean

Overtime​

POST/api/OverTimeApplication/UpdateOvertimeApplicationStatus
Bearer tokenTeam leaderP2Screens: S40

Request

JSON body:

UpdateTransactionStatusDto

Field (JSON name)Type
idsinteger[]
updateTransactionStatusTransactionStatus (enum)0 = Pending1 = Approved2 = Rejected
curl -X POST "$BASE_URL/OverTimeApplication/UpdateOvertimeApplicationStatus" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"ids": [
77
],
"updateTransactionStatus": 1
}'

Response

HTTP 200 with the standard envelope. responseData is boolean.

Type: boolean

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

Errors

  • isSuccess: false · errorCode 1 “You can't approve or reject these applications.”
  • 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/OverTimeApplicationController.cs → OvertimeApplicationService.UpdateOvertimeApplicationStatus · returns boolean

Fuel allowance​

POST/api/FuelAllowanceApplication/UpdateFuelAllowanceApplicationStatus
Bearer tokenTeam leaderP2Screens: S40

Request

JSON body:

UpdateTransactionStatusDto

Field (JSON name)Type
idsinteger[]
updateTransactionStatusTransactionStatus (enum)0 = Pending1 = Approved2 = Rejected
curl -X POST "$BASE_URL/FuelAllowanceApplication/UpdateFuelAllowanceApplicationStatus" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"ids": [
64
],
"updateTransactionStatus": 1
}'

Response

HTTP 200 with the standard envelope. responseData is boolean.

Type: boolean

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

Errors

  • isSuccess: false · errorCode 1 “You can't approve or reject these applications.”
  • 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/FuelAllowanceApplicationController.cs → FuelAllowanceApplicationService.UpdateFuelAllowanceApplicationStatus · returns boolean

Compensation​

POST/api/CompensationApplication/UpdateCompensationApplicationStatus
Bearer tokenTeam leaderP3Screens: S40

Request

JSON body:

UpdateTransactionStatusDto

Field (JSON name)Type
idsinteger[]
updateTransactionStatusTransactionStatus (enum)0 = Pending1 = Approved2 = Rejected
curl -X POST "$BASE_URL/CompensationApplication/UpdateCompensationApplicationStatus" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"ids": [
9
],
"updateTransactionStatus": 1
}'

Response

HTTP 200 with the standard envelope. responseData is boolean.

Type: boolean

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

Errors

  • isSuccess: false · errorCode 1 “You can't approve or reject these applications.”
  • 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/CompensationApplicationController.cs → CompensationApplicationService.UpdateCompensationApplicationStatus · returns boolean

Clarification​

POST/api/Clarification/UpdateClarificationStatus
Bearer tokenTeam leaderP2Screens: S40

Request

JSON body:

UpdateTransactionStatusDto

Field (JSON name)Type
idsinteger[]
updateTransactionStatusTransactionStatus (enum)0 = Pending1 = Approved2 = Rejected
curl -X POST "$BASE_URL/Clarification/UpdateClarificationStatus" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"ids": [
18
],
"updateTransactionStatus": 1
}'

Response

HTTP 200 with the standard envelope. responseData is boolean.

Type: boolean

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

Errors

  • isSuccess: false · errorCode 1 “You can't approve or reject these applications.”
  • 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/ClarificationController.cs → ClarificationService.UpdateClarificationStatus · returns boolean

Resignation​

POST/api/ResignApplication/UpdateResignApplicationStatus
Bearer tokenTeam leaderP3Screens: S40

Request

JSON body:

UpdateTransactionStatusDto

Field (JSON name)Type
idsinteger[]
updateTransactionStatusTransactionStatus (enum)0 = Pending1 = Approved2 = Rejected
curl -X POST "$BASE_URL/ResignApplication/UpdateResignApplicationStatus" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"ids": [
3
],
"updateTransactionStatus": 1
}'

Response

HTTP 200 with the standard envelope. responseData is boolean.

Type: boolean

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

Errors

  • isSuccess: false · errorCode 1 “You can't approve or reject these applications.”
  • 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/ResignApplicationController.cs → ResignApplicationService.UpdateResignApplicationStatus · returns boolean

Team today (S42)​

There is no endpoint for a leader's team or the team's attendance today (G5). Hide S42 until the backend adds one.