Get TCS Latest Version (T135)
Retrieve the latest available Tax Control System (TCS) software version from the EFRIS server. Use this endpoint to determine if your local TCS installation requires an upgrade before attempting to download upgrade files (T133).
Endpoint Overview
| Property | Value |
|---|---|
| Interface Code | T135 |
| Request Encrypted | ❌ No |
| Response Encrypted | ✅ Yes |
| Request Body | null |
| Response Format | JSON |
Flow Description
- Client calls T135 to fetch the latest version number from the server.
- Server returns the current latest version number (e.g.,
"5"). - Client compares the returned version with their local TCS version.
- If server version > local version, client should initiate upgrade process via T133 (TCS Upgrade Download).
🔄 Tip: Call this endpoint periodically (e.g., at application startup or daily) to ensure your TCS software remains compliant with URA requirements.
- PHP
- JavaScript / TypeScript
- Python
try {
// Call T135: Get TCS Latest Version
$response = $client->getTcsLatestVersion();
$content = $response['data']['content'] ?? $response;
$latestVersion = $content['latesttcsversion'] ?? null;
if ($latestVersion) {
echo "✅ Latest TCS Version: {$latestVersion}\n";
// Compare with local version
$localVersion = '4'; // Example local version
if (version_compare($latestVersion, $localVersion, '>')) {
echo "⚠️ Upgrade available! Current: {$localVersion}, Latest: {$latestVersion}\n";
// Proceed to T133: TCS Upgrade Download
} else {
echo "✅ Your TCS version is up to date\n";
}
} else {
echo "⚠️ Could not retrieve version information\n";
}
} catch (\UraEfrisSdk\Exceptions\APIException $e) {
echo "❌ API Error: " . $e->getMessage() . "\n";
echo " Return Code: " . $e->getReturnCode() . "\n";
}
try {
// Call T135: Get TCS Latest Version
const response = await client.getTcsLatestVersion();
const content = response?.data?.content ?? response;
const latestVersion = content?.latesttcsversion;
if (latestVersion) {
console.log(`✅ Latest TCS Version: ${latestVersion}`);
// Compare with local version
const localVersion = '4'; // Example local version
if (latestVersion > localVersion) {
console.warn(`⚠️ Upgrade available! Current: ${localVersion}, Latest: ${latestVersion}`);
// Proceed to T133: TCS Upgrade Download
} else {
console.log('✅ Your TCS version is up to date');
}
return latestVersion;
} else {
console.warn('⚠️ Could not retrieve version information');
return null;
}
} catch (error: any) {
console.error(`❌ API Error: ${error.message}`);
if (error.returnCode) {
console.error(` Return Code: ${error.returnCode}`);
}
throw error;
}
try:
# Call T135: Get TCS Latest Version
response = client.get_tcs_latest_version()
content = response.get("data", {}).get("content", response)
latest_version = content.get("latesttcsversion")
if latest_version:
print(f"✅ Latest TCS Version: {latest_version}")
# Compare with local version
local_version = '4' # Example local version
if latest_version > local_version:
print(f"⚠️ Upgrade available! Current: {local_version}, Latest: {latest_version}")
# Proceed to T133: TCS Upgrade Download
else:
print("✅ Your TCS version is up to date")
else:
print("⚠️ Could not retrieve version information")
except Exception as e:
print(f"❌ API Error: {e}")
if hasattr(e, "return_code"):
print(f" Return Code: {e.return_code}")
raise
Response Structure
{
"data": {
"content": {
"latesttcsversion": "5"
}
},
"globalInfo": {
"interfaceCode": "T135",
"returnStateInfo": {
"returnCode": "00",
"returnMessage": "SUCCESS"
}
}
}
Response Fields
| Field | Required | Type | Description |
|---|---|---|---|
latesttcsversion | ✅ Yes | Number | Latest available TCS software version number (e.g., 5) |
Return Codes
| Code | Message | Description |
|---|---|---|
00 | SUCCESS | Version information retrieved successfully |
99 | Unknown error | Generic server error |
400 | Device does not exist | deviceNo not registered for this TIN |
402 | Device key expired | Device credentials have expired; re-run T102 |
403 | Device status is abnormal | Device blocked or suspended |
💡 Tip: A successful response (
00) with a version number higher than your local version indicates an upgrade is available. Use T133 to download the upgrade files.
Common Use Cases
-
Startup Version Check
Verify TCS version at application startup to ensure compliance before processing invoices. -
Upgrade Trigger
Automatically trigger the T133 download flow whenlatesttcsversion>localVersion. -
Compliance Auditing
Log version checks to demonstrate due diligence in maintaining up-to-date fiscal software. -
Maintenance Windows
Schedule version checks during off-peak hours to plan upgrades without disrupting business operations.
Integration Checklist
✅ Store local TCS version in configuration or database
✅ Compare server version with local version after each T135 call
✅ Initiate T133 download only when version mismatch is detected
✅ Log version check results for audit trails
✅ Handle API errors gracefully (retry logic for codes 99, 402)