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
| Field | Type | Description |
|---|---|---|
code | string | รหัสสถานะ (สถานภาพสมรสสำหรับคำนวณภาษี) |
name | string | ชื่อสถานะ (แสดงตามภาษาที่เลือก) |
name_en | string | ชื่อสถานะภาษาอังกฤษ |
Code Examples
cURL
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 ว่าง
[]
Related APIs
- Get Employee Type - ดึงรายการประเภทพนักงาน
- Get Employee List - ดึงรายการพนักงานพร้อมกรองตามสถานะ
Last updated on