Skip to main content
POST
Extract driving licence fields from an image
Upload an image of the licence as multipart/form-data in the file field. idto reads the card and returns its fields. Pair it with Verify a driving licence to confirm the extracted number against the issuing record. Every response has the same shape whichever source serves the call. Branch on error_code, never on status:
  • error_code: null with data: fields were read from the card. Billed.
  • error_code: "IDTO_202" with data: null: no driving licence could be read from the file. Billed.
  • Any non-2xx response: the check did not complete. Never billed.

Environments

Input rules

data.dl_number is returned only when the text read matches two letters followed by 11 to 14 digits; otherwise it is null. Check every field before you rely on it, OCR reads what is printed and can misread a worn card.

Retries and duplicate protection

Send an Idempotency-Key header (at most 255 characters) to make retries safe. Replaying the same key with the same body within 48 hours returns the stored first response without a new check or a new charge. The same key with a different body returns IDTO_010 (422). A replay while the first call is still running returns IDTO_004 (409). If the first call returned an error, nothing is stored, so a retry runs the check again.

Errors

On IDTO_202 or IDTO_503, ask the user for a sharper, well lit photo of the front of the card. Retry IDTO_004, IDTO_006 and IDTO_008 with backoff. Full taxonomy: v2 error codes.

Test scenarios

Questions: Driving licence and vehicle FAQ.
Was this page helpful? Email us at tech@idto.ai with the page link.

Authorizations

X-Client-ID
string
header
default:<client-id>
required

The Client ID shown on the API Credentials page of the idto dashboard. It is not your account or customer ID, which returns 401. Send it on every server-to-server request together with X-API-Key. Staging and production client IDs are different.

X-API-Key
string
header
default:<api-key>
required

Your API key from the idto dashboard (API credentials). Keep it on your server; never ship it in a browser or mobile app. Send it on every server-to-server request together with X-Client-ID.

Headers

Idempotency-Key
string

Make retries of this exact request safe. If the same key is replayed with an identical request body, the original result is returned without re-running the verification or billing again. If the same key is replayed with a different body, the request is rejected with IDTO_010 (422). Omitting this header runs every request as new.

Maximum string length: 255

Body

multipart/form-data
file
file
required
workflow_session_token
string

Response

The image was OCR'd.

status
enum<string>
required
Available options:
success
message
string
required
error_code
string | null
required

null on a full match, an IDTO_2xx code on a definitive no-record result. Both are billed.

data
object | null
required
billed
enum<boolean>
required
Available options:
true
tranx_id
string | null
timestamp
string<date-time> | null
Last modified on December 1, 2026