Get Employee Data Filter
Endpoint สำหรับดึงข้อมูลพนักงานแบบแยกเรื่อง รองรับการดึงข้อมูลทั้ง Setting, Profile และ Financial โดยสามารถกรองตามประเภทที่ต้องการได้
API นี้ใช้ Router Pattern - ระบุ path_action เพื่อเลือกประเภทข้อมูลที่ต้องการดึง
พารามิเตอร์ที่ลงท้ายด้วย _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-filterQuery Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
path_action | string | Yes | ประเภทข้อมูลที่ต้องการดึง |
employee_code | string | Conditional | รหัสพนักงาน (สำหรับ list actions) |
Available Actions
Setting Actions
ใช้ employee_code เป็น parameter
| path_action | Description |
|---|---|
get-ot | ดึงการตั้งค่า OT |
get-quota | ดึงโควตาการลา |
get-holiday | ดึงวันหยุดประจำสัปดาห์ |
get-work-cycle | ดึงกะการทำงาน |
get-time-frame | ดึงป้ายช่วงเวลา |
get-role-duty | ดึงหน้าที่ปฏิบัติงาน |
get-cost-center | ดึงศูนย์ต้นทุน |
get-worktime-config | ดึงการตั้งค่าเวลาทำงาน |
get-user | ดึงข้อมูลผู้ใช้ |
list-facial | ดึงรายการใบหน้า |
Profile List Actions
ใช้ employee_code เป็น parameter
| path_action | Description |
|---|---|
list-family | ดึงรายการครอบครัว |
list-work | ดึงรายการประวัติการทำงาน |
list-education | ดึงรายการประวัติการศึกษา |
list-ability | ดึงรายการความสามารถพิเศษ |
list-language-skill | ดึงรายการทักษะภาษา |
list-typing-skill | ดึงรายการทักษะพิมพ์ดีด |
list-driving-skill | ดึงรายการทักษะการขับขี่ |
list-training | ดึงรายการประวัติการฝึกอบรม |
list-possess | ดึงรายการทรัพย์สินครอบครอง |
list-hospital | ดึงรายการโรงพยาบาล |
list-document | ดึงรายการเอกสาร |
list-log | ดึงประวัติการแก้ไขข้อมูล |
Profile Get Actions (by ID)
ใช้ ID เฉพาะของแต่ละประเภท
| path_action | Description | Required ID |
|---|---|---|
get-family | ดึงข้อมูลครอบครัว | employee_family_id |
get-work | ดึงประวัติการทำงาน | employee_work_id |
get-education | ดึงประวัติการศึกษา | employee_education_id |
get-ability | ดึงความสามารถพิเศษ | employee_ability_id |
get-language-skill | ดึงทักษะภาษา | employee_language_skill_id |
get-typing-skill | ดึงทักษะพิมพ์ดีด | employee_typing_skill_id |
get-driving-skill | ดึงทักษะการขับขี่ | employee_driving_skill_id |
get-training | ดึงประวัติการฝึกอบรม | employee_training_id |
get-possess | ดึงทรัพย์สินครอบครอง | employee_possess_id |
get-hospital | ดึงโรงพยาบาล | employee_hospital_id |
get-document | ดึงเอกสาร | employee_documents_id |
Financial Actions
| path_action | Description | Required Params |
|---|---|---|
list-constant | ดึงรายการค่าคงที่ | employee_code |
get-constant | ดึงค่าคงที่ | employee_constant_id |
list-fund | ดึงรายการกองทุน | employee_code |
get-fund | ดึงกองทุน | fund_employee_id |
list-welfare | ดึงรายการสวัสดิการ | employee_code, welfare_year |
get-welfare | ดึงสวัสดิการ | welfare_employee_id |
list-salary-auto-checked | ดึงรายการเงินเดือนอัตโนมัติ | employee_code |
get-salary-auto-checked | ดึงเงินเดือนอัตโนมัติ | employee_auto_checked_id |
list-work-insurance | ดึงรายการประกันสังคม | employee_code |
get-work-insurance | ดึงประกันสังคม | work_insurance_log_id |
Pagination (for list-log)
| Parameter | Type | Default | Description |
|---|---|---|---|
year_month | string | 0000-00 | ปี-เดือน (YYYY-MM) |
_PAGE | integer | 1 | หน้าที่ต้องการแสดง |
_NUMBER_PER_PAGE | integer | 50 | จำนวนรายการต่อหน้า |
Response Format
List Actions Response
{
"code": 200,
"message": "สำเร็จ",
"payload": [
{ "employee_family_id": "20260121PS01B2C3D4E5", "family_name": "สมชาย", ... },
{ "employee_family_id": "20260121PS02B2C3D4E5", "family_name": "สมหญิง", ... }
]
}Get Actions Response
{
"code": 200,
"message": "สำเร็จ",
"payload": {
"employee_family_id": "20260121PS01B2C3D4E5",
"family_name": "สมชาย",
"family_last_name": "ใจดี",
...
}
}Error Response
{
"code": 400,
"message": "ไม่สำเร็จ",
"errors": ["กรุณาระบุ 'employee_code'"]
}Code Examples
cURL
# ดึงรายการครอบครัว
curl -X GET "https://openapi.humansoft.co.th/api/v1/open-apis/employee/get-employee-data-filter?path_action=list-family&employee_code=EMP001" \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY"
# ดึงการตั้งค่า OT
curl -X GET "https://openapi.humansoft.co.th/api/v1/open-apis/employee/get-employee-data-filter?path_action=get-ot&employee_code=EMP001" \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY"
# ดึงข้อมูลครอบครัวรายตัว
curl -X GET "https://openapi.humansoft.co.th/api/v1/open-apis/employee/get-employee-data-filter?path_action=get-family&employee_family_id=MjAyNjAxMjFGTTAxQTJCM0M0RDU=" \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY"
# ดึงประวัติการแก้ไข (with pagination)
curl -X GET "https://openapi.humansoft.co.th/api/v1/open-apis/employee/get-employee-data-filter?path_action=list-log&employee_code=EMP001&year_month=2026-01&_PAGE=1&_NUMBER_PER_PAGE=20" \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY"Difference from Get Employee Data
| Feature | Get Employee Data | Get Employee Data Filter |
|---|---|---|
| Parameter | type (all/setting/profile/financial) | path_action (specific action) |
| Response | ข้อมูลทั้งหมดตาม type | ข้อมูลเฉพาะเรื่อง |
| Use Case | ดึงข้อมูลรวม | ดึงข้อมูลเฉพาะรายการ |
Related APIs
- Get Employee Data - ดึงข้อมูลตาม type (all/setting/profile/financial)
- Get Employee Info - ดึงข้อมูลครบถ้วนโดยใช้ employee_code
- Get Employee List - ดึงรายการพนักงาน
Last updated on