Skip to Content
🚀 Welcome to Humansoft Open API Documentation

Get Calendar Month

ดึงปฏิทินการทำงานทั้งเดือนตามรอบเงินเดือน แสดงรายการพนักงานที่ทำงาน/ลา/หยุดในแต่ละวัน

Endpoint

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

Request Parameters

ParameterTypeRequiredDescriptionExample
year_monthstringYesรอบเงินเดือน (YYYY-MM)"2026-02"
typestringNoประเภทการกรอง (ดูตารางด้านล่าง)"leave"
time_leave_flagstringNoรหัสประเภทการลา (ใช้เมื่อ type=leave)"01"
work_cycle_idstringNoรหัสกะการทำงาน (Base64, ใช้เมื่อ type=work_cycle)-
holiday_flag_lvstringNoรหัสประเภทวันหยุด (ใช้เมื่อ type=holiday)"01"
language_codestringNoภาษา: TH หรือ EN"TH"

Filter Types

TypeDescription
nullทั้งหมด — แสดงพนักงานทุกคนทุกวัน (default)
"leave"ลางาน — แสดงเฉพาะพนักงานที่ลางาน
"work_cycle"กะการทำงาน — แสดงพนักงานตามกะที่ระบุ
"holiday"วันหยุด — แสดงเฉพาะพนักงานที่มีวันหยุด

Response Format

Success Response

{ "code": 200, "message": "Get Calendar Month (2026-02) Accept", "month": { "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", "read_only_flag": "N" }, "payload": { "2026-02-01": [ { "employee_code": "EMP001", "employee_name": "สมชาย", "employee_last_name": "ใจดี", "position_name": "โปรแกรมเมอร์", "department_name": "ฝ่ายพัฒนา", "organization": { "company": { "label": "บริษัท", "value": "บริษัท ตัวอย่าง จำกัด" }, "branch": { "label": "สาขา", "value": "สำนักงานใหญ่" }, "department": { "label": "แผนก", "value": "ฝ่ายพัฒนา" } }, "work_date": "2026-02-01", "work_cycle_code": "SHIFT_A", "work_cycle_start_time": "08:00:00", "work_cycle_end_time": "17:00:00", "absence_flag_lv": "00", "absence_flag_name": "", "day_status": "วันทำงาน" } ] } }

month Fields

FieldTypeDescription
master_salary_monthstringรอบเดือน (YYYY-MM)
salary_report_start_dtstringวันที่เริ่มต้นรอบ
salary_report_end_dtstringวันที่สิ้นสุดรอบ
day_in_monthstringจำนวนวันในรอบ
read_only_flagstringสถานะปิดรอบ: "Y" (ปิดแล้ว), "N" (เปิดอยู่)

payload Fields (per employee per day)

FieldTypeDescription
employee_codestringรหัสพนักงาน
employee_name / employee_last_namestringชื่อ-นามสกุล (ตามภาษาที่เลือก)
position_name / department_namestringตำแหน่ง / แผนก
organizationobjectข้อมูลองค์กร (company, branch, department)
work_datestringวันที่ทำงาน (YYYY-MM-DD)
work_cycle_codestringรหัสกะการทำงาน
work_cycle_start_time / work_cycle_end_timestringเวลาเริ่ม-สิ้นสุดกะ (HH:mm:ss)
absence_flag_lvstringรหัสประเภทการลา ("00" = ไม่ลา)
absence_flag_namestringชื่อประเภทการลา
day_statusstringสถานะวัน

Error Response

{ "code": 404, "message": "Exception Invalid Request No Month Valid" }

Code Examples

# ดูปฏิทินทั้งเดือน curl -X GET "https://openapi.humansoft.co.th/api/v1/open-apis/salary/get-data-filter?path_action=get_calendar_month&year_month=2026-02&language_code=TH" \ -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" # ดูเฉพาะพนักงานที่ลางาน curl -X GET "https://openapi.humansoft.co.th/api/v1/open-apis/salary/get-data-filter?path_action=get_calendar_month&year_month=2026-02&type=leave&language_code=TH" \ -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY"

Notes

  • payload เป็น Object ที่มี key เป็นวันที่ (YYYY-MM-DD) และ value เป็น array ของพนักงาน
  • ใช้ type parameter เพื่อกรองข้อมูลและเพิ่มประสิทธิภาพ
  • แนะนำให้ cache ข้อมูลที่ได้เพราะการดึงข้อมูลอาจใช้เวลานาน

  • Get Calendar Month Filter - ดูปฏิทินตามช่วงวันที่ (ไม่จำกัดรอบเงินเดือน)
Last updated on