Skip to Content
🚀 Welcome to Humansoft Open API Documentation

Excel Template

ดาวน์โหลดไฟล์ Excel template สำหรับนำเข้าข้อมูลโควตาการลา ใช้สำหรับเตรียมข้อมูลก่อนนำเข้าผ่าน Excel Import API

Endpoint

GET /api/v1/open-apis/salary/get-data-filter?path_action=excel_template

รองรับทั้ง GET และ POST method — สามารถส่ง filter ผ่าน Query String หรือ Request Body ได้

Request Parameters

ParameterTypeRequiredDescriptionExample
quota_yearstringNoปีโควตา (YYYY)"2026"
company_idstringNoกรองตามบริษัท (Base64)-
branch_idstringNoกรองตามสาขา (Base64)-
department_idstringNoกรองตามแผนก (Base64)-
division_idstringNoกรองตามฝ่าย (Base64)-
section_idstringNoกรองตามหมวด (Base64)-
position_idstringNoกรองตามตำแหน่ง (Base64)-
employee_idstringNoกรองเฉพาะพนักงานคนเดียว (Base64)-
keywordstringNoค้นหาจากชื่อ-นามสกุล, รหัสพนักงาน"EMP001"
employee_type_codearrayNoกรองตามประเภทพนักงาน["01", "02"]
language_codestringNoภาษา: TH หรือ EN"TH"

Response Format

Success Response

  • Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
  • Body: Binary stream ของไฟล์ Excel (.xlsx)

Excel File Structure

ColumnDescriptionแก้ไขได้
รหัสพนักงานรหัสพนักงาน (employee_code)ห้ามแก้ไข
สำนักงานสาขาชื่อสาขาห้ามแก้ไข
แผนกชื่อแผนกห้ามแก้ไข
ตำแหน่งชื่อตำแหน่งห้ามแก้ไข
ชื่อ-นามสกุลชื่อเต็มพนักงานห้ามแก้ไข
ลาป่วย (วัน)จำนวนวันลาป่วยกรอกได้
ลาป่วย (ชม.)จำนวนชั่วโมงลาป่วยกรอกได้
ลากิจ (วัน)จำนวนวันลากิจกรอกได้
ลากิจ (ชม.)จำนวนชั่วโมงลากิจกรอกได้
คอลัมน์ประเภทการลาอื่นๆ ตามที่ระบบกำหนดกรอกได้

Error Response

{ "code": 400, "message": "ไม่สำเร็จ", "errors": ["quota_year must be 4 digits"] }

Code Examples

# ดาวน์โหลด template ทั้งหมด curl -X GET "https://openapi.humansoft.co.th/api/v1/open-apis/salary/get-data-filter?path_action=excel_template&quota_year=2026&language_code=TH" \ -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \ --output quota_template.xlsx # ดาวน์โหลด template เฉพาะแผนก (POST) curl -X POST "https://openapi.humansoft.co.th/api/v1/open-apis/salary/get-data-filter?path_action=excel_template&language_code=TH" \ -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"department_id": "MjAyNTEwMDYxOTJGRTg4RTk3QTU=", "employee_type_code": ["01"]}' \ --output quota_template_dept.xlsx

Notes

  • ห้ามแก้ไขคอลัมน์: รหัสพนักงาน, สำนักงานสาขา, แผนก, ตำแหน่ง, ชื่อ-นามสกุล
  • ค่าที่กรอกได้: ตัวเลข 0 หรือมากกว่า (ไม่รองรับค่าลบ)
  • ถ้าไม่ส่ง filter ระบบจะดึงพนักงานทั้งหมดตาม context
  • ใช้ --output ใน cURL เพื่อบันทึกไฟล์ Excel ลงเครื่อง
  • กรอกข้อมูลโควตาในคอลัมน์ที่กำหนดแล้วนำเข้าผ่าน Excel Import

  • Excel Import - นำเข้าโควตาจากไฟล์ Excel ที่กรอกข้อมูลแล้ว
  • Get Import Log - ดูรายการประวัติการนำเข้าโควตา
  • Excel Receiving Template - ดาวน์โหลด template สำหรับโควตาที่จะได้รับ
Last updated on