Skip to Content
🚀 Welcome to Humansoft Open API Documentation

Delete Actual Leave

ลบยอดลาจริงของพนักงาน

การลบข้อมูลไม่สามารถกู้คืนได้ กรุณาตรวจสอบให้แน่ใจก่อนดำเนินการ

Endpoint

POST /api/v1/open-apis/employee/delete-employee-setting?path_action=quota-actual-leave

Query Parameters

ParameterTypeRequiredDescription
path_actionstringYesต้องเป็น quota-actual-leave

Request Body

ParameterTypeRequiredDescription
employee_codestringYesรหัสพนักงาน
actual_leave_idstringYesID ของยอดลาจริงที่ต้องการลบ

ใช้ employee_code เพื่อระบุพนักงาน


Response Format

Success Response

{ "code": 200, "message": "Delete Actual Leave Success", "payload": { "actual_leave_id": "20260121AQ01A2B3C4D5", "deleted": true } }

Error Response

{ "code": 400, "message": "ไม่สำเร็จ", "errors": ["กรุณาระบุ 'actual_leave_id'"] }
{ "code": 404, "message": "ไม่สำเร็จ", "error": "ไม่พบยอดลาจริงที่ต้องการลบ" }

Code Examples

curl -X POST "https://openapi.humansoft.co.th/api/v1/open-apis/employee/delete-employee-setting?path_action=quota-actual-leave" \ -H "Content-Type: application/json" \ -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \ -d '{ "employee_code": "EMP001", "actual_leave_id": "MjAyNjAxMjFBUTAxQTJCM0M0RDU=" }'

Notes

  • เมื่อลบยอดลาจริง โควตาการลาจะถูกคืนกลับโดยอัตโนมัติ
  • สามารถดู actual_leave_id ได้จากการเรียก Add Actual Leave

  • Get Quota - ดึงข้อมูลโควตาการลา
  • Update Quota - แก้ไขโควตาการลา
  • Add Actual Leave - เพิ่มยอดลาจริง
Last updated on