Excel Receiving Template
ดาวน์โหลดไฟล์ Excel template สำหรับนำเข้าโควตาการลาที่จะได้รับ (Receiving Quota) ใช้สำหรับวางแผนโควตาที่พนักงานจะได้รับในอนาคต
Endpoint
GET /api/v1/open-apis/salary/get-data-filter?path_action=excel_receiving_templateรองรับทั้ง GET และ POST method — สามารถส่ง filter ผ่าน Query String หรือ Request Body ได้
Request Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
company_id | string | No | กรองตามบริษัท (Base64) | - |
branch_id | string | No | กรองตามสาขา (Base64) | - |
department_id | string | No | กรองตามแผนก (Base64) | - |
division_id | string | No | กรองตามฝ่าย (Base64) | - |
section_id | string | No | กรองตามหมวด (Base64) | - |
position_id | string | No | กรองตามตำแหน่ง (Base64) | - |
employee_id | string | No | กรองเฉพาะพนักงาน (Base64) | - |
keyword | string | No | ค้นหาจากชื่อ-นามสกุล, รหัสพนักงาน | "EMP001" |
employee_type_code | array | No | กรองตามประเภทพนักงาน | ["01"] |
language_code | string | No | ภาษา: TH หรือ EN | "TH" |
Response Format
Success Response
- Content-Type:
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet - Body: Binary stream ของไฟล์ Excel (.xlsx)
Excel File Structure
| Column | Description |
|---|---|
| รหัสพนักงาน | รหัสพนักงาน (employee_code) — ห้ามแก้ไข |
| สำนักงานสาขา | ชื่อสาขา — ห้ามแก้ไข |
| แผนก | ชื่อแผนก — ห้ามแก้ไข |
| ตำแหน่ง | ชื่อตำแหน่ง — ห้ามแก้ไข |
| ชื่อ-นามสกุล | ชื่อเต็มพนักงาน — ห้ามแก้ไข |
| ลาป่วย (วัน) | จำนวนวันลาป่วยที่จะได้รับ — กรอกได้ |
| ลาป่วย (ชม.) | จำนวนชั่วโมงลาป่วยที่จะได้รับ — กรอกได้ |
| … | คอลัมน์ประเภทการลาอื่นๆ — กรอกได้ |
Error Response
{
"code": 500,
"message": "ไม่สำเร็จ",
"errors": ["Failed to generate Excel file"]
}Code Examples
cURL
# ดาวน์โหลด template ทั้งหมด
curl -X GET "https://openapi.humansoft.co.th/api/v1/open-apis/salary/get-data-filter?path_action=excel_receiving_template&language_code=TH" \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
--output receiving_quota_template.xlsx
# ดาวน์โหลด template เฉพาะแผนก (POST)
curl -X POST "https://openapi.humansoft.co.th/api/v1/open-apis/salary/get-data-filter?path_action=excel_receiving_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 receiving_quota_template_dept.xlsxNotes
- โควตาที่จะได้รับ (Receiving Quota) คือโควตาที่พนักงานจะได้รับในอนาคต ไม่ใช่โควตาปัจจุบัน
- ถ้าไม่ส่ง filter ระบบจะดึงพนักงานทั้งหมดตาม context
- กรอกข้อมูลโควตาที่จะได้รับในคอลัมน์ที่กำหนด แล้วนำเข้าผ่าน Excel Receiving Import
Related APIs
- Excel Receiving Import - นำเข้าโควตาที่จะได้รับจาก Excel
- Get Receiving Import Log - ประวัติการนำเข้าโควตาที่จะได้รับ
- Excel Template - ดาวน์โหลด template โควตาปกติ
Last updated on