Get Employee All Data
ดึงข้อมูลพนักงานทั้งหมดในครั้งเดียว รวม Setting, Profile และ Financial
API นี้เหมาะสำหรับการดึงข้อมูลทั้งหมดในครั้งเดียว ลด API calls จาก 3 ครั้งเหลือ 1 ครั้ง
พารามิเตอร์ที่ลงท้ายด้วย _id ต้องส่งเป็น Base64-encoded ของ raw internal ID
- Response จะ return raw string ID (เช่น
20260121FC89F3BB9120) - เมื่อนำ ID จาก response ไปใช้ใน request ถัดไป ต้อง encode เป็น Base64 ก่อน
Endpoint
GET /api/v1/open-apis/employee/get-employee-data-filter?path_action=allQuery Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
path_action | string | Yes | ต้องเป็น all |
employee_code | string | Yes | รหัสพนักงาน |
welfare_year | string | No | ปีสวัสดิการ (สำหรับ financial) |
Response Format
Success Response
{
"code": 200,
"message": "สำเร็จ",
"payload": {
"setting": {
"general": {
"employee_id": "20260121FC89F3BB9120",
"days_per_month": "30",
"hours_per_day": "08:00:00",
"round_month_config": "Full",
"round_xtra_config": "Y",
"round_ot_config": "N",
"round_worktime_config": "N",
"holiday_apply_config": "Y"
},
"approver_lists": [],
"user_lists": {
"user_id": "202601213E16797C185F",
"user_name": "emp001",
"usergroup_code": "EMPLOYEE"
},
"work_cycle_lists": {
"Mon": { "work_cycle_id": "...", "active": true },
"Tue": { "work_cycle_id": "...", "active": true }
},
"holiday_lists": {
"Mon": "วันทำงาน",
"Sun": "วันหยุดพนักงาน"
},
"ot_lists": {
"employee_ot_id": "...",
"ot_1_0_able": true,
"ot_1_5_able": true
},
"quota_lists": {
"2026": { "02": { "flag_name": "ลากิจ", "quota": "0.00" } },
"effective_dt": "2000-01-21",
"work_ages_effective": "26.02 ปี"
},
"worktime_configs": {},
"facial": [],
"time_frame_lists": { "Mon": null },
"cost_center_lists": [],
"role_duty_lists": { "Mon": null }
},
"profile": {
"address": {
"employee_id": "20260121FC89F3BB9120",
"employee_name": "สมชาย",
"employee_last_name": "ใจดี"
},
"family_lists": [],
"work_lists": [],
"education_lists": [],
"ability_lists": [],
"language_skill_lists": [],
"typing_skill_lists": [],
"driving_skill_lists": [],
"document_lists": [],
"trainning_lists": [],
"possess_lists": [],
"loan_lists": [],
"hospital_lists": []
},
"financial": {
"tax_lists": [{ "tax_year_code": "2026", "tax_amt": 60000 }],
"fund_lists": [{ "fund_id": "...", "fund_name": "กองทุนสำรองเลี้ยงชีพ" }],
"work_insurance_lists": [],
"welfare_lists": [{ "salary_type_name": "ค่ารักษาพยาบาล" }],
"constant_lists": [{ "salary_type_name": "ค่าตำแหน่ง" }],
"salary_auto_checked_lists": []
}
}
}Response Structure
payload
├── setting // การตั้งค่าพนักงาน
│ ├── general
│ ├── approver_lists
│ ├── user_lists
│ ├── work_cycle_lists
│ ├── holiday_lists
│ ├── ot_lists
│ ├── quota_lists
│ ├── worktime_configs
│ ├── facial
│ ├── time_frame_lists
│ ├── cost_center_lists
│ └── role_duty_lists
│
├── profile // ข้อมูลส่วนตัว
│ ├── address
│ ├── family_lists
│ ├── work_lists
│ ├── education_lists
│ ├── ability_lists
│ ├── language_skill_lists
│ ├── typing_skill_lists
│ ├── driving_skill_lists
│ ├── document_lists
│ ├── trainning_lists
│ ├── possess_lists
│ ├── loan_lists
│ └── hospital_lists
│
└── financial // ข้อมูลการเงิน
├── tax_lists
├── fund_lists
├── work_insurance_lists
├── welfare_lists
├── constant_lists
└── salary_auto_checked_listsError Response
{
"code": 400,
"message": "ไม่สำเร็จ",
"error": "Employee profile not found for code: EMP999"
}Data Sections
Setting - การตั้งค่าพนักงาน
| Section | Description |
|---|---|
general | ตั้งค่าทั่วไป (วันทำงาน, ชั่วโมงทำงาน, การปัดเศษ) |
approver_lists | รายการผู้อนุมัติ |
user_lists | ข้อมูลบัญชีผู้ใช้ |
work_cycle_lists | กะการทำงาน |
holiday_lists | วันหยุดประจำ |
ot_lists | การตั้งค่าค่าล่วงเวลา |
quota_lists | โควตาการลา + อายุงาน |
worktime_configs | การตั้งค่าเวลาทำงาน |
facial | ข้อมูลใบหน้า |
time_frame_lists | ป้ายกำกับช่วงเวลา |
cost_center_lists | ศูนย์ต้นทุน |
role_duty_lists | หน้าที่ปฏิบัติงาน |
Profile - ข้อมูลส่วนตัว
| Section | Description |
|---|---|
address | ที่อยู่และข้อมูลพื้นฐาน |
family_lists | ข้อมูลครอบครัว |
work_lists | ประวัติการทำงาน |
education_lists | ประวัติการศึกษา |
ability_lists | ความสามารถพิเศษ |
language_skill_lists | ทักษะภาษา |
typing_skill_lists | ทักษะพิมพ์ดีด |
driving_skill_lists | ทักษะการขับขี่ |
document_lists | เอกสาร |
trainning_lists | การฝึกอบรม |
possess_lists | ทรัพย์สินครอบครอง |
loan_lists | เงินกู้ |
hospital_lists | โรงพยาบาล |
Financial - ข้อมูลการเงิน
| Section | Description |
|---|---|
tax_lists | ข้อมูลภาษี |
fund_lists | กองทุนสำรองเลี้ยงชีพ |
work_insurance_lists | ประกันสังคม |
welfare_lists | สวัสดิการ |
constant_lists | รายรับ/รายจ่ายคงที่ |
salary_auto_checked_lists | รายรับ/รายจ่ายอัตโนมัติ |
Code Examples
cURL
curl -X GET "https://openapi.humansoft.co.th/api/v1/open-apis/employee/get-employee-data-filter?path_action=all&employee_code=EMP001&welfare_year=2026" \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY"When to Use
| Scenario | Recommended API |
|---|---|
| ต้องการข้อมูลทั้งหมด | path_action=all (API นี้) |
| ต้องการเฉพาะการตั้งค่า | path_action=all-setting |
| ต้องการเฉพาะข้อมูลส่วนตัว | path_action=all-profile |
| ต้องการเฉพาะข้อมูลการเงิน | path_action=all-financial |
Response มีขนาดใหญ่และใช้เวลาประมวลผลนานกว่า API แยกส่วน หากต้องการเฉพาะบางส่วน ควรใช้ API เฉพาะทางแทน
Related APIs
- Get Setting Data - ดึงข้อมูลการตั้งค่าพนักงาน
- Get Profile Data - ดึงข้อมูลส่วนตัวพนักงาน
- Get Financial Data - ดึงข้อมูลการเงินพนักงาน
Last updated on