Skip to main content

Webhooks & API Response


API Response Format​

The API returns the following JSON:

{
"timestamp": "2026-11-10 09:12:41.512345",
"camera_id": null,
"results": [
{
"box": [212, 96, 301, 688],
"polygon": [
[98, 214],
[684, 262],
[680, 300],
[95, 252]
],
"rotation": 355,
"score": 0.91,
"label": "VIN",
"texts": [
{
"value": "1HGCM82633A004352",
"score": 0.97
}
],
"width": 800,
"height": 500
}
],
"original_width": 800,
"original_height": 500,
"usage": {
"calls": 12,
"max_calls": 5000
},
"processing_time": 180.4
}

Response Fields​

FieldDescription
timestampThe timestamp parameter, or the time of the request
camera_idThe camera_id parameter, or null
resultsList of detected VINs. It is empty when no VIN is found
original_widthWidth of the image in pixels
original_heightHeight of the image in pixels
usageCalls made in the current period and the limit of the license
processing_timeProcessing time in milliseconds

Results Object​

FieldDescription
box[ymin, xmin, ymax, xmax] in pixels of the image
polygonThe 4 corners of the VIN as [x, y] pixels. For a rotated VIN a corner can be outside the image
rotationRotation of the text in degrees, from 0 to 359
scoreConfidence of the detection, from 0 to 1
labelAlways VIN
textsUp to 10 possible readings, best first, each with a value and a score from 0 to 1
widthWidth of the image in pixels
heightHeight of the image in pixels

Webhooks Configuration​

The container can send the result of every API call to your server, including the calls where no VIN is found.

Setup​

  1. Go to the Webhooks settings page.
  2. Add your target URL. Optionally, add HTTP headers (for example, an Authorization header) and enable Send image.
  3. Restart the container. Webhooks are loaded when the container starts.

To check the webhooks that the container uses, call curl http://localhost:8001/info/.

Requirements​

  • The target URL must accept POST requests and return HTTP status code 200.
  • If the target URL returns errors, the container pauses sending to it for a while, then tries again.

Webhook Format​

The result is wrapped in a data object, next to a hook object that identifies the webhook:

{
"hook": {
"target": "https://example.com/vin-webhook/",
"id": 12,
"event": "image.done"
},
"data": {
"timestamp": "2026-11-10 09:12:41.512345",
"camera_id": null,
"results": [],
"original_width": 800,
"original_height": 500,
"usage": {
"calls": 12,
"max_calls": 5000
},
"processing_time": 180.4
}
}

The data object has the same format as the API response.

  • Without Send image, the body is the JSON above with the application/json content type.
  • With Send image, the body is multipart/form-data. The json field contains the JSON above as a string and the upload field contains the image.

Testing Webhooks​

Use webhook.site to generate a test URL, set it as the target URL, restart the container, then call the API and check the data that arrives.