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
  • Overtime
    • Get Overtimes Preriods
    • Get Overtimes Documents
  • Employee
    • User Info
    • Update Employee Information
  1. Shifts

Swap Employee Shifts

POST
https://api.gofive.co.th/empeo/api/v1/employees/swap-shifts
สลับกะระหว่างพนักงาน 2 คน
สลับกะของพนักงานสองคนในวันที่ที่ระบุ — พนักงาน FromEmployeeRefId ในวัน DateSwapFrom จะได้กะของ
ToEmployeeRefId ในวัน DateSwapTo และกลับกัน ระบบบันทึกเป็นคำขอสลับกะที่อนุมัติแล้ว
พนักงานทั้งสองคนต้องอยู่ในบริษัทเดียวกัน (CompanyName) และ ต้องมีกะของวันที่ที่จะสลับอยู่แล้วทั้งคู่
ถ้าฝ่ายใดฝ่ายหนึ่งยังไม่มีกะในวันนั้น คำขอจะล้มเหลว
endpoint นี้ใช้ envelope Result<T> ไม่ใช่ ApiResultBff<T> — ผลลัพธ์อยู่ใน Data.result (boolean)
และ Data.message (ข้อความ ปกติเป็นภาษาอังกฤษ) โดย key ทั้งสองเป็นตัวพิมพ์เล็กเพราะเป็น dictionary
ต้องมีสิทธิ์ Open API โมดูล Shift ระดับ ReadAndWrite

Request

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

Body Params application/jsonRequired

Example
{
    "CompanyName": "Gofive",
    "FromEmployeeRefId": "EMP001",
    "ToEmployeeRefId": "EMP002",
    "DateSwapFrom": "2025-06-12",
    "DateSwapTo": "2025-06-20",
    "Description": "Requesting shift swap due to a personal emergency."
}

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/swap-shifts' \
--header 'Ocp-Apim-Subscription-Key: {{subscription_key}}' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "CompanyName": "Gofive",
    "FromEmployeeRefId": "EMP001",
    "ToEmployeeRefId": "EMP002",
    "DateSwapFrom": "2025-06-12",
    "DateSwapTo": "2025-06-20",
    "Description": "Requesting shift swap due to a personal emergency."
}'

Responses

🟢200OK
application/json
สลับกะสำเร็จ — Data.result = true
Bodyapplication/json

Examples
{
    "status": {
        "code": "1000",
        "description": "Success!"
    },
    "data": {
        "message": "Saved successfully.",
        "result": true
    }
}
🟠400Bad Request
🟠401Unauthorized
🟠403Forbidden
🟠429
🔴500Server Error
Modified at 2026-08-17 17:13:59
Previous
Get Employee Shifts
Next
Search Projects
Built with