LPR Devices Data Provider Guide
Our current integration supports both mobile and fixed cameras networks, and you can chose to sent the captured image by base64
or link
strategy (if exists).
API Fields
Field | Type | Description |
---|---|---|
id required | String | Unique capture ID |
device_id required | String | Device ID |
created_at required | String | Capture date (ISO 8601) |
latitude required | Number | Float number |
longitude required | Number | Float number |
license_plate required | String | License plate detected by LPR |
license_plate_accuracy | Number | LPR accuracy (from 0 to 1 ) |
speed | Number | Vehicle Speed |
image required | String | Base64 data (in JPEG or PNG formats) |
image_url required | String | Fully formatted URL (in JPEG or PNG formats) |
bounding_box | JSON | Detected vehicle and lane positions i.e: [{ x1, y1, x2, y2 }, { x1, y1, x2, y2 }] or [[x1,y1,x2,y2],[x1,y1,x2,y2]] |
Upload Priority
If you sent both Base64
and External Image
, our system will use only the External Image data.
Vehicle Image Strategies
Currently, our API support receive the vehicle photo using two differents approachs: Base64 or External Image. We accept both JPEG
and PNG
formats.
Inline Base64 Image
If you decide to send the image with Base64 on the request's payload is required to inform the image content type
like the example below:
{
"id": "688cebe6-8cec-4b46-b34e-bfaa4b4f7860",
"device_id": "60ede5f5-c9ba-4d38-8e10-a18ea8cebbef",
"created_at": "2023-01-15T13:15:30-03:00",
"latitude": -23.634471,
"longitude": -46.727415,
"license_plate": "ZRV2A23",
"license_plate_accuracy": 0.8,
"speed": 89,
"image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzGdBT...truncated",
"bounding_box": [{ x1, y1, x2, y2 }, { x1, y1, x2, y2 }]
}
External Image URL
To external images, you just need to fill the field image_url
and make sure the url is fully available under HTTPs protocol.
{
"id": "688cebe6-8cec-4b46-b34e-bfaa4b4f7860",
"device_id": "60ede5f5-c9ba-4d38-8e10-a18ea8cebbef",
"created_at": "2023-01-15T13:15:30-03:00",
"latitude": -23.634471,
"longitude": -46.727415,
"license_plate": "ZRV2A23",
"license_plate_accuracy": 0.8,
"speed": 89,
"image_url": "https://my.server.com/image.jpg",
"bounding_box": [{ x1, y1, x2, y2 }, { x1, y1, x2, y2 }]
}
Image Buckets
If your image is under an authenticated bucket, please provide the access params on the url. Like this: https://my.server.com/image.jpg?authorization=xyzljnasdjn
Responses for successful requests
Status code: 202
{
"status": "success",
"stage": "production"
}
Responses for non successful requests
Status code: 400
eg.
{
"contract": "camera",
"validations": [
{
"instancePath": "/vehicle",
"schemaPath": "#/properties/vehicle/required",
"keyword": "required",
"params": {
"missingProperty": "X"
},
"message": "deve ter a propriedade obrigatória X"
}
]
}