Upload Exception Log (T132)
Upload diagnostic and exception logs generated by the fiscal device or client application during the previous login session. This endpoint helps URA monitor system stability and troubleshoot integration issues. Requires encrypted request but returns no content.
Endpoint Overview
| Property | Value |
|---|---|
| Interface Code | T132 |
| Request Encrypted | ✅ Yes |
| Response Encrypted | ❌ No |
| Request Body | Array of log objects |
| Response Format | null |
Flow Description
- Client application or fiscal device encounters an exception (login failure, upload failure, disconnection, etc.).
- Client stores the exception details locally during the session.
- Upon next successful login, client uploads accumulated exception logs via T132.
- Server acknowledges receipt (returns
null). - Client clears local log buffer after successful upload.
📋 Note: This endpoint is typically called automatically by the SDK during the initialization or heartbeat process. Manual invocation is rarely needed unless implementing custom error tracking.
- PHP
- JavaScript / TypeScript
- Python
try {
// Construct exception logs array
$logs = [
[
'interruptionTypeCode' => '102', // Login Failure
'description' => 'Authentication failed due to network timeout',
'errorDetail' => 'Connection timed out after 30000ms',
'interruptionTime' => date('Y-m-d H:i:s')
],
[
'interruptionTypeCode' => '103', // Receipt Upload Failure
'description' => 'Invoice upload failed',
'errorDetail' => 'Return Code 1342: Tax calculation mismatch',
'interruptionTime' => date('Y-m-d H:i:s')
]
];
// Call T132: Upload Exception Logs
$client->uploadExceptionLogs($logs);
echo "✅ Exception logs uploaded successfully\n";
} catch (\UraEfrisSdk\Exceptions\APIException $e) {
echo "❌ Upload failed: " . $e->getMessage() . "\n";
echo " Return Code: " . $e->getReturnCode() . "\n";
}
try {
// Construct exception logs array
const logs = [
{
interruptionTypeCode: '102', // Login Failure
description: 'Authentication failed due to network timeout',
errorDetail: 'Connection timed out after 30000ms',
interruptionTime: new Date().toISOString().slice(0, 19).replace('T', ' ')
},
{
interruptionTypeCode: '103', // Receipt Upload Failure
description: 'Invoice upload failed',
errorDetail: 'Return Code 1342: Tax calculation mismatch',
interruptionTime: new Date().toISOString().slice(0, 19).replace('T', ' ')
}
];
// Call T132: Upload Exception Logs
await client.uploadExceptionLogs(logs);
console.log('✅ Exception logs uploaded successfully');
} catch (error: any) {
console.error(`❌ Upload failed: ${error.message}`);
if (error.returnCode) {
console.error(` Return Code: ${error.returnCode}`);
}
throw error;
}
try:
# Construct exception logs array
logs = [
{
"interruptionTypeCode": "102", # Login Failure
"description": "Authentication failed due to network timeout",
"errorDetail": "Connection timed out after 30000ms",
"interruptionTime": datetime.now().strftime('%Y-%m-%d %H:%M:%S')
},
{
"interruptionTypeCode": "103", # Receipt Upload Failure
"description": "Invoice upload failed",
"errorDetail": "Return Code 1342: Tax calculation mismatch",
"interruptionTime": datetime.now().strftime('%Y-%m-%d %H:%M:%S')
}
]
# Call T132: Upload Exception Logs
client.upload_exception_logs(logs)
print("✅ Exception logs uploaded successfully")
except Exception as e:
print(f"❌ Upload failed: {e}")
if hasattr(e, "return_code"):
print(f" Return Code: {e.return_code}")
raise
Request Structure
[
{
"interruptionTypeCode": "102",
"description": "Authentication failed due to network timeout",
"errorDetail": "Connection timed out after 30000ms",
"interruptionTime": "2025-02-19 10:00:00"
},
{
"interruptionTypeCode": "103",
"description": "Invoice upload failed",
"errorDetail": "Return Code 1342: Tax calculation mismatch",
"interruptionTime": "2025-02-19 10:05:00"
}
]
Request Fields
| Field | Required | Type | Length | Description |
|---|---|---|---|---|
interruptionTypeCode | ✅ Yes | String | 3 | Type of interruption (see codes below) |
description | ✅ Yes | String | ≤3000 | Brief description of the error |
errorDetail | ❌ No | String | ≤4000 | Detailed error message or stack trace |
interruptionTime | ✅ Yes | Date | - | Format: yyyy-MM-dd HH:mm:ss |
Interruption Type Codes
| Code | Description |
|---|---|
101 | Number of Disconnected |
102 | Login Failure |
103 | Receipt Upload Failure |
104 | System related errors |
105 | Paper roll replacement |
Response Structure
null
✅ A successful request returns
null. Any errors will be thrown as exceptions with return codes.
Return Codes
General Codes
| Code | Message | Description |
|---|---|---|
00 | SUCCESS | Logs uploaded successfully |
99 | Unknown error | Generic server error |
400 | Device does not exist | deviceNo not registered |
402 | Device key expired | Device credentials expired |
403 | Device status is abnormal | Device blocked or suspended |
T132 Specific Codes
| Code | Message | Description |
|---|---|---|
2052 | interruptionTypeCode:Invalid field value! | Code not in 101-105 range |
2053 | description:cannot be empty! | Missing description field |
2054 | description:Byte length cannot be greater than 200! | Description too long (KB says 3000, error says 200) |
2055 | errorDetail:cannot be empty! | Missing errorDetail (if provided) |
2056 | errorDetail:Byte length cannot be greater than 200! | Error detail too long (KB says 4000, error says 200) |
2057 | interruptionTime:cannot be empty | Missing timestamp |
2058 | interruptionTime:The time format must be yyyy-MM-dd HH:mm:ss | Invalid timestamp format |
⚠️ Note: There is a discrepancy between the field description (3000/4000 chars) and return code messages (200 chars). It is recommended to keep descriptions under 200 characters to be safe.
Common Use Cases
-
Diagnostic Reporting
Automatically upload crash logs or connection failures during the next successful session for URA analysis. -
Compliance Auditing
Maintain a record of all system interruptions to demonstrate due diligence during tax audits. -
Troubleshooting Integration Issues
Provide exception logs to URA support when investigating persistent upload failures or device errors. -
Device Health Monitoring
Track frequency of101(Disconnected) or105(Paper roll) events to identify hardware issues.
Integration Checklist
✅ Capture exceptions locally during offline periods
✅ Upload logs upon next successful authentication (T103/T104)
✅ Clear local log buffer only after successful T132 response
✅ Keep description and errorDetail under 200 characters to avoid validation errors
✅ Ensure interruptionTime uses server-synced time (T101)