List Employee Hospitals
ดึงรายการโรงพยาบาลตามสิทธิทั้งหมดของพนักงาน
Endpoint
GET /api/v1/open-apis/employee/get-employee-data-filter?path_action=list-hospitalQuery Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
path_action | string | Yes | ต้องเป็น list-hospital |
employee_code | string | Yes | รหัสพนักงาน (ไม่ต้อง encode Base64) |
Option Values
hospital_link_flag
| Value | Description (TH) | Description (EN) |
|---|---|---|
01 | ประกันสังคม | Social Security |
02 | ประกันอื่นๆ | Insurance Other |
03 | สวัสดิการ | Welfare |
Response Format
Success Response
{
"code": 200,
"message": "สำเร็จ",
"payload": [
{
"employee_hospital_id": "20260121HP01D2E3F4A5",
"employee_id": "20260121EM01A2B3C4D5",
"hospital_link_flag": "01",
"hospital_name": "โรงพยาบาลกรุงเทพ",
"created": "2026-01-10 09:00:00",
"last_upd": "2026-01-12 14:30:00"
},
{
"employee_hospital_id": "20260121HP02D3E4F5A6",
"employee_id": "20260121EM01A2B3C4D5",
"hospital_link_flag": "02",
"hospital_name": "โรงพยาบาลพญาไท",
"created": "2025-11-21 10:00:00",
"last_upd": "2025-11-21 10:00:00"
}
]
}Response Fields
| Field | Type | Description |
|---|---|---|
employee_hospital_id | string | ID ของโรงพยาบาลตามสิทธิ (Plain text) |
employee_id | string | ID ของพนักงาน (Plain text) |
hospital_link_flag | string | รหัสประเภทสิทธิ (01, 02, 03) |
hospital_name | string | ชื่อโรงพยาบาล |
created | datetime | วันเวลาที่สร้าง |
last_upd | datetime | วันเวลาที่อัพเดทล่าสุด |
Empty List
{
"code": 200,
"message": "สำเร็จ",
"payload": []
}Error Response
{
"code": 400,
"message": "ไม่สำเร็จ",
"error": "Employee not found with code: EMP999"
}Code Examples
cURL
curl -X GET "https://openapi.humansoft.co.th/api/v1/open-apis/employee/get-employee-data-filter?path_action=list-hospital&employee_code=EMP001" \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"Notes
Endpoint นี้ใช้ employee_code (Plain text) ไม่ใช่ employee_id (Base64) Response fields ที่ลงท้ายด้วย _id เป็น Plain text ไม่ได้ encode Base64 หากไม่มีข้อมูล จะคืน payload เป็น array ว่าง []
Related APIs
- Get Hospital - ดึงข้อมูลโรงพยาบาลตามสิทธิตาม ID
- Add Hospital - เพิ่มโรงพยาบาลตามสิทธิ
- Update Hospital - แก้ไขโรงพยาบาลตามสิทธิ
- Delete Hospital - ลบโรงพยาบาลตามสิทธิ
Last updated on