Skip to Content
🚀 Welcome to Humansoft Open API Documentation
DocumentationAPI ReferenceOrganization (องค์กร)Get Employee Status

Get Employee Status

ดึงรายการสถานะพนักงานทั้งหมด ซึ่งค่าจริงในระบบจะเป็น “สถานภาพสมรสสำหรับคำนวณภาษี (Marital Status)”

ข้อควรระวัง: แม้ชื่อ endpoint จะเป็น employee_status แต่ในทางปฏิบัติจริง ค่าที่คืนเป็น สถานภาพสมรสสำหรับคำนวณภาษี ไม่ใช่สถานะการจ้างงาน

หากต้องการตรวจสอบสถานะการทำงาน/ลาออกของพนักงาน ให้ใช้ฟิลด์ signout_flag และ signout_type_flag ในข้อมูลพนักงานแทน (เช่นจาก Get Employee Info)

Endpoint

GET /api/v1/open-apis/organization/get-list-employee-status

สิทธิ์ที่ต้องการ: API Key ต้องมีสิทธิ์ กลุ่มข้อมูลองค์กร (org:manage)

Request Parameters

ไม่มี parameters

Response Format

Success Response (HTTP 200)

{ "code": 200, "message": "สำเร็จ", "payload": [ { "code": "01", "name": "โสด", "name_en": "Single" }, { "code": "02", "name": "สมรสและอยู่ร่วมกันตลอดปี", "name_en": "Married" }, { "code": "03", "name": "หม้าย", "name_en": "Divorce" }, { "code": "04", "name": "ตายระหว่างปีภาษี", "name_en": "Die in year" }, { "code": "05", "name": "สมรสระหว่างปี", "name_en": "Married during the year" }, { "code": "06", "name": "หย่าระหว่างปี", "name_en": "Divorce during the year" }, { "code": "07", "name": "สมรสและคู่สมรสตายระหว่างปี", "name_en": "Married and spouse die during the year" } ] }

Error Response (HTTP 400)

{ "code": 400, "message": "ไม่สำเร็จ", "error": "Error message here" }

Response Fields

FieldTypeDescription
codestringรหัสสถานะ (สถานภาพสมรสสำหรับคำนวณภาษี)
namestringชื่อสถานะ (แสดงตามภาษาที่เลือก)
name_enstringชื่อสถานะภาษาอังกฤษ

Code Examples

curl -X GET "https://openapi.humansoft.co.th/api/v1/open-apis/organization/get-list-employee-status" \ -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY"

Marital Status Codes

CodeภาษาไทยEnglish
01โสดSingle
02สมรสและอยู่ร่วมกันตลอดปีMarried
03หม้ายDivorce
04ตายระหว่างปีภาษีDie in year
05สมรสระหว่างปีMarried during the year
06หย่าระหว่างปีDivorce during the year
07สมรสและคู่สมรสตายระหว่างปีMarried and spouse die during the year

Notes

  • ข้อมูลดึงจาก List of Values ประเภท employee_status ซึ่งจริง ๆ แล้วใช้ระบุ สถานภาพสมรสสำหรับคำนวณภาษี (Marital Status)
  • ฟิลด์ name จะแสดงตามภาษาที่เลือก (TH หรือ EN)
  • ถ้าไม่มีข้อมูล payload จะเป็น array ว่าง []
  • Get Employee Type - ดึงรายการประเภทพนักงาน
  • Get Employee List - ดึงรายการพนักงานพร้อมกรองตามสถานะ
Last updated on