# M18 HCM Web Services

Version: 1.0 | Release Date: 30/6/2018

# Leave Management

# Get Default Values from a Holiday Category

Get default values from a Holiday Category

HTTP Request

GET http://[server]/jsf/rfws/pubhol/holidayCalendar/loadDefaultValues

Parameters

Name Type Description
id int The ID of Holiday Category

Result (in JSON Array)

Name Type Description
size int Size of JsonArray in values
values string Data, depends on Table
name string Name. Empty
fields string Field Details

Sample request:

OkHttpClient client = new OkHttpClient();

String url = "http://" + server + "jsf/rfws/pubhol/holidayCalendar/loadDefaultValues"
    + "?id=" + "424";

Request request = new Request.Builder()
  .url(url)
  .get()
  .addHeader("client_id", clientID)
  .addHeader("authorization", "Bearer " + token)
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();

Sample response:

{
    "size": 3,
    "values": [
        {
            "code": "111",
            "month": 12,
            "holidayTypeDesc": "CR003",
            "day": 1,
            "holidayTypeId": 3,
            "desc": "E1"
        },
        {
            "code": "222",
            "month": 2,
            "holidayTypeDesc": "CR003",
            "day": 2,
            "holidayTypeId": 3,
            "desc": "3"
        },
        {
            "code": "333",
            "month": 1,
            "day": 3,
            "desc": "3"
        }
    ],
    "name": "",
    "fields": [
        {
            "fieldClassName": "String",
            "name": "code",
            "fieldClass": "java.lang.String",
            "classType": 0
        },
        {
            "fieldClassName": "String",
            "name": "desc",
            "fieldClass": "java.lang.String",
            "classType": 0
        },
        {
            "fieldClassName": "Long",
            "name": "month",
            "fieldClass": "java.lang.Long",
            "classType": 10
        },
        {
            "fieldClassName": "Long",
            "name": "day",
            "fieldClass": "java.lang.Long",
            "classType": 10
        },
        {
            "fieldClassName": "Long",
            "name": "holidayTypeId",
            "fieldClass": "java.lang.Long",
            "classType": 10
        },
        {
            "fieldClassName": "String",
            "name": "holidayTypeDesc",
            "fieldClass": "java.lang.String",
            "classType": 0
        }
    ]
}

Return used holiday calendar footer (festival dates) with employee entity

HTTP Request

GET http://[server]/jsf/rfws/holiday/batchEmpHolidayEntitle/getUsedHolidayCalendarT

Parameters

Name Type Description
empTableJson entity Required. A SqlTable with column "empId" for the list of employees to be enquiry

Result (in JSON Array)

Name Type Description
size int Size of JsonArray in values
values string Data, depends on Table
name string Name. Empty
fields string Field Details

Sample request:

OkHttpClient client = new OkHttpClient();

String url = "http://" + server + "jsf/rfws/holiday/batchEmpHolidayEntitle/getUsedHolidayCalendarT"
    + "?empTableJson=" + URLEncoder.encode(empTable, "UTF-8");

Request request = new Request.Builder()
  .url(url)
  .get()
  .addHeader("client_id", clientID)
  .addHeader("authorization", "Bearer " + token)
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();

Sample response:

{
    "size": 3,
    "values": [
        {
            "empId": 604,
            "holidayCalendartId": 31,
            "holidayCalendarId": 25
        },
        {
            "empId": 604,
            "holidayCalendartId": 74,
            "holidayCalendarId": 25
        },
        {
            "empId": 604,
            "holidayCalendartId": 75,
            "holidayCalendarId": 25
        }
    ],
    "name": "",
    "fields": [
        {
            "fieldClassName": "Long",
            "name": "empId",
            "fieldClass": "java.lang.Long",
            "classType": 10
        },
        {
            "fieldClassName": "Long",
            "name": "holidayCalendarId",
            "fieldClass": "java.lang.Long",
            "classType": 10
        },
        {
            "fieldClassName": "Long",
            "name": "holidayCalendartId",
            "fieldClass": "java.lang.Long",
            "classType": 10
        }
    ]
}

# Calculate AL Entitlement

Calculate AL Entitlement with entitlement type ID, calculation type, calculation year and employee ID

HTTP Request

GET http://[server]/jsf/rfws/leave/annualLeaveEntitle/calculateEnt

Parameters

Name Type Description
entType int The entitlement type ID
calcType string The calculation type
calcYear int The calculation year
empId List(int) The list of employee ID

Result (in JSON Array)

Name Type Description
size int Size of JsonArray in values
values string Data, depends on Table
name string Name. Empty
fields string Field Details

Sample request:

OkHttpClient client = new OkHttpClient();

String url = "http://" + server + "jsf/rfws/leave/annualLeaveEntitle/calculateEnt"
    + "?entType=" + "19"
    + "&calcType=" + "leaveEnt"
    + "&calcYear=" + "2017"
    + "&empId=" + "[996]";

Request request = new Request.Builder()
  .url(url)
  .get()
  .addHeader("client_id", clientID)
  .addHeader("authorization", "Bearer " + token)
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();

Sample response:

{
    "size": 1,
    "values": [
        {
            "empId": 996,
            "dateTo": "2017-12-31 00:00:00",
            "leaveEntId": 19,
            "dateFrom": "2017-01-01 00:00:00",
            "entDays": 46
        }
    ],
    "name": "",
    "fields": [
        {
            "fieldClassName": "Date",
            "name": "dateFrom",
            "fieldClass": "java.util.Date",
            "classType": 21
        },
        {
            "fieldClassName": "Date",
            "name": "dateTo",
            "fieldClass": "java.util.Date",
            "classType": 21
        },
        {
            "fieldClassName": "Double",
            "name": "entDays",
            "fieldClass": "java.lang.Double",
            "classType": 10
        },
        {
            "fieldClassName": "Boolean",
            "name": "accrual",
            "fieldClass": "java.lang.Boolean",
            "classType": 3
        },
        {
            "fieldClassName": "Boolean",
            "name": "violateLaw",
            "fieldClass": "java.lang.Boolean",
            "classType": 3
        },
        {
            "fieldClassName": "Long",
            "name": "empId",
            "fieldClass": "java.lang.Long",
            "classType": 10
        },
        {
            "fieldClassName": "Long",
            "name": "leaveEntId",
            "fieldClass": "java.lang.Long",
            "classType": 10
        }
    ]
}

# Check the Employee Has AL Entitlement Setting in His Profile

Check the employee has AL entitlement setting in his profile with leave entitlement type, calcualtion year and employee ID

HTTP Request

GET http://[server]/jsf/rfws/leave/annualLeaveEntitle/checkALSetting

Parameters

Name Type Description
entType int The entitlement type ID
calcYear int The calculation year
empId List(int) The list of employee ID

Result (in JSON Array)

Name Type Description
List(int) List of employees who doesn't have AL Setting in profile for the corresponding year

Sample request:

OkHttpClient client = new OkHttpClient();

String url = "http://" + server + "jsf/rfws/leave/annualLeaveEntitle/checkALSetting"
    + "?entType=" + "19"
    + "&calcYear=" + "2017"
    + "&empId=" + "[1]";

Request request = new Request.Builder()
  .url(url)
  .get()
  .addHeader("client_id", clientID)
  .addHeader("authorization", "Bearer " + token)
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();

Sample response:

[
    1
]

# Check for Duplication of Workflow Priority

Check for duplication of Workflow Priority by the leave type id and its priority

HTTP Request

GET http://[server]/jsf/rfws/leave/leaveType/checkDupWorkPriority

Parameters

Name Type Description
id int Leave type ID
workPriority int The corresponding priority

Result (in JSON Array)

Name Type Description
size int Size of JsonArray in values
values string Data, depends on Table
name string Name. Empty
fields string Field Details

Sample request:

OkHttpClient client = new OkHttpClient();

String url = "http://" + server + "jsf/rfws/leave/leaveType/checkDupWorkPriority"
    + "?id=" + "111"
    + "&workPriority=" + "2";

Request request = new Request.Builder()
  .url(url)
  .get()
  .addHeader("client_id", clientID)
  .addHeader("authorization", "Bearer " + token)
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();

Sample response:

{
    "size": 1,
    "values": [
        {
            "code": "SC06",
            "desc": "SC06"
        }
    ],
    "name": "",
    "fields": [
        {
            "fieldClassName": "String",
            "name": "code",
            "fieldClass": "java.lang.String",
            "classType": 0
        },
        {
            "fieldClassName": "String",
            "name": "desc",
            "fieldClass": "java.lang.String",
            "classType": 0
        }
    ]
}

# Check whether Employee Has Holiday Entitlement for the Corresponding Year

Check whether employee has holiday entitlement for the corresponding year with employee entity information and the calculation year

HTTP Request

GET http://[server]/jsf/rfws/holiday/holidayEntitle/checkExistEmpHolidayEntitle

Parameters

Name Type Description
calcYear int The year of holiday entitlement to be updated
selectEmpJson entity Required. A SqlTable with column "empId", "deptId", "positionId" for the list of employees to be enquiry

Result (in JSON Array)

Name Type Description
size int Size of JsonArray in values
values string Data, depends on Table
name string Name. Empty
fields string Field Details

Sample request:

OkHttpClient client = new OkHttpClient();

String url = "http://" + server + "jsf/rfws/holiday/holidayEntitle/checkExistEmpHolidayEntitle"
    + "?selectEmpJson=" + URLEncoder.encode(selectEmpJson, "UTF-8")
    + "&calcYear=" + "2017";

Request request = new Request.Builder()
  .url(url)
  .get()
  .addHeader("client_id", clientID)
  .addHeader("authorization", "Bearer " + token)
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();

Sample response:

{
    "size": 1,
    "values": [
        {
            "empId": 604,
            "positionId": 51,
            "deptId": 218
        }
    ],
    "name": "",
    "fields": [
        {
            "fieldClassName": "Long",
            "name": "empId",
            "fieldClass": "java.lang.Long",
            "classType": 10
        },
        {
            "fieldClassName": "Long",
            "name": "deptId",
            "fieldClass": "java.lang.Long",
            "classType": 10
        },
        {
            "fieldClassName": "Long",
            "name": "positionId",
            "fieldClass": "java.lang.Long",
            "classType": 10
        }
    ]
}

# Get the List of Public Holiday Dates accordign to employee's holiday info

Get the list of Public Holiday Dates by employee ID, period date from and period date to

HTTP Request

GET http://[server]/jsf/rfws/holiday/empHolidayEntitle/getPubHldDates

Parameters

Name Type Description
empId int The employee ID
dateFrom date The date from date for the period required (yyyy-MM-dd)
dateTo date The date to date for the period required (yyyy-MM-dd)

Result (in JSON Array)

Name Type Description
size int Size of JsonArray in values
values string Data, depends on Table (Date are shown in form of milliseconds from 1900-01-01)
name string Name. Empty
fields string Field Details

Sample request:

OkHttpClient client = new OkHttpClient();

String url = "http://" + server + "jsf/rfws/holiday/empHolidayEntitle/getPubHldDates"
    + "?empId=" + "424"
    + "&dateFrom=" + "2017-01-01"
    + "&dateTo=" + "2017-12-31";

Request request = new Request.Builder()
  .url(url)
  .get()
  .addHeader("client_id", clientID)
  .addHeader("authorization", "Bearer " + token)
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();

Sample response:

[
    1483200000000,
    1486483200000,
    1486569600000,
    1506787200000,
    1490371200000,
    1494691200000,
    1488729600000
]

# Check if the Employee has AL Entitlement for a Particular Year

Check if the employee has AL entitlement for a particular year

HTTP Request

GET http://[server]/jsf/rfws/leave/annualLeaveEntitle/existEnt

Parameters

Name Type Description
entType int The entitlement type ID
calcYear int The calculation year
empId List(int) The set of employee ID

Result (in JSON Array)

Name Type Description
size int Size of JsonArray in values
values string Data, depends on Table
name string Name. Empty
fields string Field Details

Sample request:

OkHttpClient client = new OkHttpClient();

String url = "http://" + server + "jsf/rfws/leave/annualLeaveEntitle/existEnt"
    + "?entType=" + "19"
    + "&calcYear=" + "2017"
    + "&empId=" + "[1,508,695]";

Request request = new Request.Builder()
  .url(url)
  .get()
  .addHeader("client_id", clientID)
  .addHeader("authorization", "Bearer " + token)
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();

Sample response:

{
    "size": 1,
    "values": [
        {
            "empId": 695
        }
    ],
    "name": "",
    "fields": [
        {
            "fieldClassName": "Long",
            "name": "empId",
            "fieldClass": "java.lang.Long",
            "classType": 10
        }
    ]
}

# Get Employee Leave Info's ID by employee's ID

Get Employee Leave Info's ID by employee's ID

HTTP Request

GET http://[server]/jsf/rfws/leave/empLeaveEntInfo/getLeaveInfoIdByEmpid

Parameters

Name Type Description
empId int The employee ID

Result (in JSON Array)

Name Type Description
id int The ID of employee's leave info

Sample request:

OkHttpClient client = new OkHttpClient();

String url = "http://" + server + "jsf/rfws/leave/empLeaveEntInfo/getLeaveInfoIdByEmpid"
    + "?empId=" + "111"

Request request = new Request.Builder()
  .url(url)
  .get()
  .addHeader("client_id", clientID)
  .addHeader("authorization", "Bearer " + token)
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();

Sample response:

{
    111
}

# Get the maximun of Workflow Priority among leave types

Return the maximum of Workflow Priority among leave types stored in DB for generating default Workflow Priority

HTTP Request

GET http://[server]/jsf/rfws/leave/leaveType/getDefaultWorkPriority

Parameters

Name Type Description
No Parameters needed

Result (in JSON Array)

Name Type Description
int The maximun work priority

Sample request:

OkHttpClient client = new OkHttpClient();

String url = "http://" + server + "jsf/rfws/leave/leaveType/getDefaultWorkPriority";

Request request = new Request.Builder()
  .url(url)
  .get()
  .addHeader("client_id", clientID)
  .addHeader("authorization", "Bearer " + token)
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();

Sample response:

96

# Return Employee Holiday Info's ID

Return employee holiday info's ID by the employee table entity

HTTP Request

GET http://[server]/jsf/rfws/holiday/batchEmpHolidayEntitle/getEmpHolidayInfoId

Parameters

Name Type Description
empTableJson entity Required. A SqlTable with column "empId" for the list of employees to be enquiry

Result (in JSON Array)

Name Type Description
size int Size of JsonArray in values
values string Data, depends on Table
name string Name. Empty
fields string Field Details

Sample request:

OkHttpClient client = new OkHttpClient();

String url = "http://" + server + "jsf/rfws/holiday/batchEmpHolidayEntitle/getEmpHolidayInfoId"
    + "?empTableJson=" + URLEncoder.encode(empTable, "UTF-8");

Request request = new Request.Builder()
  .url(url)
  .get()
  .addHeader("client_id", clientID)
  .addHeader("authorization", "Bearer " + token)
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();

Sample response:

{
    "size": 1,
    "values": [
        {
            "empId": 604,
            "id": 436
        }
    ],
    "name": "",
    "fields": [
        {
            "fieldClassName": "Long",
            "name": "id",
            "fieldClass": "java.lang.Long",
            "classType": 10
        },
        {
            "fieldClassName": "Long",
            "name": "empId",
            "fieldClass": "java.lang.Long",
            "classType": 10
        }
    ]
}

# Get a List of Leave Application

Get a list of leave application record of a particular employee in a date range with employee ID, period date from, period date to and leave type ID

HTTP Request

GET http://[server]/jsf/rfws/leave/leaveApp/getEmpLeaveApp

Parameters

Name Type Description
empId int The employee ID
dateFrom date The date from date for the period required (yyyy-MM-dd)
dateTo date The date to date for the period required (yyyy-MM-dd)
leaveTypeId int The corresponding leave type

Result (in JSON Array)

Name Type Description
size int Size of JsonArray in values
values string Data, depends on Table
name string Name. Empty
fields string Field Details

Sample request:

OkHttpClient client = new OkHttpClient();

String url = "http://" + server + "jsf/rfws/leave/leaveApp/getEmpLeaveApp"
    + "?empId=" + "1400"
    + "&dateFrom=" + "2017-11-15"
    + "&dateTo=" + "2017-11-15"
    + "&leaveTypeID=" + "111";

Request request = new Request.Builder()
  .url(url)
  .get()
  .addHeader("client_id", clientID)
  .addHeader("authorization", "Bearer " + token)
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();

Sample response:

{
    "size": 1,
    "values": [
        {
            "empId": 1400,
            "period": "nil",
            "leaveAppNo@Duplicate_No@-1": "001",
            "code": "CR_MBug022",
            "leaveAppNo": "LEA1711134",
            "filingDate": "2017-11-15 00:00:00",
            "endDate": "2017-11-15 00:00:00",
            "cancelStatus": "nil",
            "leaveAppId": 284,
            "footerId": 2787,
            "empName": "CR_MBug02",
            "specifyDate": "2017-09-04 00:00:00",
            "days": 1,
            "deptDesc": "001-Eng",
            "positionDesc": "00002",
            "startTime": "00:00",
            "leaveTypeId": 22,
            "endTime": "23:59",
            "startDate": "2017-11-15 00:00:00",
            "status": "N"
        }
    ],
    "name": "",
    "fields": [
        {
            "fieldClassName": "Long",
            "name": "leaveAppId",
            "fieldClass": "java.lang.Long",
            "classType": 10
        },
        {
            "fieldClassName": "String",
            "name": "leaveAppNo",
            "fieldClass": "java.lang.String",
            "classType": 0
        },
        {
            "fieldClassName": "String",
            "name": "status",
            "fieldClass": "java.lang.String",
            "classType": 0
        },
        {
            "fieldClassName": "String",
            "name": "leaveAppNo@Duplicate_No@-1",
            "fieldClass": "java.lang.String",
            "classType": 0
        },
        {
            "fieldClassName": "Long",
            "name": "empId",
            "fieldClass": "java.lang.Long",
            "classType": 10
        },
        {
            "fieldClassName": "String",
            "name": "code",
            "fieldClass": "java.lang.String",
            "classType": 0
        },
        {
            "fieldClassName": "String",
            "name": "empName",
            "fieldClass": "java.lang.String",
            "classType": 0
        },
        {
            "fieldClassName": "String",
            "name": "alias",
            "fieldClass": "java.lang.String",
            "classType": 0
        },
        {
            "fieldClassName": "String",
            "name": "deptDesc",
            "fieldClass": "java.lang.String",
            "classType": 0
        },
        {
            "fieldClassName": "String",
            "name": "positionDesc",
            "fieldClass": "java.lang.String",
            "classType": 0
        },
        {
            "fieldClassName": "Long",
            "name": "leaveTypeId",
            "fieldClass": "java.lang.Long",
            "classType": 10
        },
        {
            "fieldClassName": "Date",
            "name": "filingDate",
            "fieldClass": "java.util.Date",
            "classType": 21
        },
        {
            "fieldClassName": "String",
            "name": "period",
            "fieldClass": "java.lang.String",
            "classType": 0
        },
        {
            "fieldClassName": "Date",
            "name": "startDate",
            "fieldClass": "java.util.Date",
            "classType": 21
        },
        {
            "fieldClassName": "String",
            "name": "startTime",
            "fieldClass": "java.lang.String",
            "classType": 0
        },
        {
            "fieldClassName": "Date",
            "name": "endDate",
            "fieldClass": "java.util.Date",
            "classType": 21
        },
        {
            "fieldClassName": "String",
            "name": "endTime",
            "fieldClass": "java.lang.String",
            "classType": 0
        },
        {
            "fieldClassName": "Double",
            "name": "days",
            "fieldClass": "java.lang.Double",
            "classType": 10
        },
        {
            "fieldClassName": "Date",
            "name": "specifyDate",
            "fieldClass": "java.util.Date",
            "classType": 21
        },
        {
            "fieldClassName": "String",
            "name": "reason",
            "fieldClass": "java.lang.String",
            "classType": 0
        },
        {
            "fieldClassName": "Long",
            "name": "footerId",
            "fieldClass": "java.lang.Long",
            "classType": 10
        },
        {
            "fieldClassName": "String",
            "name": "cancelStatus",
            "fieldClass": "java.lang.String",
            "classType": 0
        }
    ]
}

# Get a List of Leave Cancellation Record of a Particular Employee in a Date Range

Get a list of leave cancellation record of a particular employee in a date range with employee ID, period date from, period date to and leave type ID

HTTP Request

GET http://[server]/jsf/rfws/leave/leaveCancel/getEmpLeaveCancel

Parameters

Name Type Description
empId int The employee ID
dateFrom date The date from date for the period required (yyyy-MM-dd)
dateTo date The date to date for the period required (yyyy-MM-dd)
leaveTypeId int The corresponding id of leave type

Result (in JSON Array)

Name Type Description
size int Size of JsonArray in values
values string Data, depends on Table
name string Name. Empty
fields string Field Details

Sample request:

OkHttpClient client = new OkHttpClient();

String url = "http://" + server + "jsf/rfws/leave/leaveCancel/getUncancelLeave"
    + "?empId=" + "416"
    + "&dateFrom=" + "1900-01-01"
    + "&dateTo=" + "2017-12-31"
    + "&leaveTypeID=" + "2";

Request request = new Request.Builder()
  .url(url)
  .get()
  .addHeader("client_id", clientID)
  .addHeader("authorization", "Bearer " + token)
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();

Sample response:

{
    "size": 1,
    "values": [
        {
            "period": "fullDay",
            "leaveAppNo": "scscs",
            "filingDate": "2011-01-05 00:00:00",
            "endDate": "2011-01-05 00:00:00",
            "leaveCancelId": 7,
            "footerId": 7,
            "leaveCancelNo": "LEC170006",
            "specifyDate": "2011-01-05 00:00:00",
            "days": 1,
            "startTime": "00:00",
            "leaveTypeId": 2,
            "endTime": "23:59",
            "startDate": "2011-01-05 00:00:00",
            "status": "Y"
        }
    ],
    "name": "",
    "fields": [
        {
            "fieldClassName": "Long",
            "name": "leaveCancelId",
            "fieldClass": "java.lang.Long",
            "classType": 10
        },
        {
            "fieldClassName": "String",
            "name": "leaveCancelNo",
            "fieldClass": "java.lang.String",
            "classType": 0
        },
        {
            "fieldClassName": "String",
            "name": "status",
            "fieldClass": "java.lang.String",
            "classType": 0
        },
        {
            "fieldClassName": "String",
            "name": "leaveAppNo",
            "fieldClass": "java.lang.String",
            "classType": 0
        },
        {
            "fieldClassName": "Long",
            "name": "leaveTypeId",
            "fieldClass": "java.lang.Long",
            "classType": 10
        },
        {
            "fieldClassName": "Date",
            "name": "filingDate",
            "fieldClass": "java.util.Date",
            "classType": 21
        },
        {
            "fieldClassName": "String",
            "name": "period",
            "fieldClass": "java.lang.String",
            "classType": 0
        },
        {
            "fieldClassName": "Date",
            "name": "startDate",
            "fieldClass": "java.util.Date",
            "classType": 21
        },
        {
            "fieldClassName": "String",
            "name": "startTime",
            "fieldClass": "java.lang.String",
            "classType": 0
        },
        {
            "fieldClassName": "Date",
            "name": "endDate",
            "fieldClass": "java.util.Date",
            "classType": 21
        },
        {
            "fieldClassName": "String",
            "name": "endTime",
            "fieldClass": "java.lang.String",
            "classType": 0
        },
        {
            "fieldClassName": "Double",
            "name": "days",
            "fieldClass": "java.lang.Double",
            "classType": 10
        },
        {
            "fieldClassName": "Date",
            "name": "specifyDate",
            "fieldClass": "java.util.Date",
            "classType": 21
        },
        {
            "fieldClassName": "String",
            "name": "cancelReason",
            "fieldClass": "java.lang.String",
            "classType": 0
        },
        {
            "fieldClassName": "Long",
            "name": "footerId",
            "fieldClass": "java.lang.Long",
            "classType": 10
        }
    ]
}

# Get List of Employee Leave Entitlement

Get list of employee leave entitlement

HTTP Request

GET http://[server]/jsf/rfws/leave/empLeaveEntInfo/getEmpLeaveEntitle

Parameters

Name Type Description
empId int The employee ID
dateFrom date The date from date for the period required (yyyy-MM-dd)
dateTo date The date to date for the period required (yyyy-MM-dd)
entitleTypeId int The Entitlement Type ID

Result (in JSON Array)

Name Type Description
size int Size of JsonArray in values
values string Data, depends on Table
name string Name. Empty
fields string Field Details

Sample request:

OkHttpClient client = new OkHttpClient();

String url = "http://" + server + "jsf/rfws/leave/empLeaveEntInfo/getEmpLeaveEntitle"
    + "?empId=" + "199"
    + "&dateFrom=" + "2017-01-01"
    + "&dateTo=" + "2017-12-31"
    + "&entitleTypeId=" + "15";

Request request = new Request.Builder()
  .url(url)
  .get()
  .addHeader("client_id", clientID)
  .addHeader("authorization", "Bearer " + token)
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();

Sample response:

{
    "size": 1,
    "values": [
        {
            "empId": 199,
            "effDate": "2017-01-10 00:00:00",
            "Entperiod": 1,
            "leaveEntId": 15,
            "entday": 10,
            "leaveEntDesc": "SC-AL ENG",
            "expDate": "2017-12-31 00:00:00",
            "EntperiodUnit": "nil"
        }
    ],
    "name": "",
    "fields": [
        {
            "fieldClassName": "Long",
            "name": "empId",
            "fieldClass": "java.lang.Long",
            "classType": 10
        },
        {
            "fieldClassName": "Long",
            "name": "leaveEntId",
            "fieldClass": "java.lang.Long",
            "classType": 10
        },
        {
            "fieldClassName": "String",
            "name": "leaveEntDesc",
            "fieldClass": "java.lang.String",
            "classType": 0
        },
        {
            "fieldClassName": "Integer",
            "name": "Entperiod",
            "fieldClass": "java.lang.Integer",
            "classType": 10
        },
        {
            "fieldClassName": "String",
            "name": "EntperiodUnit",
            "fieldClass": "java.lang.String",
            "classType": 0
        },
        {
            "fieldClassName": "Date",
            "name": "effDate",
            "fieldClass": "java.util.Date",
            "classType": 21
        },
        {
            "fieldClassName": "Date",
            "name": "expDate",
            "fieldClass": "java.util.Date",
            "classType": 21
        },
        {
            "fieldClassName": "Double",
            "name": "hkslcat1",
            "fieldClass": "java.lang.Double",
            "classType": 10
        },
        {
            "fieldClassName": "Double",
            "name": "hkslcat2",
            "fieldClass": "java.lang.Double",
            "classType": 10
        },
        {
            "fieldClassName": "Double",
            "name": "entday",
            "fieldClass": "java.lang.Double",
            "classType": 10
        }
    ]
}

# Get Employee's Multiple Profile Leave Setup

Get employee's multiple profile leave setup with the corresponding personal number

HTTP Request

GET http://[server]/jsf/rfws/leave/batchMpEnt/getEmpMpEnt

Parameters

Name Type Description
personalNo String Personal number

Result (in JSON Array)

Name Type Description
size int Size of JsonArray in values
values string Data, depends on Table
name string Name. Empty
fields string Field Details

Sample request:

OkHttpClient client = new OkHttpClient();

String url = "http://" + server + "jsf/rfws/leave/batchMpEnt/getEmpMpEnt"
    + "?personalNo=" + "1";

Request request = new Request.Builder()
  .url(url)
  .get()
  .addHeader("client_id", clientID)
  .addHeader("authorization", "Bearer " + token)
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();

Sample response:

{
    "155": "{\"size\":59,\"values\":[{\"hId\":124,\"leaveEntId\":37,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":38,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":1,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":2,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":3,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":4,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":5,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":7,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":8,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":9,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":13,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":14,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":15,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":16,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":17,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":18,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":19,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":20,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":21,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":22,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":23,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":24,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":25,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":26,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":27,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":29,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":30,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":31,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":32,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":33,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":34,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":35,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":36,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":39,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":40,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":41,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":42,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":43,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":44,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":45,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":6,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":46,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":47,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":48,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":49,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":50,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":51,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":52,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":53,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":54,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":55,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":56,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":57,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":58,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":59,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":60,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":61,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":62,\"entMasterId\":155},{\"hId\":124,\"leaveEntId\":63,\"entMasterId\":155}],\"name\":\"\",\"fields\":[{\"name\":\"empId\",\"classType\":10,\"fieldClassName\":\"Long\",\"fieldClass\":\"java.lang.Long\"},{\"name\":\"hId\",\"classType\":10,\"fieldClassName\":\"Long\",\"fieldClass\":\"java.lang.Long\"},{\"name\":\"leaveEntId\",\"classType\":10,\"fieldClassName\":\"Long\",\"fieldClass\":\"java.lang.Long\"},{\"name\":\"entMasterId\",\"classType\":10,\"fieldClassName\":\"Long\",\"fieldClass\":\"java.lang.Long\"},{\"name\":\"iRev\",\"classType\":10,\"fieldClassName\":\"Integer\",\"fieldClass\":\"java.lang.Integer\"},{\"name\":\"id\",\"classType\":10,\"fieldClassName\":\"Long\",\"fieldClass\":\"java.lang.Long\"},{\"name\":\"itemNo\",\"classType\":0,\"fieldClassName\":\"String\",\"fieldClass\":\"java.lang.String\"}]}"
}

# Get HKML Setup

Get HKML setup

HTTP Request

GET http://[server]/jsf/rfws/hkleave/hkmlSetup/getHKMLSetup

Parameters

Name Type Description
No Parameters needed

Result (in JSON Array)

Name Type Description
size int Size of JsonArray in values
values string Data, depends on Table
name string Name. Empty
fields string Field Details

Sample request:

OkHttpClient client = new OkHttpClient();

String url = "http://" + server + "jsf/rfws/hkleave/hkmlSetup/getHKMLSetup";

Request request = new Request.Builder()
  .url(url)
  .get()
  .addHeader("client_id", clientID)
  .addHeader("authorization", "Bearer " + token)
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();

Sample response:

{
    "moduleType": "hkmlsetup",
    "hkmlsetup": "{\"size\":1,\"values\":[{\"lastModifyUid\":13,\"weeksTotal\":2,\"expiredDate\":\"1900-01-01 00:00:00\",\"iRev\":13,\"weeksAfter\":1,\"weeksBefore\":1,\"seniorityFactor\":\"joinDate\",\"id\":1,\"statusModifyDate\":\"2017-06-27 14:51:33\",\"lastModifyDate\":\"2017-11-08 15:38:30\",\"createUid\":4,\"createDate\":\"2017-06-27 14:51:33\",\"status\":\"Y\"}],\"name\":\"\",\"fields\":[{\"fieldClassName\":\"Long\",\"name\":\"id\",\"fieldClass\":\"java.lang.Long\",\"classType\":10},{\"fieldClassName\":\"Integer\",\"name\":\"iRev\",\"fieldClass\":\"java.lang.Integer\",\"classType\":10},{\"fieldClassName\":\"Long\",\"name\":\"beId\",\"fieldClass\":\"java.lang.Long\",\"classType\":10},{\"fieldClassName\":\"Date\",\"name\":\"createDate\",\"fieldClass\":\"java.util.Date\",\"classType\":21},{\"fieldClassName\":\"Long\",\"name\":\"createUid\",\"fieldClass\":\"java.lang.Long\",\"classType\":10},{\"fieldClassName\":\"Date\",\"name\":\"lastModifyDate\",\"fieldClass\":\"java.util.Date\",\"classType\":21},{\"fieldClassName\":\"Long\",\"name\":\"lastModifyUid\",\"fieldClass\":\"java.lang.Long\",\"classType\":10},{\"fieldClassName\":\"Date\",\"name\":\"statusModifyDate\",\"fieldClass\":\"java.util.Date\",\"classType\":21},{\"fieldClassName\":\"String\",\"name\":\"status\",\"fieldClass\":\"java.lang.String\",\"classType\":0},{\"fieldClassName\":\"Boolean\",\"name\":\"locked\",\"fieldClass\":\"java.lang.Boolean\",\"classType\":3},{\"fieldClassName\":\"Boolean\",\"name\":\"expired\",\"fieldClass\":\"java.lang.Boolean\",\"classType\":3},{\"fieldClassName\":\"Long\",\"name\":\"expiredUid\",\"fieldClass\":\"java.lang.Long\",\"classType\":10},{\"fieldClassName\":\"Date\",\"name\":\"expiredDate\",\"fieldClass\":\"java.util.Date\",\"classType\":21},{\"fieldClassName\":\"Integer\",\"name\":\"printCount\",\"fieldClass\":\"java.lang.Integer\",\"classType\":10},{\"fieldClassName\":\"String\",\"name\":\"sysJson\",\"fieldClass\":\"java.lang.String\",\"classType\":0},{\"fieldClassName\":\"String\",\"name\":\"viewCode\",\"fieldClass\":\"java.lang.String\",\"classType\":0},{\"fieldClassName\":\"String\",\"name\":\"seniorityFactor\",\"fieldClass\":\"java.lang.String\",\"classType\":0},{\"fieldClassName\":\"Integer\",\"name\":\"weeksTotal\",\"fieldClass\":\"java.lang.Integer\",\"classType\":10},{\"fieldClassName\":\"Integer\",\"name\":\"weeksBefore\",\"fieldClass\":\"java.lang.Integer\",\"classType\":10},{\"fieldClassName\":\"Integer\",\"name\":\"weeksAfter\",\"fieldClass\":\"java.lang.Integer\",\"classType\":10}]}",
    "subTableNames": "hkmlsetup_attach",
    "hkmlsetup_attach": "{\"size\":0,\"values\":[],\"name\":\"\",\"fields\":[{\"fieldClassName\":\"Long\",\"name\":\"id\",\"fieldClass\":\"java.lang.Long\",\"classType\":10},{\"fieldClassName\":\"Integer\",\"name\":\"iRev\",\"fieldClass\":\"java.lang.Integer\",\"classType\":10},{\"fieldClassName\":\"Long\",\"name\":\"hId\",\"fieldClass\":\"java.lang.Long\",\"classType\":10},{\"fieldClassName\":\"String\",\"name\":\"code\",\"fieldClass\":\"java.lang.String\",\"classType\":0},{\"fieldClassName\":\"String\",\"name\":\"desc\",\"fieldClass\":\"java.lang.String\",\"classType\":0},{\"fieldClassName\":\"Long\",\"name\":\"fileSize\",\"fieldClass\":\"java.lang.Long\",\"classType\":10},{\"fieldClassName\":\"Long\",\"name\":\"createUid\",\"fieldClass\":\"java.lang.Long\",\"classType\":10},{\"fieldClassName\":\"Date\",\"name\":\"createDate\",\"fieldClass\":\"java.util.Date\",\"classType\":21},{\"fieldClassName\":\"Long\",\"name\":\"filedataId\",\"fieldClass\":\"java.lang.Long\",\"classType\":10},{\"fieldClassName\":\"String\",\"name\":\"password\",\"fieldClass\":\"java.lang.String\",\"classType\":0},{\"fieldClassName\":\"String\",\"name\":\"uuid\",\"fieldClass\":\"java.lang.String\",\"classType\":0},{\"fieldClassName\":\"String\",\"name\":\"author\",\"fieldClass\":\"java.lang.String\",\"classType\":0},{\"fieldClassName\":\"String\",\"name\":\"tags\",\"fieldClass\":\"java.lang.String\",\"classType\":0},{\"fieldClassName\":\"String\",\"name\":\"remark\",\"fieldClass\":\"java.lang.String\",\"classType\":0},{\"fieldClassName\":\"Long\",\"name\":\"pid\",\"fieldClass\":\"java.lang.Long\",\"classType\":10},{\"fieldClassName\":\"String\",\"name\":\"path\",\"fieldClass\":\"java.lang.String\",\"classType\":0}]}",
    "mainTableName": "hkmlsetup"
}

# Get HKSL Setup

Get HKSL setup

HTTP Request

GET http://[server]/jsf/rfws/hkleave/hkslSetup/getHKSLSetup

Parameters

Name Type Description
No Parameters needed

Result (in JSON Array)

Name Type Description
size int Size of JsonArray in values
values string Data, depends on Table
name string Name. Empty
fields string Field Details

Sample request:

OkHttpClient client = new OkHttpClient();

String url = "http://" + server + "jsf/rfws/hkleave/hkslSetup/getHKSLSetup";

Request request = new Request.Builder()
  .url(url)
  .get()
  .addHeader("client_id", clientID)
  .addHeader("authorization", "Bearer " + token)
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();

Sample response:

{
    "moduleType": "hkslsetup",
    "hkslsetup": "{\"size\":1,\"values\":[{\"seniorityFactor\":\"joinDate\",\"lastModifyUid\":678,\"expiredDate\":\"1900-01-01 00:00:00\",\"maxCat1\":36,\"maxCat2\":84,\"iRev\":14,\"id\":1,\"statusModifyDate\":\"2017-06-27 14:51:33\",\"lastModifyDate\":\"2017-11-02 11:59:05\",\"createUid\":4,\"createDate\":\"2017-06-27 14:51:33\",\"status\":\"Y\"}],\"name\":\"\",\"fields\":[{\"fieldClassName\":\"Long\",\"name\":\"id\",\"fieldClass\":\"java.lang.Long\",\"classType\":10},{\"fieldClassName\":\"Integer\",\"name\":\"iRev\",\"fieldClass\":\"java.lang.Integer\",\"classType\":10},{\"fieldClassName\":\"Long\",\"name\":\"beId\",\"fieldClass\":\"java.lang.Long\",\"classType\":10},{\"fieldClassName\":\"Date\",\"name\":\"createDate\",\"fieldClass\":\"java.util.Date\",\"classType\":21},{\"fieldClassName\":\"Long\",\"name\":\"createUid\",\"fieldClass\":\"java.lang.Long\",\"classType\":10},{\"fieldClassName\":\"Date\",\"name\":\"lastModifyDate\",\"fieldClass\":\"java.util.Date\",\"classType\":21},{\"fieldClassName\":\"Long\",\"name\":\"lastModifyUid\",\"fieldClass\":\"java.lang.Long\",\"classType\":10},{\"fieldClassName\":\"Date\",\"name\":\"statusModifyDate\",\"fieldClass\":\"java.util.Date\",\"classType\":21},{\"fieldClassName\":\"String\",\"name\":\"status\",\"fieldClass\":\"java.lang.String\",\"classType\":0},{\"fieldClassName\":\"Boolean\",\"name\":\"locked\",\"fieldClass\":\"java.lang.Boolean\",\"classType\":3},{\"fieldClassName\":\"Boolean\",\"name\":\"expired\",\"fieldClass\":\"java.lang.Boolean\",\"classType\":3},{\"fieldClassName\":\"Long\",\"name\":\"expiredUid\",\"fieldClass\":\"java.lang.Long\",\"classType\":10},{\"fieldClassName\":\"Date\",\"name\":\"expiredDate\",\"fieldClass\":\"java.util.Date\",\"classType\":21},{\"fieldClassName\":\"Integer\",\"name\":\"printCount\",\"fieldClass\":\"java.lang.Integer\",\"classType\":10},{\"fieldClassName\":\"String\",\"name\":\"sysJson\",\"fieldClass\":\"java.lang.String\",\"classType\":0},{\"fieldClassName\":\"String\",\"name\":\"viewCode\",\"fieldClass\":\"java.lang.String\",\"classType\":0},{\"fieldClassName\":\"String\",\"name\":\"seniorityFactor\",\"fieldClass\":\"java.lang.String\",\"classType\":0},{\"fieldClassName\":\"Integer\",\"name\":\"maxCat1\",\"fieldClass\":\"java.lang.Integer\",\"classType\":10},{\"fieldClassName\":\"Integer\",\"name\":\"maxCat2\",\"fieldClass\":\"java.lang.Integer\",\"classType\":10}]}",
    "hkslsetupt": "{\"size\":2,\"values\":[{\"yrofservice\":1.0,\"hId\":1,\"iRev\":14,\"id\":1,\"itemNo\":\"     2\",\"entdays\":4.0},{\"hId\":1,\"iRev\":14,\"id\":2,\"itemNo\":\"     1\",\"entdays\":2.0}],\"name\":\"\",\"fields\":[{\"fieldClassName\":\"Long\",\"name\":\"id\",\"fieldClass\":\"java.lang.Long\",\"classType\":10},{\"fieldClassName\":\"Integer\",\"name\":\"iRev\",\"fieldClass\":\"java.lang.Integer\",\"classType\":10},{\"fieldClassName\":\"Long\",\"name\":\"hId\",\"fieldClass\":\"java.lang.Long\",\"classType\":10},{\"fieldClassName\":\"String\",\"name\":\"itemNo\",\"fieldClass\":\"java.lang.String\",\"classType\":0},{\"fieldClassName\":\"Double\",\"name\":\"yrofservice\",\"fieldClass\":\"java.lang.Double\",\"classType\":10},{\"fieldClassName\":\"Double\",\"name\":\"entdays\",\"fieldClass\":\"java.lang.Double\",\"classType\":10}]}",
    "hkslsetup_attach": "{\"size\":0,\"values\":[],\"name\":\"\",\"fields\":[{\"fieldClassName\":\"Long\",\"name\":\"id\",\"fieldClass\":\"java.lang.Long\",\"classType\":10},{\"fieldClassName\":\"Integer\",\"name\":\"iRev\",\"fieldClass\":\"java.lang.Integer\",\"classType\":10},{\"fieldClassName\":\"Long\",\"name\":\"hId\",\"fieldClass\":\"java.lang.Long\",\"classType\":10},{\"fieldClassName\":\"String\",\"name\":\"code\",\"fieldClass\":\"java.lang.String\",\"classType\":0},{\"fieldClassName\":\"String\",\"name\":\"desc\",\"fieldClass\":\"java.lang.String\",\"classType\":0},{\"fieldClassName\":\"Long\",\"name\":\"fileSize\",\"fieldClass\":\"java.lang.Long\",\"classType\":10},{\"fieldClassName\":\"Long\",\"name\":\"createUid\",\"fieldClass\":\"java.lang.Long\",\"classType\":10},{\"fieldClassName\":\"Date\",\"name\":\"createDate\",\"fieldClass\":\"java.util.Date\",\"classType\":21},{\"fieldClassName\":\"Long\",\"name\":\"filedataId\",\"fieldClass\":\"java.lang.Long\",\"classType\":10},{\"fieldClassName\":\"String\",\"name\":\"password\",\"fieldClass\":\"java.lang.String\",\"classType\":0},{\"fieldClassName\":\"String\",\"name\":\"uuid\",\"fieldClass\":\"java.lang.String\",\"classType\":0},{\"fieldClassName\":\"String\",\"name\":\"author\",\"fieldClass\":\"java.lang.String\",\"classType\":0},{\"fieldClassName\":\"String\",\"name\":\"tags\",\"fieldClass\":\"java.lang.String\",\"classType\":0},{\"fieldClassName\":\"String\",\"name\":\"remark\",\"fieldClass\":\"java.lang.String\",\"classType\":0},{\"fieldClassName\":\"Long\",\"name\":\"pid\",\"fieldClass\":\"java.lang.Long\",\"classType\":10},{\"fieldClassName\":\"String\",\"name\":\"path\",\"fieldClass\":\"java.lang.String\",\"classType\":0}]}",
    "subTableNames": "hkslsetupt;hkslsetup_attach",
    "mainTableName": "hkslsetup"
}

# Get Employee's Holiday Balance on a day

Get employee's holiday balance on a day with employee ID, the date for the RD balance

HTTP Request

GET http://[server]/jsf/rfws/leave/holBal/getHolBal

Parameters

Name Type Description
empId int The Employee ID
asAtDate date Get the Holiday Balance as at which date

Result (in JSON Array)

Name Type Description
size int Size of JsonArray in values
values string Data, depends on Table
name string Name. Empty
fields string Field Details

Sample request:

OkHttpClient client = new OkHttpClient();

String url = "http://" + server + "jsf/rfws/leave/holBal/getHolBal"
    + "?empId=" + "424"
    + "&asAtDate=" + "2017-12-31";

Request request = new Request.Builder()
  .url(url)
  .get()
  .addHeader("client_id", clientID)
  .addHeader("authorization", "Bearer " + token)
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();

Sample response:

{
    "size": 14,
    "values": [
        {
            "holidayDesc": "the first day of January",
            "empId": 424,
            "holidaycalendartId": 66,
            "sDate": "2010-12-30 00:00:00",
            "name": "SCC03",
            "dept": 180,
            "position": 64,
            "eDate": "2011-01-03 00:00:00"
        },
        {
            "holidayDesc": "Good Friday",
            "empId": 424,
            "holidaycalendartId": 70,
            "sDate": "2011-03-13 00:00:00",
            "name": "SCC03",
            "dept": 180,
            "position": 64,
            "eDate": "2011-03-25 00:00:00"
        },
        {
            "holidayDesc": "the first day of January",
            "empId": 424,
            "holidaycalendartId": 38,
            "sDate": "2016-11-29 00:00:00",
            "name": "SCC03",
            "dept": 180,
            "position": 64,
            "eDate": "2017-02-03 00:00:00"
        },
        {
            "holidayDesc": "Lunar New Year's Day",
            "empId": 424,
            "holidaycalendartId": 39,
            "sDate": "2017-01-06 00:00:00",
            "name": "SCC03",
            "dept": 180,
            "position": 64,
            "eDate": "2017-03-13 00:00:00"
        },
        {
            "holidayDesc": "the second day of Lunar New Year",
            "empId": 424,
            "holidaycalendartId": 40,
            "sDate": "2017-01-07 00:00:00",
            "name": "SCC03",
            "dept": 180,
            "position": 64,
            "eDate": "2017-03-14 00:00:00"
        },
        {
            "holidayDesc": "Freeday",
            "empId": 424,
            "holidaycalendartId": 83,
            "sDate": "2017-02-01 00:00:00",
            "name": "SCC03",
            "dept": 180,
            "position": 64,
            "eDate": "2017-04-08 00:00:00"
        },
        {
            "holidayDesc": "Good Friday",
            "empId": 424,
            "holidaycalendartId": 42,
            "sDate": "2017-02-20 00:00:00",
            "name": "SCC03",
            "dept": 180,
            "position": 64,
            "eDate": "2017-04-27 00:00:00"
        },
        {
            "holidayDesc": "The Birthday of the Buddha",
            "empId": 424,
            "holidaycalendartId": 43,
            "sDate": "2017-04-11 00:00:00",
            "name": "SCC03",
            "dept": 180,
            "position": 64,
            "eDate": "2017-06-16 00:00:00"
        },
        {
            "holidayDesc": "National Day, being the first day of October",
            "empId": 424,
            "holidaycalendartId": 41,
            "sDate": "2017-08-29 00:00:00",
            "name": "SCC03",
            "dept": 180,
            "position": 64,
            "eDate": "2017-11-03 00:00:00"
        },
        {
            "holidayDesc": "the first day of January",
            "empId": 424,
            "holidaycalendartId": 87,
            "sDate": "2017-11-29 00:00:00",
            "name": "SCC03",
            "dept": 180,
            "position": 64,
            "eDate": "2018-02-03 00:00:00"
        },
        {
            "holidayDesc": "Lunar New Year's Day",
            "empId": 424,
            "holidaycalendartId": 88,
            "sDate": "2018-01-06 00:00:00",
            "name": "SCC03",
            "dept": 180,
            "position": 64,
            "eDate": "2018-03-13 00:00:00"
        },
        {
            "holidayDesc": "the second day of Lunar New Year",
            "empId": 424,
            "holidaycalendartId": 89,
            "sDate": "2018-01-07 00:00:00",
            "name": "SCC03",
            "dept": 180,
            "position": 64,
            "eDate": "2018-03-14 00:00:00"
        },
        {
            "holidayDesc": "Good Friday",
            "empId": 424,
            "holidaycalendartId": 90,
            "sDate": "2018-02-20 00:00:00",
            "name": "SCC03",
            "dept": 180,
            "position": 64,
            "eDate": "2018-04-27 00:00:00"
        },
        {
            "holidayDesc": "The Birthday of the Buddha",
            "empId": 424,
            "holidaycalendartId": 91,
            "sDate": "2018-04-11 00:00:00",
            "name": "SCC03",
            "dept": 180,
            "position": 64,
            "eDate": "2018-06-16 00:00:00"
        }
    ],
    "name": "",
    "fields": [
        {
            "fieldClassName": "Long",
            "name": "empId",
            "fieldClass": "java.lang.Long",
            "classType": 10
        },
        {
            "fieldClassName": "String",
            "name": "name",
            "fieldClass": "java.lang.String",
            "classType": 0
        },
        {
            "fieldClassName": "Long",
            "name": "dept",
            "fieldClass": "java.lang.Long",
            "classType": 10
        },
        {
            "fieldClassName": "Long",
            "name": "position",
            "fieldClass": "java.lang.Long",
            "classType": 10
        },
        {
            "fieldClassName": "Date",
            "name": "sDate",
            "fieldClass": "java.util.Date",
            "classType": 21
        },
        {
            "fieldClassName": "Date",
            "name": "eDate",
            "fieldClass": "java.util.Date",
            "classType": 21
        },
        {
            "fieldClassName": "String",
            "name": "holidayDesc",
            "fieldClass": "java.lang.String",
            "classType": 0
        },
        {
            "fieldClassName": "Long",
            "name": "holidaycalendartId",
            "fieldClass": "java.lang.Long",
            "classType": 10
        }
    ]
}

# Get Leave Balance of employee

Get leave balance of employee

HTTP Request

GET http://[server]/jsf/rfws/leave/leaveApp/getLeaveBalance

Parameters

Name Type Description
empId int The employee ID
dateFrom date The date from date for leave balance (yyyy-MM-dd)
dateTo date The date to date for leave balance (yyyy-MM-dd)
entitleTypeId int The entitlement type id for the corresponding leave
checkFuture boolean Whether calculate the future leave related fields (e.g. Leave Days (As at Period End))

Result (in JSON Array)

Name Type Description
size int Size of JsonArray in values
values string Data, depends on Table
name string Name. Empty
fields string Field Details

Sample request:

OkHttpClient client = new OkHttpClient();

String url = "http://" + server + "jsf/rfws/leave/leaveApp/getLeaveBalance"
    + "?empId=" + "1400"
    + "&dateFrom=" + "2017-11-15"
    + "&dateTo=" + "2017-11-15"
    + "&entitleTypeId=" + ""
    + "&checkFuture=" + "";

Request request = new Request.Builder()
  .url(url)
  .get()
  .addHeader("client_id", clientID)
  .addHeader("authorization", "Bearer " + token)
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();

Sample response:

{
    "size": 6,
    "values": [
        {
            "entitleTypeDesc": "HKSL- Cat. 1",
            "balAppDays": -57,
            "apvDays": 73,
            "netBal": -57,
            "balApvDays": -57,
            "balApvDaysFuture": -57,
            "leaveEntExpiry": 16,
            "entDays": 16,
            "appDaysExpiry": 73,
            "balApvDaysExpiry": -57,
            "apvDaysExpiry": 73,
            "balAppDaysExpiry": -57,
            "balAppDaysFuture": -57,
            "entitleTypeId": 18,
            "entitleTypeMess": "ch01_leave.hkslcat1",
            "leaveEnt": 16,
            "appDays": 73
        },
        {
            "entitleTypeDesc": "HKSL- Cat. 2",
            "entitleTypeId": 18,
            "entitleTypeMess": "ch01_leave.hkslcat2"
        },
        {
            "empId": 1400,
            "entitleTypeDesc": "AL",
            "entitleTypeId": 19
        },
        {
            "empId": 1400,
            "entitleTypeDesc": "ANDY_Y",
            "entitleTypeId": 22
        },
        {
            "empId": 1400,
            "entitleTypeDesc": "HKAL",
            "entitleTypeId": 25
        },
        {
            "empId": 1400,
            "entitleTypeDesc": "SENA",
            "entitleTypeId": 33
        }
    ],
    "name": "",
    "fields": [
        {
            "fieldClassName": "Long",
            "name": "empId",
            "fieldClass": "java.lang.Long",
            "classType": 10
        },
        {
            "fieldClassName": "Long",
            "name": "entitleTypeId",
            "fieldClass": "java.lang.Long",
            "classType": 10
        },
        {
            "fieldClassName": "String",
            "name": "entitleTypeDesc",
            "fieldClass": "java.lang.String",
            "classType": 0
        },
        {
            "fieldClassName": "String",
            "name": "entitleTypeMess",
            "fieldClass": "java.lang.String",
            "classType": 0
        },
        {
            "fieldClassName": "Double",
            "name": "accrual",
            "fieldClass": "java.lang.Double",
            "classType": 10
        },
        {
            "fieldClassName": "Double",
            "name": "entDays",
            "fieldClass": "java.lang.Double",
            "classType": 10
        },
        {
            "fieldClassName": "Double",
            "name": "netBal",
            "fieldClass": "java.lang.Double",
            "classType": 10
        },
        {
            "fieldClassName": "Double",
            "name": "apvDays",
            "fieldClass": "java.lang.Double",
            "classType": 10
        },
        {
            "fieldClassName": "Double",
            "name": "napvDays",
            "fieldClass": "java.lang.Double",
            "classType": 10
        },
        {
            "fieldClassName": "Double",
            "name": "appDays",
            "fieldClass": "java.lang.Double",
            "classType": 10
        },
        {
            "fieldClassName": "Double",
            "name": "leaveEnt",
            "fieldClass": "java.lang.Double",
            "classType": 10
        },
        {
            "fieldClassName": "Double",
            "name": "balApvDays",
            "fieldClass": "java.lang.Double",
            "classType": 10
        },
        {
            "fieldClassName": "Double",
            "name": "balAppDays",
            "fieldClass": "java.lang.Double",
            "classType": 10
        },
        {
            "fieldClassName": "Double",
            "name": "apvDaysExpiry",
            "fieldClass": "java.lang.Double",
            "classType": 10
        },
        {
            "fieldClassName": "Double",
            "name": "napvDaysExpiry",
            "fieldClass": "java.lang.Double",
            "classType": 10
        },
        {
            "fieldClassName": "Double",
            "name": "appDaysExpiry",
            "fieldClass": "java.lang.Double",
            "classType": 10
        },
        {
            "fieldClassName": "Double",
            "name": "leaveEntExpiry",
            "fieldClass": "java.lang.Double",
            "classType": 10
        },
        {
            "fieldClassName": "Double",
            "name": "balApvDaysExpiry",
            "fieldClass": "java.lang.Double",
            "classType": 10
        },
        {
            "fieldClassName": "Double",
            "name": "balAppDaysExpiry",
            "fieldClass": "java.lang.Double",
            "classType": 10
        },
        {
            "fieldClassName": "Double",
            "name": "balApvDaysFuture",
            "fieldClass": "java.lang.Double",
            "classType": 10
        },
        {
            "fieldClassName": "Double",
            "name": "balAppDaysFuture",
            "fieldClass": "java.lang.Double",
            "classType": 10
        }
    ]
}

# Get Leave Balance Checking Result of Leave Application

Check where there is any over-application in the inputted leave entity.

HTTP Request

GET http://[server]/jsf/rfws/leave/leaveApp/getLeaveBalanceCheckTable

Parameters

Name Type Description
entity `entity Required. The SqlEntity of the Leave Application.
src string System parameter to indicate it is "ESSP" or "HCM"
all boolean indicate all( no matter violation is remind/prohibition or not) default: false
rem boolean indicate remind default:false
prob boolean indicate prohibition default:false
incNoApvLeave boolean indicate whether include non-approved Leave
incNoApvLC boolean indicate if include non-approved Leave Cancellation

Result (in JSON Array)

Name Type Description
size int Size of JsonArray in values
values string Data, depends on Table
name string Name. Empty
fields string Field Details

Sample request:

OkHttpClient client = new OkHttpClient();

String url = "http://" + server + "jsf/rfws/leave/leaveApp/getLeaveBalanceCheckTable"
    + "?entity=" + URLEncoder.encode(leaveApplications, "UTF-8")
    + "&src=" + "HCM"
    + "&all=" + "true"
    + "&rem=" + "false"
    + "&prob=" + "false"
    + "&incNoApvLeave=" + "false"
    + "&incNoApvLC=" + "false";

Request request = new Request.Builder()
  .url(url)
  .get()
  .addHeader("client_id", clientID)
  .addHeader("authorization", "Bearer " + token)
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();

Sample response:

{
    "size": 0,
    "values": [],
    "name": "",
    "fields": []
}

# Get the Leave Circle Check Table for Further Checking

Get the leave circle check table by the SqlEntity of leave application.

HTTP Request

GET http://[server]/jsf/rfws/leave/leaveApp/getLeaveCircleCheckTable

Parameters

Name Type Description
entity entity Required. The SqlEntity of the Leave Application
src string System parameter to indicate it is "ESSP" or "HCM"
all boolean indicate all(remind and prohibition) default:false
rem boolean indicate remind default:false
prob boolean indicate prohibition default:false

Result (in JSON Array)

Name Type Description
size int Size of JsonArray in values
values string Data, depends on Table
name string Name. Empty
fields string Field Details

Sample request:

OkHttpClient client = new OkHttpClient();

String url = "http://" + server + "jsf/rfws/leave/leaveApp/getLeaveCircleCheckTable"
    + "?entity=" + URLEncoder.encode(leaveApplications, "UTF-8")
    + "&src=" + "HCM"
    + "&all=" + "false"
    + "&rem=" + "false"
    + "&prob=" + "true";

Request request = new Request.Builder()
  .url(url)
  .get()
  .addHeader("client_id", clientID)
  .addHeader("authorization", "Bearer " + token)
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();

Sample response:

{
    "size": 0,
    "values": [],
    "name": "",
    "fields": [
        {
            "fieldClassName": "Date",
            "name": "filingDate",
            "fieldClass": "java.util.Date",
            "classType": 21
        },
        {
            "fieldClassName": "Long",
            "name": "leaveCircleId",
            "fieldClass": "java.lang.Long",
            "classType": 10
        },
        {
            "fieldClassName": "String",
            "name": "msg",
            "fieldClass": "java.lang.String",
            "classType": 0
        },
        {
            "fieldClassName": "String",
            "name": "violation",
            "fieldClass": "java.lang.String",
            "classType": 0
        }
    ]
}

Get the list of related leave applications of a leave circle on a particular day.

HTTP Request

GET http://[server]/jsf/rfws/leave/leaveApp/getLeaveCircleAppList

Parameters

Name Type Description
leaveCircleId string The leave circle ID
date string The date to retrieve the setting

Result (in JSON Array)

Name Type Description
size int Size of JsonArray in values
values string Data, depends on Table
name string Name. Empty
fields string Field Details

Sample request:

OkHttpClient client = new OkHttpClient();

String url = "http://" + server + "jsf/rfws/leave/leaveApp/getLeaveCircleAppList"
    + "?leaveCircleId=" + "9"
    + "&date=" + "2017-10-10";

Request request = new Request.Builder()
  .url(url)
  .get()
  .addHeader("client_id", clientID)
  .addHeader("authorization", "Bearer " + token)
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();

Sample response:

{
    "size": 1,
    "values": [
        {
            "empId": 422,
            "code": "SCF01",
            "photoCode": "cl514O31150269219O147",
            "endDate": "2017-10-10 00:00:00",
            "name": "SCF01 N",
            "leaveTypeId": 20,
            "startDate": "2017-10-10 00:00:00"
        }
    ],
    "name": "",
    "fields": [
        {
            "fieldClassName": "Long",
            "name": "empId",
            "fieldClass": "java.lang.Long",
            "classType": 10
        },
        {
            "fieldClassName": "String",
            "name": "code",
            "fieldClass": "java.lang.String",
            "classType": 0
        },
        {
            "fieldClassName": "String",
            "name": "name",
            "fieldClass": "java.lang.String",
            "classType": 0
        },
        {
            "fieldClassName": "String",
            "name": "photoCode",
            "fieldClass": "java.lang.String",
            "classType": 0
        },
        {
            "fieldClassName": "Long",
            "name": "leaveTypeId",
            "fieldClass": "java.lang.Long",
            "classType": 10
        },
        {
            "fieldClassName": "Date",
            "name": "startDate",
            "fieldClass": "java.util.Date",
            "classType": 21
        },
        {
            "fieldClassName": "Date",
            "name": "endDate",
            "fieldClass": "java.util.Date",
            "classType": 21
        }
    ]
}

Get the list of users who share the same leave circle to an employee within a period.

HTTP Request

GET http://[server]/jsf/rfws/leave/leaveApp/getLeaveCircleUser

Parameters

Name Type Description
empId int The employee ID
dateFrom date The date from date for the period required (yyyy-MM-dd)
dateTo date The date to date for the period required (yyyy-MM-dd)

Result (in JSON Array)

Name Type Description
size int Size of JsonArray in values
values string Data, depends on Table
name string Name. Empty
fields string Field Details

Sample request:

OkHttpClient client = new OkHttpClient();

String url = "http://" + server + "jsf/rfws/leave/leaveApp/getLeaveCircleUser"
    + "?empId=" + "1400"
    + "&dateFrom=" + "2017-11-15"
    + "&dateTo=" + "2017-11-15";

Request request = new Request.Builder()
  .url(url)
  .get()
  .addHeader("client_id", clientID)
  .addHeader("authorization", "Bearer " + token)
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();

Sample response:

{
    "size": 1,
    "values": [
        {
            "empId": 1400,
            "accessible": true
        }
    ],
    "name": "",
    "fields": [
        {
            "fieldClassName": "Long",
            "name": "empId",
            "fieldClass": "java.lang.Long",
            "classType": 10
        },
        {
            "fieldClassName": "Long",
            "name": "leaveCircleId",
            "fieldClass": "java.lang.Long",
            "classType": 10
        },
        {
            "fieldClassName": "Boolean",
            "name": "accessible",
            "fieldClass": "java.lang.Boolean",
            "classType": 3
        }
    ]
}

# Get All Entitlement Types

Get the list of entitlement types

HTTP Request

GET http://[server]/jsf/rfws/leave/empLeaveEntInfo/getAllEntitleType

Parameters

Name Type Description
No Parameters needed

Result (in JSON Array)

Name Type Description
size int Size of JsonArray in values
values string Data, depends on Table
name string Name. Empty
fields string Field Details

Sample request:

OkHttpClient client = new OkHttpClient();

String url = "http://" + server + "jsf/rfws/leave/empLeaveEntInfo/getAllEntitleType"
+ "?empId=" + "1400";

Request request = new Request.Builder()
  .url(url)
  .get()
  .addHeader("client_id", clientID)
  .addHeader("authorization", "Bearer " + token)
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();

Sample response:

{
    "size": 29,
    "values": [
        {
            "id": 1
        },
        {
            "id": 2
        },
        {
            "id": 3
        },
        {
            "id": 4
        },
        {
            "id": 7
        },
        {
            "id": 8
        },
        {
            "id": 9
        },
        {
            "id": 13
        },
        {
            "id": 15
        },
        {
            "id": 16
        },
        {
            "id": 17
        },
        {
            "id": 18
        },
        {
            "id": 19
        },
        {
            "id": 20
        },
        {
            "id": 21
        },
        {
            "id": 22
        },
        {
            "id": 23
        },
        {
            "id": 24
        },
        {
            "id": 25
        },
        {
            "id": 26
        },
        {
            "id": 27
        },
        {
            "id": 29
        },
        {
            "id": 30
        },
        {
            "id": 31
        },
        {
            "id": 32
        },
        {
            "id": 33
        },
        {
            "id": 5
        },
        {
            "id": 6
        },
        {
            "id": 14
        }
    ],
    "name": "",
    "fields": [
        {
            "fieldClassName": "Long",
            "name": "id",
            "fieldClass": "java.lang.Long",
            "classType": 10
        }
    ]
}

# Get the List of Un-cancalled Footers of a Leave Application

Get the list of un-cancalled footers of a leave application with leave application ID and leave cancellation ID

HTTP Request

GET http://[server]/jsf/rfws/leave/leaveCancel/getUncancelLeave

Parameters

Name Type Description
id int Leave Application ID
lcid int Excluded Leave Cancellation ID

Result (in JSON Array)

Name Type Description
size int Size of JsonArray in values
values string Data, depends on Table
name string Name. Empty
fields string Field Details

Sample request:

OkHttpClient client = new OkHttpClient();

String url = "http://" + server + "jsf/rfws/leave/leaveCancel/getUncancelLeave"
    + "?id=" + "416"
    + "&lcid=" + "1900-01-01";

Request request = new Request.Builder()
  .url(url)
  .get()
  .addHeader("client_id", clientID)
  .addHeader("authorization", "Bearer " + token)
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();

Sample response:

{
    "size": 1,
    "values": [
        {
            "cancel": true,
            "empId": 200,
            "code": "LEA1710058"
        }
    ],
    "name": "",
    "fields": [
        {
            "fieldClassName": "Long",
            "name": "empId",
            "fieldClass": "java.lang.Long",
            "classType": 10
        },
        {
            "fieldClassName": "String",
            "name": "code",
            "fieldClass": "java.lang.String",
            "classType": 0
        },
        {
            "fieldClassName": "Long",
            "name": "id",
            "fieldClass": "java.lang.Long",
            "classType": 10
        },
        {
            "fieldClassName": "Integer",
            "name": "iRev",
            "fieldClass": "java.lang.Integer",
            "classType": 10
        },
        {
            "fieldClassName": "Long",
            "name": "hId",
            "fieldClass": "java.lang.Long",
            "classType": 10
        },
        {
            "fieldClassName": "String",
            "name": "itemNo",
            "fieldClass": "java.lang.String",
            "classType": 0
        },
        {
            "fieldClassName": "Long",
            "name": "leaveType",
            "fieldClass": "java.lang.Long",
            "classType": 10
        },
        {
            "fieldClassName": "Date",
            "name": "filingDate",
            "fieldClass": "java.util.Date",
            "classType": 21
        },
        {
            "fieldClassName": "String",
            "name": "period",
            "fieldClass": "java.lang.String",
            "classType": 0
        },
        {
            "fieldClassName": "Date",
            "name": "startDate",
            "fieldClass": "java.util.Date",
            "classType": 21
        },
        {
            "fieldClassName": "String",
            "name": "startTime",
            "fieldClass": "java.lang.String",
            "classType": 0
        },
        {
            "fieldClassName": "Date",
            "name": "endDate",
            "fieldClass": "java.util.Date",
            "classType": 21
        },
        {
            "fieldClassName": "String",
            "name": "endTime",
            "fieldClass": "java.lang.String",
            "classType": 0
        },
        {
            "fieldClassName": "Double",
            "name": "days",
            "fieldClass": "java.lang.Double",
            "classType": 10
        },
        {
            "fieldClassName": "Date",
            "name": "specifyDate",
            "fieldClass": "java.util.Date",
            "classType": 21
        },
        {
            "fieldClassName": "Boolean",
            "name": "cancel",
            "fieldClass": "java.lang.Boolean",
            "classType": 3
        },
        {
            "fieldClassName": "String",
            "name": "cancelReason",
            "fieldClass": "java.lang.String",
            "classType": 0
        },
        {
            "fieldClassName": "String",
            "name": "jsonData",
            "fieldClass": "java.lang.String",
            "classType": 0
        },
        {
            "fieldClassName": "Long",
            "name": "leaveCancelId",
            "fieldClass": "java.lang.Long",
            "classType": 10
        },
        {
            "fieldClassName": "Boolean",
            "name": "grant",
            "fieldClass": "java.lang.Boolean",
            "classType": 3
        },
        {
            "fieldClassName": "Long",
            "name": "leaveTypeId",
            "fieldClass": "java.lang.Long",
            "classType": 10
        }
    ]
}

# Get Employee's RD Balance on a day

Get employee's RD balance on a day with employee ID, the date for the RD balance

HTTP Request

GET http://[server]/jsf/rfws/leave/rdBal/getRDBal

Parameters

Name Type Description
empId int The employee ID
asAtDate date Get the Rest Day Balance as at which date

Result (in JSON Array)

Name Type Description
size int Size of JsonArray in values
values string Data, depends on Table
name string Name. Empty
fields string Field Details

Sample request:

OkHttpClient client = new OkHttpClient();

String url = "http://" + server + "jsf/rfws/leave/rdBal/getRDBal"
    + "?empId=" + "424"
    + "&asAtDate=" + "2017-12-31";

Request request = new Request.Builder()
  .url(url)
  .get()
  .addHeader("client_id", clientID)
  .addHeader("authorization", "Bearer " + token)
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();

Sample response:

{
    "size": 1,
    "values": [
        {
            "empId": 424,
            "rdStartDate": "2011-01-01 00:00:00",
            "days": 732
        }
    ],
    "name": "",
    "fields": [
        {
            "fieldClassName": "Long",
            "name": "empId",
            "fieldClass": "java.lang.Long",
            "classType": 10
        },
        {
            "fieldClassName": "Date",
            "name": "rdStartDate",
            "fieldClass": "java.util.Date",
            "classType": 21
        },
        {
            "fieldClassName": "Double",
            "name": "days",
            "fieldClass": "java.lang.Double",
            "classType": 10
        },
        {
            "fieldClassName": "Double",
            "name": "leaveDays",
            "fieldClass": "java.lang.Double",
            "classType": 10
        }
    ]
}

# Return the List of Holiday Entitled in Employee Holiday Info

Return the list of holiday entitled in employee holiday info profile.

HTTP Request

GET http://[server]/jsf/rfws/holiday/batchEmpHolidayEntitle/getUsedHolidayCalendartIdStr

Parameters

Name Type Description
empId int(Query) Required. Employee ID
year int(Query) Required. Year

Result (in JSON Array)

Name Type Description
size int Size of JsonArray in values
values string Data, depends on Table
name string Name. Empty
fields string Field Details

Sample request:

OkHttpClient client = new OkHttpClient();

String url = "http://" + server + "jsf/rfws/holiday/batchEmpHolidayEntitle/getUsedHolidayCalendartIdStr"
    + "?empId=" + "573"
    + "&year=" + "2017";

Request request = new Request.Builder()
  .url(url)
  .get()
  .addHeader("client_id", clientID)
  .addHeader("authorization", "Bearer " + token)
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();

Sample response:

38,39,40,41,42,43

# Get the list of Public Holiday Dates according to employee's holiday category

Get the list of public holiday dates defined in the holiday category in employee profile in certain period.

HTTP Request

GET http://[server]/jsf/rfws/pubhol/holidayCalendar/getPubHldDates

Parameters

Name Type Description
empId int The employee ID
dateFrom date The date from date for the period required (yyyy-MM-dd)
dateTo date The date to date for the period required (yyyy-MM-dd)

Result (in JSON Array)

Name Type Description
size int Size of JsonArray in values
values string Data, depends on Table
name string Name. Empty
fields string Field Details

Sample request:

OkHttpClient client = new OkHttpClient();

String url = "http://" + server + "jsf/rfws/pubhol/holidayCalendar/getPubHldDates"
    + "?empId=" + "424"
    + "&dateFrom=" + "2017-01-01"
    + "&dateTo=" + "2017-12-31";

Request request = new Request.Builder()
  .url(url)
  .get()
  .addHeader("client_id", clientID)
  .addHeader("authorization", "Bearer " + token)
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();

Sample response:

[
    1483200000000,
    1486483200000,
    1486569600000,
    1506787200000,
    1490371200000,
    1494691200000,
    1488729600000
]

Get the list of holiday calendar footer (festival dates) used in employee holiday info.

HTTP Request

GET http://[server]/jsf/rfws/holiday/holidayCalendarHolidayExt/getUsedHolidayCalendarT

Parameters

Name Type Description
id int The holiday category id

Result (in JSON Array)

Name Type Description
size int Size of JsonArray in values
values string Data, depends on Table
name string Name. Empty
fields string Field Details

Sample request:

OkHttpClient client = new OkHttpClient();

String url = "http://" + server + "jsf/rfws/holiday/holidayCalendarHolidayExt/getUsedHolidayCalendarT"
    + "?id=" + "1";

Request request = new Request.Builder()
  .url(url)
  .get()
  .addHeader("client_id", clientID)
  .addHeader("authorization", "Bearer " + token)
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();

Sample response:

{
    "size": 1,
    "values": [
        {
            "holidayCalendartDesc": "CR001_001",
            "holidayCalendartCode": "CR001_001",
            "holidayCategoryId": 2,
            "holidayCalendartDay": 1,
            "holidayCalendartId": 1,
            "holidayCalendartMonth": 1,
            "holidayCalendarId": 1
        }
    ],
    "name": "",
    "fields": [
        {
            "fieldClassName": "Long",
            "name": "holidayCalendarId",
            "fieldClass": "java.lang.Long",
            "classType": 10
        },
        {
            "fieldClassName": "Long",
            "name": "holidayCategoryId",
            "fieldClass": "java.lang.Long",
            "classType": 10
        },
        {
            "fieldClassName": "Long",
            "name": "holidayCalendartId",
            "fieldClass": "java.lang.Long",
            "classType": 10
        },
        {
            "fieldClassName": "String",
            "name": "holidayCalendartCode",
            "fieldClass": "java.lang.String",
            "classType": 0
        },
        {
            "fieldClassName": "String",
            "name": "holidayCalendartDesc",
            "fieldClass": "java.lang.String",
            "classType": 0
        },
        {
            "fieldClassName": "Long",
            "name": "holidayCalendartMonth",
            "fieldClass": "java.lang.Long",
            "classType": 10
        },
        {
            "fieldClassName": "Long",
            "name": "holidayCalendartDay",
            "fieldClass": "java.lang.Long",
            "classType": 10
        }
    ]
}

# Calculate the Holiday Entitlement

Calculate the holiday entitlement with calculation year and the entity of holiday entitlement calculation footer table

HTTP Request

GET http://[server]/jsf/rfws/holiday/holidayEntitle/calculate

Parameters

Name Type Description
calcYear int Required. The year of holiday entitlement calculated
tableJson entity Required. A SqlTable with column "empId" for the list of employees to be enquiry and boolean column "selected" to mark need to be calculated".

Result (in JSON Array)

Name Type Description
size int Size of JsonArray in values
values string Data, depends on Table
name string Name. Empty
fields string Field Details

Sample request:

OkHttpClient client = new OkHttpClient();

String url = "http://" + server + "jsf/rfws/holiday/holidayEntitle/calculate"
    + "?calcYear=" + "2017"
    + "&tableJson=" + URLEncoder.encode(tableJson, "UTF-8");

Request request = new Request.Builder()
  .url(url)
  .get()
  .addHeader("client_id", clientID)
  .addHeader("authorization", "Bearer " + token)
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();

Sample response:


{
    "size": 3,
    "values": [
        {
            "date": "2017-12-01 00:00:00",
            "dayAfter": 12,
            "empId": 604,
            "isPaid": true,
            "year": 2017,
            "dayBefore": 2,
            "holidayCalendartId": 31,
            "holidayTypeId": 1,
            "holidayCalendarId": 25
        },
        {
            "date": "2017-05-06 00:00:00",
            "dayAfter": 12,
            "empId": 604,
            "isPaid": true,
            "year": 2017,
            "dayBefore": 2,
            "holidayCalendartId": 74,
            "holidayTypeId": 4,
            "holidayCalendarId": 25
        },
        {
            "date": "2017-01-03 00:00:00",
            "dayAfter": 12,
            "empId": 604,
            "isPaid": true,
            "year": 2017,
            "dayBefore": 2,
            "holidayCalendartId": 75,
            "holidayTypeId": 1,
            "holidayCalendarId": 25
        }
    ],
    "name": "",
    "fields": [
        {
            "fieldClassName": "Long",
            "name": "empId",
            "fieldClass": "java.lang.Long",
            "classType": 10
        },
        {
            "fieldClassName": "Integer",
            "name": "year",
            "fieldClass": "java.lang.Integer",
            "classType": 10
        },
        {
            "fieldClassName": "Long",
            "name": "holidayCalendarId",
            "fieldClass": "java.lang.Long",
            "classType": 10
        },
        {
            "fieldClassName": "Long",
            "name": "holidayCalendartId",
            "fieldClass": "java.lang.Long",
            "classType": 10
        },
        {
            "fieldClassName": "Date",
            "name": "date",
            "fieldClass": "java.util.Date",
            "classType": 21
        },
        {
            "fieldClassName": "Long",
            "name": "holidayTypeId",
            "fieldClass": "java.lang.Long",
            "classType": 10
        },
        {
            "fieldClassName": "Integer",
            "name": "dayBefore",
            "fieldClass": "java.lang.Integer",
            "classType": 10
        },
        {
            "fieldClassName": "Integer",
            "name": "dayAfter",
            "fieldClass": "java.lang.Integer",
            "classType": 10
        },
        {
            "fieldClassName": "Boolean",
            "name": "isPaid",
            "fieldClass": "java.lang.Boolean",
            "classType": 3
        }
    ]
}

# Check whether the Leave Application Fulfills Leave Type's Requirement (e.g. Minimum Number of Application Days)

Check whether the leave application fulfills leave type's requirement by the SqlEntity of leave application.

HTTP Request

GET http://[server]/jsf/rfws/leave/leaveApp/isLeaveTypeFulfill

Parameters

Name Type Description
leaveappt entity Required. SqlTable of the footer of Leave Application. Table Name like "leaveappt"

Result (in JSON Array)

Name Type Description
String[] string String of error message

Sample request:

OkHttpClient client = new OkHttpClient();

String url = "http://" + server + "jsf/rfws/leave/leaveApp/isLeaveTypeFulfill"
    + "?entity=" + URLEncoder.encode(leaveappt, "UTF-8")

Request request = new Request.Builder()
  .url(url)
  .get()
  .addHeader("client_id", clientID)
  .addHeader("authorization", "Bearer " + token)
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();

Sample response:

(Empty list indicating no errors)

# Check whether the Leave Applications' Specify Date Chronological Order is Same as It's Filing Date Order

Check whether the leave applications'sapplications' specify date chronological order is same as its filing date order by the SqlEntity of leave application.

HTTP Request

GET http://[server]/jsf/rfws/leave/leaveApp/isSpecifyDateOrder

Parameters

Name Type Description
leaveappt entity Required. SqlTable of the footer of Leave Application. Table Name like "leaveApplications"

Result (in JSON Array)

Name Type Description
values boolean Whether the leave application correct

Sample request:

OkHttpClient client = new OkHttpClient();

String url = "http://" + server + "jsf/rfws/leave/leaveApp/isSpecifyDateOrder"
    + "?leaveappt=" + URLEncoder.encode(leaveApplications, "UTF-8");

Request request = new Request.Builder()
  .url(url)
  .get()
  .addHeader("client_id", clientID)
  .addHeader("authorization", "Bearer " + token)
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();

Sample response:

true