Delete Work Certificate
ลบเอกสารหนังสือรับรองการทำงานที่ยังไม่ได้อนุมัติ
การลบข้อมูลไม่สามารถกู้คืนได้ กรุณาตรวจสอบให้แน่ใจก่อนดำเนินการ
Endpoint
POST /api/v1/open-apis/work-certificate/deleteRequest Body
Required Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
work_certificate_letter_id | string (base64) | Yes | รหัสเอกสาร (base64 encoded) | "MjAyNjAzMDVXQzAwMDAwMDAwMQ==" |
Request Body Example
{
"work_certificate_letter_id": "MjAyNjAzMDVXQzAwMDAwMDAwMQ=="
}Response Format
Success Response (HTTP 200)
{
"code": 200,
"message": "ลบเอกสารรับรองการทำงานสำเร็จ",
"payload": {
"work_certificate_letter_id": "20260305WC000000001"
}
}Error Response - Validation Failed (HTTP 422)
{
"code": 422,
"message": "Validation failed",
"errors": ["Missing required parameter: 'work_certificate_letter_id'"]
}Error Response - Certificate Not Found (HTTP 404)
{
"code": 404,
"message": "Certificate not found"
}Error Response - Cannot Delete Approved (HTTP 400)
{
"code": 400,
"message": "Cannot delete approved certificate"
}Error Response - Server Error (HTTP 500)
{
"code": 500,
"message": "Internal server error"
}Response Fields
| Field | Type | Nullable | Description |
|---|---|---|---|
work_certificate_letter_id | string | No | รหัสเอกสารที่ถูกลบ (plain text) |
Code Examples
cURL
curl -X POST "https://openapi.humansoft.co.th/api/v1/open-apis/work-certificate/delete" \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"work_certificate_letter_id": "MjAyNjAzMDVXQzAwMDAwMDAwMQ=="
}'Notes
ข้อควรทราบ:
work_certificate_letter_idใน request ต้องเข้ารหัส base64, ใน response เป็น plain text- ไม่สามารถลบเอกสารที่มีสถานะ
02(อนุมัติแล้ว) ได้ - การลบข้อมูลไม่สามารถกู้คืนได้
- การแจ้งเตือนที่เกี่ยวข้องจะถูกลบอัตโนมัติ
Related APIs
- Get List - ดูรายการเอกสารเพื่อเลือกเอกสารที่จะลบ
- Get Detail - ตรวจสอบรายละเอียดเอกสารก่อนลบ
- Submit - สร้างเอกสารใหม่ทดแทนเอกสารที่ลบ
Last updated on