Get Employee Leave Quota
ดึงข้อมูลโควตาการลาของพนักงาน
Endpoint
GET /api/v1/open-apis/employee/get-employee-data-filter?path_action=get-quotaQuery Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
path_action | string | Yes | ต้องเป็น get-quota |
employee_code | string | Yes | รหัสพนักงาน |
year | string | Yes | ปี พ.ศ. ที่ต้องการดึงข้อมูล เช่น 2567 |
ใช้ employee_code เพื่อระบุพนักงาน
Response Format
Success Response
{
"code": 200,
"message": "สำเร็จ",
"payload": [
{
"employee_id": "20260121EM01A2B3C4D5",
"leave_type_id": "20260121LT01A2B3C4D5",
"leave_type_name": "ลาป่วย",
"quota_days": 30,
"used_days": 5,
"remaining_days": 25
},
{
"employee_id": "20260121EM01A2B3C4D5",
"leave_type_id": "20260121LT02A2B3C4D5",
"leave_type_name": "ลากิจ",
"quota_days": 6,
"used_days": 2,
"remaining_days": 4
},
{
"employee_id": "20260121EM01A2B3C4D5",
"leave_type_id": "20260121LT03A2B3C4D5",
"leave_type_name": "ลาพักร้อน",
"quota_days": 10,
"used_days": 3,
"remaining_days": 7
}
]
}Response Fields
| Field | Type | Description |
|---|---|---|
employee_id | string | ID ของพนักงาน |
leave_type_id | string | ID ของประเภทการลา |
leave_type_name | string | ชื่อประเภทการลา |
quota_days | number | จำนวนวันลาที่ได้รับ (โควตา) |
used_days | number | จำนวนวันลาที่ใช้ไป |
remaining_days | number | จำนวนวันลาคงเหลือ |
Error Response
{
"code": 400,
"message": "ไม่สำเร็จ",
"error": "Missing required parameter: year"
}Code Examples
cURL
curl -X GET "https://openapi.humansoft.co.th/api/v1/open-apis/employee/get-employee-data-filter?path_action=get-quota&employee_code=EMP001&year=2567" \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY"Related APIs
- Update Quota - แก้ไขโควตาการลา
- Add Actual Leave - เพิ่มยอดลาจริง
- Delete Actual Leave - ลบยอดลาจริง
Last updated on