Skip to Content
🚀 Welcome to Humansoft Open API Documentation

List Employee Family Members

ดึงรายการสมาชิกครอบครัวทั้งหมดของพนักงาน (เรียงตามวันเกิด)

Endpoint

GET /api/v1/open-apis/employee/get-employee-profile?path_action=list-family

Query Parameters

ParameterTypeRequiredDescription
path_actionstringYesต้องเป็น list-family
employee_codestringYesรหัสพนักงาน

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

FieldTypeDescription
employee_family_idstringID ของข้อมูลครอบครัว
employee_idstringID ของพนักงาน
relation_typestringรหัสประเภทความสัมพันธ์
relation_type_namestringชื่อประเภทความสัมพันธ์
family_id_nostringเลขบัตรประชาชน
family_title_lvstringคำนำหน้าชื่อ
family_namestringชื่อ
family_last_namestringนามสกุล
family_birthdaystringวันเกิด (YYYY-MM-DD)
family_mobilestringเบอร์โทรศัพท์
family_emailstringอีเมล
family_addressstringที่อยู่

Error Response

{ "code": 400, "message": "ไม่สำเร็จ", "error": "Employee not found with code: EMP001" }

relation_type Values

ValueDescription (TH)Description (EN)
01ภรรยาWife
02บิดาDad
03มารดาMom
04บุตรChild
05ผู้ติดต่อฉุกเฉินAccident Contact Person
06สามีHusband
07ผู้ค้ำประกันGuarantor
08พี่น้องSiblings

รายการอาจมีเพิ่มเติมได้จากการตั้งค่าในระบบ


Code Examples

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 ว่าง)

  • Get Family - ดึงข้อมูลครอบครัวตาม ID
  • Add Family - เพิ่มข้อมูลครอบครัว
  • Update Family - แก้ไขข้อมูลครอบครัว
  • Delete Family - ลบข้อมูลครอบครัว
Last updated on