IIAPI Reference
Complete API reference for IIAPI e-invoice integration.
Base URL
Production: https://api.your-domain.com/api/iiapi
Development: http://localhost:3000/api/iiapiInvoice Endpoints
Create VAT Invoice
http
POST /vat-invoices
Content-Type: application/json
{
"seller": {
"taxCode": "0123456789",
"name": "Your Company",
"address": "123 Street"
},
"buyer": {
"taxCode": "9876543210",
"name": "Customer Company",
"address": "456 Avenue"
},
"invoiceDate": "2024-01-15",
"currencyCode": "VND",
"items": [
{
"itemName": "Product",
"quantity": 10,
"unitPrice": 100000,
"amount": 1000000,
"vatRate": 10,
"vatAmount": 100000
}
],
"totalAmount": 1000000,
"totalVatAmount": 100000,
"totalPayment": 1100000
}Create POS Invoice
http
POST /pos-sale-invoices
Content-Type: application/json
{
"invoiceDate": "2024-01-15",
"items": [
{
"itemName": "Coffee",
"quantity": 2,
"unitPrice": 50000,
"amount": 100000
}
],
"totalAmount": 100000,
"totalPayment": 100000,
"paymentMethod": "CASH"
}Invoice Management
InvoiceManagementService exposes four operations. The optional clientName query parameter selects a registered client; when omitted, the default client is used.
Cancel Invoice
http
POST /invoices/cancel?clientName=vnpay-client
Content-Type: application/json
{ ...cancel invoice request body }Get Invoice Detail
http
POST /invoices/detail?clientName=vnpay-client
Content-Type: application/json
{ ...invoice detail request body }Get Tax Code Information
http
GET /tax-code/{taxCode}?clientName=vnpay-clientGet Invoice PDF
Returns the invoice PDF in base64.
http
POST /invoices/pdf?clientName=vnpay-client
Content-Type: application/json
{ ...invoice PDF request body }Invoice Status
| Status | Description |
|---|---|
| DRAFT | Created, not submitted |
| PENDING | Submitted to T-VAN |
| SIGNED | Digitally signed |
| SENT | Sent to CQT |
| ACCEPTED | CQT accepted |
| REJECTED | CQT rejected |
| CANCELLED | Cancelled |
Error Codes
BANA does not define its own e-invoice error catalogue - errors are surfaced from the VNPAY viiAPI provider response (HTTP status + provider error payload). Inspect the provider response and the service logs.