Skip to Content
🚀 Welcome to Humansoft Open API Documentation

Delete Employee Setting

Router สำหรับลบข้อมูลการตั้งค่าพนักงาน รองรับการเรียกใช้งานแบบแยกเรื่องผ่าน path_action parameter

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

Endpoint

POST /api/v1/open-apis/employee/delete-employee-setting

Query Parameters

ParameterTypeRequiredDescription
path_actionstringYesประเภทข้อมูลที่ต้องการลบ
employee_codestringYesรหัสพนักงาน

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

พารามิเตอร์ที่ลงท้ายด้วย _id ต้องส่งเป็น Base64-encoded ของ raw internal ID

  • Response จะ return raw string ID (เช่น 20260121FC89F3BB9120)
  • เมื่อนำ ID จาก response ไปใช้ใน request ถัดไป ต้อง encode เป็น Base64 ก่อน

Supported Actions

path_actionDescriptionRequired ID
userลบบัญชีผู้ใช้งานuser_id
actual-quotaลบโควตาการลาจริงactual_quota_id
facialลบใบหน้า (ระบบลงเวลา)employee_facial_id

Action Details

user - ลบบัญชีผู้ใช้งาน

ParameterTypeRequiredDescription
user_idstringYesID ของบัญชีผู้ใช้

actual-quota - ลบโควตาการลาจริง

ParameterTypeRequiredDescription
actual_quota_idstringYesID ของโควตาที่ใช้จริง

facial - ลบใบหน้า

ParameterTypeRequiredDescription
employee_facial_idstringYesID ของข้อมูลใบหน้า

Response Format

Success Response

{ "code": 200, "message": "Delete User Success", "payload": { "user_id": "20241225C3024958C974" } }

Error Response

{ "code": 400, "message": "ข้อมูลไม่ถูกต้อง", "errors": [ "กรุณาระบุ 'user_id'" ] }

Code Examples

# ลบบัญชีผู้ใช้งาน curl -X POST "https://openapi.humansoft.co.th/api/v1/open-apis/employee/delete-employee-setting?path_action=user" \ -H "Content-Type: application/json" \ -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \ -d '{ "user_id": "MjAyNjAxMjFVUzAxQTJCM0M0RDU=" }' # ลบโควตาการลาจริง curl -X POST "https://openapi.humansoft.co.th/api/v1/open-apis/employee/delete-employee-setting?path_action=actual-quota" \ -H "Content-Type: application/json" \ -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \ -d '{ "actual_quota_id": "MjAyNjAxMTVBUTAxQTJCM0M0RDU=" }' # ลบใบหน้า curl -X POST "https://openapi.humansoft.co.th/api/v1/open-apis/employee/delete-employee-setting?path_action=facial&employee_code=EMP001" \ -H "Content-Type: application/json" \ -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \ -d '{ "employee_code": "EMP001", "employee_facial_id": "MjAyNjAxMjFGQzAxRjJBM0I0QzU=" }'

Last updated on