Payroll
Version: 1.2 | Release Date: 30/01/2024
# Variable Pay
# Fetch Variable Pay List
# Description
Usage: Fetch Variable Pay List
# API Detail
Request URL
URL http://[server]/jsf/rfws/search/search HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 stSearch String
(Query)Yes Lookup Type. You can find it in Lookup.
(Eg:varpay
......)formatId long
(Query)No Lookup Query ID, If not specified, the default format is used. startRow int
(Query)No Resultset offset : start index endRow int
(Query)No Resultset offset : end index quickSearchStr String
(Query)No Quick search keyword Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&stSearch=").append("varpay"); paramStrBuilder.append("&startRow=").append(0); paramStrBuilder.append("&endRow=").append(10); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Request Sample
{ "stSearch": "varpay", "size": 10, "stSearchDisplay": "Variable Pay", "values": [ { "code": "18051401", "desc__lang": "", "status": "Y", "iRev": 1, "lastModifyDate": "2018-05-14 17:27:12", "varpay.lastModifyUid.simpleUser.desc__lang": "", "id": 7, "st_desc": "18051401", "st_id": 7, "st_code": "18051401" }, {......} ] }
# Create Variable Pay
# Description
Usage: Create Variable Pay
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/varpay HTTP Method PUT Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:varpay
entitYes String
(Body)Yes JSON (Refer to Request Sample) Request Sample
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/varpay"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("varpay"); HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString()); put.addHeader("authorization", access_token); put.addHeader("client_id", ClientID); StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON); entity.setContentEncoding("UTF-8"); put.setEntity(entity); res = client.execute(put); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); if (json != null) { recordId = json.getLongValue("recordId"); } System.out.println(json); } put.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Entity JSON Format:
{ "mainvp": { "values": [ { "code": "test001", "desc": "测试变动科目", "vpcatId": 1 } ] } }
Request Sample
{ "recordId": 41, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "Same Code found(mainvp.code)", "msgCode": "core_101903" } ], "status": false }
# Load Variable Pay
# Description
Usage: Load Variable Pay
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/read/varpay HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:varpay
id long
(Query)Yes Variable Pay ID iRev long
(Query)No Inner Version Request Sample
JSONObject json = null; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/varpay"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("varpay"); paramStrBuilder.append("&id=").append(id); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Request Sample
{ "data": { "mainvp": [ { "ir56macc": "nil", "attachmentNo": 0, "lastModifyUid": 4, "code": "test001", "useAccess": false, "ddesc": "", "expiredDate": -2209017600000, "vpcatId": 3, "iRev": 3, "sysJson": "", "payrollrela": "nil", "viewCode": "varpay", "beId": 0, "ir56bacc": "nil", "ir56Rent": "nil", "expired": false, "leaveType": 0, "incomecate": "nil", "printCount": 0, "useAccessBl": false, "printSequence": 1, "id": 41, "statusModifyDate": 1651908968000, "locked": false, "desc_en": "测试变动科目", "lastModifyDate": 1651909228000, "createUid": 4, "forOneOffSpeAllow": false, "createDate": 1651908968000, "payScaleCat": "--", "desc_zh-CN": "", "lastApproveUid": 4, "mandaitem": false, "expiredUid": 0, "useAccessWl": false, "udfaac": 0, "i18nField": "{\"desc_en\": \"测试变动科目\"}", "desc_zh-TW": "", "showzero": false, "taxrela": "nil", "ir56eacc": "nil", "sysDefault": false, "useAccessAutoCalc": false, "status": "Y", "desc": "测试变动科目" } ] }, "messages": [], "status": true }
{ "data": {}, "messages": [ { "msgDetail": "No data is found, it may be deleted or not authorized for you to access", "msgCode": "core_141019" } ], "status": false }
# Update Variable Pay
# Description
Usage: Update Variable Pay
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/varpay HTTP Method PUT Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:varpay
entitYes String
(Body)Yes JSON (Refer to Request Sample) Request Sample
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/varpay"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("varpay"); HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString()); put.addHeader("authorization", access_token); put.addHeader("client_id", ClientID); StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON); entity.setContentEncoding("UTF-8"); put.setEntity(entity); res = client.execute(put); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); if (json != null) { recordId = json.getLongValue("recordId"); } System.out.println(json); } put.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Entity JSON Format:
{ "mainvp": { "values": [ { "id": 41, "code": "test001", "vpcatId": 3 } ] } }
Request Sample
{ "recordId": 41, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "Invalid Data Found(mainvp.vpcatId)", "msgCode": "core_143009" } ], "status": false }
# Delete Variable Pay
# Description
Usage: Delete Variable Pay
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/delete/varpay HTTP Method DELETE Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:varpay
id long
(Query)Yes Variable Pay ID Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/varpay"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("varpay"); paramStrBuilder.append("&id=").append(id); HttpDelete delete = new HttpDelete(url + "?" + paramStrBuilder.toString()); delete.addHeader("authorization", access_token); delete.addHeader("client_id", ClientID); res = client.execute(delete); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } delete.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Request Sample
{ "messages": [], "status": true }
{ "messages": [ { "msgDetail": "The record was deleted", "msgCode": "core_101017" } ], "status": false }
# Fixed Pay
# Fetch Fixed Pay List
# Description
Usage: Fetch Fixed Pay List
# API Detail
Request URL
URL http://[server]/jsf/rfws/search/search HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 stSearch String
(Query)Yes Lookup Type. You can find it in Lookup.
(Eg:fixpay
......)formatId long
(Query)No Lookup Query ID, If not specified, the default format is used. startRow int
(Query)No Resultset offset : start index endRow int
(Query)No Resultset offset : end index quickSearchStr String
(Query)No Quick search keyword Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&stSearch=").append("fixpay"); paramStrBuilder.append("&startRow=").append(0); paramStrBuilder.append("&endRow=").append(10); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Request Sample
{ "stSearch": "fixpay", "size": 10, "stSearchDisplay": "Fixed Pay", "values": [ { "code": "ADMIN_ACC", "desc__lang": "", "status": "Y", "iRev": 7, "lastModifyDate": "2017-12-01 10:06:34", "fixpay.lastModifyUid.simpleUser.desc__lang": "admin-SC", "id": 11, "st_desc": "(ADMIN_ACC)", "st_id": 11, "st_code": "ADMIN_ACC" }, {......} ] }
# Create Fixed Pay
# Description
Usage: Create Fixed Pay
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/fixpay HTTP Method PUT Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:fixpay
entitYes String
(Body)Yes JSON (Refer to Request Sample) Request Sample
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/fixpay"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("fixpay"); HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString()); put.addHeader("authorization", access_token); put.addHeader("client_id", ClientID); StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON); entity.setContentEncoding("UTF-8"); put.setEntity(entity); res = client.execute(put); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); if (json != null) { recordId = json.getLongValue("recordId"); } System.out.println(json); } put.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Entity JSON Format:
{ "mainfp": { "values": [ { "code": "test001", "desc": "测试固定科目", "fpcatId": 1 } ] } }
Request Sample
{ "recordId": 28, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "Same Code found(mainfp.code)", "msgCode": "core_101903" } ], "status": false }
# Load Fixed Pay
# Description
Usage: Load Fixed Pay
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/read/fixpay HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:fixpay
id long
(Query)Yes Fixed Pay ID iRev long
(Query)No Inner Version Request Sample
JSONObject json = null; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/fixpay"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("fixpay"); paramStrBuilder.append("&id=").append(id); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Request Sample
{ "data": { "mainfp": [ { "ir56macc": "nil", "attachmentNo": 0, "lastModifyUid": 4, "code": "test001", "useAccess": false, "ddesc": "", "expiredDate": -2209017600000, "iRev": 1, "sysJson": "", "payrollrela": "nil", "viewCode": "fixpay", "calcdivide": false, "beId": 0, "ir56bacc": "nil", "ir56Rent": "nil", "expired": false, "leaveType": 0, "incomecate": "nil", "printCount": 0, "useAccessBl": false, "printSequence": 1, "id": 28, "statusModifyDate": 1651909592000, "locked": false, "desc_en": "测试固定科目", "lastModifyDate": 1651909592000, "createUid": 4, "forOneOffSpeAllow": false, "createDate": 1651909592000, "payScaleCat": "--", "desc_zh-CN": "", "period": "pay", "lastApproveUid": 4, "mandaitem": false, "expiredUid": 0, "useAccessWl": false, "i18nField": "{\"desc_en\": \"测试固定科目\"}", "desc_zh-TW": "", "showzero": false, "taxrela": "nil", "fpcatId": 1, "ir56eacc": "nil", "useAccessAutoCalc": false, "status": "Y", "desc": "测试固定科目" } ] }, "messages": [], "status": true }
{ "data": {}, "messages": [ { "msgDetail": "No data is found, it may be deleted or not authorized for you to access", "msgCode": "core_141019" } ], "status": false }
# Update Fixed Pay
# Description
Usage: Update Fixed Pay
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/fixpay HTTP Method PUT Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:fixpay
entitYes String
(Body)Yes JSON (Refer to Request Sample) Request Sample
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/fixpay"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("fixpay"); HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString()); put.addHeader("authorization", access_token); put.addHeader("client_id", ClientID); StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON); entity.setContentEncoding("UTF-8"); put.setEntity(entity); res = client.execute(put); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); if (json != null) { recordId = json.getLongValue("recordId"); } System.out.println(json); } put.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Entity JSON Format:
{ "mainfp": { "values": [ { "id": 28, "code": "test001", "fpcatId": 3 } ] } }
Request Sample
{ "recordId": 28, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "Invalid Data Found(mainfp.fpcatId)", "msgCode": "core_143009" } ], "status": false }
# Delete Fixed Pay
# Description
Usage: Delete Fixed Pay
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/delete/fixpay HTTP Method DELETE Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:fixpay
id long
(Query)Yes Fixed Pay ID Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/fixpay"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("fixpay"); paramStrBuilder.append("&id=").append(id); HttpDelete delete = new HttpDelete(url + "?" + paramStrBuilder.toString()); delete.addHeader("authorization", access_token); delete.addHeader("client_id", ClientID); res = client.execute(delete); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } delete.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Request Sample
{ "messages": [], "status": true }
{ "messages": [ { "msgDetail": "The record was deleted", "msgCode": "core_101017" } ], "status": false }
# Resulting Value
# Fetch Resulting Value List
# Description
Usage: Fetch Resulting Value List
# API Detail
Request URL
URL http://[server]/jsf/rfws/search/search HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 stSearch String
(Query)Yes Lookup Type. You can find it in Lookup.
(Eg:resultvalue
......)formatId long
(Query)No Lookup Query ID, If not specified, the default format is used. startRow int
(Query)No Resultset offset : start index endRow int
(Query)No Resultset offset : end index quickSearchStr String
(Query)No Quick search keyword Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&stSearch=").append("resultvalue"); paramStrBuilder.append("&startRow=").append(0); paramStrBuilder.append("&endRow=").append(10); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Request Sample
{ "stSearch": "resultvalue", "size": 10, "stSearchDisplay": "Resulting Value", "values": [ { "code": "AA", "desc__lang": "AA", "status": "Y", "iRev": 3, "lastModifyDate": "2019-03-25 14:14:49", "resultvalue.lastModifyUid.simpleUser.desc__lang": "admin-SC", "id": 33, "st_desc": "AA", "st_id": 33, "st_code": "AA" }, {......} ] }
# Create Resulting Value
# Description
Usage: Create Resulting Value
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/resultvalue HTTP Method PUT Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:resultvalue
entitYes String
(Body)Yes JSON (Refer to Request Sample) Request Sample
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/resultvalue"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("resultvalue"); HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString()); put.addHeader("authorization", access_token); put.addHeader("client_id", ClientID); StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON); entity.setContentEncoding("UTF-8"); put.setEntity(entity); res = client.execute(put); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); if (json != null) { recordId = json.getLongValue("recordId"); } System.out.println(json); } put.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Entity JSON Format:
{ "mainrv": { "values": [ { "code": "test001", "desc": "测试统计科目", "rvcatId": 1 } ] } }
Request Sample
{ "recordId": 74, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "Same Code found(mainrv.code)", "msgCode": "core_101903" } ], "status": false }
# Load Resulting Value
# Description
Usage: Load Resulting Value
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/read/resultvalue HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:resultvalue
id long
(Query)Yes Resulting Value ID iRev long
(Query)No Inner Version Request Sample
JSONObject json = null; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/resultvalue"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("resultvalue"); paramStrBuilder.append("&id=").append(id); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Request Sample
{ "data": { "mainrv": [ { "ir56macc": "nil", "lastModifyUid": 4, "useAccess": false, "expiredDate": -2209017600000, "sysJson": "", "viewCode": "resultvalue", "beId": 0, "ir56bacc": "nil", "ir56Rent": "nil", "calcOrder": "bmpf", "leaveType": 0, "useAccessBl": false, "printSequence": 1, "id": 74, "locked": false, "lastModifyDate": 1651909763000, "createUid": 4, "forOneOffSpeAllow": false, "payScaleCat": "--", "lastApproveUid": 4, "expiredUid": 0, "transfer": false, "i18nField": "{\"desc_en\": \"测试统计科目\"}", "desc_zh-TW": "", "casualPayRela": "nil", "taxrela": "nil", "status": "Y", "desc": "测试统计科目", "attachmentNo": 0, "code": "test001", "ddesc": "", "iRev": 1, "payrollrela": "nil", "rvcatId": 1, "expired": false, "incomecate": "nil", "printCount": 0, "statusModifyDate": 1651909763000, "desc_en": "测试统计科目", "createDate": 1651909763000, "desc_zh-CN": "", "lspAcType": "nil", "mandaitem": false, "useAccessWl": false, "needCostAmor": false, "showzero": false, "ir56eacc": "nil", "sysDefault": false, "useAccessAutoCalc": false } ] }, "messages": [], "status": true }
{ "data": {}, "messages": [ { "msgDetail": "No data is found, it may be deleted or not authorized for you to access", "msgCode": "core_141019" } ], "status": false }
# Update Resulting Value
# Description
Usage: Update Resulting Value
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/resultvalue HTTP Method PUT Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:resultvalue
entitYes String
(Body)Yes JSON (Refer to Request Sample) Request Sample
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/resultvalue"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("resultvalue"); HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString()); put.addHeader("authorization", access_token); put.addHeader("client_id", ClientID); StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON); entity.setContentEncoding("UTF-8"); put.setEntity(entity); res = client.execute(put); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); if (json != null) { recordId = json.getLongValue("recordId"); } System.out.println(json); } put.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Entity JSON Format:
{ "mainrv": { "values": [ { "id": 74, "code": "test001", "rvcatId": 3 } ] } }
Request Sample
{ "recordId": 74, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "Invalid Data Found(mainrv.rvcatId)", "msgCode": "core_143009" } ], "status": false }
# Delete Resulting Value
# Description
Usage: Delete Resulting Value
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/delete/resultvalue HTTP Method DELETE Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:resultvalue
id long
(Query)Yes Resulting Value ID Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/resultvalue"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("resultvalue"); paramStrBuilder.append("&id=").append(id); HttpDelete delete = new HttpDelete(url + "?" + paramStrBuilder.toString()); delete.addHeader("authorization", access_token); delete.addHeader("client_id", ClientID); res = client.execute(delete); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } delete.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Request Sample
{ "messages": [], "status": true }
{ "messages": [ { "msgDetail": "The record was deleted", "msgCode": "core_101017" } ], "status": false }
# Social Security Item
# Fetch Social Security Item List
# Description
Usage: FetchSocial Security Item List
# API Detail
Request URL
URL http://[server]/jsf/rfws/search/search HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 stSearch String
(Query)Yes Lookup Type. You can find it in Lookup.
(Eg:insurAcc
......)formatId long
(Query)No Lookup Query ID, If not specified, the default format is used. startRow int
(Query)No Resultset offset : start index endRow int
(Query)No Resultset offset : end index quickSearchStr String
(Query)No Quick search keyword Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&stSearch=").append("insurAcc"); paramStrBuilder.append("&startRow=").append(0); paramStrBuilder.append("&endRow=").append(10); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Request Sample
{ "stSearch": "insurAcc", "size": 10, "stSearchDisplay": "Social Security Item", "values": [ { "code": "IA001", "desc__lang": "Insurance Account", "status": "Y", "iRev": 7, "lastModifyDate": "2020-02-21 16:11:43", "insurAcc.lastModifyUid.simpleUser.desc__lang": "admin-SC", "id": 55, "st_desc": "Insurance Account", "st_id": 55, "st_code": "IA001" }, {......} ] }
# Create Social Security Item
# Description
Usage: Create Social Security Item
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/insurAcc HTTP Method PUT Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:insurAcc
entitYes String
(Body)Yes JSON (Refer to Request Sample) Request Sample
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/insurAcc"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("insurAcc"); HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString()); put.addHeader("authorization", access_token); put.addHeader("client_id", ClientID); StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON); entity.setContentEncoding("UTF-8"); put.setEntity(entity); res = client.execute(put); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); if (json != null) { recordId = json.getLongValue("recordId"); } System.out.println(json); } put.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Entity JSON Format:
{ "insuracc": { "values": [ { "code": "test001", "desc": "测试保险科目", "insurAccCat": 3 } ] } }
Request Sample
{ "recordId": 78, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "Same Code found(insuracc.code)", "msgCode": "core_101903" } ], "status": false }
# Load Social Security Item
# Description
Usage: Load Social Security Item
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/read/insurAcc HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:insurAcc
id long
(Query)Yes Social Security Item ID iRev long
(Query)No Inner Version Request Sample
JSONObject json = null; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/insurAcc"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("insurAcc"); paramStrBuilder.append("&id=").append(id); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Request Sample
{ "data": { "insuracc": [ { "attachmentNo": 0, "lastModifyUid": 4, "code": "test002", "useAccess": false, "ddesc": "", "expiredDate": -2209017600000, "iRev": 1, "sysJson": "", "payrollrela": "nil", "viewCode": "insurAcc", "insurPayer": "emp", "beId": 0, "expired": false, "insurAccCat": 3, "incomecate": "nil", "printCount": 0, "useAccessBl": false, "printSequence": 1, "id": 78, "statusModifyDate": 1652250429000, "locked": false, "desc_en": "测试保险科目", "lastModifyDate": 1652250429000, "createUid": 4, "createDate": 1652250429000, "desc_zh-CN": "", "lastApproveUid": 4, "mandaitem": false, "expiredUid": 0, "useAccessWl": false, "i18nField": "{\"desc_en\": \"测试保险科目\"}", "desc_zh-TW": "", "showzero": false, "useAccessAutoCalc": false, "status": "Y", "desc": "测试保险科目" } ] }, "messages": [], "status": true }
{ "data": {}, "messages": [ { "msgDetail": "No data is found, it may be deleted or not authorized for you to access", "msgCode": "core_141019" } ], "status": false }
# Updte Social Security Item
# Description
Usage: Update Social Security Item
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/insurAcc HTTP Method PUT Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:insurAcc
entitYes String
(Body)Yes JSON (Refer to Request Sample) Request Sample
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/insurAcc"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("insurAcc"); HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString()); put.addHeader("authorization", access_token); put.addHeader("client_id", ClientID); StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON); entity.setContentEncoding("UTF-8"); put.setEntity(entity); res = client.execute(put); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); if (json != null) { recordId = json.getLongValue("recordId"); } System.out.println(json); } put.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Entity JSON Format:
{ "insuracc": { "values": [ { "id": 78, "code": "test001", "insurAccCat": 3 } ] } }
Request Sample
{ "recordId": 78, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "Same Code found(insuracc.code)", "msgCode": "core_101903" } ], "status": false }
# Delete Social Security Item
# Description
Usage: Delete Social Security Item
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/delete/insurAcc HTTP Method DELETE Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:insurAcc
id long
(Query)Yes Social Security Item ID Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/insurAcc"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("insurAcc"); paramStrBuilder.append("&id=").append(id); HttpDelete delete = new HttpDelete(url + "?" + paramStrBuilder.toString()); delete.addHeader("authorization", access_token); delete.addHeader("client_id", ClientID); res = client.execute(delete); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } delete.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Request Sample
{ "messages": [], "status": true }
{ "messages": [ { "msgDetail": "The record was deleted", "msgCode": "core_101017" } ], "status": false }
# Claim Record
# Fetch Claim Record List
# Description
Usage: Fetch Claim Record List
# API Detail
Request URL
URL http://[server]/jsf/rfws/search/search HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 stSearch String
(Query)Yes Lookup Type. You can find it in Lookup.
(Eg:myClaim
......)formatId long
(Query)No Lookup Query ID, If not specified, the default format is used. startRow int
(Query)No Resultset offset : start index endRow int
(Query)No Resultset offset : end index quickSearchStr String
(Query)No Quick search keyword Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&stSearch=").append("myClaim"); paramStrBuilder.append("&startRow=").append(0); paramStrBuilder.append("&endRow=").append(10); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Request Sample
{ "stSearch": "myClaim", "size": 10, "stSearchDisplay": "Claim Record", "values": [ { "code": "18060501", "myClaim.empId.employee.code": "18040801", "myClaim.empId.employee.desc": "18040801_en", "iRev": 3, "lastModifyDate": "2018-06-05 15:25:07", "myClaim.lastModifyUid.simpleUser.desc__lang": "", "id": 75, "st_desc": "18060501", "st_id": 75, "st_code": "18060501" }, {......} ] }
# Create Claim Record
# Description
Usage: Create Claim Record
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/myClaim HTTP Method PUT Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:myClaim
entitYes String
(Body)Yes JSON (Refer to Request Sample) Request Sample
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/myClaim"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("myClaim"); HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString()); put.addHeader("authorization", access_token); put.addHeader("client_id", ClientID); StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON); entity.setContentEncoding("UTF-8"); put.setEntity(entity); res = client.execute(put); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); if (json != null) { recordId = json.getLongValue("recordId"); } System.out.println(json); } put.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Entity JSON Format:
{ "myclaim": { "values": [ { "code": "test001", "empId": 49 } ] }, "myclaimt": { "values": [ { "claimTypeId": 1, "currency": 2, "paymentDate": "2022-05-11" } ] } }
Request Sample
{ "recordId": 168, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "Same Code found(myclaim.code)", "msgCode": "core_101903" } ], "status": false }
# Load Claim Record
# Description
Usage: Load Claim Record
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/read/myClaim HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:myClaim
id long
(Query)Yes Claim Record ID iRev long
(Query)No Inner Version Request Sample
JSONObject json = null; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/myClaim"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("myClaim"); paramStrBuilder.append("&id=").append(id); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Request Sample
{ "data": { "myclaimt": [ { "date": -2209017600000, "hId": 168, "amount": 0, "claimTypeId": 1, "iRev": 1, "currency": 2, "id": 220, "itemNo": "", "paymentDate": 1652198400000, "desc": "" } ], "myclaim": [ { "empId": 49, "attachmentNo": 0, "lastModifyUid": 4, "code": "test001", "useAccess": false, "expiredDate": -2209017600000, "iRev": 1, "sysJson": "", "viewCode": "myClaim", "beId": 0, "expired": false, "printCount": 0, "useAccessBl": false, "id": 168, "statusModifyDate": 1652251160000, "locked": false, "lastModifyDate": 1652251160000, "createUid": 4, "createDate": 1652251160000, "lastApproveUid": 0, "expiredUid": 0, "useAccessWl": false, "udftextml": "", "udfvarpay": "", "useAccessAutoCalc": false, "remarks": "", "status": "N" } ] }, "messages": [], "status": true }
{ "data": {}, "messages": [ { "msgDetail": "No data is found, it may be deleted or not authorized for you to access", "msgCode": "core_141019" } ], "status": false }
# Update Claim Record
# Description
Usage: Update Claim Record
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/myClaim HTTP Method PUT Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:myClaim
entitYes String
(Body)Yes JSON (Refer to Request Sample) Request Sample
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/myClaim"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("myClaim"); HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString()); put.addHeader("authorization", access_token); put.addHeader("client_id", ClientID); StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON); entity.setContentEncoding("UTF-8"); put.setEntity(entity); res = client.execute(put); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); if (json != null) { recordId = json.getLongValue("recordId"); } System.out.println(json); } put.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Entity JSON Format:
{ "myclaim": { "values": [ { "id": 78, "code": "test001" } ] } }
Request Sample
{ "recordId": 78, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "Same Code found(myclaim.code)", "msgCode": "core_101903" } ], "status": false }
# Delete Claim Record
# Description
Usage: Delete Claim Record
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/delete/myClaim HTTP Method DELETE Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:myClaim
id long
(Query)Yes Claim Record ID Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/myClaim"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("myClaim"); paramStrBuilder.append("&id=").append(id); HttpDelete delete = new HttpDelete(url + "?" + paramStrBuilder.toString()); delete.addHeader("authorization", access_token); delete.addHeader("client_id", ClientID); res = client.execute(delete); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } delete.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Request Sample
{ "messages": [], "status": true }
{ "messages": [ { "msgDetail": "The record was deleted", "msgCode": "core_101017" } ], "status": false }
# Employee Payroll Info
# Fetch Employee Payroll Info List
# Description
Usage: Fetch Employee Payroll Info List
# API Detail
Request URL
URL http://[server]/jsf/rfws/search/search HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 stSearch String
(Query)Yes Lookup Type. You can find it in Lookup.
(Eg:empPayrollInfo
......)formatId long
(Query)No Lookup Query ID, If not specified, the default format is used. startRow int
(Query)No Resultset offset : start index endRow int
(Query)No Resultset offset : end index quickSearchStr String
(Query)No Quick search keyword Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&stSearch=").append("empPayrollInfo"); paramStrBuilder.append("&startRow=").append(0); paramStrBuilder.append("&endRow=").append(10); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Request Sample
{ "stSearch": "empPayrollInfo", "size": 10, "stSearchDisplay": "Employee Payroll Info", "values": [ { "code": "00002", "empPayrollInfo.empId.employee.desc": "00002", "empPayrollInfo.empId.employee.dept.dept.desc__lang": "SZO", "empPayrollInfo.empId.employee.position.position.desc__lang": "人事部门-简体", "iRev": 10, "lastModifyDate": "2020-06-23 12:20:50", "empPayrollInfo.lastModifyUid.simpleUser.desc__lang": "admin-SC", "id": 33518, "st_desc": "00002", "st_id": 33518, "st_code": "00002" }, {......} ] }
# Create Employee Payroll Info
# Create Employee
# Load Employee Payroll Info
# Description
Usage: Load Employee Payroll Info
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/read/empPayrollInfo HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:empPayrollInfo
id long
(Query)Yes Employee Payroll Info ID iRev long
(Query)No Inner Version Request Sample
JSONObject json = null; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/empPayrollInfo"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("empPayrollInfo"); paramStrBuilder.append("&id=").append(id); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Request Sample
{ "data": { "emppacc": [ { "cur": 1, "udfmltime": "", "allowPtFrom": 0, "udfmlcombo": "", "obsolete": false, "udfmltest": "", "allowPct": 0, "iRev": 2, "itemNo": "", "notPublishToEssp": false, "isAllow": false, "fixPayId": 3, "payUpReasonId": 2, "effDate": 1546272000000, "salaryPt": 0, "udfmlboolean": false, "disabled": false, "id": 453, "udfmldate": -2209017600000, "subFooterRemark": "", "payScaleId": 0, "hId": 168, "amount": 1577, "allowPtTo": 0, "footerRemark": "", "allowPtDiff": 0, "payScaleFooterKey": 0, "amtByPayScale": false, "udfmlnum": 0, "udfmlquery": 0 } ], "emppayrollinfo": [ {......} ] }, "messages": [], "status": true }
{ "data": {}, "messages": [ { "msgDetail": "No data is found, it may be deleted or not authorized for you to access", "msgCode": "core_141019" } ], "status": false }
# Update Employee Payroll Info
# Description
Usage: Update Employee Payroll Info
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/empPayrollInfo HTTP Method PUT Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:empPayrollInfo
entitYes String
(Body)Yes JSON (Refer to Request Sample) Request Sample
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/empPayrollInfo"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("empPayrollInfo"); HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString()); put.addHeader("authorization", access_token); put.addHeader("client_id", ClientID); StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON); entity.setContentEncoding("UTF-8"); put.setEntity(entity); res = client.execute(put); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); if (json != null) { recordId = json.getLongValue("recordId"); } System.out.println(json); } put.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Entity JSON Format:
{ "emppayrollinfo": { "values": [ { "id": 7 } ] }, "empaacc": { "values": [ { "varPayId": 1, "cur": 2, "effDate": "2022-05-11" }] } }
Request Sample
{ "recordId": 7, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "Invalid Data Found(empaacc.cur.1)", "msgCode": "core_143009" } ], "status": false }
# Delete Employee Payroll Info
# Delete Employee
# Employee IR56-related Info
# Fetch Employee IR56-related Info List
# Description
Usage: Fetch Employee IR56-related Info List
# API Detail
Request URL
URL http://[server]/jsf/rfws/search/search HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 stSearch String
(Query)Yes Lookup Type. You can find it in Lookup.
(Eg:empIR56Info
......)formatId long
(Query)No Lookup Query ID, If not specified, the default format is used. startRow int
(Query)No Resultset offset : start index endRow int
(Query)No Resultset offset : end index quickSearchStr String
(Query)No Quick search keyword Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&stSearch=").append("empIR56Info"); paramStrBuilder.append("&startRow=").append(0); paramStrBuilder.append("&endRow=").append(10); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Request Sample
{ "stSearch": "empIR56Info", "size": 9, "stSearchDisplay": "员工IR56相关资料", "values": [ { "code": "BT2017102501", "empIR56Info.empId.employee.code": "BTEST001", "empIR56Info.empId.employee.desc": "迈克尔.乔丹", "effDate": "2017-01-01", "iRev": 5, "lastModifyDate": "2019-01-28 09:48:24", "empIR56Info.lastModifyUid.simpleUser.desc__lang": "BT_SC", "id": 2, "st_desc": "BT2017102501", "st_id": 2, "st_code": "BT2017102501" }, {......} ] }
# Create Employee IR56-related Info
# Description
Usage: Create Employee IR56-related Info
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/empIR56Info HTTP Method PUT Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:empIR56Info
entitYes String
(Body)Yes JSON (Refer to Request Sample) Request Sample
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/empIR56Info"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("empIR56Info"); HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString()); put.addHeader("authorization", access_token); put.addHeader("client_id", ClientID); StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON); entity.setContentEncoding("UTF-8"); put.setEntity(entity); res = client.execute(put); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); if (json != null) { recordId = json.getLongValue("recordId"); } System.out.println(json); } put.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Entity JSON Format:
{ "empir56info": { "values": [ { "code": "test001", "empId": 49, "effDate": "2022-05-11" } ] } }
Request Sample
{ "recordId": 10, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "Exists the same effective date, record cannot be saved!(empir56info.effDate)", "msgCode": "ch01_hklaw_empIR56Info_100001" }, { "msgDetail": "Same Code found(empir56info.code)", "msgCode": "core_101903" } ], "status": false }
# Load Employee IR56-related Info
# Description
Usage: Load Employee IR56-related Info
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/read/empIR56Info HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:empIR56Info
id long
(Query)Yes Employee IR56-related Info ID iRev long
(Query)No Inner Version Request Sample
JSONObject json = null; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/empIR56Info"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("empIR56Info"); paramStrBuilder.append("&id=").append(id); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Request Sample
{ "data": { "empir56info": [ { "returnHK": false, "reason": "", "estAmt": 0, "lastModifyUid": 4, "useAccess": false, "sysJson": "", "viewCode": "empIR56Info", "rentPaidEr1": 0, "beId": 0, "naturePayAfterTerm": "NP", "effDate": 1462464000000, "rentPaidToEr1": 0, "rentPaidToEr2": 0, "departOtherReason": "", "useAccessBl": false, "id": 9, "anyMoneyHeld": false, "lastModifyDate": 1633336030000, "createUid": 4, "overseaCo": "", "overseaAdd": "", "withheldAmt": 0, "prinEr": "", "rentRefundEmp2": 0, "rentRefundEmp1": 0, "lastApproveUid": 4, "placeProByEr": false, "grantDate": -2209017600000, ...... } ] }, "messages": [], "status": true }
{ "data": {}, "messages": [ { "msgDetail": "No data is found, it may be deleted or not authorized for you to access", "msgCode": "core_141019" } ], "status": false }
# Update Employee IR56-related Info
# Description
Usage: Update Employee IR56-related Info
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/empIR56Info HTTP Method PUT Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:empIR56Info
entitYes String
(Body)Yes JSON (Refer to Request Sample) Request Sample
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/empIR56Info"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("empIR56Info"); HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString()); put.addHeader("authorization", access_token); put.addHeader("client_id", ClientID); StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON); entity.setContentEncoding("UTF-8"); put.setEntity(entity); res = client.execute(put); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); if (json != null) { recordId = json.getLongValue("recordId"); } System.out.println(json); } put.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Entity JSON Format:
{ "empir56info": { "values": [ { "id": 10, "code": "test001", "empId": 12, "effDate": "2022-05-12" } ] } }
Request Sample
{ "recordId": 10, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "Approved employee's Employee cannot be changed(empir56info.empId)", "msgCode": "ch01_hklaw_empIR56Info_100002" }, { "msgDetail": "Invalid Data Found(empir56info.empId)", "msgCode": "core_143009" } ], "status": false }
# Delete Employee IR56-related Info
# Description
Usage: Delete Employee IR56-related Info
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/delete/empIR56Info HTTP Method DELETE Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:empIR56Info
id long
(Query)Yes Employee IR56-related Info ID Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/empIR56Info"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("empIR56Info"); paramStrBuilder.append("&id=").append(id); HttpDelete delete = new HttpDelete(url + "?" + paramStrBuilder.toString()); delete.addHeader("authorization", access_token); delete.addHeader("client_id", ClientID); res = client.execute(delete); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } delete.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Request Sample
{ "messages": [], "status": true }
{ "messages": [ { "msgDetail": "The record was deleted", "msgCode": "core_101017" } ], "status": false }
# Salary Adjustment
# Fetch Salary Adjustment List
# Description
Usage: Fetch Salary Adjustment List
# API Detail
Request URL
URL http://[server]/jsf/rfws/search/search HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 stSearch String
(Query)Yes Lookup Type. You can find it in Lookup.
(Eg:salAdj
......)formatId long
(Query)No Lookup Query ID, If not specified, the default format is used. startRow int
(Query)No Resultset offset : start index endRow int
(Query)No Resultset offset : end index quickSearchStr String
(Query)No Quick search keyword Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&stSearch=").append("salAdj"); paramStrBuilder.append("&startRow=").append(0); paramStrBuilder.append("&endRow=").append(10); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Request Sample
{ "stSearch": "salAdj", "size": 8, "stSearchDisplay": "Salary Adjustment", "values": [ { "code": "AA", "desc": "AA", "adjType": "annualPayInc", "status": "Y", "iRev": 1, "lastModifyDate": "2020-12-03 12:46:34", "salAdj.lastModifyUid.simpleUser.desc__lang": "admin-SC", "id": 14, "st_desc": "AA", "st_id": 14, "st_code": "AA" }, {......} ] }
# Create Salary Adjustment
# Description
Usage: Create Salary Adjustment
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/salAdj HTTP Method PUT Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:salAdj
entitYes String
(Body)Yes JSON (Refer to Request Sample) Request Sample
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/salAdj"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("salAdj"); HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString()); put.addHeader("authorization", access_token); put.addHeader("client_id", ClientID); StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON); entity.setContentEncoding("UTF-8"); put.setEntity(entity); res = client.execute(put); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); if (json != null) { recordId = json.getLongValue("recordId"); } System.out.println(json); } put.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Entity JSON Format:
{ "saladj": { "values": [ { "code": "test001", "desc": "description", "pic": 71010 } ] }, "saladjt": { "values": [ { "empId": 49 } ] } }
Request Sample
{ "recordId": 16, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "Salary Adjustment Dscription cannot be duplicated, please modify it.", "msgCode": "ch01_payscale_salAdj_100002" }, { "msgDetail": "Same Code found(saladj.code)", "msgCode": "core_101903" } ], "status": false }
# Load Salary Adjustment
# Description
Usage: Load Salary Adjustment
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/read/salAdj HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:salAdj
id long
(Query)Yes Salary Adjustment ID iRev long
(Query)No Inner Version Request Sample
JSONObject json = null; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/salAdj"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("salAdj"); paramStrBuilder.append("&id=").append(id); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Request Sample
{ "data": { "saladjt": [ { "salPt": 6, "empId": 10197, "aiSusPeriodFrom": -2209017600000, "totalAllowAmt": 0, "minPt": 5, "amt": 0.01, "iRev": 1, "itemNo": " 1", "salAmt": 0, "oneOffSalary": 0, "rank": 1, "id": 11, "incPercent": 100, "hId": 15, "totalSalaryAmt": 0, "maxPt": 14, "barPt": -1, "newSalAmt": 0, "oneOffAllow": 0, "increDay": 0, "updateByIncDate": false, "aiSusPeriodTo": -2209017600000, "increYear": 0, "omitPt": "12.0,13.0", "payScale": 2, "newPt": 9, "incExtPt": 3, "remarks": "", "increMth": 0 } ], "saladj": [ {......} ] }, "messages": [], "status": true }
{ "data": {}, "messages": [ { "msgDetail": "No data is found, it may be deleted or not authorized for you to access", "msgCode": "core_141019" } ], "status": false }
# Update Salary Adjustment
# Description
Usage: Update Salary Adjustment
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/salAdj HTTP Method PUT Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:salAdj
entitYes String
(Body)Yes JSON (Refer to Request Sample) Request Sample
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/salAdj"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("salAdj"); HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString()); put.addHeader("authorization", access_token); put.addHeader("client_id", ClientID); StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON); entity.setContentEncoding("UTF-8"); put.setEntity(entity); res = client.execute(put); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); if (json != null) { recordId = json.getLongValue("recordId"); } System.out.println(json); } put.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Entity JSON Format:
{ "saladj": { "values": [ { "id": 16, "code": "test001", "desc": "description", "adjType": "sal", "effDate": "2022-05-11" } ] } }
Request Sample
{ "recordId": 16, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "Invalid Combo Value(saladj.adjType)", "msgCode": "core_143008" } ], "status": false }
# Delete Salary Adjustment
# Description
Usage: Delete Salary Adjustment
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/delete/salAdj HTTP Method DELETE Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:salAdj
id long
(Query)Yes Salary Adjustment ID Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/salAdj"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("salAdj"); paramStrBuilder.append("&id=").append(id); HttpDelete delete = new HttpDelete(url + "?" + paramStrBuilder.toString()); delete.addHeader("authorization", access_token); delete.addHeader("client_id", ClientID); res = client.execute(delete); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } delete.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Request Sample
{ "messages": [], "status": true }
{ "messages": [ { "msgDetail": "The record was deleted", "msgCode": "core_101017" } ], "status": false }
# Payroll Calculation
# Fetch Payroll Calculation List
# Description
Usage: Fetch Payroll Calculation List
# API Detail
Request URL
URL http://[server]/jsf/rfws/search/search HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 stSearch String
(Query)Yes Lookup Type. You can find it in Lookup.
(Eg:payCalcSet
......)formatId long
(Query)No Lookup Query ID, If not specified, the default format is used. startRow int
(Query)No Resultset offset : start index endRow int
(Query)No Resultset offset : end index quickSearchStr String
(Query)No Quick search keyword Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&stSearch=").append("payCalcSet"); paramStrBuilder.append("&startRow=").append(0); paramStrBuilder.append("&endRow=").append(10); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Request Sample
{ "stSearch": "payCalcSet", "size": 10, "stSearchDisplay": "Payroll Calculation", "values": [ { "code": "1000_201812-02", "desc": "1000_201812", "filingYear": 2019, "filingMth": 1, "payCalcStatus": "calcConfirm", "payCalcSet.pic.employee.code": "SZ0001", "status": "Y", "iRev": 28, "lastModifyDate": "2022-01-06 12:12:09", "payCalcSet.lastModifyUid.simpleUser.desc__lang": "admin-SC", "id": 290, "st_desc": "1000_201812", "st_id": 290, "st_code": "1000_201812-02" }, {......} ] }
# Create Payroll Calculation
# Description
Usage: Create Payroll Calculation
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/payCalcSet HTTP Method PUT Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:payCalcSet
entitYes String
(Body)Yes JSON (Refer to Request Sample) Request Sample
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/payCalcSet"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("payCalcSet"); HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString()); put.addHeader("authorization", access_token); put.addHeader("client_id", ClientID); StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON); entity.setContentEncoding("UTF-8"); put.setEntity(entity); res = client.execute(put); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); if (json != null) { recordId = json.getLongValue("recordId"); } System.out.println(json); } put.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Entity JSON Format:
{ "paycalcset": { "values": [ { "code": "test001", "desc": "description", "payPeriodStart": "2022-05-01", "payPeriodEnd": "2022-05-31", "attPeriodStart": "2022-05-01", "attPeriodEnd": "2022-05-31", "filingYear": 2022, "pic": 49, "cur": 1 } ] } }
Request Sample
{ "recordId": 525, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "Same Code found(paycalcset.code)", "msgCode": "core_101903" } ], "status": false }
# Load Payroll Calculation
# Description
Usage: Load Payroll Calculation
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/read/payCalcSet HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:payCalcSet
id long
(Query)Yes Payroll Calculation ID iRev long
(Query)No Inner Version Request Sample
JSONObject json = null; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/payCalcSet"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("payCalcSet"); paramStrBuilder.append("&id=").append(id); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Request Sample
{ "data": { "paycalcsett": [ { "empId": 14979, "hId": 524, "payCalcRemark": "", "paySlipRemark": "", "iRev": 2, "itemNo": " 1", "dept": 2255, "payrollFormula": 0, "beId": 0, "insur": 0, "salaryTax": 0, "finalPay": false, "id": 94705, "position": 48, "isCalc": false }, {......} ], "paycalcset": [ {......} ], "paycalcsetemphistinfo": [ { "empId": 14979, "mpfAdjustedDate": -2209017600000, "hId": 524, "mpfTrusteeId": 0, "deptId": 2255, "iRev": 2, "itemNo": "", "mpfTypeId": 0, "mpfAdjustedBy": 0, "beId": 2028, "memberNo": "", "positionId": 48, "mpfFirstDate": -2209017600000, "mpfEffDate": -2209017600000, "mpfAdjusted": false, "id": 108583 }, {......} ] }, "messages": [], "status": true }
{ "data": {}, "messages": [ { "msgDetail": "No data is found, it may be deleted or not authorized for you to access", "msgCode": "core_141019" } ], "status": false }
# Update Payroll Calculation
# Description
Usage: Update Payroll Calculation
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/payCalcSet HTTP Method PUT Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:payCalcSet
entitYes String
(Body)Yes JSON (Refer to Request Sample) Request Sample
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/payCalcSet"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("payCalcSet"); HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString()); put.addHeader("authorization", access_token); put.addHeader("client_id", ClientID); StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON); entity.setContentEncoding("UTF-8"); put.setEntity(entity); res = client.execute(put); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); if (json != null) { recordId = json.getLongValue("recordId"); } System.out.println(json); } put.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Entity JSON Format:
{ "paycalcset": { "values": [ { "id": 525, "code": "test001", "desc": "description", "filingYear": "year", "calcDate": "2022-05-11" } ] }, "paycalcsett": { "values": [ { "empId": 49 } ] } }
Request Sample
{ "recordId": 525, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "Wrong number format(paycalcset.filingYear)", "msgCode": "core_143006" }, { "msgDetail": "Required field is empty(paycalcset.filingYear)", "msgCode": "core_101905" } ], "status": false }
# Delete Payroll Calculation
# Description
Usage: Delete Payroll Calculation
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/delete/payCalcSet HTTP Method DELETE Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:payCalcSet
id long
(Query)Yes Payroll Calculation ID Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/payCalcSet"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("payCalcSet"); paramStrBuilder.append("&id=").append(id); HttpDelete delete = new HttpDelete(url + "?" + paramStrBuilder.toString()); delete.addHeader("authorization", access_token); delete.addHeader("client_id", ClientID); res = client.execute(delete); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } delete.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Request Sample
{ "messages": [], "status": true }
{ "messages": [ { "msgDetail": "The record was deleted", "msgCode": "core_101017" } ], "status": false }
# Back Pay
# Fetch Back Pay List
# Description
Usage: Fetch Back Pay List
# API Detail
Request URL
URL http://[server]/jsf/rfws/search/search HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 stSearch String
(Query)Yes Lookup Type. You can find it in Lookup.
(Eg:backPay
......)formatId long
(Query)No Lookup Query ID, If not specified, the default format is used. startRow int
(Query)No Resultset offset : start index endRow int
(Query)No Resultset offset : end index quickSearchStr String
(Query)No Quick search keyword Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&stSearch=").append("backPay"); paramStrBuilder.append("&startRow=").append(0); paramStrBuilder.append("&endRow=").append(10); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Request Sample
{ "stSearch": "backPay", "size": 10, "stSearchDisplay": "Back Pay", "values": [ { "code": "1000_201812", "desc": "1000_201812", "backPayStatus": "setConfirm", "backPay.pic.employee.code": "SZ0001", "status": "Y", "iRev": 2, "lastModifyDate": "2021-04-06 18:13:48", "backPay.lastModifyUid.simpleUser.desc__lang": "admin-SC", "id": 82, "st_desc": "1000_201812", "st_id": 82, "st_code": "1000_201812" }, {......} ] }
# Create Back Pay
# Description
Usage: Create Back Pay
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/backPay HTTP Method PUT Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:backPay
entitYes String
(Body)Yes JSON (Refer to Request Sample) Request Sample
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/backPay"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("backPay"); HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString()); put.addHeader("authorization", access_token); put.addHeader("client_id", ClientID); StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON); entity.setContentEncoding("UTF-8"); put.setEntity(entity); res = client.execute(put); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); if (json != null) { recordId = json.getLongValue("recordId"); } System.out.println(json); } put.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Entity JSON Format:
{ "backpay": { "values": [ { "code": "test001", "desc": "description", "pic": 49 } ] } }
Request Sample
{ "recordId": 90, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "Same Code found(backpay.code)", "msgCode": "core_101903" } ], "status": false }
# Load Back Pay
# Description
Usage: Load Back Pay
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/read/backPay HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:backPay
id long
(Query)Yes Back Pay ID iRev long
(Query)No Inner Version Request Sample
JSONObject json = null; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/backPay"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("backPay"); paramStrBuilder.append("&id=").append(id); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Request Sample
{ "data": { "backpay": [ { "attachmentNo": 0, "lastModifyUid": 4, "code": "test001", "useAccess": false, "backPayStatus": "open", "iRev": 1, "sysJson": "", "pic": 49, "viewCode": "backPay", "notPublishToEssp": false, "beId": 0, "isConfirm": false, "paymentId": 0, "printCount": 0, "useAccessBl": false, "id": 90, "statusModifyDate": 1652260630000, "lastModifyDate": 1652260630000, "createUid": 4, "createDate": 1652260630000, "lastApproveUid": 4, "useAccessWl": false, "paymentDate": -2209017600000, "useAccessAutoCalc": false, "remarks": "", "status": "Y", "desc": "description" } ] }, "messages": [], "status": true }
{ "data": {}, "messages": [ { "msgDetail": "No data is found, it may be deleted or not authorized for you to access", "msgCode": "core_141019" } ], "status": false }
# Update Back Pay
# Description
Usage: Update Back Pay
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/backPay HTTP Method PUT Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:backPay
entitYes String
(Body)Yes JSON (Refer to Request Sample) Request Sample
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/backPay"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("backPay"); HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString()); put.addHeader("authorization", access_token); put.addHeader("client_id", ClientID); StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON); entity.setContentEncoding("UTF-8"); put.setEntity(entity); res = client.execute(put); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); if (json != null) { recordId = json.getLongValue("recordId"); } System.out.println(json); } put.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Entity JSON Format:
{ "backpay": { "values": [ { "id": 90 } ] }, "backpayt": { "values": [ { "payCalcSetId": 478 } ] } }
Request Sample
{ "recordId": 90, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "Invalid Data Found(backpayt.payCalcSetId.1)", "msgCode": "core_143009" } ], "status": false }
# Delete Back Pay
# Description
Usage: Delete Back Pay
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/delete/backPay HTTP Method DELETE Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:backPay
id long
(Query)Yes Back Pay ID Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/backPay"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("backPay"); paramStrBuilder.append("&id=").append(id); HttpDelete delete = new HttpDelete(url + "?" + paramStrBuilder.toString()); delete.addHeader("authorization", access_token); delete.addHeader("client_id", ClientID); res = client.execute(delete); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } delete.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Request Sample
{ "messages": [], "status": true }
{ "messages": [ { "msgDetail": "The record was deleted", "msgCode": "core_101017" } ], "status": false }
# Salary Payment
# Fetch Salary Payment List
# Description
Usage: Fetch Salary Payment List
# API Detail
Request URL
URL http://[server]/jsf/rfws/search/search HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 stSearch String
(Query)Yes Lookup Type. You can find it in Lookup.
(Eg:payment
......)formatId long
(Query)No Lookup Query ID, If not specified, the default format is used. startRow int
(Query)No Resultset offset : start index endRow int
(Query)No Resultset offset : end index quickSearchStr String
(Query)No Quick search keyword Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&stSearch=").append("payment"); paramStrBuilder.append("&startRow=").append(0); paramStrBuilder.append("&endRow=").append(10); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Request Sample
{ "stSearch": "payment", "size": 10, "stSearchDisplay": "Salary Payment", "values": [ { "code": "1", "desc": "2", "paymentDate": "2018-06-01", "paymentStatus": "transfer", "payment.pic.employee.code": "CTEST01", "status": "Y", "iRev": 20, "lastModifyDate": "2019-06-06 17:12:26", "payment.lastModifyUid.simpleUser.desc__lang": "", "id": 14, "st_desc": "2", "st_id": 14, "st_code": "1" }, {......} ] }
# Create Salary Payment
# Description
Usage: Create Salary Payment
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/payment HTTP Method PUT Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:payment
entitYes String
(Body)Yes JSON (Refer to Request Sample) Request Sample
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/payment"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("payment"); HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString()); put.addHeader("authorization", access_token); put.addHeader("client_id", ClientID); StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON); entity.setContentEncoding("UTF-8"); put.setEntity(entity); res = client.execute(put); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); if (json != null) { recordId = json.getLongValue("recordId"); } System.out.println(json); } put.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Entity JSON Format:
{ "payment": { "values": [ { "code": "test001", "desc": "description", "paymentDate": "2022-05-11", "pic": 49 } ] } }
Request Sample
{ "recordId": 115, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "Same Code found(payment.code)", "msgCode": "core_101903" } ], "status": false }
# Load Salary Payment
# Description
Usage: Load Salary Payment
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/read/payment HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:payment
id long
(Query)Yes Salary Payment ID iRev long
(Query)No Inner Version Request Sample
JSONObject json = null; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/payment"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("payment"); paramStrBuilder.append("&id=").append(id); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Request Sample
{ "data": { "paymentemp": [ { "empId": 14657, "cur": 6, "hId": 100, "payCalcSetId": 447, "backPayId": 0, "amt": 89000, "iRev": 5, "itemNo": "", "bankAcc": "SZ0001", "beId": 5164, "reference": "", "bank": 2, "payMethod": "autopay", "tranDate": -2209017600000, "id": 1524, "remarks": "" }, { "empId": 14649, "cur": 6, "hId": 100, "payCalcSetId": 447, "backPayId": 0, "amt": 89000, "iRev": 5, "itemNo": "", "bankAcc": "SZ0002", "beId": 2028, "reference": "", "bank": 2, "payMethod": "autopay", "tranDate": -2209017600000, "id": 1525, "remarks": "" } ], "paymentt": [ { "hId": 100, "payCalcSetId": 447, "backPayId": 0, "iRev": 5, "id": 137, "itemNo": " 1", "payCode": "MLSZ0002-2010", "remarks": "", "backpay": false } ], "payment": [ {......} ] }, "messages": [], "status": true }
{ "data": {}, "messages": [ { "msgDetail": "No data is found, it may be deleted or not authorized for you to access", "msgCode": "core_141019" } ], "status": false }
# Update Salary Payment
# Description
Usage: Update Salary Payment
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/payment HTTP Method PUT Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:payment
entitYes String
(Body)Yes JSON (Refer to Request Sample) Request Sample
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/payment"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("payment"); HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString()); put.addHeader("authorization", access_token); put.addHeader("client_id", ClientID); StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON); entity.setContentEncoding("UTF-8"); put.setEntity(entity); res = client.execute(put); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); if (json != null) { recordId = json.getLongValue("recordId"); } System.out.println(json); } put.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Entity JSON Format:
{ "payment": { "values": [ { "id": 100 } ] }, "paymentt": { "values": [ { "payCode": 1 } ] } }
Request Sample
{ "recordId": 100, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "Null Data Exception", "msgCode": "core_130001" } ], "status": false }
# Delete Salary Payment
# Description
Usage: Delete Salary Payment
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/delete/payment HTTP Method DELETE Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:payment
id long
(Query)Yes Salary Payment ID Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/payment"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("payment"); paramStrBuilder.append("&id=").append(id); HttpDelete delete = new HttpDelete(url + "?" + paramStrBuilder.toString()); delete.addHeader("authorization", access_token); delete.addHeader("client_id", ClientID); res = client.execute(delete); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } delete.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Request Sample
{ "messages": [], "status": true }
{ "messages": [ { "msgDetail": "The record was deleted", "msgCode": "core_101017" } ], "status": false }
# Social Security Info
# Fetch Social Security Info List
# Description
Usage: Fetch Social Security Info List
# API Detail
Request URL
URL http://[server]/jsf/rfws/search/search HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 stSearch String
(Query)Yes Lookup Type. You can find it in Lookup.
(Eg:insur
......)formatId long
(Query)No Lookup Query ID, If not specified, the default format is used. startRow int
(Query)No Resultset offset : start index endRow int
(Query)No Resultset offset : end index quickSearchStr String
(Query)No Quick search keyword Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/search/search"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&stSearch=").append("insur"); paramStrBuilder.append("&startRow=").append(0); paramStrBuilder.append("&endRow=").append(10); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Request Sample
{ "stSearch": "insur", "size": 10, "stSearchDisplay": "Social Security Info", "values": [ { "code": "INSUR00001", "desc__lang": "北京 - 本地城镇", "status": "Y", "iRev": 2, "lastModifyDate": "2017-06-15 15:55:12", "insur.lastModifyUid.simpleUser.desc__lang": "", "id": 3, "st_desc": "北京 - 本地城镇", "st_id": 3, "st_code": "INSUR00001" }, {......} ] }
# Create Social Security Info
# Description
Usage: Create Social Security Info
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/insur HTTP Method PUT Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:insur
entitYes String
(Body)Yes JSON (Refer to Request Sample) Request Sample
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/insur"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("insur"); HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString()); put.addHeader("authorization", access_token); put.addHeader("client_id", ClientID); StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON); entity.setContentEncoding("UTF-8"); put.setEntity(entity); res = client.execute(put); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); if (json != null) { recordId = json.getLongValue("recordId"); } System.out.println(json); } put.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Entity JSON Format:
{ "insur": { "values": [ { "code": "test001", "desc": "Social Security Info" } ] } }
Request Sample
{ "recordId": 135, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "<Social Security District> + <Social Security Identity> +<Effective Date> cannot be duplicated, please modify it(insur.insurDistrict,insur.insurIdentity,insur.effDate)", "msgCode": "ch01_insur_insur_100002" }, { "msgDetail": "Same Code found(insur.code)", "msgCode": "core_101903" } ], "status": false }
# Load Social Security Info
# Description
Usage: Load Social Security Info
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/read/insur HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:insur
id long
(Query)Yes Social Security Info ID iRev long
(Query)No Inner Version Request Sample
JSONObject json = null; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/read/insur"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("insur"); paramStrBuilder.append("&id=").append(id); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Request Sample
{ "data": { "insur": [ { "attachmentNo": 0, "lastModifyUid": 4, "code": "test001", "useAccess": false, "expiredDate": -2209017600000, "iRev": 1, "sysJson": "", "viewCode": "insur", "beId": 0, "effDate": -2209017600000, "expired": false, "insurDistrict": 0, "printCount": 0, "useAccessBl": false, "id": 135, "statusModifyDate": 1652263652000, "locked": false, "desc_en": "Social Security Info", "lastModifyDate": 1652263652000, "createUid": 4, "createDate": 1652263652000, "desc_zh-CN": "", "lastApproveUid": 4, "udflevel": "", "expiredUid": 0, "useAccessWl": false, "insurIdentity": 0, "i18nField": "{\"desc_en\": \"Social Security Info\"}", "desc_zh-TW": "", "useAccessAutoCalc": false, "status": "Y", "desc": "Social Security Info" } ] }, "messages": [], "status": true }
{ "data": {}, "messages": [ { "msgDetail": "No data is found, it may be deleted or not authorized for you to access", "msgCode": "core_141019" } ], "status": false }
# Update Social Security Info
# Description
Usage: Update Social Security Info
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/save/insur HTTP Method PUT Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:insur
entitYes String
(Body)Yes JSON (Refer to Request Sample) Request Sample
long recordId = 0; CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/save/insur"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("insur"); HttpPut put = new HttpPut(url + "?" + paramStrBuilder.toString()); put.addHeader("authorization", access_token); put.addHeader("client_id", ClientID); StringEntity entity = new StringEntity(data.toJSONString(), ContentType.APPLICATION_JSON); entity.setContentEncoding("UTF-8"); put.setEntity(entity); res = client.execute(put); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); if (json != null) { recordId = json.getLongValue("recordId"); } System.out.println(json); } put.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Entity JSON Format:
{ "insur": { "values": [ { "id": 135, "effDate": "2022-05-11", "insurDistrict": 2 } ] }, "insurt": { "values": [ { "insurAcc": 41 } ] } }
Request Sample
{ "recordId": 135, "messages": [], "status": true }
{ "recordId": 0, "messages": [ { "msgDetail": "Invalid Data Found(insur.insurDistrict)", "msgCode": "core_143009" } ], "status": false }
# Delete Social Security Info
# Description
Usage: Delete Social Security Info
# API Detail
Request URL
URL http://[server]/jsf/rfws/root/api/delete/insur HTTP Method DELETE Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 menuCode String
(Query)Yes In Data Dictionary
Eg:insur
id long
(Query)Yes Social Security Info ID Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/root/api/delete/insur"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&menuCode=").append("insur"); paramStrBuilder.append("&id=").append(id); HttpDelete delete = new HttpDelete(url + "?" + paramStrBuilder.toString()); delete.addHeader("authorization", access_token); delete.addHeader("client_id", ClientID); res = client.execute(delete); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } delete.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Request Sample
{ "messages": [], "status": true }
{ "messages": [ { "msgDetail": "The record was deleted", "msgCode": "core_101017" } ], "status": false }
# Load EBI data
# Employee Fixed Pay Listing
# Description
Usage: Run EBI [Employee Fixed Pay Listing], return EBI data
# API Detail
Request URL
URL http://[server]/jsf/rfws/ebiWidget/loadReport HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 formatId long
(Query)Yes Format ID fetched from another API offset int
(Query)No Resultset offset : start index rows int
(Query)No Resultset offset : end index Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&formatId=").append(formatId); paramStrBuilder.append("&offset=").append(0); paramStrBuilder.append("&rows=").append(10); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Request Sample
{ "size": 10, "rows": [ { "E_A_code": "SZ0003", "aiM18ReservedCol_dataIndex": 1, "VP_C_code": "F1", "VP_A_effDate": "2017/01/01", "VP_C_id": "3", "MAIN_latest": "否", "E_A_id": "14668", "MAIN_isCurEffect": "否" } ] }
# Employee Variable Pay Listing
# Description
Usage: Run EBI [Employee Variable Pay Listing], return EBI data
# API Detail
Request URL
URL http://[server]/jsf/rfws/ebiWidget/loadReport HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 formatId long
(Query)Yes Format ID fetched from another API offset int
(Query)No Resultset offset : start index rows int
(Query)No Resultset offset : end index Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&formatId=").append(formatId); paramStrBuilder.append("&offset=").append(0); paramStrBuilder.append("&rows=").append(10); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Request Sample
{ "size": 10, "rows": [ { "E_A_code": "BTEST001", "aiM18ReservedCol_dataIndex": 1, "VP_A_effDate": "1901/01/01", "VP_C_code": "VP001", "VP_B_sym": "A货币", "VP_A_amount": "677.0000", "VP_C_id": "1", "E_A_id": "10127" } ] }
# Payroll Resulting Value Report
# Description
Usage: Run EBI [Payroll Resulting Value Report], return EBI data
# API Detail
Request URL
URL http://[server]/jsf/rfws/ebiWidget/loadReport HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 formatId long
(Query)Yes Format ID fetched from another API offset int
(Query)No Resultset offset : start index rows int
(Query)No Resultset offset : end index Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&formatId=").append(formatId); paramStrBuilder.append("&offset=").append(0); paramStrBuilder.append("&rows=").append(10); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Request Sample
{ "size": 10, "rows": [ { "E_A_code": "CTESTHK01", "PCR_C_id": "478", "PCR_C_code": "CTESTHK2022", "MAIN_cur": "HKD", "aiM18ReservedCol_dataIndex": 1, "E_A_id": "72474", "MAIN_amt": "29,400.00" } ] }
# Employee Payroll Parameter Listing
# Description
Usage: Run EBI [Employee Payroll Parameter Listing], return EBI data
# API Detail
Request URL
URL http://[server]/jsf/rfws/ebiWidget/loadReport HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 formatId long
(Query)Yes Format ID fetched from another API offset int
(Query)No Resultset offset : start index rows int
(Query)No Resultset offset : end index Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&formatId=").append(formatId); paramStrBuilder.append("&offset=").append(0); paramStrBuilder.append("&rows=").append(10); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Request Sample
{ "size": 10, "rows": [ { "T3_B_code": "PAYPAR2", "T3_B_id": "1", "aiM18ReservedCol_dataIndex": 1, "T1_A_id": "70363", "T3_A_effDate": "2017/03/01", "MAIN_isCurEffect": "否", "T1_A_code": "17080801" } ] }
# Payroll Data Warehouse
# Description
Usage: Run EBI [Payroll Data Warehouse], return EBI data
# API Detail
Request URL
URL http://[server]/jsf/rfws/ebiWidget/loadReport HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 formatId long
(Query)Yes Format ID fetched from another API offset int
(Query)No Resultset offset : start index rows int
(Query)No Resultset offset : end index Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&formatId=").append(formatId); paramStrBuilder.append("&offset=").append(0); paramStrBuilder.append("&rows=").append(10); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Request Sample
{ "size": 10, "rows": [ { "E_A_code": "SZ0001", "MAIN_PAYROLLX_cur": "HKD", "P_C_code": "MLT001", "aiM18ReservedCol_dataIndex": 1, "P_C_filingYear": "2017", "P_C_id": "2", "P_C_filingMth": "7月", "MAIN_PAYROLLX_desc": "", "E_A_id": "14657", "MAIN_PAYROLLX_amt": "35,000.00", "MAIN_PAYROLLX_repCurAmt": "0.00" } ] }
# Final Payment Report
# Description
Usage: Run EBI [Final Payment Report], return EBI data
# API Detail
Request URL
URL http://[server]/jsf/rfws/ebiWidget/loadReport HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 formatId long
(Query)Yes Format ID fetched from another API offset int
(Query)No Resultset offset : start index rows int
(Query)No Resultset offset : end index Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&formatId=").append(formatId); paramStrBuilder.append("&offset=").append(0); paramStrBuilder.append("&rows=").append(10); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Request Sample
{ "size": 10, "rows": [ { "MAIN_amt_cur": "0.00", "aiM18ReservedCol_dataIndex": 1, "MAIN_calcDate": "2018/03/22" } ] }
# Employee Cost Allocation Setup Report
# Description
Usage: Run EBI [Employee Cost Allocation Setup Report], return EBI data
# API Detail
Request URL
URL http://[server]/jsf/rfws/ebiWidget/loadReport HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 formatId long
(Query)Yes Format ID fetched from another API offset int
(Query)No Resultset offset : start index rows int
(Query)No Resultset offset : end index Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&formatId=").append(formatId); paramStrBuilder.append("&offset=").append(0); paramStrBuilder.append("&rows=").append(10); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Request Sample
{ "size": 10, "rows": [ { "MAIN_effDate": "2017/01/01", "MAIN_residue": "是", "aiM18ReservedCol_dataIndex": 1, "MAIN_absCeil": "0.00", "MAIN_udfresult29": "0.00", "T1_A_id": "10127", "T2_A_id": "0", "T1_A_code": "BTEST001", "T2_A_code": "" } ] }
# Payroll Amortization Report
# Description
Usage: Run EBI [Payroll Amortization Report], return EBI data
# API Detail
Request URL
URL http://[server]/jsf/rfws/ebiWidget/loadReport HTTP Method GET Encode UTF-8 URL Parameters
Parameter Type Required Remarks authorization String
(Header)Yes Access Token obtained via Oauth2 client_id String
(Header)Yes Client ID from [OAuth Applications], generated by the aiM18 formatId long
(Query)Yes Format ID fetched from another API offset int
(Query)No Resultset offset : start index rows int
(Query)No Resultset offset : end index Request Sample
CloseableHttpClient client = HttpClientBuilder.create().build(); CloseableHttpResponse res = null; try { String url = "http://" + HostIP + ":" + HostPort + "/jsf/rfws/ebiWidget/loadReport"; StringBuilder paramStrBuilder = new StringBuilder(); paramStrBuilder.append("&formatId=").append(formatId); paramStrBuilder.append("&offset=").append(0); paramStrBuilder.append("&rows=").append(10); HttpGet get = new HttpGet(url + "?" + paramStrBuilder.toString()); get.addHeader("authorization", access_token); get.addHeader("client_id", ClientID); res = client.execute(get); if (res.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { JSONObject json = JSON.parseObject(EntityUtils.toString(res.getEntity())); System.out.println(json); } get.releaseConnection(); } catch (Exception e) { e.printStackTrace(); } finally { try { if (res != null) { res.close(); } if (client != null) { client.close(); } } catch (Exception ex) { ex.printStackTrace(); } }
Request Sample
{ "size": 10, "rows": [ { "T2_C_id": "2310",