Skip to content

T-VAN API Reference

Complete API reference for T-VAN integration.

Base URL

Production: https://api.your-domain.com/api/t-van
Development: http://localhost:3000/api/t-van

Tax Info Endpoints

Get Tax Information

http
GET /tax-info/:taxCode

Response:
{
  "taxCode": "0123456789",
  "companyName": "CÔNG TY TNHH ABC",
  "address": "123 Nguyễn Huệ, Quận 1",
  "representative": "Nguyễn Văn A",
  "status": "ACTIVE",
  "registrationDate": "2020-01-15"
}

Batch Lookup

http
POST /tax-info/batch
Content-Type: application/json

{
  "taxCodes": ["0123456789", "9876543210"]
}

Response:
{
  "results": [
    { "taxCode": "0123456789", "found": true, "status": "ACTIVE", ... },
    { "taxCode": "9876543210", "found": false }
  ]
}

Invoice Endpoints

Validate Invoice

http
POST /invoice/validate
Content-Type: application/json

{
  "invoiceNumber": "AA/24E0001234",
  "sellerTaxCode": "0123456789",
  "invoiceDate": "2024-01-15"
}

Response:
{
  "isValid": true,
  "status": "VALID",
  "invoiceNumber": "AA/24E0001234",
  "totalAmount": 1100000
}

Error Responses

json
{
  "error": {
    "code": "TVAN_002",
    "message": "Tax code not found"
  }
}

Error Codes

CodeDescription
TVAN_001Invalid tax code format
TVAN_002Tax code not found
TVAN_003Connection timeout
TVAN_004Provider error
TVAN_005Rate limit exceeded

Multi-Client Usage

Specify client in request headers:

http
GET /tax-info/0123456789
X-TVAN-Client: backup

Or in query parameter:

http
GET /tax-info/0123456789?client=backup

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