List Employee Work Insurance
ดึงรายการประกันการทำงาน (Work Insurance Log) ทั้งหมดของพนักงาน แสดงประวัติการหักเงินประกันการทำงานแต่ละเดือน
Endpoint
GET /api/v1/open-apis/employee/get-employee-data-filter?path_action=list-work-insuranceQuery Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
path_action | string | Yes | ต้องเป็น list-work-insurance |
employee_code | string | Yes | รหัสพนักงาน (plain text) |
Response Format
Success Response
{
"code": 200,
"message": "สำเร็จ",
"payload": [
{
"no": 1,
"work_insurance_log_id": "20260121WI01A2B3C4D5",
"master_salary_month": "2026-03",
"month_name": "มีนาคม 2026",
"log_source": "Manual",
"log_balance": 1500,
"log_datetime": "2026-03-01 08:00:00"
},
{
"no": 2,
"work_insurance_log_id": "20260121WI02E3F4A5B6",
"master_salary_month": "2026-02",
"month_name": "กุมภาพันธ์ 2026",
"log_source": "System",
"log_balance": 1500,
"log_datetime": "2026-02-01 08:00:00"
},
{
"no": 3,
"work_insurance_log_id": "20260121WI03F4A5B6C7",
"master_salary_month": "2026-01",
"month_name": "มกราคม 2026",
"log_source": "System",
"log_balance": 1500,
"log_datetime": "2026-01-01 08:00:00"
}
]
}Response Fields
| Field | Type | Description |
|---|---|---|
no | number | ลำดับที่ |
work_insurance_log_id | string | ID ของรายการ (plain text) |
master_salary_month | string | เดือนที่หักเงิน (YYYY-MM) |
month_name | string | ชื่อเดือน (แสดงผลตามภาษา) |
log_source | string | แหล่งที่มา (Manual, System, Import) |
log_balance | number | จำนวนเงิน |
log_datetime | datetime | วันเวลาที่บันทึก |
Error Response
{
"code": 400,
"message": "ไม่สำเร็จ",
"error": "Employee not found with code: EMP999"
}Code Examples
cURL
curl -X GET "https://openapi.humansoft.co.th/api/v1/open-apis/employee/get-employee-data-filter?path_action=list-work-insurance&employee_code=EMP001" \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY"Notes
- รายการจะเรียงลำดับตาม
master_salary_monthจากล่าสุดไปเก่าสุด (DESC) month_nameแสดงชื่อเดือนตามภาษาที่เลือก (TH/EN)- หากไม่มีข้อมูล จะคืน payload เป็น array ว่าง
[] log_sourceมี 3 ประเภท: Manual (บันทึกด้วยตนเอง), System (ระบบสร้างจากการคำนวณเงินเดือน), Import (นำเข้าจากไฟล์)
Related APIs
- Get Work Insurance - ดึงข้อมูลประกันการทำงานตาม ID
- Add Work Insurance - เพิ่มรายการประกันการทำงาน
- Delete Work Insurance - ลบรายการประกันการทำงาน
Last updated on