Open API Introduction
TConnect Open API is an open API suite that lets partners integrate TConnect services into their own systems. All APIs share a single authentication mechanism via the API Gateway and follow the common conventions below.
API catalog
| API group | Description | Documentation |
|---|---|---|
| Input invoice lookup | Retrieve a business's input (purchase) invoices from the tax portal (General Department of Taxation): account registration, sync, retrieval, reconciliation. | View details → |
| Tax code lookup | Look up business information by tax code (name, address, tax office, legal representative, etc.). No encryption required; billed per request. | View details → |
Authentication
TConnect Open API uses a single shared authentication mechanism for all API groups: a JWT Bearer token issued by Keycloak (same as the Payment API).
- Call
POST /openapi/v1/auth/login(headerPartner-Code, AES-256-CBC-encrypted body containingusername/password/client_id/client_secret) → receive anaccess_token. - Add to every request:
Authorization: Bearer <access_token>
Partner-Code: <Merchant code issued by TConnect>
For the mechanism and AES encryption details, see Authentication (AES Encryption). When the token expires, call /openapi/v1/auth/refresh-token to get a new one.
Environment
| Environment | Base URL |
|---|---|
| Staging | https://sme-open-api-sandbox.tconnect.vn |
| Production | Provided after testing is completed |
Conventions
- Resource identifiers (e.g.
accountId,invoiceId) are UUIDs. - Dates use Vietnam time (UTC+7), in
YYYY-MM-DDformat. - Errors follow standard HTTP codes:
400(invalid data / wrong format),404(not found),401/403(authentication / no permission). - Bodies are JSON (
Content-Type: application/json).