Skip to main content

Get Server Time (T101)

Synchronize your client application time with the Uganda Revenue Authority EFRIS server. This endpoint returns the current server timestamp and requires no authentication or encryption.


Endpoint Overview

PropertyValue
Interface CodeT101
Request Encrypted❌ No
Response Encrypted❌ No
Request Bodynull
Response FormatJSON

try {
// Call T101: Get Server Time
$response = $client->getServerTime();

$currentTime = $response['data']['content']['currentTime']
?? $response['currentTime']
?? null;

if ($currentTime) {
echo "✅ Server Time: {$currentTime}\n";
// Format: dd/MM/yyyy HH:mm:ss
} else {
echo "⚠️ Could not parse server time\n";
}
} catch (\UraEfrisSdk\Exceptions\APIException $e) {
echo "❌ API Error: " . $e->getMessage() . "\n";
echo " Return Code: " . $e->getReturnCode() . "\n";
}

Response Structure

{
"data": {
"content": {
"currentTime": "19/02/2025 10:00:00"
}
},
"globalInfo": {
"interfaceCode": "T101",
"returnStateInfo": {
"returnCode": "00",
"returnMessage": "SUCCESS"
}
}
}

Response Fields

FieldRequiredTypeDescription
currentTime✅ YesStringCurrent server time in dd/MM/yyyy HH:mm:ss format

Return Codes

CodeMessageDescription
00SUCCESSRequest processed successfully
99Unknown errorGeneric server error
06The outer message is emptyMalformed request envelope
07GlobalInfo content cannot be emptyMissing required globalInfo
11InterfaceCode cannot be emptyMissing interfaceCode in request
28Time difference > 10 minutesClient time out of sync with server

💡 Tip: Use this endpoint at application startup to validate time synchronization. A difference greater than 10 minutes may cause subsequent authenticated requests to fail.


Common Use Cases

  1. Time Synchronization Check
    Validate client clock accuracy before submitting time-sensitive invoices.

  2. Health Check / Ping
    Verify EFRIS API connectivity without authentication overhead.

  3. Logging & Auditing
    Timestamp local operations with authoritative server time for compliance.

  4. Retry Logic
    Use server time to calculate accurate backoff intervals for failed requests.