Skip to main content

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

PropertyValue
Interface CodeT135
Request Encrypted❌ No
Response Encrypted✅ Yes
Request Bodynull
Response FormatJSON

Flow Description

  1. Client calls T135 to fetch the latest version number from the server.
  2. Server returns the current latest version number (e.g., "5").
  3. Client compares the returned version with their local TCS version.
  4. 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.


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";
}

Response Structure

{
"data": {
"content": {
"latesttcsversion": "5"
}
},
"globalInfo": {
"interfaceCode": "T135",
"returnStateInfo": {
"returnCode": "00",
"returnMessage": "SUCCESS"
}
}
}

Response Fields

FieldRequiredTypeDescription
latesttcsversion✅ YesNumberLatest available TCS software version number (e.g., 5)

Return Codes

CodeMessageDescription
00SUCCESSVersion information retrieved successfully
99Unknown errorGeneric server error
400Device does not existdeviceNo not registered for this TIN
402Device key expiredDevice credentials have expired; re-run T102
403Device status is abnormalDevice 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

  1. Startup Version Check
    Verify TCS version at application startup to ensure compliance before processing invoices.

  2. Upgrade Trigger
    Automatically trigger the T133 download flow when latesttcsversion > localVersion.

  3. Compliance Auditing
    Log version checks to demonstrate due diligence in maintaining up-to-date fiscal software.

  4. 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)