Vehicles (Protected)

Ler documento de veículo (DUA/livrete) e devolver campos para autofill

OCR a vehicle document (JPEG/PNG/PDF) via Claude Vision and return RAW TEXT fields for the create-vehicle form to prefill (id resolution happens in the FE, section-scoped — never here).

Accepts ONE OR MORE images so the caller can send the frente AND the verso — the technical fields (cilindrada, potência, combustível, cor, lugares) live on the verso of the DUA/livrete, so a front-only photo can't read them. All images are read together in a single vision call and billed as ONE read.

Unreadable/unsupported input returns success=False (never a 5xx); billing only fires on success. Heavy sync work (CV + PyMuPDF + Anthropic + pyodbc) runs in the threadpool so the event loop is never blocked (same pattern as /invoices/process-qr).

post/api/vehicles/ocr-document

Request

  • Base URL
    https://api.multigest.pt (the document declares no server; this is the origin it was published from)
  • URL
    https://api.multigest.pt/api/vehicles/ocr-document
  • Auth
    API key in header x-api-token and API key in header x-origin-verify

Headers

x-api-tokenstring nullable

Request body multipart/form-data

filesstring[] required

Documento do veículo (frente e, opcionalmente, verso)

Response

Successful Response

successboolean
error_messagestring nullable
billedboolean
doc_typestring nullable
confiancastring nullable
warningsstring[]
matriculastring nullable
vinstring nullable
marca_textostring nullable
modelo_textostring nullable
versao_textostring nullable
data_primeira_matriculastring nullable
data_matricula_nacionalstring nullable
cilindradastring nullable
combustivel_textostring nullable
potencia_cvstring nullable
cor_textostring nullable
caixa_textostring nullable
lugaresinteger nullable
portasinteger nullable
pesostring nullable
categoriastring nullable

Changes

No recorded changes to this operation across all 21 revisions of this API.