Delete Employee Welfare
ลบสวัสดิการของพนักงาน (ลบถาวร)
การลบข้อมูลไม่สามารถกู้คืนได้ กรุณาตรวจสอบให้แน่ใจก่อนดำเนินการ
Endpoint
POST /api/v1/open-apis/employee/delete-employee-financial?path_action=welfareQuery Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
path_action | string | Yes | ต้องเป็น welfare |
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
welfare_employee_id | string | Yes | ID สวัสดิการพนักงานที่ต้องการลบ (ต้อง encode Base64) |
- Request parameter
welfare_employee_idต้อง encode เป็น Base64 - Response field
welfare_employee_idเป็น Plain text ไม่ได้ encode Base64 - ควรตรวจสอบว่าไม่มีการใช้สวัสดิการแล้ว (
used_welfare_amt= 0) ก่อนลบ
Response Format
Success Response
{
"code": 200,
"message": "Delete Welfare Success",
"payload": {
"welfare_employee_id": "20260121WE01A2B3C4D5",
"deleted": true
}
}Response Fields
| Field | Type | Description |
|---|---|---|
code | number | รหัสสถานะ (200 = สำเร็จ) |
message | string | ข้อความตอบกลับ |
payload | object | ข้อมูลการลบ |
payload.welfare_employee_id | string | ID ของสวัสดิการที่ลบ (Plain text) |
payload.deleted | boolean | สถานะการลบ (true = ลบสำเร็จ) |
Error Response
{
"code": 400,
"message": "Validation failed",
"errors": ["Missing required parameter: 'welfare_employee_id'"]
}Welfare Not Found
{
"code": 400,
"message": "Welfare record not found with ID: MjAyNjAxMjFXRTAxQTJCM0M0RDU="
}Code Examples
cURL
curl -X POST "https://openapi.humansoft.co.th/api/v1/open-apis/employee/delete-employee-financial?path_action=welfare" \
-H "Content-Type: application/json" \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
-d '{
"welfare_employee_id": "MjAyNjAxMjFXRTAxQTJCM0M0RDU="
}'Related APIs
- List Welfare - ดึงรายการสวัสดิการทั้งหมด
- Get Welfare - ดึงข้อมูลสวัสดิการตาม ID
- Add Welfare - เพิ่มสวัสดิการ
- Save Welfare - แก้ไขสวัสดิการ
- Add Welfare Log - เพิ่มบันทึกการใช้สวัสดิการ
- Delete Welfare Log - ลบบันทึกการใช้สวัสดิการ
Last updated on