Get Tax Cutoff Date
ดึงข้อมูลวันตัดแก้ไขการแก้ไขรายการหักลดหย่อนภาษี และสิทธิ์ว่าสามารถแก้ไขได้หรือไม่
ควรเรียก API นี้ก่อนทำการแก้ไขข้อมูลลดหย่อนภาษี เพื่อตรวจสอบว่า allow_edit_deduction เป็น true
Endpoint
GET /api/v1/open-apis/employee/get-employee-data-filter?path_action=get-cutoff-date-deductionQuery Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
path_action | string | Yes | ต้องเป็น get-cutoff-date-deduction |
employee_code | string | Yes | รหัสพนักงาน |
role_page | string | No | ถ้าเป็น profile จะไม่ตรวจสิทธิ์กลุ่ม SAL/AUDIT (ให้แก้ได้) |
Response Format
Success Response
{
"code": 200,
"message": "สำเร็จ",
"payload": {
"allow_edit_deduction": true,
"last_date_edit_deduction": "2024-12-15",
"report_end_dt": "2024-12-31",
"date_request": "2024-12-01"
}
}Success Response - Config ปิด
{
"code": 200,
"message": "สำเร็จ",
"payload": {
"allow_edit_deduction": true,
"last_date_edit_deduction": null,
"report_end_dt": null,
"date_request": "2024-12-01"
}
}Response Fields
| Field | Type | Description |
|---|---|---|
code | number | 200 = สำเร็จ |
message | string | ข้อความตอบกลับ |
payload | object | ข้อมูล cutoff |
payload.allow_edit_deduction | boolean | สิทธิ์แก้ไขรายการหักลดหย่อนได้หรือไม่ |
payload.last_date_edit_deduction | string / null | วันสุดท้ายที่แก้ไขได้ (Y-m-d) ถ้ามี config (null ถ้า config ปิด) |
payload.report_end_dt | string / null | วันสิ้นสุดรอบรายงาน (null ถ้า config ปิด) |
payload.date_request | string | วันที่ที่ใช้ตรวจ (วันนี้ Y-m-d) |
Error Responses
Missing Parameter:
{
"code": 400,
"message": "ไม่สำเร็จ",
"error": "Missing required parameter: employee_code"
}Employee Not Found:
{
"code": 400,
"message": "ไม่สำเร็จ",
"error": "Employee not found with code: EMP999"
}Check Round Month:
{
"code": 400,
"message": "ไม่สำเร็จ",
"error": "Exception check round month"
}Code Examples
cURL
curl -X GET "https://openapi.humansoft.co.th/api/v1/open-apis/employee/get-employee-data-filter?path_action=get-cutoff-date-deduction&employee_code=EMP001" \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY"Usage Flow
1. เรียก Get Cutoff Date เพื่อตรวจสอบ
|
+-- allow_edit_deduction = true
| +-- เรียก List Tax Exception
| +-- เรียก Update Tax Exception
|
+-- allow_edit_deduction = false
+-- แจ้งผู้ใช้ว่าไม่สามารถแก้ไขได้Related APIs
- List Tax Exception - ดึงรายการลดหย่อนภาษี
- Update Tax Exception - แก้ไขรายการลดหย่อนภาษี
- Fill Tax Exception - เติมข้อมูลลดหย่อนภาษีจากปีก่อน
- Delete Tax - ลบข้อมูลภาษีทั้งปี
Last updated on