Export Extra Round
ส่งออกข้อมูลงวดพิเศษเป็นไฟล์รายงานในรูปแบบต่างๆ เช่น Excel, PDF, สลิปเงินเดือน หรือไฟล์สำหรับอัปโหลดเข้าระบบธนาคาร
Endpoint
GET /api/v1/open-apis/salary/get-data-filter?path_action=export_extra_roundสามารถส่งออกได้เฉพาะงวดที่ถูกปิด (Finished) แล้วเท่านั้น
Request Parameters
Required Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
master_salary_xtra_report_id | string | Yes | รหัสงวดพิเศษ (Base64 encoded) | "MjAyNTExMDFBMUIyQzNENA==" |
type | string | Yes | ประเภทไฟล์ส่งออก (ดูตารางด้านล่าง) | "slip" |
Optional Parameters
| Parameter | Type | Description | Example |
|---|---|---|---|
employee_code | string | กรองเฉพาะพนักงาน (ใช้กับ nvat, slip) | "EMP001" |
company_payment_account_id | string | บัญชีจ่ายเงินของบริษัท (Base64 encoded) | "MjAyMzExMTYwNjREOTVEQzc4OTA" |
filename | string | ชื่อไฟล์หรือหัวเรื่องรายงาน | "รอบจ่ายโบนัส" |
company_lists | array | กรองบริษัท | [{"id": "Base64_ID"}] |
branch_lists | array | กรองสาขา | [{"id": "Base64_ID"}] |
department_lists | array | กรองแผนก | [{"id": "Base64_ID"}] |
division_lists | array | กรองฝ่าย | [{"id": "Base64_ID"}] |
ประเภทไฟล์ส่งออก (type)
รายงานทั่วไป
ค่า (type) | รายละเอียด | รูปแบบ |
|---|---|---|
nvat | รายงาน ภ.ง.ด. | ข้อมูลสำหรับยื่นภาษี |
slip | สลิปเงินเดือน (งวดพิเศษ) | |
excel_normal | รายงานสรุปแบบปกติ | Excel |
excel_cash | รายงานสรุปการจ่ายเงินสด | Excel |
excel_transfer | รายงานสรุปการโอนเงิน | Excel |
excel | รายงานสรุป (ภาพรวม) | Excel |
pdf_cash | สรุปการจ่ายเงินสด (ลงลายมือชื่อ) | |
pdf_sign | ใบเซ็นรับเงิน | |
pdf_transfer | สรุปเงินโอน | |
json | ข้อมูลแบบ JSON | JSON |
ไฟล์สำหรับธนาคาร (Bank Format)
| ธนาคาร | ค่า type ที่รองรับ |
|---|---|
| กสิกรไทย (KBank) | excel_kbank, text_kbank, text_kbank2 - text_kbank6 |
| กรุงเทพ (BBL) | excel_bbl, dat_bbl, dat_bbl2 - dat_bbl10 |
| ไทยพาณิชย์ (SCB) | excel_scb, excel_scb2, excel_scb3, text_scb - text_scb7 |
| กรุงไทย (KTB) | excel_ktb - excel_ktb4, text_ktb, text_ktb2 |
| กรุงศรี (BAY) | text_bay - text_bay5 |
| ทีเอ็มบีธนชาต (TTB) | excel_tmb, excel_tbank, text_ttb, text_ttb2 |
| ยูโอบี (UOB) | excel_uob, text_uob |
| LH Bank | text_lah |
เมื่อใช้ Bank Format ค่า type ต้องตรงกับธนาคารของบัญชีจ่ายเงินที่ระบุใน company_payment_account_id
Response Format
Response จะเป็น Binary file (เช่น .xlsx, .pdf, .txt) ไม่ใช่ JSON — สามารถดาวน์โหลดและบันทึกไฟล์ได้โดยตรง
Error Responses
{
"code": 500,
"message": "งวดพิเศษนี้ยังไม่ถูกปิด ไม่สามารถส่งออกได้",
"payload": []
}{
"code": 400,
"message": "ValidationException: กรุณาระบุ master_salary_xtra_report_id",
"payload": []
}Code Examples
cURL
# ส่งออกสลิปเงินเดือนพนักงานเฉพาะคน
curl -X GET "https://openapi.humansoft.co.th/api/v1/open-apis/salary/get-data-filter?path_action=export_extra_round&master_salary_xtra_report_id=MjAyNTExMDFBMUIyQzNENA==&type=slip&employee_code=EMP001" \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
-o slip_extra.pdf
# ส่งออกรายงานสรุป Excel
curl -X GET "https://openapi.humansoft.co.th/api/v1/open-apis/salary/get-data-filter?path_action=export_extra_round&master_salary_xtra_report_id=MjAyNTExMDFBMUIyQzNENA==&type=excel_normal" \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
-o report.xlsx
# ส่งออกไฟล์ธนาคาร KBank
curl -X GET "https://openapi.humansoft.co.th/api/v1/open-apis/salary/get-data-filter?path_action=export_extra_round&master_salary_xtra_report_id=MjAyNTExMDFBMUIyQzNENA==&type=text_kbank&company_payment_account_id=MjAyMzExMTYwNjREOTVEQzc4OTA" \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
-o kbank_transfer.txtRelated APIs
- Get Extra Round Detail - ตรวจสอบสถานะงวดก่อนส่งออก
- Finish Extra Round - ปิดงวดก่อนส่งออก
Last updated on