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

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/clients/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

Cartão de Cidadão (frente e, opcionalmente, verso)

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 operation across all 21 revisions of this API.