Update Employee Time Frame
แก้ไขกรอบเวลาการทำงานของพนักงาน
Endpoint
POST /api/v1/open-apis/employee/update-employee-setting?path_action=time-frameQuery Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
path_action | string | Yes | ต้องเป็น time-frame |
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
employee_code | string | Yes | รหัสพนักงาน |
time_frame_id | string | Yes | ID ของกรอบเวลาที่ต้องการกำหนด |
effective_date | string | Yes | วันที่มีผลบังคับใช้ (รูปแบบ YYYY-MM-DD) |
ใช้ employee_code เพื่อระบุพนักงาน
การเปลี่ยนกรอบเวลาจะมีผลตั้งแต่วันที่ระบุใน effective_date เป็นต้นไป
Response Format
Success Response
{
"code": 200,
"message": "Save Time Frame Success",
"payload": {
"employee_id": "20260121EM01A2B3C4D5",
"time_frame_id": "20260121TF02A2B3C4D5",
"time_frame_name": "กรอบเวลายืดหยุ่น",
"effective_date": "2026-02-01"
}
}Response Fields
| Field | Type | Description |
|---|---|---|
employee_id | string | ID ของพนักงาน |
time_frame_id | string | ID ของกรอบเวลาที่อัพเดท |
time_frame_name | string | ชื่อกรอบเวลาที่อัพเดท |
effective_date | string | วันที่มีผลบังคับใช้ |
Error Response
{
"code": 400,
"message": "ไม่สำเร็จ",
"errors": ["กรุณาระบุ 'time_frame_id'"]
}Code Examples
cURL
curl -X POST "https://openapi.humansoft.co.th/api/v1/open-apis/employee/update-employee-setting?path_action=time-frame" \
-H "Content-Type: application/json" \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
-d '{
"employee_code": "EMP001",
"time_frame_id": "MjAyNjAxMjFURjAyQTJCM0M0RDU=",
"effective_date": "2026-02-01"
}'Related APIs
- Get Time Frame - ดึงข้อมูลกรอบเวลาการทำงาน
- Setting Overview - ภาพรวม Setting APIs
Last updated on