Delete Employee Setting
Router สำหรับลบข้อมูลการตั้งค่าพนักงาน รองรับการเรียกใช้งานแบบแยกเรื่องผ่าน path_action parameter
การลบข้อมูลไม่สามารถกู้คืนได้ กรุณาตรวจสอบให้แน่ใจก่อนดำเนินการ
Endpoint
POST /api/v1/open-apis/employee/delete-employee-settingQuery Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
path_action | string | Yes | ประเภทข้อมูลที่ต้องการลบ |
employee_code | string | Yes | รหัสพนักงาน |
ใช้ employee_code เพื่อระบุพนักงาน
พารามิเตอร์ที่ลงท้ายด้วย _id ต้องส่งเป็น Base64-encoded ของ raw internal ID
- Response จะ return raw string ID (เช่น
20260121FC89F3BB9120) - เมื่อนำ ID จาก response ไปใช้ใน request ถัดไป ต้อง encode เป็น Base64 ก่อน
Supported Actions
| path_action | Description | Required ID |
|---|---|---|
user | ลบบัญชีผู้ใช้งาน | user_id |
actual-quota | ลบโควตาการลาจริง | actual_quota_id |
facial | ลบใบหน้า (ระบบลงเวลา) | employee_facial_id |
Action Details
user - ลบบัญชีผู้ใช้งาน
| Parameter | Type | Required | Description |
|---|---|---|---|
user_id | string | Yes | ID ของบัญชีผู้ใช้ |
actual-quota - ลบโควตาการลาจริง
| Parameter | Type | Required | Description |
|---|---|---|---|
actual_quota_id | string | Yes | ID ของโควตาที่ใช้จริง |
facial - ลบใบหน้า
| Parameter | Type | Required | Description |
|---|---|---|---|
employee_facial_id | string | Yes | ID ของข้อมูลใบหน้า |
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
# ลบบัญชีผู้ใช้งาน
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="
}'Related APIs
- Add Employee Setting - เพิ่มการตั้งค่า
- Update Employee Setting - แก้ไขการตั้งค่า
- Get Employee Info - ดึงข้อมูลพนักงาน
Last updated on