POST
/v1/vehicle/dl- Authentication
- Bearer token
- Scope
vehicle:read
Request body
| Field | Type | Required | Description |
|---|---|---|---|
dl_number | string | Yes | Driving licence number, 8 to 20 letters and digits; spaces and hyphens are ignored. |
dob | string | Yes | Date of birth, a past date as YYYY-MM-DD, DD/MM/YYYY or DD-MM-YYYY. |
Sample code
Set your key in the GRAPPI_API_KEY environment variable. Sample values are placeholders.
curl -sS -X POST 'https://grappi.ai/v1/vehicle/dl' \
-H "Authorization: Bearer $GRAPPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"dl_number": "MH1220190001234",
"dob": "1990-01-01"
}'Sample response
{
"request_id": "req_01HZY3K8M2",
"result": {
"dl_number": "MH1220190001234",
"dob": "17/08/1990",
"badge_details": [],
"dl_validity": {
"non_transport": {
"from": "2019-05-10",
"to": "2039-08-16"
},
"transport": {
"from": "",
"to": ""
},
"hazardous_valid_till": "",
"hill_valid_till": ""
},
"details_of_driving_licence": {
"name": "ASHA RAO",
"father_or_husband_name": "RAMESH RAO",
"status": "ACTIVE",
"date_of_issue": "2019-05-10",
"date_of_last_transaction": "2019-05-10",
"address": "12 Example Lane, Pune, Maharashtra, 411001",
"split_address": {
"district": [
"Pune"
],
"state": [
"Maharashtra"
],
"city": [
"Pune"
],
"pincode": "411001",
"country": [
"India"
],
"address_line": "12 Example Lane"
},
"cov_details": [
{
"cov": "LMV",
"issue_date": "2019-05-10"
}
]
}
}
}Response fields
| Field | Type | Description |
|---|---|---|
dl_number | string | The licence number that was checked. |
dob | string | Date of birth on the licence record. |
badge_details | array | Transport badges held by the licence holder. |
dl_validity | object | Periods the licence is valid for. |
dl_validity.non_transport | object | Validity for non-transport vehicles, with from and to dates. |
dl_validity.transport | object | Validity for transport vehicles, with from and to dates. |
dl_validity.hazardous_valid_till | string | Date the hazardous-goods endorsement is valid until. |
dl_validity.hill_valid_till | string | Date the hill-driving endorsement is valid until. |
details_of_driving_licence | object | Details recorded on the licence. |
details_of_driving_licence.name | string | Licence holder's name. |
details_of_driving_licence.father_or_husband_name | string | Father's or husband's name. |
details_of_driving_licence.status | string | Status of the licence. |
details_of_driving_licence.date_of_issue | string | Date of issue. |
details_of_driving_licence.date_of_last_transaction | string | Date of the last transaction on the licence. |
details_of_driving_licence.last_transacted_at | string | Office where the last transaction was made. |
details_of_driving_licence.address | string | Address on the licence. |
details_of_driving_licence.address_list | array | Addresses on the licence. |
details_of_driving_licence.split_address | object | The licence holder's address broken into parts. |
details_of_driving_licence.split_address.district | array | District name, as a list. |
details_of_driving_licence.split_address.state | array | State name, as a list. |
details_of_driving_licence.split_address.city | array | City name, as a list. |
details_of_driving_licence.split_address.pincode | string | Six-digit pincode. |
details_of_driving_licence.split_address.country | array | Country name, as a list. |
details_of_driving_licence.split_address.address_line | string | Street-level part of the address. |
details_of_driving_licence.cov_details | array | Classes of vehicle the licence covers. |
details_of_driving_licence.photo | string | Link to the licence holder's photo, when available. |
Errors
Every failure has the same shape. A call that fails on our side or at the data source is refunded to your wallet; a "no record found" answer is charged. See the error reference.