Skip to Content
🚀 Welcome to Humansoft Open API Documentation

Reset Quota

รีเซ็ตโควตาการลาของพนักงานในปีที่ระบุ ระบบจะลบโควตาเดิมและคำนวณโควตาใหม่จากกฎธุรกิจ

การรีเซ็ตจะลบโควตาเดิมและคำนวณใหม่ทั้งหมด การดำเนินการนี้ไม่สามารถย้อนกลับได้

Endpoint

POST /api/v1/open-apis/salary/add-data-filter

Request Body

ParameterTypeRequiredDescriptionExample
path_actionstringYesต้องเป็น reset_quota"reset_quota"
quota_yearstringYesปีโควตาที่ต้องการรีเซ็ต (YYYY)"2026"
time_leave_flagstringNoกรองตามประเภทการลา"06"
employee_codestringNoรีเซ็ตเฉพาะพนักงานคนเดียว"EMP001"
company_idstringNoกรองตามบริษัท (Base64)-
branch_idstringNoกรองตามสาขา (Base64)-
department_idstringNoกรองตามแผนก (Base64)-
position_idstringNoกรองตามตำแหน่ง (Base64)-
keywordstringNoค้นหาพนักงาน-
language_codestringNoภาษาสำหรับแสดงผล"TH"

Response Format

Success Response

{ "code": 200, "message": "สำเร็จ", "payload": { "reset_count": 25, "employees": [ { "employee_code": "EMP001", "quotas_reset": 5 }, { "employee_code": "EMP002", "quotas_reset": 5 } ] } }

Error Response

{ "code": 400, "message": "ไม่สำเร็จ", "errors": ["Missing required parameter: 'quota_year'"] }

Code Examples

curl -X POST "https://openapi.humansoft.co.th/api/v1/open-apis/salary/add-data-filter" \ -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "path_action": "reset_quota", "quota_year": "2026" }'

Notes

  • ถ้าไม่ระบุ filter ระบบจะรีเซ็ตโควตาของพนักงานทั้งหมด
  • ใช้ filter เพื่อจำกัดขอบเขต เช่น รีเซ็ตเฉพาะแผนก หรือเฉพาะประเภทการลา
  • โควตาใหม่จะคำนวณจากกฎธุรกิจที่ตั้งค่าในระบบ

  • Create Quota Year - สร้างโควตาประจำปีใหม่
  • Calculate Quota - คำนวณโควตาจากข้อมูลการลา
  • List Quotas - ดูรายการโควตาหลังรีเซ็ต
Last updated on