Skip to Content
🚀 Welcome to Humansoft Open API Documentation

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

Request Parameters

ParameterTypeRequiredDescriptionExample
petty_cash_idstring (base64)Yesรหัสเอกสารเบิกเงินสดย่อยที่ต้องการดูข้อมูล"MjAy..."
authorize_idstring (base64)YesID ของผู้ที่ขอดึงข้อมูล"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

FieldTypeNullableDescription
petty_cash_idstringNoรหัสเอกสาร
employee_idstringNoID ของพนักงาน
employee_namestringNoชื่อพนักงาน
department_namestringNoชื่อแผนก
request_topicstringNoหัวข้อการเบิก
req_dtstringNoวันที่ยื่นคำขอ
petty_cash_type_lvstringNoสถานะปัจจุบันของเอกสาร (01 = Pending)
req_amtnumberNoยอดรวมเงินเบิกของทั้งเอกสาร
item_listarrayNoรายการค่าใช้จ่ายย่อยทั้งหมดในเอกสารนี้

Error Response

{ "code": 404, "message": "ไม่พบข้อมูลเอกสาร" }

Code Examples

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


  • Get List - ดูรายการเอกสารของพนักงาน
  • Search List - ค้นหาเอกสารสำหรับ HR/ผู้อนุมัติ
  • Approve - อนุมัติเอกสาร
Last updated on