---
title: "Ler Carta de Condução e devolver campos para autofill do cliente"
method: POST
path: "/api/clients/ocr-driving-license"
tags: ["Clients - Protected"]
---

# Ler Carta de Condução e devolver campos para autofill do cliente

`POST /api/clients/ocr-driving-license`

OCR a Portuguese Carta de Condução via Claude Vision and return the storable
client fields (nome, nº da carta, data de emissão) plus the card's validade,
which only stamps DataExpira on the attached document. Data-minimized: no DOB,
no nº de identificação civil, no categorias.

RGPD: reads the images in-memory and never persists them; the frontend attaches
them as Documentos do cliente (módulo 12, tipo "Carta de Condução") after the
client is saved. Unreadable/unsupported input returns success=False (never a
5xx); billing only fires on success, and success requires the document to
actually be a licence. Heavy sync work runs in the threadpool.

## Headers

- `x-api-token` string, nullable

## Response `200`

Successful Response

- DrivingLicenseOcrResult — Result of POST /api/clients/ocr-driving-license (mirrors CitizenCardOcrResult): flat fields + success/error_message — an unreadable document is success=False, never a 500. Data-minimized: no DOB, no nº de identificação civil (4d), no entidade emissora (4c), no categorias. Images are processed in memory and never persisted here; once the client is saved the frontend attaches them as Documentos do cliente (módulo 12, tipo "Carta de Condução") via POST /documents-test/. Unlike the CC result, success already implies doc_type == "carta_conducao" — a legible non-licence never reaches the caller as a success.
  - `success` boolean
  - `error_message` string, nullable
  - `billed` boolean
  - `doc_type` string, nullable
  - `confianca` string, nullable
  - `warnings` string[]
  - `nome` string, nullable
  - `numero_carta` string, nullable
  - `data_emissao` string, nullable
  - `validade` string, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/multigest/apis/multigest-protected-api.md) · [All operations](https://skmtc.dev/multigest/apis/multigest-protected-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/multigest/multigest-protected-api/revisions/4b44eb76b3ee/schema)
