Delete Petty Cash Type
API สำหรับผู้ดูแลระบบ (HR/Admin) เพื่อลบประเภทเงินสดย่อยที่ไม่ต้องการใช้งานแล้วออกจากระบบ ประเภทที่ถูกลบจะไม่ปรากฏให้พนักงานเลือกใช้งานในเอกสารใหม่ แต่เอกสารเบิกเงินสดย่อยที่เคยใช้ประเภทนี้ไปแล้วจะยังคงแสดงผลข้อมูลหมวดหมู่เดิมได้ปกติ
Endpoint
POST /api/v1/open-apis/petty-cash/delete-typeRequest Body
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
petty_cash_type_id | string | Yes | ID ของประเภทที่ต้องการลบ | "20260325OPTYX0003" |
authorize_id | string (base64) | Yes | ID ของผู้ที่ดำเนินการลบ | "MjAy..." |
Response Format
Success Response
{
"code": 200,
"message": "ลบสำเร็จ",
"payload": {
"petty_cash_type_id": "20260325OPTYX0003",
"petty_cash_type_name": "ค่าอาหาร (แก้ไข)",
"petty_cash_type_code": "PC003"
}
}Response Fields
| Field | Type | Nullable | Description |
|---|---|---|---|
petty_cash_type_id | string | No | รหัสประเภทที่ถูกลบ |
petty_cash_type_name | string | No | ชื่อประเภทที่ถูกลบ |
petty_cash_type_code | string | No | รหัสประเภทสั้น |
Code Examples
cURL
curl -X POST "https://openapi.humansoft.co.th/api/v1/open-apis/petty-cash/delete-type" \
-H "Content-Type: application/json" \
-H "Ocp-Apim-Subscription-Key: YOUR_API_KEY" \
-d '{
"petty_cash_type_id": "20260325OPTYX0003",
"authorize_id": "MjAyNTAzMDM1MUIwQTJDQ0JEOUM="
}'Notes
เอกสารเบิกเงินสดย่อยที่เคยใช้ประเภทนี้ไปแล้วจะยังคงแสดงผลข้อมูลหมวดหมู่เดิมได้ปกติ แต่พนักงานจะไม่สามารถเลือกประเภทนี้มาใช้ในเอกสารใหม่ได้
Related APIs
- List Types - ดูรายการประเภทค่าใช้จ่าย
- Create Type - สร้างประเภทค่าใช้จ่ายใหม่
- Update Type - แก้ไขประเภทค่าใช้จ่าย
Last updated on