# M18 HCM Web Services

?Version: 1.01 | Release Date: 12/2/2019

# Organization And Personnel Management

# Get Employee's Length of Notice Required Period as at Termination Effective Date

HTTP Request

GET http://[server]/jsf/rfws/emp/termination/getEmpNoticeRequired

Parameters

Name Type Description
empId String(Query) Required. ID of terminated Employee
applyDate String(Query) Required. Date String of Employee Termination Effective Date

Result (in JSON Array)

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

Sample request:

OkHttpClient client = new OkHttpClient();

String url = "http://" + server + "/jsf/rfws/emp/termination/getEmpNoticeRequired?empId=" + empId & applyDate=" + applyDate;

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

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



Sample response: { "size": 1, "values": [ { "id": 809, "code": "CR-L101", "joinDate": "2012-10-01 00:00:00", "noticeReqLenght": 99, "noticeReqUnit": "mth" } ], "name": "", "fields": [ { "name": "id", "classType": 10, "fieldClassName": "Long", "fieldClass": "java.lang.Long" }, { "name": "code", "classType": 0, "fieldClassName": "String", "fieldClass": "java.lang.String" }, { "name": "joinDate", "classType": 21, "fieldClassName": "Date", "fieldClass": "java.util.Date" }, { "name": "noticeReqLenght", "classType": 10, "fieldClassName": "Integer", "fieldClass": "java.lang.Integer" }, { "name": "noticeReqUnit", "classType": 0, "fieldClassName": "String", "fieldClass": "java.lang.String" } ] }


### Get records by corresponding AUL Type and description



**HTTP Request** 
`GET http://[server]/jsf/rfws/core/auldata/getAulData` 


**Parameters**

| Name    | Type              | Description                                                      |
| ------- | ----------------- | ---------------------------------------------------------------- |
| pattern   | `String`(*Query*) | **Required.** Lookup Type of AUL field                          |
| aulDesc | `String`(*Query*) | **Required.** Description of AUL field |



**Result (in JSON Array)**

| Name   | Type     | Description                 |
| ------ | -------- | --------------------------- |
| id   | `Long`    | id  |
| code | `string` | code of the record |
| desc   | `string` | description of the record|

> Sample request:

```java
OkHttpClient client = new OkHttpClient();

String url = "http://" + server + "/jsf/rfws/core/auldata/getAulData?pattern=aulTag&aulDesc=test0001"

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

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

Sample response: { "values": [ { "code": "test0001", "id": 163, "desc": "test0001" } ], "message": "" }


### Create a new record by AUL Type and description



**HTTP Request** 
`GET http://[server]/jsf/rfws/core/auldata/addAulData` 


**Parameters**

| Name    | Type              | Description                                                      |
| ------- | ----------------- | ---------------------------------------------------------------- |
| pattern   | `String`(*Query*) | **Required.** Lookup Type of AUL field                          |
| aulDesc | `String`(*Query*) | **Required.** Description of AUL field |



**Result (in JSON Array)**

| Name   | Type     | Description                 |
| ------ | -------- | --------------------------- |
| id   | `Long`    | id  |
| message | `string` | Error Message |


> Sample request:

```java
OkHttpClient client = new OkHttpClient();

String url = "http://" + server + "/jsf/rfws/core/auldata/addAulData?pattern=aulTag&aulDesc=test00012"

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

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

Sample response: { "values": { "id": 164 }, "message": "" }


### Modify existing AUL record



**HTTP Request** 
`GET http://[server]/jsf/rfws/core/auldata/updateAulData` 

**Parameters**

| Name    | Type              | Description                                                      |
| ------- | ----------------- | ---------------------------------------------------------------- |
| id   | `long`(*Query*) | **Required.**ID of AUL Record                         |
| aulDesc | `String`(*Query*) | **Required.** Description of AUL field |


**Result (in JSON Array)**

| Name   | Type     | Description                 |
| ------ | -------- | --------------------------- |
| message | `string` | Error Message |

> Sample request:

```java
OkHttpClient client = new OkHttpClient();

String url = "http://" + server + "/jsf/rfws/core/auldata/addAulData?id=164&aulDesc=ddchange2"

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

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

Sample response: { "message": "" }