Driving Licence and Vehicle
Verify a driving licence
Check a driving licence number and date of birth against the issuing record and get the holder details, validity and vehicle classes.
POST
/
v2
/
verify
/
driving_licence
Verify a driving licence
curl --request POST \
--url https://prod.idto.ai/v2/verify/driving_licence \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--header 'X-Client-ID: <api-key>' \
--data '
{
"licence_number": "KA0120200000001",
"dob": "1990-01-01"
}
'const options = {
method: 'POST',
headers: {
'X-Client-ID': '<api-key>',
'X-API-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({licence_number: 'KA0120200000001', dob: '1990-01-01'})
};
fetch('https://prod.idto.ai/v2/verify/driving_licence', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {
method: 'POST',
headers: {
'X-Client-ID': '<api-key>',
'X-API-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({licence_number: 'KA0120200000001', dob: '1990-01-01'})
};
fetch('https://prod.idto.ai/v2/verify/driving_licence', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://prod.idto.ai/v2/verify/driving_licence"
payload = {
"licence_number": "KA0120200000001",
"dob": "1990-01-01"
}
headers = {
"X-Client-ID": "<api-key>",
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://prod.idto.ai/v2/verify/driving_licence"
payload := strings.NewReader("{\n \"licence_number\": \"KA0120200000001\",\n \"dob\": \"1990-01-01\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Client-ID", "<api-key>")
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://prod.idto.ai/v2/verify/driving_licence",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'licence_number' => 'KA0120200000001',
'dob' => '1990-01-01'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>",
"X-Client-ID: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}require 'uri'
require 'net/http'
url = URI("https://prod.idto.ai/v2/verify/driving_licence")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Client-ID"] = '<api-key>'
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"licence_number\": \"KA0120200000001\",\n \"dob\": \"1990-01-01\"\n}"
response = http.request(request)
puts response.read_bodyHttpResponse<String> response = Unirest.post("https://prod.idto.ai/v2/verify/driving_licence")
.header("X-Client-ID", "<api-key>")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"licence_number\": \"KA0120200000001\",\n \"dob\": \"1990-01-01\"\n}")
.asString();{
"status": "success",
"message": "Driving licence verified successfully.",
"error_code": null,
"data": {
"dl_number": "KA0120200000001",
"name": "RAHUL SHARMA",
"dob": "1990-01-01",
"relative_name": "SURESH SHARMA",
"address": "12 SAMPLE STREET, SAMPLE AREA, BENGALURU, KARNATAKA-560001",
"pincode": "560001",
"status": "Active",
"issuing_authority": {
"rto": "RTO Bangalore Central",
"state": "Karnataka"
},
"validity": {
"non_transport": {
"issue_date": "2010-05-01",
"expiry_date": "2030-05-01"
},
"transport": {
"issue_date": null,
"expiry_date": null
}
},
"vehicle_classes": [
{
"category": "LMV",
"authority": "RTO Bangalore Central"
}
],
"blood_group": "O+",
"photo": null
},
"billed": true,
"tranx_id": "8f14e45f-ceea-467e-bd93-4a2c11e0a1b2",
"timestamp": "2026-09-14T10:15:30Z"
}
Send a licence number and the holder’s date of birth. idto looks up the licence with the issuing authority and returns the holder name, address, validity dates and the vehicle classes the holder may drive. Use it to onboard drivers and delivery partners, or before handing over a rental vehicle.
Every response has the same shape whichever source serves the call. Branch on
Fix the input on
Questions: Driving licence and vehicle FAQ.
Was this page helpful? Email us at tech@idto.ai with the page link.
error_code, never on status:
error_code: nullwithdata: the licence exists and matches the date of birth. Billed.error_code: "IDTO_202"withdata: null: no licence matches this number and date of birth. Billed, because the check ran to a definitive answer.- Any non-2xx response: the check did not complete. Never billed.
Environments
| Environment | Base URL | Notes |
|---|---|---|
| Production | https://prod.idto.ai | Keys from the dashboard after go-live. Billed. |
| Staging | https://dev.idto.ai | Keys on request from your idto account manager. Calls reach live sources, so use identities you are authorised to verify. Staging credits are deducted from your staging account. |
Input rules
| Field | Rule |
|---|---|
licence_number | Required. Spaces and hyphens are removed and letters are upper-cased first. The result must be at least 8 letters and digits, for example KA0120200000001 or KA01 20200000001. A licence that contains / is accepted when it is at least 13 characters long and every other character is a letter or digit. A value made only of spaces and hyphens is rejected with IDTO_001. |
dob | Required. YYYY-MM-DD, DD-MM-YYYY or DD/MM/YYYY. |
user_id | Optional. Your own reference for the end user. |
workflow_session_token | Optional. Pass only when the call is part of an idto workflow session. |
Response fields
| Field | Meaning |
|---|---|
data.dl_number | Licence number as held by the issuer. |
data.name, data.relative_name | Holder name and father’s or husband’s name. |
data.dob | Date of birth on the record. |
data.address, data.pincode | Address on the licence and its PIN code. |
data.status | Licence status reported by the issuer. |
data.issuing_authority | Issuing RTO and state. |
data.validity | Non-transport and transport validity dates. |
data.vehicle_classes | Classes of vehicle the holder may drive. |
data.blood_group, data.photo | Present when the issuer returns them; photo is base64. |
billed | true when this call was charged. |
tranx_id | idto transaction id. Quote it to support. |
Retries and duplicate protection
Send anIdempotency-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
| Code | HTTP | Message | Billed |
|---|---|---|---|
IDTO_202 | 200 | Record is invalid or does not exist. | Yes |
IDTO_001 | 400 | Invalid input: Driving licence number is required. Please check and retry. | No |
IDTO_001 | 400 | Invalid input: A valid date of birth is required. Please check and retry. | No |
IDTO_001 | 400 | Invalid input: The date of birth is below the minimum age for a driving licence. Please check and retry. (the issuer reports the holder is under age) | No |
IDTO_001 | 400 | Invalid input: licence_number is empty after removing spaces and hyphens. Please check and retry. | No |
IDTO_001 | 422 | Invalid input. Please check the request and try again. (a required field is missing or has the wrong type) | No |
null | 400 | Insufficient credits for this operation. (your idto balance is too low; recharge and retry) | No |
IDTO_004 | 409 | An identical request is already in progress; retry shortly. | No |
IDTO_010 | 422 | Idempotency-Key was already used with a different request body. | No |
IDTO_006 | 429 | Too many requests. Please wait a moment and retry. | No |
IDTO_007 | 500 | Verification could not be completed due to a service configuration issue. Please contact support at tech@idto.ai. | No |
IDTO_008 | 503 | The verification service is facing downtime due to issues from the source. Please drop a mail to tech@idto.ai, and try again later. | No |
IDTO_001; do not retry it unchanged. Retry IDTO_004, IDTO_006 and IDTO_008 with backoff. Full taxonomy: v2 error codes.
Test scenarios
| Input | Expected error_code | HTTP | Billed |
|---|---|---|---|
| Valid licence number with the matching date of birth | null | 200 | Yes |
| Well-formed licence number with no matching record | IDTO_202 | 200 | Yes |
licence_number shorter than 8 characters, for example KA01 | IDTO_001 | 400 | No |
A licence with / shorter than 13 characters, for example KA01/2020 | IDTO_001 | 400 | No |
dob as 1990.01.01 | IDTO_001 | 400 | No |
dob missing from the body | IDTO_001 | 422 | No |
Same Idempotency-Key, different body | IDTO_010 | 422 | No |
Was this page helpful? Email us at tech@idto.ai with the page link.
Authorizations
Headers
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:
255Body
application/json
Response
The DL lookup ran to completion.
Last modified on December 1, 2026
Verify a driving licence
curl --request POST \
--url https://prod.idto.ai/v2/verify/driving_licence \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--header 'X-Client-ID: <api-key>' \
--data '
{
"licence_number": "KA0120200000001",
"dob": "1990-01-01"
}
'const options = {
method: 'POST',
headers: {
'X-Client-ID': '<api-key>',
'X-API-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({licence_number: 'KA0120200000001', dob: '1990-01-01'})
};
fetch('https://prod.idto.ai/v2/verify/driving_licence', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {
method: 'POST',
headers: {
'X-Client-ID': '<api-key>',
'X-API-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({licence_number: 'KA0120200000001', dob: '1990-01-01'})
};
fetch('https://prod.idto.ai/v2/verify/driving_licence', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://prod.idto.ai/v2/verify/driving_licence"
payload = {
"licence_number": "KA0120200000001",
"dob": "1990-01-01"
}
headers = {
"X-Client-ID": "<api-key>",
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://prod.idto.ai/v2/verify/driving_licence"
payload := strings.NewReader("{\n \"licence_number\": \"KA0120200000001\",\n \"dob\": \"1990-01-01\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Client-ID", "<api-key>")
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://prod.idto.ai/v2/verify/driving_licence",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'licence_number' => 'KA0120200000001',
'dob' => '1990-01-01'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>",
"X-Client-ID: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}require 'uri'
require 'net/http'
url = URI("https://prod.idto.ai/v2/verify/driving_licence")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Client-ID"] = '<api-key>'
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"licence_number\": \"KA0120200000001\",\n \"dob\": \"1990-01-01\"\n}"
response = http.request(request)
puts response.read_bodyHttpResponse<String> response = Unirest.post("https://prod.idto.ai/v2/verify/driving_licence")
.header("X-Client-ID", "<api-key>")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"licence_number\": \"KA0120200000001\",\n \"dob\": \"1990-01-01\"\n}")
.asString();{
"status": "success",
"message": "Driving licence verified successfully.",
"error_code": null,
"data": {
"dl_number": "KA0120200000001",
"name": "RAHUL SHARMA",
"dob": "1990-01-01",
"relative_name": "SURESH SHARMA",
"address": "12 SAMPLE STREET, SAMPLE AREA, BENGALURU, KARNATAKA-560001",
"pincode": "560001",
"status": "Active",
"issuing_authority": {
"rto": "RTO Bangalore Central",
"state": "Karnataka"
},
"validity": {
"non_transport": {
"issue_date": "2010-05-01",
"expiry_date": "2030-05-01"
},
"transport": {
"issue_date": null,
"expiry_date": null
}
},
"vehicle_classes": [
{
"category": "LMV",
"authority": "RTO Bangalore Central"
}
],
"blood_group": "O+",
"photo": null
},
"billed": true,
"tranx_id": "8f14e45f-ceea-467e-bd93-4a2c11e0a1b2",
"timestamp": "2026-09-14T10:15:30Z"
}