Skip to main content

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

PropertyValue
Interface CodeT132
Request Encrypted✅ Yes
Response Encrypted❌ No
Request BodyArray of log objects
Response Formatnull

Flow Description

  1. Client application or fiscal device encounters an exception (login failure, upload failure, disconnection, etc.).
  2. Client stores the exception details locally during the session.
  3. Upon next successful login, client uploads accumulated exception logs via T132.
  4. Server acknowledges receipt (returns null).
  5. 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.


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

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

FieldRequiredTypeLengthDescription
interruptionTypeCode✅ YesString3Type of interruption (see codes below)
description✅ YesString≤3000Brief description of the error
errorDetail❌ NoString≤4000Detailed error message or stack trace
interruptionTime✅ YesDate-Format: yyyy-MM-dd HH:mm:ss

Interruption Type Codes

CodeDescription
101Number of Disconnected
102Login Failure
103Receipt Upload Failure
104System related errors
105Paper roll replacement

Response Structure

null

✅ A successful request returns null. Any errors will be thrown as exceptions with return codes.


Return Codes

General Codes

CodeMessageDescription
00SUCCESSLogs uploaded successfully
99Unknown errorGeneric server error
400Device does not existdeviceNo not registered
402Device key expiredDevice credentials expired
403Device status is abnormalDevice blocked or suspended

T132 Specific Codes

CodeMessageDescription
2052interruptionTypeCode:Invalid field value!Code not in 101-105 range
2053description:cannot be empty!Missing description field
2054description:Byte length cannot be greater than 200!Description too long (KB says 3000, error says 200)
2055errorDetail:cannot be empty!Missing errorDetail (if provided)
2056errorDetail:Byte length cannot be greater than 200!Error detail too long (KB says 4000, error says 200)
2057interruptionTime:cannot be emptyMissing timestamp
2058interruptionTime:The time format must be yyyy-MM-dd HH:mm:ssInvalid 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

  1. Diagnostic Reporting
    Automatically upload crash logs or connection failures during the next successful session for URA analysis.

  2. Compliance Auditing
    Maintain a record of all system interruptions to demonstrate due diligence during tax audits.

  3. Troubleshooting Integration Issues
    Provide exception logs to URA support when investigating persistent upload failures or device errors.

  4. Device Health Monitoring
    Track frequency of 101 (Disconnected) or 105 (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)