Get Actual Leave
ดูประวัติการลาจริงของพนักงานตามประเภทการลาและปีที่ระบุ แสดงข้อมูลการลาแยกตามปี
Endpoint
GET /api/v1/open-apis/salary/get-data-filter?path_action=get_actual_leaveQuery Parameters
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
path_action | string | Yes | - | ต้องเป็น get_actual_leave | "get_actual_leave" |
employee_code | string | Yes | - | รหัสพนักงาน (plain text) | "EMP001" |
time_leave_flag | string | Yes | - | รหัสประเภทการลา (01-09) | "06" |
quota_year | string | Yes | - | ปีโควตา (YYYY) | "2026" |
language_code | string | No | "TH" | ภาษาสำหรับแสดงผล | "TH", "EN" |
Response Format
Success Response
{
"code": 200,
"message": "สำเร็จ",
"payload": {
"employee_code": "EMP001",
"employee_name": "สมชาย",
"employee_last_name": "ใจดี",
"time_leave_flag": "06",
"time_leave_flag_name": "ลาพักร้อน",
"time_leave_flag_name_en": "Annual Leave",
"actual_leave": [
{
"actual_leave_id": "20260201AL01A2B3C4D5",
"work_date": "2026-01-15",
"absence_day": 1,
"in_year": "2026",
"time_leave_desc": "ลาพักร้อนประจำปี",
"remark": ""
},
{
"actual_leave_id": "20260201AL02E3F4A5B6",
"work_date": "2026-02-10",
"absence_day": 0.5,
"in_year": "2026",
"time_leave_desc": "ลาพักร้อนครึ่งวันเช้า",
"remark": "ธุระส่วนตัว"
}
]
}
}Response Fields
| Field | Type | Nullable | Description |
|---|---|---|---|
employee_code | string | No | รหัสพนักงาน |
employee_name | string | No | ชื่อพนักงาน (ตาม language_code) |
employee_last_name | string | No | นามสกุลพนักงาน |
time_leave_flag | string | No | รหัสประเภทการลา |
time_leave_flag_name | string | No | ชื่อประเภทการลา (ไทย) |
time_leave_flag_name_en | string | No | ชื่อประเภทการลา (อังกฤษ) |
actual_leave[].actual_leave_id | string | No | ID การลาจริง (plain text) |
actual_leave[].work_date | string | No | วันที่ลา (YYYY-MM-DD) |
actual_leave[].absence_day | number | No | จำนวนวันที่ลา (รองรับทศนิยม เช่น 0.5 = ครึ่งวัน) |
actual_leave[].in_year | string | No | ปีที่นับโควตา |
actual_leave[].time_leave_desc | string | Yes | รายละเอียดการลา |
actual_leave[].remark | string | Yes | หมายเหตุ |
Error Response
{
"code": 404,
"message": "Employee not found with code: EMP001",
"payload": []
}Code Examples
cURL
curl -X GET "https://openapi.humansoft.co.th/api/v1/open-apis/salary/get-data-filter?path_action=get_actual_leave&employee_code=EMP001&time_leave_flag=06"a_year=2026&language_code=TH" \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY"Notes
absence_dayรองรับทศนิยม เช่น0.5= ลาครึ่งวัน,1= ลา 1 วันin_yearคือปีที่นับโควตา อาจไม่ตรงกับปีของwork_dateในบางกรณี- ข้อมูลเรียงตาม
work_dateจากใหม่ไปเก่า
Related APIs
- Add Actual Leave - เพิ่มบันทึกการลาจริง
- Update Actual Leave - แก้ไขปีที่นับโควตา
- Delete Actual Leave - ลบบันทึกการลา
- Get Quota by Employee - ดูยอดโควตาทั้งหมด
Last updated on