Family

Pada halaman Employee Family ini Anda dapat menggunakan metode :
1. POST
2. GET


1. POST
  • Add new Families of Employee

Tujuan : Untuk menambahkan anggota keluarga baru dari seorang Karyawan

Method : POST
API Endpoint : [[baseurl]]/api/integration/v1/employee/families

HEADER

X-TenantID: [[tenantid]]
Authorization: Bearer [[accesstoken]]

πŸ“Catatan Untuk mengetahui [[baseurl]], dan [[tenantid]], Anda dapat mempelajarinya pada halaman Integration Credential. Dan untuk [[accesstoken]] dapat dipelajari pada halaman Authorization Token.

BODY PAYLOAD (JSON)

{
  "effectiveDate": "2022-03-08",
  "employeeNo": "bqjnqjs",
  "relationship": "Spouse",
  "name": "Femmy Endah Novianti",
  "gender": "Female",
  "birthPlace": "Jakarta",
  "birthDate": "1992-11-29",
  "maritalStatus": "Married",
  "maritalDate": "2020-11-01",
  "decease": false,
  "active": true
}

CONSUME VIA CURL

curl --location --request POST '[[baseurl]]/api/integration/v1/employee/families' 
--header 'X-TenantID: [[tenantid]]' 
--header 'Authorization: Bearer [[accesstoken]]' 
--header 'Content-Type: application/json' 
--data-raw '{
 "effectiveDate": "2022-03-08",
 "employeeNo": "bqjnqjs",
 "relationship": "Spouse",
 "name": "Femmy Endah Novianti",
 "gender": "Female",
 "birthPlace": "Jakarta",
 "birthDate": "1992-11-29",
 "maritalStatus": "Married",
 "maritalDate": "2020-11-01",
 "decease": false,
 "active": true
 }'

API Response :

{
  "message": "Create Data Successfully",
  "error": false
}

2. GET
  • Get detail Employee Families with employeeNo parameter

Tujuan : Untuk mendapatkan detail anggota keluarga dari seorang Karyawan dengan parameter employeeNo

Method : GET
API Endpoint : [[baseurl]]/api/integration/v1/employee/families?active=[[value]]&employeeNo=[[employeenumber]]

πŸ“Catatan Parameter [[value]] diisi dengan “true” jika data karyawan tersebut aktif atau “false” jika data karyawan tersebut tidak aktif. Dan parameter [[employeenumber]] diisi dengan nomor karyawan yang diinginkan.

HEADER

X-TenantID: [[tenantid]]
Authorization: Bearer [[accesstoken]]
CONSUME VIA CURL

curl --location --request GET '[[baseurl]]/api/integration/v1/employee/families?active=[[value]]&employeeNo=[[employeenumber]]' 
--header 'X-TenantID: [[tenantid]]' 
--header 'Authorization: Bearer [[accesstoken]]'

πŸ“Catatan Untuk mengetahui [[baseurl]], dan [[tenantid]], Anda dapat mempelajarinya pada halaman Integration Credential. Dan untuk [[accesstoken]] dapat dipelajari pada halaman Authorization Token.

API Response :

[
  {
    "employeeId": "eba294d7-929c-11eb-97ce-0adbcc9eaaa8",
    "employeeNo": "0811001",
    "details": [
      {
        "id": "0bf9607e-4eb1-4954-b536-41ea12fd2cf4",
        "relationship": "Child",
        "name": "aaaa",
        "gender": "Female",
        "birthPlace": "aaa",
        "birthDate": "2021-08-05",
        "maritalStatus": null,
        "maritalDate": null,
        "decease": false,
        "active": true
      }
    ]
  }
]