Get Work Certificate List
ดึงรายการเอกสารหนังสือรับรองการทำงาน พร้อมตัวกรองโครงสร้างองค์กร สายการอนุมัติ และการแบ่งหน้า
ผลลัพธ์จัดกลุ่มตามพนักงาน แต่ละพนักงานมี profile และ docs array รองรับการแสดงผลบน Dashboard หรือ Mobile App
Endpoint
GET /api/v1/open-apis/work-certificate/get-listหรือ
POST /api/v1/open-apis/work-certificate/get-listRequest Parameters
Required Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
document_flow_lv | string | Yes | สถานะเอกสาร (ดู Option Values) | "01" |
req_year | string (YYYY) | Yes | ปีที่ขอเอกสาร (4 หลัก) | "2026" |
Optional Parameters
| Parameter | Type | Default | Description | Example |
|---|---|---|---|---|
req_month | string (MM) | - | เดือนที่ขอเอกสาร (01-12) | "03" |
from_dt | string (YYYY-MM-DD) | - | วันที่เริ่มต้นช่วงกรอง | "2026-01-01" |
to_dt | string (YYYY-MM-DD) | - | วันที่สิ้นสุดช่วงกรอง | "2026-03-31" |
authorize_line | boolean | false | เปิดกรองตามสายการอนุมัติ | true |
platform | string | - | ระบุ platform | "web-hrs" |
select_channel_id | string (base64) | - | รหัส channel (base64 encoded) | "MjAyNDExMTM0OTVDMEFDNDZGREU=" |
hashtags | array | - | กรองตาม hashtag | ["งานขาย", "IT"] |
employee_lists | array | - | กรองตามพนักงาน (array ของ {id}) | ดูตัวอย่าง |
company_lists | array | - | กรองตามบริษัท (array ของ {id}) | ดูตัวอย่าง |
branch_lists | array | - | กรองตามสาขา (array ของ {id}) | ดูตัวอย่าง |
department_lists | array | - | กรองตามแผนก (array ของ {id}) | ดูตัวอย่าง |
division_lists | array | - | กรองตามฝ่าย (array ของ {id}) | ดูตัวอย่าง |
section_lists | array | - | กรองตามแผนกย่อย (array ของ {id}) | ดูตัวอย่าง |
position_lists | array | - | กรองตามตำแหน่ง (array ของ {id}) | ดูตัวอย่าง |
_PAGE | integer | 1 | หน้าปัจจุบัน | 1 |
_NUMBER_PER_PAGE | integer | - | จำนวนรายการต่อหน้า (1-1000) | 20 |
List Parameters Structure
ทุก *_lists parameter ต้องเป็น array ของ object ที่มี id เป็น base64 encoded:
[
{"id": "MjAyNjAzMDk0NjI1RUY2NUVGQ0E="},
{"id": "MjAyNjAzMDk0NjI1RUY2NUVGQ0I="}
]Document Flow Level Values
| Value | ความหมาย (TH) | ความหมาย (EN) | กรองรวม |
|---|---|---|---|
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 (ทุกสถานะที่ยังไม่ผ่านการอนุมัติขั้นสุดท้าย)
from_dt และ to_dt มีลำดับความสำคัญสูงกว่า req_year / req_month
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": "Work_Certificate",
"doc_id": "20260305WC000000001",
"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": "บริษัท ABC จำกัด",
"document_flow_lv": "01",
"doc_approver_name": null,
"doc_detail": { "...": "..." }
}
]
}
],
"_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 | Nullable | Description |
|---|---|---|---|
employee_id | string | No | รหัสพนักงาน (plain text) |
employee_code | string | No | รหัสพนักงาน |
photograph | string | No | URL รูปภาพ |
employee_name | string | No | ชื่อพนักงาน |
employee_last_name | string | No | นามสกุลพนักงาน |
employee_nickname | string | No | ชื่อเล่น |
position_name | string | No | ตำแหน่ง |
department_name | string | No | แผนก |
division_name | string | Yes | ฝ่าย |
section_name | string | Yes | แผนกย่อย |
branch_name | string | No | สาขา |
count_docs | integer | No | จำนวนเอกสาร |
Docs (รายการเอกสาร)
| Field | Type | Nullable | Description |
|---|---|---|---|
doc_type | string | No | ประเภทเอกสาร ("Work_Certificate") |
doc_id | string | No | รหัสเอกสาร (plain text) |
employee_id | string | No | รหัสพนักงาน |
approve_by | string | Yes | ชื่อผู้อนุมัติ |
header | string | No | หัวข้อเอกสาร |
detail | string | No | รายละเอียดเอกสาร |
status_detail | string | No | รายละเอียดสถานะ |
status | string | No | ชื่อสถานะเอกสาร |
authorize_flag | boolean | No | สิทธิ์อนุมัติตามสายงาน |
created | string | No | วันเวลาสร้าง (YYYY-MM-DD HH:mm:ss) |
created_format | string | No | วันเวลาสร้าง format (DD/MM/YYYY HH:mm) |
send_doc_address | string | Yes | ที่อยู่จัดส่ง |
document_flow_lv | string | No | สถานะเอกสาร (จัดกลุ่มแล้ว) |
doc_approver_name | string | Yes | ชื่อผู้อนุมัติเอกสาร |
doc_detail | object | No | ข้อมูลเอกสารเต็ม |
Pagination
| Field | Type | Nullable | Description |
|---|---|---|---|
_TOTAL_RECORDS | integer | No | จำนวนเอกสารทั้งหมด |
_PAGE | integer | No | หน้าปัจจุบัน |
_NUMBER_PER_PAGE | integer | No | จำนวนรายการต่อหน้า |
Code Examples
cURL
# ดูรายการเอกสารรออนุมัติ ปี 2026
curl -X GET "https://openapi.humansoft.co.th/api/v1/open-apis/work-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"
# ดูเอกสารอนุมัติแล้ว เดือนมีนาคม 2026
curl -X GET "https://openapi.humansoft.co.th/api/v1/open-apis/work-certificate/get-list?document_flow_lv=02&req_year=2026&req_month=03" \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Notes
ข้อควรทราบ:
- ฟิลด์
_idใน response เป็น plain text, ใน request (เช่นemployee_lists,company_lists) ต้องเข้ารหัส base64 document_flow_lvใน response จะถูกจัดกลุ่ม: สถานะ01,06,07-11จะแสดงเป็น01- หนังสือรับรองการทำงาน ไม่มีข้อมูลเงินเดือน ต่างจากหนังสือรับรองเงินเดือน
from_dtและto_dtมีลำดับความสำคัญสูงกว่าreq_year/req_month
Related APIs
- Get Detail - ดูรายละเอียดเอกสาร (ใช้
doc_idจาก response) - Submit - สร้างเอกสารใหม่
- Approve - อนุมัติเอกสารที่เลือกจากรายการ
- Update - แก้ไขเอกสารที่เลือกจากรายการ
- Delete - ลบเอกสารที่เลือกจากรายการ
- Export PDF - สร้าง PDF ของเอกสาร
Last updated on