List Employee Family Members
ดึงรายการสมาชิกครอบครัวทั้งหมดของพนักงาน (เรียงตามวันเกิด)
Endpoint
GET /api/v1/open-apis/employee/get-employee-profile?path_action=list-familyQuery Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
path_action | string | Yes | ต้องเป็น list-family |
employee_code | string | Yes | รหัสพนักงาน |
Response Format
Success Response
{
"code": 200,
"message": "สำเร็จ",
"payload": [
{
"employee_family_id": "20260213A310C7812B2C",
"employee_id": "20260121FC89F3BB9120",
"relation_type": "01",
"relation_type_name": "ภรรยา",
"family_id_no": "1123456789012",
"family_title_lv": "02",
"family_name": "สมหญิง",
"family_last_name": "รักดี",
"family_birthday": "1985-03-20",
"family_mobile": "0819998888",
"family_email": "somying@email.com",
"family_address": "123/45 ถ.สุขุมวิท กรุงเทพฯ"
},
{
"employee_family_id": "20260213B420D8923C3D",
"employee_id": "20260121FC89F3BB9120",
"relation_type": "04",
"relation_type_name": "บุตร",
"family_id_no": "1123456789013",
"family_title_lv": "51",
"family_name": "สมชาย",
"family_last_name": "ใจดี",
"family_birthday": "2010-05-15",
"family_mobile": "0812345678",
"family_email": "somchai@email.com",
"family_address": "123/45 ถ.สุขุมวิท กรุงเทพฯ"
}
]
}Response Fields
| Field | Type | Description |
|---|---|---|
employee_family_id | string | ID ของข้อมูลครอบครัว |
employee_id | string | ID ของพนักงาน |
relation_type | string | รหัสประเภทความสัมพันธ์ |
relation_type_name | string | ชื่อประเภทความสัมพันธ์ |
family_id_no | string | เลขบัตรประชาชน |
family_title_lv | string | คำนำหน้าชื่อ |
family_name | string | ชื่อ |
family_last_name | string | นามสกุล |
family_birthday | string | วันเกิด (YYYY-MM-DD) |
family_mobile | string | เบอร์โทรศัพท์ |
family_email | string | อีเมล |
family_address | string | ที่อยู่ |
Error Response
{
"code": 400,
"message": "ไม่สำเร็จ",
"error": "Employee not found with code: EMP001"
}relation_type Values
| Value | Description (TH) | Description (EN) |
|---|---|---|
01 | ภรรยา | Wife |
02 | บิดา | Dad |
03 | มารดา | Mom |
04 | บุตร | Child |
05 | ผู้ติดต่อฉุกเฉิน | Accident Contact Person |
06 | สามี | Husband |
07 | ผู้ค้ำประกัน | Guarantor |
08 | พี่น้อง | Siblings |
รายการอาจมีเพิ่มเติมได้จากการตั้งค่าในระบบ
Code Examples
cURL
curl -X GET "https://openapi.humansoft.co.th/api/v1/open-apis/employee/get-employee-profile?path_action=list-family&employee_code=EMP001" \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY"Notes
- Endpoint นี้ใช้
employee_code(รหัสพนักงาน) ไม่ใช่employee_id - Response เรียงลำดับตามวันเกิด (
family_birthday) - ถ้าพนักงานไม่มีข้อมูลครอบครัว จะได้
payload: [](array ว่าง)
Related APIs
- Get Family - ดึงข้อมูลครอบครัวตาม ID
- Add Family - เพิ่มข้อมูลครอบครัว
- Update Family - แก้ไขข้อมูลครอบครัว
- Delete Family - ลบข้อมูลครอบครัว
Last updated on