Update Employee Document
แก้ไขเอกสารของพนักงาน (รองรับการ upload ไฟล์ใหม่)
API นี้ใช้ multipart/form-data สำหรับ upload ไฟล์เอกสาร
พารามิเตอร์ employee_documents_id ต้องส่งเป็น Base64-encoded string
Endpoint
POST /api/v1/open-apis/employee/update-employee-profile?path_action=save-documentQuery Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
path_action | string | Yes | ใช้ document หรือ save-document |
Request Body (form-data)
| Field | Type | Required | Description |
|---|---|---|---|
employee_documents_id | text | Yes | ID ของเอกสารที่ต้องการแก้ไข (Base64-encoded) |
documents_name | text | No | ชื่อเอกสาร |
documents_code | text | No | รหัสประเภทเอกสาร |
documents_expired | text | No | วันหมดอายุ (YYYY-MM-DD) |
_doc | file | No | ไฟล์เอกสารใหม่ |
Document Types (documents_code)
| Code | Description (TH) | Description (EN) |
|---|---|---|
person_id | บัตรประจำตัวประชาชน | ID card |
passport | Passport | Passport |
home | ทะเบียนบ้าน | House Registration |
driver | ใบขับขี่ | Driver’s license |
employee_agreement | สัญญาจ้าง | Contract |
transcript | วุฒิการศึกษา | Transcript |
resume | Resume | Resume |
visa | Visa | Visa |
work_permit | ใบรับรองการทำงาน | Work Permit |
work_through | ใบผ่านงาน | Work Pass |
soldier | ใบผ่านการเกณฑ์ทหาร | Military Service Certificate |
change_name | เอกสารการเปลี่ยนชื่อ | Change Name |
surety_ship_agreemen | สัญญาค้ำประกัน | Guarantee Contract |
etc | อื่นๆ | Other |
Response Format
Success Response
{
"code": 200,
"message": "Update Document Success",
"payload": {
"employee_documents_id": "20260121DC01E2F3A4B5",
"documents_name": "บัตรประชาชน (ใหม่)"
}
}Error Response
{
"code": 400,
"message": "Validation failed",
"errors": ["Missing required parameter: employee_documents_id"]
}Code Examples
cURL
curl -X POST "https://openapi.humansoft.co.th/api/v1/open-apis/employee/update-employee-profile?path_action=save-document" \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
-F "employee_documents_id=MjAyNjAxMjFEQzAxRTJGM0E0QjU=" \
-F "documents_name=บัตรประชาชน (ใหม่)" \
-F "documents_expired=2032-12-31" \
-F "_doc=@/path/to/new_document.pdf"Related APIs
- List Documents - ดึงรายการเอกสารทั้งหมด
- Get Document - ดึงข้อมูลเอกสารตาม ID
- Add Document - เพิ่มเอกสาร
- Delete Document - ลบเอกสาร
Last updated on