Get Salary Certificate List
ดึงรายการเอกสารหนังสือรับรองเงินเดือน พร้อมตัวกรองโครงสร้างองค์กร สายการอนุมัติ และการแบ่งหน้า
ใช้ API นี้เพื่อดึงรายการเอกสารหนังสือรับรองเงินเดือนทั้งหมด รองรับการกรองตามหลายเงื่อนไข ผลลัพธ์จัดกลุ่มตามพนักงาน เหมาะสำหรับแสดงผลบน Dashboard หรือ Mobile App
Endpoint
GET /api/v1/open-apis/salary-certificate/get-list
POST /api/v1/open-apis/salary-certificate/get-listRequest Body
Required Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
document_flow_lv | string | Yes | สถานะเอกสาร | "01" |
req_year | string | Yes | ปีที่ขอเอกสาร (YYYY) | "2026" |
Optional Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
req_month | string | No | เดือนที่ขอเอกสาร (MM) | "03" |
from_dt | string | No | วันที่เริ่มต้นช่วงกรอง (YYYY-MM-DD) | "2026-01-01" |
to_dt | string | No | วันที่สิ้นสุดช่วงกรอง (YYYY-MM-DD) | "2026-03-31" |
authorize_line | boolean | No | เปิดกรองตามสายการอนุมัติ | true |
platform | string | No | ระบุ platform | "web-hrs" |
hashtags | array | No | กรองตาม hashtag | ["งานขาย", "IT"] |
employee_lists | array | No | กรองตามพนักงาน (array ของ {id} base64) | ดูตัวอย่าง |
company_lists | array | No | กรองตามบริษัท (array ของ {id} base64) | ดูตัวอย่าง |
branch_lists | array | No | กรองตามสาขา (array ของ {id} base64) | ดูตัวอย่าง |
department_lists | array | No | กรองตามแผนก (array ของ {id} base64) | ดูตัวอย่าง |
division_lists | array | No | กรองตามฝ่าย (array ของ {id} base64) | ดูตัวอย่าง |
section_lists | array | No | กรองตามแผนกย่อย (array ของ {id} base64) | ดูตัวอย่าง |
position_lists | array | No | กรองตามตำแหน่ง (array ของ {id} base64) | ดูตัวอย่าง |
_PAGE | integer | No | หน้าปัจจุบัน ค่าเริ่มต้น 1 | 1 |
_NUMBER_PER_PAGE | integer | No | จำนวนรายการต่อหน้า (1-1000) | 20 |
List Parameter Format
ทุก *_lists parameter ต้องเป็น array ของ object ที่มี id เป็น Base64 encoded:
[
{"id": "MjAyNjAzMDk0NjI1RUY2NUVGQ0E="},
{"id": "MjAyNjAzMDk0NjI1RUY2NUVGQ0I="}
]Option Values: document_flow_lv
| Value | Description (TH) | Description (EN) | Filter Includes |
|---|---|---|---|
01 | รออนุมัติ | Pending Approval | รวม 01, 06, 07-11 |
02 | อนุมัติแล้ว | Approved | เฉพาะ 02 |
03 | ไม่อนุมัติ | Not Approved | เฉพาะ 03 |
04 | ส่งเอกสารแล้ว | Sent Document | เฉพาะ 04 |
05 | ได้รับเอกสารแล้ว | Receive Document | เฉพาะ 05 |
07 | หัวหน้าอนุมัติ | Manager Approved | รวม 07-11 |
เมื่อกรองด้วย 01 ระบบจะรวมสถานะ 01, 06, 07-11 (ทุกสถานะที่ยังไม่ผ่านการอนุมัติขั้นสุดท้าย)
Response Format
Success Response (HTTP 200)
{
"code": 200,
"message": "สำเร็จ",
"payload": [
{
"profile": {
"employee_id": "20260309462FEF65EFCA",
"employee_code": "EMP001",
"photograph": "images/userPlaceHolder.png",
"employee_name": "ธาวัน",
"employee_last_name": "รายเดือน",
"employee_nickname": "วัน",
"position_name": "นักพัฒนาระบบ",
"department_name": "ฝ่ายไอที",
"division_name": "",
"section_name": "",
"branch_name": "สำนักงานใหญ่",
"count_docs": 2
},
"docs": [
{
"doc_type": "Salary_Certificate",
"doc_id": "20260305IMP00000001",
"employee_id": "20260309462FEF65EFCA",
"approve_by": "สมชาย ผู้จัดการ",
"header": "ขอหนังสือรับรองเงินเดือน",
"detail": "เพื่อใช้ยื่นกู้สินเชื่อธนาคาร",
"status_detail": "รออนุมัติ",
"status": "รออนุมัติ",
"authorize_flag": true,
"created": "2026-03-09 11:00:00",
"created_format": "09/03/2026 11:00",
"send_doc_address": "ธนาคารกสิกรไทย สาขาสยาม",
"document_flow_lv": "01",
"doc_approver_name": null
}
]
}
],
"_PAGINATION": {
"_TOTAL_RECORDS": 5,
"_PAGE": 1,
"_NUMBER_PER_PAGE": 20
}
}Empty Result Response (HTTP 200)
{
"code": 200,
"message": "สำเร็จ",
"payload": [],
"_PAGINATION": {
"_TOTAL_RECORDS": 0,
"_PAGE": 1,
"_NUMBER_PER_PAGE": 0
}
}Error Response - Validation Failed (HTTP 400)
{
"code": 400,
"message": "การตรวจสอบข้อมูลล้มเหลว",
"errors": [
"'document_flow_lv' is required",
"'req_year' is required"
]
}Response Fields
Profile (โปรไฟล์พนักงาน)
| Field | Type | Description |
|---|---|---|
employee_id | string | รหัสพนักงาน (20 ตัวอักษร, plain text) |
employee_code | string | รหัสพนักงาน |
photograph | string | URL รูปภาพ |
employee_name | string | ชื่อพนักงาน |
employee_last_name | string | นามสกุลพนักงาน |
employee_nickname | string | ชื่อเล่น |
position_name | string | ตำแหน่ง |
department_name | string | แผนก |
division_name | string | null | ฝ่าย |
section_name | string | null | แผนกย่อย |
branch_name | string | สาขา |
count_docs | integer | จำนวนเอกสาร |
Docs (รายการเอกสาร)
| Field | Type | Description |
|---|---|---|
doc_type | string | ประเภทเอกสาร ("Salary_Certificate") |
doc_id | string | รหัสเอกสาร (20 ตัวอักษร, plain text) |
employee_id | string | รหัสพนักงาน |
approve_by | string | null | ชื่อผู้อนุมัติ |
header | string | หัวข้อเอกสาร |
detail | string | รายละเอียดเอกสาร |
status_detail | string | รายละเอียดสถานะ |
status | string | ชื่อสถานะเอกสาร |
authorize_flag | boolean | สิทธิ์อนุมัติตามสายงาน |
created | string | วันเวลาสร้าง (YYYY-MM-DD HH:mm:ss) |
created_format | string | วันเวลาสร้าง format (DD/MM/YYYY HH:mm) |
send_doc_address | string | null | ที่อยู่จัดส่ง |
document_flow_lv | string | สถานะเอกสาร (จัดกลุ่มแล้ว) |
doc_approver_name | string | null | ชื่อผู้อนุมัติเอกสาร |
Pagination
| Field | Type | Description |
|---|---|---|
_TOTAL_RECORDS | integer | จำนวนเอกสารทั้งหมด |
_PAGE | integer | หน้าปัจจุบัน |
_NUMBER_PER_PAGE | integer | จำนวนรายการต่อหน้า |
Code Examples
cURL
curl -X GET "https://openapi.humansoft.co.th/api/v1/open-apis/salary-certificate/get-list?document_flow_lv=01&req_year=2026&_PAGE=1&_NUMBER_PER_PAGE=20" \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Notes
ข้อควรทราบ:
- ฟิลด์
_idใน response เป็น plain text 20 ตัวอักษร - ฟิลด์
_idใน request (เช่นemployee_lists,company_lists) ต้องเข้ารหัส Base64 document_flow_lvใน response จะถูกจัดกลุ่ม: สถานะ01,06,07-11แสดงเป็น01- ผลลัพธ์จัดกลุ่มตามพนักงาน แต่ละพนักงานมี
profileและdocsarray - ถ้าไม่มีสิทธิ์ดูเงินเดือน เงินเดือนจะแสดงเป็น
"XXXX" from_dtและto_dtมีลำดับความสำคัญสูงกว่าreq_year/req_month
Related APIs
- Get Detail - ดูรายละเอียดเอกสาร
- Submit - สร้างเอกสารใหม่
- Approve - อนุมัติเอกสาร
- Delete - ลบเอกสาร
- Export PDF - สร้าง PDF ของเอกสาร
Last updated on