Clients - Protected

Ler Cartão de Cidadão (frente+verso) e devolver campos para autofill do cliente

OCR a Portuguese Cartão de Cidadão via Claude Vision and return the storable client fields (nome, nif, nº documento, validade, entidade emissora) for the create-client form to prefill. Data-minimized: no DOB/sex/filiação/NISS.

RGPD: this route reads the images in-memory and never persists them. When the client is created, the frontend attaches them as Documentos do cliente (módulo 12, tipo CC) via POST /documents-test/ — same retention as a manual upload. Unreadable/unsupported input returns success=False (never a 5xx); billing only fires on success. Heavy sync work runs in the threadpool (same pattern as /vehicles/ocr-document).

post/api/clients/ocr-document

Headers

x-api-tokenstring nullable

Response

Successful Response

successboolean
error_messagestring nullable
billedboolean
doc_typestring nullable
confiancastring nullable
warningsstring[]
nomestring nullable
nifstring nullable
numero_documentostring nullable
validadestring nullable
entidade_emissorastring nullable

Changes

No recorded changes to this endpoint across all 1 revision of this API.