Tax 91 (50ทวิ / ภงด.91)
ดึงรายงานภาษีสำหรับพนักงานรายบุคคล พร้อมหนังสือรับรองการหักภาษี ณ ที่จ่าย (50ทวิ) และข้อมูลภาษีประจำปี รองรับผลลัพธ์แบบ JSON และ PDF
Endpoint
POST /api/v1/open-apis/report/tax-91?path_action=tax_91Request Parameters
Query Parameter
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
path_action | string | Yes | ระบุเป็น tax_91 | "tax_91" |
Request Body (JSON)
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
authorize_id | string | Yes | รหัสผู้เรียก (employee_code ของผู้ขอสิทธิ์) | "EMP001" |
employee_lists | array | Yes | ระบุพนักงาน (array ของ object ที่มี id แบบ base64) | ดูด้านล่าง |
year | string | Yes | ปีภาษี (YYYY) | "2026" |
type | string | No | รูปแบบผลลัพธ์: json, pdf1 (default: json) | "pdf1" |
filename | string | No | ชื่อไฟล์ที่ส่งออก (ใช้กับ pdf1) | "ใบรับรองการหักภาษี_2026" |
sign_date | string | No | วันที่ลงนาม (YYYY-MM-DD) ใช้กับ pdf1 | "2026-03-15" |
era_format | string | No | รูปแบบปี ระบุ "BE" เพื่อใช้ปีพุทธศักราช | "BE" |
_PAGE | integer | No | หน้าปัจจุบัน (default: 1) | 1 |
_NUMBER_PER_PAGE | integer | No | จำนวนรายการต่อหน้า (1-1000) | 50 |
employee_lists Structure
ทุก id ต้องเป็น base64 encoded:
[
{ "id": "RU1QMDAxLTAwMQ==" }
]type: json— ใช้เมื่อต้องการข้อมูลสำหรับระบบภายนอกtype: pdf1— ใช้สำหรับพิมพ์/ลงนาม และส่งให้พนักงานsign_dateและera_formatใช้ได้เฉพาะกับpdf1era_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
| Field | Type | Description |
|---|---|---|
code | integer | HTTP Status Code (200 = สำเร็จ) |
message | string | ข้อความสถานะ |
payload.employee | object | ข้อมูลพนักงาน (ชื่อ, ที่อยู่, เลขประจำตัว) |
payload.tax_summary | object | สรุปภาษีประจำปี (เงินรวม, ภาษี, ประกันสังคม, กองทุนสำรอง) |
payload.additional_data | object | ข้อมูลเพิ่มเติม (รายได้พิเศษ, ใบแนบ, วันที่ลงนาม) |
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 Status | Description |
|---|---|
400 | Parameter ไม่ครบหรือรูปแบบไม่ถูกต้อง |
401 | API Key ไม่ถูกต้องหรือไม่ได้ส่ง |
403 | ไม่มีสิทธิ์เข้าถึง |
404 | ไม่พบข้อมูลพนักงานหรือข้อมูลภาษีของปีที่ระบุ |
500 | เกิดข้อผิดพลาดภายใน |
Code Examples
cURL
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.pdfRelated APIs
- Attachment PND91 (ใบแนบ ภงด.91) - รายงานใบแนบ ภงด.91 ประจำเดือน
Last updated on