Skip to Content
🚀 Welcome to Humansoft Open API Documentation

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-deduction

Query Parameters

ParameterTypeRequiredDescription
path_actionstringYesต้องเป็น get-cutoff-date-deduction
employee_codestringYesรหัสพนักงาน
role_pagestringNoถ้าเป็น 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

FieldTypeDescription
codenumber200 = สำเร็จ
messagestringข้อความตอบกลับ
payloadobjectข้อมูล cutoff
payload.allow_edit_deductionbooleanสิทธิ์แก้ไขรายการหักลดหย่อนได้หรือไม่
payload.last_date_edit_deductionstring / nullวันสุดท้ายที่แก้ไขได้ (Y-m-d) ถ้ามี config (null ถ้า config ปิด)
payload.report_end_dtstring / nullวันสิ้นสุดรอบรายงาน (null ถ้า config ปิด)
payload.date_requeststringวันที่ที่ใช้ตรวจ (วันนี้ 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 -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 +-- แจ้งผู้ใช้ว่าไม่สามารถแก้ไขได้

  • List Tax Exception - ดึงรายการลดหย่อนภาษี
  • Update Tax Exception - แก้ไขรายการลดหย่อนภาษี
  • Fill Tax Exception - เติมข้อมูลลดหย่อนภาษีจากปีก่อน
  • Delete Tax - ลบข้อมูลภาษีทั้งปี
Last updated on