Skip to Content
🚀 Welcome to Humansoft Open API Documentation

Daily In Month

ดึงข้อมูลตารางเวลาการทำงานทั้งเดือนของพนักงาน แสดงรายวัน พร้อมเวลาเข้า-ออก, กะ, วันหยุด, เอกสารลา/OT/แก้เวลา และสรุปข้อมูลเงินเดือน

Endpoint

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

Request Parameters

ParameterTypeRequiredDescriptionExample
employee_codestringYesรหัสพนักงาน"EMP001"
year_monthstringNoรอบเงินเดือน (YYYY-MM) ถ้าไม่ส่งจะใช้รอบเดือนปัจจุบัน"2026-02"
language_codestringNoภาษา: TH หรือ EN (ค่าเริ่มต้น: TH)"TH"

หากไม่ระบุ year_month ระบบจะใช้รอบเดือนปัจจุบันโดยอัตโนมัติ


Response Format

Success Response

{ "code": 200, "message": "Success", "payload": { "profile": { "master_employee_id": "2026012815D188B7C42D", "master_salary_report_id": "202601286709D2934361", "master_salary_month": "2026-02", "employee_id": "20260121FC89F3BB9120", "employee_code": "EMP001", "employee_name": "สมชาย", "employee_last_name": "ใจดี", "employee_name_en": "Somchai", "employee_last_name_en": "Jaidee", "employee_nickname": "ชาย", "employee_gender": "M", "employee_status": "01", "salary": "35000.00", "days_per_month": "26", "hours_per_day": "09:00:00", "work_ages": "5 ปี 2 เดือน 10 วัน", "work_cycle_format": "daily", "calculate_ot": false, "employee_type_group_code": "ET0001", "employee_type_group_name": "พนักงานรายเดือน", "company_name": "บริษัท ตัวอย่าง จำกัด", "branch_name": "สำนักงานใหญ่", "department_name": "ฝ่ายพัฒนา", "position_name": "โปรแกรมเมอร์" }, "month": { "master_salary_report_id": "202601286709D2934361", "master_salary_month": "2026-02", "salary_report_start_dt": "2026-01-26 00:00:00", "salary_report_end_dt": "2026-02-25 23:59:59", "day_in_month": "31", "master_salary_report_type_lv": "salary", "salary_report_step": "1", "salary_paid_dt": null, "salary_split_flag": "Y", "salary_split_round": "2", "sso_employee_rate": "2.00", "sso_company_rate": "2.00", "employee_calculate_flag": "N" }, "daily": [ { "time_attendance_group_transac_id": "20260128D11B6231DC51", "work_date": "2026-01-26", "day_status": "วันทำงาน", "work_cycle_code": "WC002", "work_cycle_start_time": "2026-01-26 09:00:00", "work_cycle_end_time": "2026-01-26 18:00:00", "work_cycle_hour": "09:00:00", "break_cycle_start_time": "2026-01-26 12:00:00", "break_cycle_end_time": "2026-01-26 13:00:00", "break_cycle_hour": "01:00:00", "holiday_count": "0", "holiday_flag_lv": "00", "work_time_count": "0", "work_sum_time": "00:00:00", "work_total_time": "00:00:00", "work_total_in_cycle": "00:00:00", "late_sum_time": "00:00:00", "late_total": "0.00", "early_sum_time": "00:00:00", "early_total": "0.00", "morning_sum_time": "00:00:00", "absence_day": "0.0000", "absence_total": "0.00", "time": [], "work_cycle_change": null, "holiday_change": null, "time_adjust": null, "ot_work": null, "calculate_result": { "title": "ชั่วโมงการทำงาน", "bullets": [ { "label": "ไม่สามารถคำนวณชั่วโมงการทำงานได้เนื่องจาก", "value": "ยังไม่ได้ลงเวลาเข้า/ออกงาน" } ], "warnings": ["ยังไม่ได้ลงเวลาเข้า/ออกงาน", "ยังไม่มีการคำนวณเงินเดือน"], "periodText": "WC002 : 08:00:00 ชั่วโมง | 09:00 - 12:00 - 13:00 - 18:00", "canCalculate": false, "isHoliday": false } } ], "documents": { "holiday_change": [], "time_leave": [], "time_leave_2": [], "ot_request": [], "time_adjust": [], "work_cycle_change": [] }, "documents_count": { "holiday_change": 0, "time_leave": 0, "time_leave_2": 0, "ot_request": 0, "time_adjust": 0, "work_cycle_change": 0 }, "slip": { "salary_slip_id": "20260228SLIP000001", "employee_code": "EMP001", "company_name": "บริษัท ตัวอย่าง จำกัด", "branch_name": "สำนักงานใหญ่", "department_name": "ฝ่ายพัฒนา", "position_name": "โปรแกรมเมอร์", "income_total": "35000.00", "expense_total": "1750.00", "net_total": "33250.00" }, "salary_type": { "Income": [ { "salary_type_code": "I001", "salary_type_name": "เงินเดือน", "salary_type_total": "35000.00" } ], "Expense": [ { "salary_type_code": "E001", "salary_type_name": "ประกันสังคม", "salary_type_total": "750.00" } ] }, "sumtime": [ { "sum_time_code": "WORK", "sum_time_name": "เวลาทำงาน", "sum_time_value": "00:00:00" }, { "sum_time_code": "LATE", "sum_time_name": "มาสาย", "sum_time_value": "00:00:00" } ], "income": [ { "salary_type_code": "I001", "salary_type_name": "เงินเดือน", "salary_item_value": "35000.00" } ], "expense": [ { "salary_type_code": "E001", "salary_type_name": "ประกันสังคม", "salary_item_value": "750.00" } ], "withdraw": [], "withdraw_total": 0, "summary": [ { "type": "income", "name": "รวมรายได้", "value": "35000.00" }, { "type": "expense", "name": "รวมรายจ่าย", "value": "1750.00" }, { "type": "net", "name": "รับสุทธิ", "value": "33250.00" } ] } }

Payload Sections

SectionTypeDescription
profileobjectข้อมูลพนักงานในรอบเดือนนี้
monthobjectข้อมูลรอบเดือน
dailyarrayตารางเวลาทำงานรายวัน พร้อมผลการคำนวณ
documentsobjectสรุปเอกสารที่มีในรอบเดือน
documents_countobjectจำนวนเอกสารแต่ละประเภท
advance_withdrawarrayรายการเบิกล่วงหน้า
slipobjectข้อมูลสลิปเงินเดือน
salary_typeobjectรายการประเภทเงินเดือน แยก Income / Expense
sumtimearrayสรุปเวลาทำงานรอบเดือน
incomearrayรายการรายรับทั้งหมด
expensearrayรายการรายจ่ายทั้งหมด
withdrawarrayรายการเบิก
withdraw_totalnumberยอดรวมเบิก
summaryarrayสรุปยอดรวม (รายรับ/รายจ่าย/เงินเดือนสุทธิ)

Key Response Fields - profile

FieldTypeDescription
employee_codestringรหัสพนักงาน
employee_namestringชื่อพนักงาน
employee_last_namestringนามสกุล
salarystringเงินเดือน (decimal string)
days_per_monthstringจำนวนวันทำงานต่อเดือน
hours_per_daystringชั่วโมงทำงานต่อวัน (HH:MM:SS)
work_agesstringอายุงาน
calculate_otbooleanคำนวณ OT หรือไม่
employee_type_group_namestringชื่อประเภทพนักงาน

Key Response Fields - daily[]

FieldTypeDescription
work_datestringวันที่ (YYYY-MM-DD)
day_statusstringสถานะวัน: "วันทำงาน", "วันหยุดพนักงาน"
work_cycle_codestringรหัสกะ
work_cycle_start_timestringเวลาเริ่มงานตามกะ
work_cycle_end_timestringเวลาเลิกงานตามกะ
work_sum_timestringเวลาทำงานรวม (HH:mm:ss)
late_sum_timestringเวลาสาย (HH:mm:ss)
early_sum_timestringเวลากลับก่อน (HH:mm:ss)
absence_daystringจำนวนวันขาดงาน
timearrayรายการเวลาเข้า-ออกงาน
calculate_resultobjectผลการคำนวณชั่วโมงทำงาน

Error Response

{ "code": 404, "message": "Employee not found with code: 9999", "payload": [] }
HTTP StatusDescription
400พารามิเตอร์ไม่ถูกต้อง เช่น year_month ผิดรูปแบบ
401API Key ไม่ถูกต้องหรือไม่ได้ส่ง
404ไม่พบพนักงาน หรือไม่พบรอบเดือนที่ระบุ

Code Examples

curl -X GET "https://openapi.humansoft.co.th/api/v1/open-apis/salary/get-data-filter?path_action=daily_in_month&employee_code=EMP001&year_month=2026-02&language_code=TH" \ -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY"

Notes

  • ข้อมูล profile บางฟิลด์อาจเป็น null ให้ใช้ข้อมูลจาก slip แทน (เช่น company_name, branch_name)
  • daily[].time = [] หมายถึงยังไม่ได้ลงเวลา และ calculate_result.canCalculate จะเป็น false
  • รอบเดือนอาจไม่ตรงปฏิทิน เช่น รอบ 2026-02 อาจเริ่ม 26 ม.ค. ถึง 25 ก.พ.
  • salary_type[].amount = 0 หมายถึงยังไม่ได้กรอกค่าหรือยังไม่คำนวณ ไม่ใช่ 0 บาทเสมอไป

API นี้ส่งข้อมูลจำนวนมาก หากต้องการเฉพาะข้อมูลสรุป ควรใช้ Salary Summary แทน


  • A Daily In Month - ดูข้อมูลวันทำงานวันเดียวในรอบเดือน
  • Current Month - ดูรอบเดือนปัจจุบัน
  • Daily Info - ดูรายละเอียดวันทำงาน พร้อม options
  • Calculate Month - คำนวณเวลาทำงานทั้งเดือน
  • Salary Summary - ดูสรุปเงินเดือน (เบากว่า)
Last updated on