Get Petty Cash Detail
API สำหรับเรียกดูข้อมูลทั้งหมดของเอกสารเบิกเงินสดย่อย 1 ฉบับ โดยจะคืนค่าทั้งข้อมูลหัวเอกสาร (Header) และรายการค่าใช้จ่ายทั้งหมด (Items) รวมถึงข้อมูลพนักงานผู้ขอ แผนก และยอดเงินรวม
Endpoint
GET /api/v1/open-apis/petty-cash/get-detail
POST /api/v1/open-apis/petty-cash/get-detailRequest Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
petty_cash_id | string (base64) | Yes | รหัสเอกสารเบิกเงินสดย่อยที่ต้องการดูข้อมูล | "MjAy..." |
authorize_id | string (base64) | Yes | ID ของผู้ที่ขอดึงข้อมูล | "MjAy..." |
Response Format
Success Response
{
"code": 200,
"message": "ดึงข้อมูลสำเร็จ",
"payload": {
"petty_cash_id": "20260325PCD00000001",
"employee_id": "20260309462FEF65EFCA",
"employee_name": "สมชาย ใจดี",
"department_name": "IT Support",
"request_topic": "เบิกค่าเดินทางไปพบลูกค้า",
"req_dt": "2026-03-25",
"petty_cash_type_lv": "01",
"req_amt": 500.00,
"item_list": [
{
"petty_cash_item_id": "ITEM0001",
"petty_cash_item_name": "ค่าน้ำมันรถ",
"req_amt": "500.00",
"qty": 1,
"petty_cash_type_name": "ค่าเดินทาง",
"attach_files": [
{
"file_id": "FILE123",
"file_name": "receipt.jpg",
"file_url": "https://..."
}
]
}
]
}
}Response Fields
| Field | Type | Nullable | Description |
|---|---|---|---|
petty_cash_id | string | No | รหัสเอกสาร |
employee_id | string | No | ID ของพนักงาน |
employee_name | string | No | ชื่อพนักงาน |
department_name | string | No | ชื่อแผนก |
request_topic | string | No | หัวข้อการเบิก |
req_dt | string | No | วันที่ยื่นคำขอ |
petty_cash_type_lv | string | No | สถานะปัจจุบันของเอกสาร (01 = Pending) |
req_amt | number | No | ยอดรวมเงินเบิกของทั้งเอกสาร |
item_list | array | No | รายการค่าใช้จ่ายย่อยทั้งหมดในเอกสารนี้ |
Error Response
{
"code": 404,
"message": "ไม่พบข้อมูลเอกสาร"
}Code Examples
cURL
curl -X GET "https://openapi.humansoft.co.th/api/v1/open-apis/petty-cash/get-detail?petty_cash_id=MjAyNjAzMjVQQ0QwMDAwMDAwMQ==&authorize_id=MjAyNTAzMDM1MUIwQTJDQ0JEOUM=" \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY"Notes
ผลลัพธ์ใน item_list จะรวมถึง URL ของไฟล์แนบ (ถ้ามี) เพื่อให้สามารถดาวน์โหลดหรือดูรูปหลักฐานการเบิกได้ทันที
พารามิเตอร์ petty_cash_id และ authorize_id ต้องส่งเป็น Base64-encoded
Related APIs
- Get List - ดูรายการเอกสารของพนักงาน
- Search List - ค้นหาเอกสารสำหรับ HR/ผู้อนุมัติ
- Approve - อนุมัติเอกสาร
Last updated on