Gofive OpenAPI
empeo
VenioeTaxGo
empeo
VenioeTaxGo
  1. Shifts
  • Authentication
    • Authorization
      POST
  • Master
    • Get Organizations
      GET
    • Get CustomField
      GET
    • Get Holiday
      GET
    • Get MasterSetup
      GET
    • Get Overtimes
      GET
  • Recruitment
    • Get Candidate
      GET
  • Core HR
    • Attendance
      • Get Time Attendance
      • Workin
      • Get Employee WorkIn Site
      • Get Timestamps
      • Get TimeStamp Attachments
      • Get Workin Sites
      • Get IOMO Logs
      • Add Timestamps
    • Asset
      • Get Asset list
      • Update Asset
      • Get Employee Assets
    • Employee
      • Get Employee
      • Update Employee
      • Get Employees List
      • Get Mastertypes List
      • Get Name Prefixes
      • Get Document Types
      • Update Employee
      • Add Employee Attachment
      • Update Employee Address
      • Update Employee Family
      • Update Employee Contact
      • Update Employee Education
      • Update Employee Experience
      • Update Employee CustomField
      • Delete Employee
      • Get Employee Role
      • Get Employee Movement Lists
    • Leave
      • Get Employee Documents
    • Shifts
      • Get Shift Details
        GET
      • Update Employee Shifts
        POST
      • Get Employee Shifts
        GET
      • Swap Employee Shifts
        POST
    • Timesheet
      • Search Projects
      • Search Tasks
      • Create Timesheet Entry
  • Payroll
    • Get Financial Transactions
      POST
    • Update Financial Transactions
      PUT
    • Create Loan
      POST
    • Get Cost Center
      POST
  • Welfare
    • Shuttle Buses
      GET
    • Passengers
      GET
  • Goals
    • Update KPI
  • Engagement
    • Achievement
      • Get Employee Achievements
      • Create Achievement Card
      • Create Achievement Award Document
      • Get Achievement Events
    • Praise
      • Get Employee Praises
      • Get Praise Types
      • Create Praise Reward Manager
    • StampCard
      • Get Stamp Cards
      • Get Stamp Card Detail
      • Add Stamp
    • Celebration
      • Get Upcoming Celebrations
    • Mission
      • ดึงคิวงานรอตรวจ
      • ดึงรายละเอียดงาน 1 ใบ
      • ดึงตัวเลขสรุปงานตามสถานะ
      • อนุมัติงานหลายใบพร้อมกัน
      • ส่งงานกลับให้แก้หลายใบพร้อมกัน
  • Overtime
    • Get Overtimes Preriods
    • Get Overtimes Documents
  • Employee
    • User Info
    • Update Employee Information
  1. Shifts

Update Employee Shifts

POST
https://api.gofive.co.th/empeo/api/v1/employees/shifts
กำหนดกะให้พนักงานหลายคนเป็นช่วงวันที่
กำหนดกะให้พนักงานหลายคนพร้อมกัน โดยแต่ละรายการระบุช่วงวันที่ที่กะมีผล
ระบบสร้างเป็นคำขอเปลี่ยนกะที่อนุมัติแล้วให้อัตโนมัติ
ต่างจาก PUT /api/v1/employees/shift ตรงที่ระบุบริษัทได้ ระบุกะด้วย รหัสกะ (ShiftCode) และกำหนดเป็นช่วงวันได้
📥 การส่ง body — body เป็น array ส่งหลายรายการได้ในคำขอเดียว
ไม่ส่ง DateTo = กะมีผลไปตลอด (ระบบตั้ง UnlimitEndDate ให้เอง)
EmployeeId / ToShiftId / ShiftTypeId ระบบเติมให้เองจาก EmployeeRefId และ ShiftCode — ส่งมาก็ถูกเขียนทับ จึงไม่มีในเอกสารนี้
📋 ต้องมีข้อมูลก่อนเรียก: รหัสกะต้องมีอยู่ในบริษัทนั้นหรือเป็นกะที่ใช้ได้ทุกสาขา (ดูจาก GET /api/v1/shifts)
⚠️ การตรวจสอบจะหยุดที่รายการแรกที่ผิด และตอบ 400 ทันที รายการก่อนหน้ายังไม่ถูกบันทึก (ระบบบันทึกทั้งชุดหลังตรวจครบแล้ว) — ข้อความบอกค่าที่ผิดไว้ใน Message เช่น No company name 'X' in this tenant., No employee 'EMP001' in this company. หรือ No shift 'A01' in this company.
📦 Batch Size Limit
จำนวนบริษัทสูงสุดต่อ 1 Request: 5 บริษัท (นับจาก CompanyName ที่ต่างกัน)
จำนวนรายการกะการทำงาน (Shift) สูงสุดต่อ 1 บริษัท: 1,000 รายการ
รวมสูงสุดต่อ 1 Request: ไม่เกิน 5 บริษัท × 1,000 รายการ/บริษัท
หากส่งเกินจำนวนนี้ ระบบจะตอบกลับ 429 Too Many Requests โดยไม่บันทึกรายการใดเลย
แนะนำ: หากมีข้อมูลมากกว่านี้ ให้แบ่งส่งเป็นหลาย Request
🔐 ต้องมีสิทธิ์ Open API โมดูล Shift ระดับ ReadAndWrite

Request

Authorization
JWT Bearer
Add the parameter
Authorization
to Headers
Example:
Authorization: ********************
or
Header Params

Body Params application/jsonRequired

Example
[
    {
        "EmployeeRefId": "EMP001",
        "CompanyName": "Acme",
        "ShiftCode": "A01",
        "DateFrom": "2026-07-01",
        "DateTo": "2026-07-31"
    },
    {
        "EmployeeRefId": "EMP002",
        "CompanyName": "Acme",
        "ShiftCode": "B01",
        "DateFrom": "2026-07-01",
        "DateTo": null
    }
]

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://api.gofive.co.th/empeo/api/v1/employees/shifts' \
--header 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '[
    {
        "EmployeeRefId": "EMP001",
        "CompanyName": "Acme",
        "ShiftCode": "A01",
        "DateFrom": "2026-07-01",
        "DateTo": "2026-07-31"
    },
    {
        "EmployeeRefId": "EMP002",
        "CompanyName": "Acme",
        "ShiftCode": "B01",
        "DateFrom": "2026-07-01",
        "DateTo": null
    }
]'

Responses

🟢200OK
application/json
บันทึกสำเร็จทั้งชุด — Message เป็นข้อความผลลัพธ์จากระบบ ไม่มี Data
Bodyapplication/json

Example
{
    "StatusCode": 200,
    "Message": "Saved successfully."
}
🟠400Bad Request
🟠401Unauthorized
🟠403Forbidden
🟠429Too Many Requests
🔴500Server Error
Modified at 2026-08-20 06:07:07
Previous
Get Shift Details
Next
Get Employee Shifts
Built with