Skip to Content
🚀 Welcome to Humansoft Open API Documentation
DocumentationAPI ReferenceReport (รายงาน)Personal Tax (50ทวิ/ภงด.91)Tax 91 (50ทวิ/ภงด.91)

Tax 91 (50ทวิ / ภงด.91)

ดึงรายงานภาษีสำหรับพนักงานรายบุคคล พร้อมหนังสือรับรองการหักภาษี ณ ที่จ่าย (50ทวิ) และข้อมูลภาษีประจำปี รองรับผลลัพธ์แบบ JSON และ PDF

Endpoint

POST /api/v1/open-apis/report/tax-91?path_action=tax_91

Request Parameters

Query Parameter

ParameterTypeRequiredDescriptionExample
path_actionstringYesระบุเป็น tax_91"tax_91"

Request Body (JSON)

ParameterTypeRequiredDescriptionExample
authorize_idstringYesรหัสผู้เรียก (employee_code ของผู้ขอสิทธิ์)"EMP001"
employee_listsarrayYesระบุพนักงาน (array ของ object ที่มี id แบบ base64)ดูด้านล่าง
yearstringYesปีภาษี (YYYY)"2026"
typestringNoรูปแบบผลลัพธ์: json, pdf1 (default: json)"pdf1"
filenamestringNoชื่อไฟล์ที่ส่งออก (ใช้กับ pdf1)"ใบรับรองการหักภาษี_2026"
sign_datestringNoวันที่ลงนาม (YYYY-MM-DD) ใช้กับ pdf1"2026-03-15"
era_formatstringNoรูปแบบปี ระบุ "BE" เพื่อใช้ปีพุทธศักราช"BE"
_PAGEintegerNoหน้าปัจจุบัน (default: 1)1
_NUMBER_PER_PAGEintegerNoจำนวนรายการต่อหน้า (1-1000)50

employee_lists Structure

ทุก id ต้องเป็น base64 encoded:

[ { "id": "RU1QMDAxLTAwMQ==" } ]
  • type: json — ใช้เมื่อต้องการข้อมูลสำหรับระบบภายนอก
  • type: pdf1 — ใช้สำหรับพิมพ์/ลงนาม และส่งให้พนักงาน
  • sign_date และ era_format ใช้ได้เฉพาะกับ pdf1
  • era_format: "BE" จะแสดงปี 2026 เป็น 2569

Example Request Body

{ "authorize_id": "EMP001", "employee_lists": [ { "id": "RU1QMDAxLTAwMQ==" } ], "year": "2026", "type": "pdf1", "filename": "ใบรับรองการหักภาษี_2569", "sign_date": "2026-03-15", "era_format": "BE" }

Response Format

JSON Response (type: json)

{ "code": 200, "message": "Success", "payload": { "employee": { "employee_id": "EMP0001234", "employee_code": "0001234", "id_no": "1234567890123", "id_no_format": "1-2345-67890-12-3", "name": "นาย ชื่อพนักงาน นามสกุล", "address": { "address": "123/45 ซ.ถนน", "address1": "แขวง", "address2": "เขต", "address3": "จังหวัด", "address4": "รหัสไปรษณีย์" }, "employee_foreigner": "0" }, "tax_summary": { "tax_year_code": "2026", "salary_summary": "500000.00", "person_month_tax_amt": "15000.00", "sso_summary": "1800.00", "provident_summary": "2000.00", "cat7_summary": "0.00", "revenue_extra_40_1": "0.00", "revenue_extra_40_2": "0.00", "tax_extra": "0.00" }, "additional_data": { "income_data": [], "attachment_data": {}, "sign_date": "2026-03-15" } } }

PDF Response (type: pdf1)

สำหรับ type: pdf1 Response จะเป็น file binary ให้ใช้ --output ใน cURL เพื่อบันทึกไฟล์

HTTP/1.1 200 OK Content-Type: application/pdf Content-Disposition: attachment; filename="tax_91_2026.pdf"

Response Fields

FieldTypeDescription
codeintegerHTTP Status Code (200 = สำเร็จ)
messagestringข้อความสถานะ
payload.employeeobjectข้อมูลพนักงาน (ชื่อ, ที่อยู่, เลขประจำตัว)
payload.tax_summaryobjectสรุปภาษีประจำปี (เงินรวม, ภาษี, ประกันสังคม, กองทุนสำรอง)
payload.additional_dataobjectข้อมูลเพิ่มเติม (รายได้พิเศษ, ใบแนบ, วันที่ลงนาม)

Error Response

{ "code": 400, "message": "Validation failed", "errors": [ "Missing required parameter: 'employee_lists'", "'year' must be in YYYY format (e.g., 2026)", "'type' must be one of: json, pdf1" ] }
HTTP StatusDescription
400Parameter ไม่ครบหรือรูปแบบไม่ถูกต้อง
401API Key ไม่ถูกต้องหรือไม่ได้ส่ง
403ไม่มีสิทธิ์เข้าถึง
404ไม่พบข้อมูลพนักงานหรือข้อมูลภาษีของปีที่ระบุ
500เกิดข้อผิดพลาดภายใน

Code Examples

curl -X POST "https://openapi.humansoft.co.th/api/v1/open-apis/report/tax-91?path_action=tax_91" \ -H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "authorize_id": "EMP001", "employee_lists": [ { "id": "RU1QMDAxLTAwMQ==" } ], "year": "2026", "type": "pdf1", "filename": "ใบรับรองการหักภาษี_2569", "sign_date": "2026-03-15", "era_format": "BE" }' \ --output tax_91_2569.pdf

Last updated on