Add Employee Document
เพิ่มเอกสารของพนักงาน
Endpoint
POST /api/v1/open-apis/employee/add-employee-profile?path_action=documentQuery Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
path_action | string | Yes | ต้องเป็น document |
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
employee_code | string | Yes | รหัสพนักงาน |
documents_code | string | Yes | รหัสประเภทเอกสาร |
documents_no | string | Yes | เลขที่เอกสาร |
documents_date_from | string | No | วันที่เริ่มต้น (YYYY-MM-DD) |
documents_date_to | string | No | วันที่สิ้นสุด (YYYY-MM-DD) |
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": "Add Document Success",
"payload": {
"documents_id": "20260213ABC1234567890",
"employee_id": "20260121FC89F3BB9120",
"documents_code": "02",
"documents_no": "AB1234567",
"documents_date_from": "2020-01-01",
"documents_date_to": "2025-12-31"
}
}Error Response
{
"code": 400,
"message": "Validation failed",
"errors": [
"Missing required parameter: 'employee_code'",
"Missing required parameter: 'documents_code'"
]
}Code Examples
cURL
curl -X POST "https://openapi.humansoft.co.th/api/v1/open-apis/employee/add-employee-profile?path_action=document" \
-H "Content-Type: application/json" \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
-d '{
"employee_code": "EMP001",
"documents_code": "person_id",
"documents_no": "AB1234567",
"documents_date_from": "2020-01-01",
"documents_date_to": "2025-12-31"
}'Related APIs
- List Documents - ดึงรายการเอกสารทั้งหมด
- Get Document - ดึงข้อมูลเอกสารตาม ID
- Update Document - แก้ไขเอกสาร
- Delete Document - ลบเอกสาร
Last updated on