Get Employee Worktime Config
ดึงข้อมูลการตั้งค่าเวลาทำงานของพนักงาน เช่น มาสาย, กลับก่อน, OT
Endpoint
GET /api/v1/open-apis/employee/get-employee-data-filter?path_action=get-worktime-configQuery Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
path_action | string | Yes | ต้องเป็น get-worktime-config |
employee_code | string | Yes | รหัสพนักงาน |
ใช้ employee_code (รหัสพนักงาน เช่น EMP001) เพื่อระบุพนักงาน
Response Format
Success Response
{
"code": 200,
"message": "สำเร็จ",
"payload": {
"employee_type_code": "01",
"configs": [
{
"key_type_lv": "late",
"config_name": "มาสาย",
"key_type_value": "Y",
"key_type_value_01": "Y",
"key_type_value_02": "N",
"key_value_1": "A",
"key_value_2": "100",
"key_value_13": "-30",
"sso_include_01": "1",
"tax_include_01": "1"
}
]
}
}Response Fields
| Field | Type | Description |
|---|---|---|
employee_type_code | string | ประเภทพนักงาน เช่น 01 = รายเดือน, 02 = รายวัน |
configs | array | รายการ config ทุก key_type_lv |
configs — แต่ละ item
| Field | Type | Description |
|---|---|---|
key_type_lv | string | ประเภท config (เช่น late, early, OT_1_5) |
config_name | string | ชื่อ config |
key_type_value | string | Y = เปิดใช้งาน, N = ปิด |
key_type_value_01 ~ 04 | string | เปิด/ปิดแยกตาม employee_type |
key_value_1 ~ key_value_16 | string | ค่าตั้งค่าต่าง ๆ (ดูรายละเอียดใน Update API) |
sso_include_01 ~ 04 | string | คิดประกันสังคม (1/0) |
tax_include_01 ~ 04 | string | คิดภาษี (1/0) |
provident_include_01 ~ 04 | string | คิดกองทุน (1/0) |
ค่า key_value_* มีความหมายต่างกันตามแต่ละ key_type_lv — ดูรายละเอียดใน Update Worktime Config
Error Response
{
"code": 400,
"message": "ไม่สำเร็จ",
"error": "Employee not found with code: EMP999"
}| เงื่อนไข | Error Message |
|---|---|
ไม่ส่ง employee_code หรือว่าง | Missing required parameter: employee_code |
| หา employee ไม่เจอ | Employee not found with code: xxx |
Code Examples
cURL
curl -X GET "https://openapi.humansoft.co.th/api/v1/open-apis/employee/get-employee-data-filter?path_action=get-worktime-config&employee_code=EMP001" \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Related APIs
- Update Worktime Config - บันทึกการตั้งค่าเวลาทำงาน
- Get Time Frame - ดึงข้อมูลกรอบเวลาการทำงาน
- Get Work Cycle - ดึงข้อมูลกะการทำงาน
Last updated on