Skip to content

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/iiapi

Invoice 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

Submit Invoice

http
POST /invoices/:id/submit
Content-Type: application/json

{
  "clientName": "default"
}

Cancel Invoice

http
POST /invoices/:id/cancel
Content-Type: application/json

{
  "reason": "Customer request"
}

Get Invoice

http
GET /invoices/:id

List Invoices

http
GET /invoices?status=ACCEPTED&dateFrom=2024-01-01&dateTo=2024-01-31

Invoice Status

StatusDescription
DRAFTCreated, not submitted
PENDINGSubmitted to T-VAN
SIGNEDDigitally signed
SENTSent to CQT
ACCEPTEDCQT accepted
REJECTEDCQT rejected
CANCELLEDCancelled

Error Codes

CodeDescription
IIAPI_001Invalid tax code
IIAPI_002Missing required field
IIAPI_003T-VAN connection failed
IIAPI_004Invoice already submitted
IIAPI_005CQT rejection

Proprietary and Confidential. Unauthorized copying, distribution, or use of this software is strictly prohibited.