Delete Employee Profile
Router สำหรับลบข้อมูลส่วนตัวพนักงาน รองรับการเรียกใช้งานแบบแยกเรื่องผ่าน path_action parameter
การลบข้อมูลไม่สามารถกู้คืนได้ กรุณาตรวจสอบให้แน่ใจก่อนดำเนินการ
Endpoint
POST /api/v1/open-apis/employee/delete-employee-profileQuery Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
path_action | string | Yes | ประเภทข้อมูลที่ต้องการลบ |
Base Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
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 |
|---|---|---|
family | ลบข้อมูลครอบครัว | employee_family_id |
work | ลบประวัติการทำงาน | employee_work_id |
education | ลบประวัติการศึกษา | employee_education_id |
ability | ลบความสามารถพิเศษ | employee_ability_id |
language-skill | ลบทักษะภาษา | employee_language_skill_id |
typing-skill | ลบทักษะพิมพ์ดีด | employee_typing_skill_id |
driving-skill | ลบทักษะการขับขี่ | employee_driving_skill_id |
training | ลบประวัติการฝึกอบรม | employee_training_id |
possess | ลบทรัพย์สินครอบครอง | employee_possess_id |
possess-image | ลบรูปภาพทรัพย์สิน | employee_possess_image_id |
hospital | ลบโรงพยาบาลตามสิทธิ | employee_hospital_id |
document | ลบเอกสาร | employee_documents_id |
Response Format
Success Response
{
"code": 200,
"message": "Delete Success",
"payload": {
"deleted_id": "20260121FM01B2C3D4E5"
}
}Error Response
{
"code": 400,
"message": "ข้อมูลไม่ถูกต้อง",
"errors": [
"กรุณาระบุ 'employee_family_id'"
]
}Code Examples
cURL
# ลบข้อมูลครอบครัว
curl -X POST "https://openapi.humansoft.co.th/api/v1/open-apis/employee/delete-employee-profile?path_action=family" \
-H "Content-Type: application/json" \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
-d '{
"employee_code": "EMP001",
"employee_family_id": "MjAyNjAxMjFGTTAxQjJDM0Q0RTU="
}'
# ลบประวัติการศึกษา
curl -X POST "https://openapi.humansoft.co.th/api/v1/open-apis/employee/delete-employee-profile?path_action=education" \
-H "Content-Type: application/json" \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
-d '{
"employee_code": "EMP001",
"employee_education_id": "MjAyNjAxMjFFRDAxQTJCM0M0RDU="
}'
# ลบเอกสาร
curl -X POST "https://openapi.humansoft.co.th/api/v1/open-apis/employee/delete-employee-profile?path_action=document" \
-H "Content-Type: application/json" \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
-d '{
"employee_code": "EMP001",
"employee_documents_id": "MjAyNjAxMjFEQzAxRTJGM0E0QjU="
}'Related APIs
- Add Employee Profile - เพิ่มข้อมูล Profile
- Update Employee Profile - แก้ไขข้อมูล Profile
- Get Employee Info - ดึงข้อมูลพนักงาน
Last updated on