#
Cameras Integration
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).
graph LR A(GPS Device) --> |Payload| C B1(Static Camera) --> |Payload| C B2(Mobile Camera) --> |Payload| C C(Zarv API) --> D{Base64 or URL?} D --> E(Zarv's Platform) D --> |Download| F[Partner's CDN] F --> |Storage| E
Upload priority
If you sent both Base64
and External Image
, our system will use only the Base64 data.
Check here how to authenticate
#
API Fields
#
Vehicle image strategies
Currently, our API support receive the vehicle photo using two differents approachs: 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 }]
}
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": "prod"
}
#
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"
}
]
}