Skip to Content
🚀 Welcome to Humansoft Open API Documentation

Update Employee Address

แก้ไขที่อยู่ของพนักงาน ทั้งที่อยู่ตามทะเบียนบ้านและที่อยู่ปัจจุบัน

Endpoint

POST /api/v1/open-apis/employee/update-employee-profile?path_action=save-address

Query Parameters

ParameterTypeRequiredDescription
path_actionstringYesใช้ address หรือ save-address

Request Body

Base Parameters

ParameterTypeRequiredDescription
employee_codestringYesรหัสพนักงาน

ที่อยู่ตามทะเบียนบ้าน

ParameterTypeRequiredDescription
addressstringNoที่อยู่ตามทะเบียนบ้าน
country_codestringNoรหัสประเทศ
state_codestringNoรหัสจังหวัด
district_codestringNoรหัสอำเภอ/เขต
subdistrict_codestringNoรหัสตำบล/แขวง
post_codestringNoรหัสไปรษณีย์

ที่อยู่ปัจจุบัน

ParameterTypeRequiredDescription
current_addressstringNoที่อยู่ปัจจุบัน
current_country_codestringNoรหัสประเทศปัจจุบัน
current_state_codestringNoรหัสจังหวัดปัจจุบัน
current_district_codestringNoรหัสอำเภอ/เขตปัจจุบัน
current_subdistrict_codestringNoรหัสตำบล/แขวงปัจจุบัน
current_post_codestringNoรหัสไปรษณีย์ปัจจุบัน

Response Format

Success Response

{ "code": 200, "message": "Update Address Success", "payload": { "employee_id": "20260121EM01A2B3C4D5", "address": "99/1 ถนนนเรศวร", "country_code": "TH", "state_code": "65", "district_code": "6501", "subdistrict_code": "650101", "post_code": "65000", "current_address": "99/1 ถนนนเรศวร", "current_country_code": "TH", "current_state_code": "65", "current_district_code": "6501", "current_subdistrict_code": "650101", "current_post_code": "65000" } }

Error Response

{ "code": 400, "message": "Validation failed", "errors": ["Missing required parameter: 'employee_code'"] }

Code Examples

curl -X POST "https://openapi.humansoft.co.th/api/v1/open-apis/employee/update-employee-profile?path_action=save-address" \ -H "Content-Type: application/json" \ -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \ -d '{ "employee_code": "EMP001", "address": "99/1 ถนนนเรศวร", "country_code": "TH", "state_code": "65", "district_code": "6501", "subdistrict_code": "650101", "post_code": "65000", "current_address": "99/1 ถนนนเรศวร", "current_country_code": "TH", "current_state_code": "65", "current_district_code": "6501", "current_subdistrict_code": "650101", "current_post_code": "65000" }'

Notes

  • ฟิลด์ทั้งหมดเป็น Optional ยกเว้น employee_code - ถ้าไม่ระบุจะคงค่าเดิม
  • สามารถอัพเดทเฉพาะที่อยู่ตามทะเบียนบ้าน หรือเฉพาะที่อยู่ปัจจุบันได้
  • รหัสไปรษณีย์จะถูก resolve อัตโนมัติจาก subdistrict_code (ถ้ามี)

  • Get Employee Info - ดึงข้อมูลพนักงาน (รวมที่อยู่)
  • Get Employee Data - ดึงข้อมูลพนักงานแบบละเอียด
Last updated on