Address

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


1. POST
  • Add new Address

Tujuan : Untuk menambahkan alamat Karyawan

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

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": "2021-09-24",
  "employeeNo": "0921038",
  "address": "Jl. Test A",
  "primaryFlag": false,
  "type": "Home",
  "city": "Jakarta Utara",
  "province": "DKI Jakarta",
  "postalCode": "14360",
  "district": "Tanjung Priok",
  "subDistrict": "Sunter Jaya",
  "active": true
}


CONSUME VIA CURL

curl --location --request POST '[[baseurl]]/api/integration/v1/employee/address' 
--header 'X-TenantID: [[tenantid]]' 
--header 'Authorization: Bearer [[accesstoken]]' 
--header 'Content-Type: application/json' 
--data-raw '{
 "effectiveDate": "2021-09-24",
 "employeeNo": "0921038",
 "address": "Jl. Test A",
 "primaryFlag": false,
 "type": "Home",
 "city": "Jakarta Utara",
 "province": "DKI Jakarta",
 "postalCode": "14360",
 "district": "Tanjung Priok",
 "subDistrict": "Sunter Jaya",
 "active": true
 }'

API Response :

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

2. GET
  • Get detail address with employeeNo parameter

Tujuan : Untuk mendapatkan detail alamat Karyawan dengan parameter employeeNo

Method : GET
API Endpoint : [[baseurl]]/api/integration/v1/employee/address?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/address?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 :

[
  {
    "id": "40b17a05-4cce-4e78-960f-eba4b9290a09",
    "employeeId": "2162fc6d-a8c9-445e-a328-a87d21a44a91",
    "employeeNo": "0921038",
    "address": "Jl. Test A",
    "primaryFlag": true,
    "type": "Home",
    "city": "Jakarta Utara",
    "province": "DKI Jakarta",
    "postalCode": "14360",
    "district": "Tanjung Priok",
    "subDistrict": "Sunter Jaya",
    "active": true
  }
]