Add Employee Driving Skill
เพิ่มทักษะการขับขี่ของพนักงาน
Endpoint
POST /api/v1/open-apis/employee/add-employee-profile?path_action=driving-skillQuery Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
path_action | string | Yes | ต้องเป็น driving-skill |
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
employee_code | string | Yes | รหัสพนักงาน |
vehicle_name | string | Yes | ประเภทยานพาหนะ (เช่น รถยนต์, รถจักรยานยนต์, รถบรรทุก, รถโฟล์คลิฟท์) |
skill_level | string | No | ได้/ไม่ได้ (Y = ได้, N = ไม่ได้) |
certificate_no | string | No | เลขที่ใบอนุญาตขับขี่ |
certificate_effective_dt | string | No | วันเริ่มมีผลใบอนุญาต (YYYY-MM-DD) |
certificate_expire_dt | string | No | วันหมดอายุใบอนุญาต (YYYY-MM-DD) |
Response Format
Success Response
{
"code": 200,
"message": "Add Driving Skill Success",
"payload": {
"employee_driving_skill_id": "20260121DS01F2A3B4C5",
"employee_id": "20260121EM01A2B3C4D5",
"vehicle_name": "รถยนต์",
"skill_level": "Y",
"certificate_no": "12345678",
"certificate_expire_dt": "2030-12-31"
}
}Error Response
{
"code": 400,
"message": "Validation failed",
"errors": [
"Missing required parameter: 'employee_code'",
"Missing required parameter: 'vehicle_name'"
]
}Validation Rules
| Field | Rule |
|---|---|
employee_code | ต้องระบุและต้องมีพนักงานในระบบ |
vehicle_name | ต้องระบุและต้องไม่เป็นค่าว่าง |
Code Examples
cURL
curl -X POST "https://openapi.humansoft.co.th/api/v1/open-apis/employee/add-employee-profile?path_action=driving-skill" \
-H "Content-Type: application/json" \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
-d '{
"employee_code": "EMP001",
"vehicle_name": "รถยนต์",
"skill_level": "Y",
"certificate_no": "12345678",
"certificate_expire_dt": "2030-12-31"
}'Notes
- สามารถเพิ่มทักษะการขับขี่ได้หลายรายการต่อพนักงาน
- แต่ละรายการจะมี
employee_driving_skill_idแยกกัน - Endpoint นี้ใช้
employee_code(ไม่ต้อง encode Base64)
Related APIs
- List Driving Skills - ดึงรายการทักษะการขับขี่ทั้งหมด
- Get Driving Skill - ดึงข้อมูลทักษะการขับขี่ตาม ID
- Update Driving Skill - แก้ไขทักษะการขับขี่
- Delete Driving Skill - ลบทักษะการขับขี่
Last updated on