Skip to main content

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}
  • Private Server 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. It is case sensitive, and does not need to match the plate itself.

Request Body

The PUT request requires the following data to be passed in the body of the request.

Required Fields

  • plate (String): The license plate number of the vehicle to be monitored.

Optional Fields

  • monitorReason (String): The reason for monitoring the vehicle (e.g., "Security Alert", "VIP Monitoring"). This is human-readable text that is written to the eConnect notes for the subject.
  • tags (Array of Objects): Tags that categorize the vehicle, each with a single tagName property.
    • Tags are prefixed with the field prefix assigned to your account. If your account is SystemA and you send the tag Banned, it is stored in eConnect as SystemA-Banned.
    • If you supply no tags, one is added automatically using your field prefix as the tag name. This is what stops the subject being removed by routine cleanup processes.
  • additionalFields (Array of Objects): Any extra information to store alongside the plate, such as a TenantId. Each entry has a fieldName and a fieldValue, and the whole array is replayed back to you in the fields property of every detection webhook.

Code Examples

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);

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": [{ "tagName": "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).
  • 401 Unauthorized: Missing or invalid JWT token.
  • 500 Internal Server Error: An issue occurred on the server side. The reason is returned in the problem details body.

Example Response

{}

The success response body is an empty object by design — LprMonitorResponse carries no fields. Treat the 200 status code as the result, and do not expect any properties to read.

Additional Notes

  • Ensure that the externalId provided in the URL matches the one used in your system to identify the vehicle uniquely. It is case sensitive.
  • The plate field must contain the correct license plate number for accurate monitoring.
  • This endpoint both creates and updates. Sending a second PUT for an externalId you already enrolled replaces the stored record rather than creating a duplicate.
  • Enrollment is not necessarily instant across every connected server. Use Retrieve All Monitored License Plates to confirm the plate reached all of them.