Skip to navigation

Push container OCR identification from edge device

View as Markdown

Receive container identification (OCR) results from an edge device after on-device inference. Creates or updates the Container document. Uses API key authentication.

user_email optionally identifies the operator who triggered this scan (web → edge → API flow). When provided, a newly created Container is owned by that user and visible in their dashboard. When absent, falls back to "edge-device@cargovision.app" (autonomous mode). First push wins: subsequent scans against an existing Container do NOT change ownership.

Authentication

X-API-Keystring
API key for edge device authentication

Request

This endpoint expects an object.
container_numberstringRequired
imagestringRequiredformat: "byte"

Base64-encoded JPEG (raw or data URL). Body limit 50MB.

user_emailstringOptionalformat: "email"

Operator email forwarded by the edge from the originating web session. Optional; falls back to “edge-device@cargovision.app” when absent or empty. Rejected with 400 if non-empty but missing ”@”.

camera_idstringOptional
device_idstringOptional
timestampdatetimeOptional
confidencefloatOptional
boxobjectOptional
detectionslist of objectsOptional

Response

Container identified (or created and identified)

successbooleanOptional
messagestringOptional
dataobjectOptional

Errors

400
Bad Request Error
401
Unauthorized Error