Gofive OpenAPI
empeo
VenioeTaxGo
empeo
VenioeTaxGo
  1. Leave
  • 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
        POST
    • Shifts
      • Get Shift Details
      • Update Employee Shifts
      • Get Employee Shifts
      • Swap Employee Shifts
    • 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
      POST
  • 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. Leave

Get Employee Documents

POST
https://api.gofive.co.th/empeo/api/v1/documents
ค้นหาเอกสารการลา
ค้นหาเอกสารการลาของ tenant ตามตัวกรองที่ส่งมาใน body
ทุก field ใน body ไม่บังคับ แต่ ต้องส่ง body มา (ส่ง {} ได้)
🎛️ ค่าเริ่มต้นที่ระบบเติมให้เมื่อไม่ส่ง
Skip = 0
Take = 2000
SortBy = AsOfDate
SortDir = DESC
ไม่ส่งทั้ง DateStart และ DateEnd → ค้นเฉพาะปีปัจจุบัน (1 ม.ค. – 31 ธ.ค.) โดยอัตโนมัติ; ถ้าต้องการช่วงอื่นต้องระบุเอง ส่งมาข้างเดียวก็ได้
⚠️ ข้อควรรู้
ไม่ส่ง body เลยจะได้ 400 จาก framework ในรูปแบบ ValidationProblemDetails ซึ่งไม่ใช่ envelope Result<T> ของ endpoint นี้
DocumentStatusId และ LeaveTypeId รับได้หลายค่าในรูปแบบ CSV (เช่น 2,4)
วันที่ใช้เฉพาะส่วนวัน เวลาที่ติดมาจะถูกตัดทิ้ง
ตัวกรองที่ระบบกำหนดเองเสมอ: ผู้ใช้และ tenant มาจาก token — ถ้าส่ง UserId / TenantId / SortOrder มาใน body จะถูกเขียนทับ จึงไม่มีในเอกสารนี้
🔐 ต้องมีสิทธิ์ Open API โมดูล Leave ระดับ Read

Request

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

Body Params application/jsonRequired

Example
{
    "CompanyName": "Acme",
    "DocumentStatusId": "2,4",
    "DateStart": "2026-06-01",
    "DateEnd": "2026-06-30",
    "Skip": 0,
    "Take": 100,
    "SortBy": "AsOfDate",
    "SortDir": "DESC"
}

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/documents' \
--header 'Ocp-Apim-Subscription-Key: YOUR_SUBSCRIPTION_KEY' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "CompanyName": "Acme",
    "DocumentStatusId": "2,4",
    "DateStart": "2026-06-01",
    "DateEnd": "2026-06-30",
    "Skip": 0,
    "Take": 100,
    "SortBy": "AsOfDate",
    "SortDir": "DESC"
}'

Responses

🟢200OK
application/json
สำเร็จ — Data คือรายการเอกสารที่ตรงตัวกรอง; ไม่พบข้อมูลก็ยังเป็น 200 โดย Data เป็น array ว่าง
Bodyapplication/json

Example
{
    "Status": {
        "Code": "1000",
        "Description": "Success!"
    },
    "Data": [
        {
            "DocumentNo": "LEV-2026-000123",
            "TimeBegin": "2026-06-15T09:00:00",
            "TimeEnd": "2026-06-15T18:00:00",
            "Date": "2026-06-15T00:00:00",
            "Note": "ลาพักผ่อนตัวอย่าง",
            "EmployeeNo": "EMP001",
            "EmployeeName": "พนักงานตัวอย่าง หนึ่ง",
            "TotalDay": 1,
            "TotalHour": 8,
            "DateCreated": "2026-06-10T10:15:00",
            "DateApproved": "2026-06-11T09:30:00",
            "CreatedBy": "พนักงานตัวอย่าง หนึ่ง",
            "DocumentStatusId": 4,
            "DocumentStatus": "อนุมัติเรียบร้อย",
            "LeaveType": "ลาพักผ่อน",
            "Category": 1,
            "OrgLevelOne": "บริษัทตัวอย่าง",
            "OrgLevelTwo": "สำนักงานใหญ่",
            "OrgLevelThree": "ฝ่ายตัวอย่าง",
            "OrgLevelFour": "แผนกตัวอย่าง",
            "OrgLevelFive": null,
            "OrgLevelSix": null
        },
        {
            "DocumentNo": "LEV-2026-000124",
            "TimeBegin": "2026-06-20T13:00:00",
            "TimeEnd": "2026-06-20T18:00:00",
            "Date": "2026-06-20T00:00:00",
            "Note": "ลากิจตัวอย่าง ครึ่งวัน",
            "EmployeeNo": "EMP002",
            "EmployeeName": "พนักงานตัวอย่าง สอง",
            "TotalDay": 0.5,
            "TotalHour": 4,
            "DateCreated": "2026-06-18T08:05:00",
            "DateApproved": null,
            "CreatedBy": "พนักงานตัวอย่าง สอง",
            "DocumentStatusId": 2,
            "DocumentStatus": "รออนุมัติ",
            "LeaveType": "ลากิจ",
            "Category": 1,
            "OrgLevelOne": "บริษัทตัวอย่าง",
            "OrgLevelTwo": "สำนักงานใหญ่",
            "OrgLevelThree": "ฝ่ายตัวอย่าง",
            "OrgLevelFour": null,
            "OrgLevelFive": null,
            "OrgLevelSix": null
        }
    ]
}
🟠401Unauthorized
🟠403Forbidden
🟠429Too Many Requests
🔴500Server Error
Modified at 2026-08-20 06:06:41
Previous
Get Employee Movement Lists
Next
Get Shift Details
Built with