รหัสข้อผิดพลาด
รหัสข้อผิดพลาด Validation (400 Bad Request)
| Error Code | Error Message | สาเหตุ |
|---|---|---|
| 207450 | documentSerial is required. | documentSerial เป็น null หรือ ค่าว่าง |
| 207450 | contactName is required. | contactName เป็น null หรือ ค่าว่าง |
| 207450 | contactBranch is required. | contactBranch เป็น null หรือ ค่าว่าง |
| 207450 | contactTaxId is required when taxForm is PP30. | taxForm = 1 (P.P.30) แต่ contactTaxId เป็น null หรือค่าว่าง |
| 207450 | contactTaxId must be exactly 13 digits when taxForm is PP30. | taxForm = 1 (P.P.30) แต่ contactTaxId ไม่ใช่ตัวเลข 13 หลัก |
| 207450 | taxForm must be 1 (PP30) or 3 (PP36). | taxForm ไม่ใช่ค่า 1 หรือ 3 |
| 207450 | vatableAmount must be greater than 0 when taxForm is PP36. | taxForm = 3 (P.P.36) แต่ vatableAmount ไม่มีค่า หรือ ≤ 0 |
| 207450 | vatAmount must be greater than 0 when taxForm is PP36. | taxForm = 3 (P.P.36) แต่ vatAmount ไม่มีค่า หรือ ≤ 0 |
รหัสข้อผิดพลาด File Validation (400 Bad Request)
| Error Code | Error Message | สาเหตุ |
|---|---|---|
| 207450 | file.fileName must not be empty. | file.fileName เป็นค่าว่าง |
| 207450 | file.base64Data must be valid Base64 format. | file.base64Data ไม่ใช่ Base64 ที่ถูกต้อง |
| 207450 | Unsupported file extension. | นามสกุลไฟล์ไม่รองรับ |
| 207450 | File type mismatch. | ประเภทของไฟล์ไม่ตรงกับนามสกุลที่ระบุ |
| 207450 | File exceeds size limit. | ขนาดไฟล์เกิน 10 MB |
รหัสข้อผิดพลาด เอกสารต้นทาง (400/404)
| Error Code | Error Message | สาเหตุ |
|---|---|---|
| 190000 | Document not found | เอกสารไม่อยู่ในระบบ, ถูกลบ หรืออยู่คนละบริษัท (404) |
| 70020 | Document is voided | เอกสารถูกยกเลิก (Void) สำหรับ POST และ PUT |
| 70005 | Document is locked in batch tax filing | เอกสารอยู่ในแบบยื่นภาษี (Batch Tax Filing) ไม่สามารถแก้ไขได้ (สำหรับ POST และ PUT) |
| 70000 | Supplier invoice already attached | supplierInvoiceStatus ไม่ใช่ Awaiting (1) หรือ NoRefund (7) มีใบกำกับภาษีซื้อแนบอยู่แล้ว (สำหรับ POST) |
| 190000 | Supplier invoice not found | ไม่มีใบกำกับภาษีซื้อแนบอยู่ (สำหรับ PUT และ DELETE) |
| 70005 | Cannot delete supplier invoice in current status | supplierInvoiceStatus เป็น CreatedBatchFiling (5), NoRefund (7), WaitingToPayPP36 (11) หรือ AwaitingTaxReceipt (13) ไม่สามารถลบได้ (สำหรับ DELETE) |
รหัสข้อผิดพลาด Duplicate Detection (409 Conflict)
| Error Code | Error Message | สาเหตุ |
|---|---|---|
| 95013 | Duplicate supplier invoice detected | พบใบกำกับภาษีซื้อซ้ำ (ตรวจจาก documentSerial + documentDate + contactName + companyId) |
รหัสข้อผิดพลาด Internal Server Error (500)
| Error Code | Error Message | สาเหตุ |
|---|---|---|
| 70000 | Internal server error | อัปโหลดไฟล์หรือบันทึกข้อมูลล้มเหลว (สำหรับ POST) |
รหัสข้อผิดพลาด PUT File Replacement Failed (200 with status: false)
| Error Code | Error Message | สาเหตุ |
|---|---|---|
| 70000 | Supplier invoice updated but file replacement failed. | ใบกำกับภาษีซื้อถูกแก้ไขสำเร็จ แต่การอัปโหลดไฟล์ใหม่ล้มเหลว สามารถลองส่ง PUT อีกครั้งพร้อมไฟล์เพื่ออัปโหลดใหม่ได้ |