Monitoring License Plates
The Monitor License Plate API allows partners to enroll and begin monitoring a vehicle’s license plate in the Events Bridge system. Once enrolled, the system will track the vehicle based on the supplied license plate information.
API Endpoint
- HTTP Method: 
PUT - Endpoint: 
/api/v1/lpr/monitor/{externalId} - Base URL: 
https://10.0.0.123:5022 - Cloud Server Base URL: 
https://customername.econnectcloud.com/eventsbridge 
Authentication
This API call requires authentication with a JWT token, which must be passed in the header of the request.
Path Parameter
- externalId: The unique ID assigned by the partner’s system to identify the license plate being monitored. This ID must be unique to the partner and is required for tracking and future interactions.
 
Request Body
The PUT request requires the following data to be passed in the body of the request.
Required Fields
plate: The license plate number of the vehicle to be monitored.
Optional Fields
- monitorReason: The reason for monitoring the vehicle (e.g., "Security Alert", "VIP Monitoring", etc.).
 - tags: An array of tags to categorize the vehicle (e.g., "VIP", "Banned", etc.).
 - additionalFields: Any extra information that you would like to store alongside the plate, such as a TenantID or other custom data.
 
Code Examples
- C#
 - Curl
 - PowerShell
 
using eConnect.EventsBridge.Sdk;
// Assuming sdk is already initialized with authentication
// Define the externalId
string externalId = "12345";
// Check if already enrolled
var status = await sdk.LprMonitorStatusCheckAsync(externalId);
if (status.Enrolled)
{
    await sdk.LprUnMonitorAsync(externalId);
}
// Create the LprMonitorRequest
var request = new LprMonitorRequest
{
    Plate = "ABC123",
    MonitorReason = "Example",
    Tags = new List<TagInfoItem> { new TagInfoItem { TagName = "VIP" } },
    AdditionalFields = new List<AdditionalFieldItem> { new AdditionalFieldItem { FieldName = "Note", FieldValue = "Important vehicle" } }
};
// Monitor the license plate
await sdk.LprMonitorAsync(externalId, request);
# Define variables
API_URL="https://your-domain.com/eventsbridge"
TOKEN="your_token"
EXTERNAL_ID="12345"
# Check status
STATUS=$(curl -X GET "$API_URL/api/v1/lpr/monitor/$EXTERNAL_ID" \
  -H "Authorization: Bearer $TOKEN" | jq -r '.enrolled')
if [ "$STATUS" == "true" ]; then
  curl -X DELETE "$API_URL/api/v1/lpr/monitor/$EXTERNAL_ID" \
    -H "Authorization: Bearer $TOKEN"
fi
# Create JSON request
REQUEST=$(cat <<EOF
{
  "plate": "ABC123",
  "monitorReason": "Example",
  "tags": [{"tagName": "VIP"}],
  "additionalFields": [{"fieldName": "Note", "fieldValue": "Important vehicle"}]
}
EOF
)
# Monitor the license plate
curl -X PUT "$API_URL/api/v1/lpr/monitor/$EXTERNAL_ID" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d "$REQUEST"
# Define variables
$API_URL = "https://your-domain.com/eventsbridge"
$TOKEN = "your_token"
$EXTERNAL_ID = "12345"
# Check status
$statusResponse = Invoke-RestMethod -Uri "$API_URL/api/v1/lpr/monitor/$EXTERNAL_ID" -Method Get -Headers @{ "Authorization" = "Bearer $TOKEN" }
if ($statusResponse.enrolled) {
    Invoke-RestMethod -Uri "$API_URL/api/v1/lpr/monitor/$EXTERNAL_ID" -Method Delete -Headers @{ "Authorization" = "Bearer $TOKEN" }
}
# Create request body
$requestBody = @{
    plate = "ABC123"
    monitorReason = "Example"
    tags = @(
        @{
            tagName = "VIP"
        }
    )
    additionalFields = @(
        @{
            fieldName = "Note"
            fieldValue = "Important vehicle"
        }
    )
} | ConvertTo-Json
# Monitor the license plate
Invoke-RestMethod -Uri "$API_URL/api/v1/lpr/monitor/$EXTERNAL_ID" -Method Put -Headers @{ "Authorization" = "Bearer $TOKEN" } -Body $requestBody -ContentType "application/json"
Raw Sample
Here’s an example of how to use the PUT method to monitor a license plate:
Request
PUT https://10.0.0.123:5022/api/v1/lpr/monitor/ABC123
Authorization: Bearer <your_jwt_token>
Content-Type: application/json
{
  "plate": "ABC123",
  "monitorReason": "Suspicious Activity",
  "tags": ["Banned"],
  "additionalFields": [
    {
      "fieldName": "TenantID",
      "fieldValue": "XYZ987"
    }
  ]
}
Response
- 200 OK: The license plate has been successfully enrolled for monitoring.
 - 400 Bad Request: There was an issue with the provided data (e.g., invalid plate number or missing required fields).
 - 500 Internal Server Error: An issue occurred on the server side.
 - 401 Unauthorized: Missing or invalid JWT token.
 
Example Response
{
  
}
Additional Notes
- Ensure that the externalId provided in the URL matches the one used in your system to identify the vehicle uniquely.
 - The plate field must contain the correct license plate number for accurate monitoring.
 - Optionally, you can pass additional tags or fields to categorize the vehicle or store extra information as needed.