API reference / Vehicle / DL

DL verify

Sarathi-style driving-licence verification.

POST/v1/vehicle/dl
Authentication
Bearer token
Scope
vehicle:read

Request body

FieldTypeRequiredDescription
dl_numberstringYesDriving licence number, 8 to 20 letters and digits; spaces and hyphens are ignored.
dobstringYesDate 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

FieldTypeDescription
dl_numberstringThe licence number that was checked.
dobstringDate of birth on the licence record.
badge_detailsarrayTransport badges held by the licence holder.
dl_validityobjectPeriods the licence is valid for.
dl_validity.non_transportobjectValidity for non-transport vehicles, with from and to dates.
dl_validity.transportobjectValidity for transport vehicles, with from and to dates.
dl_validity.hazardous_valid_tillstringDate the hazardous-goods endorsement is valid until.
dl_validity.hill_valid_tillstringDate the hill-driving endorsement is valid until.
details_of_driving_licenceobjectDetails recorded on the licence.
details_of_driving_licence.namestringLicence holder's name.
details_of_driving_licence.father_or_husband_namestringFather's or husband's name.
details_of_driving_licence.statusstringStatus of the licence.
details_of_driving_licence.date_of_issuestringDate of issue.
details_of_driving_licence.date_of_last_transactionstringDate of the last transaction on the licence.
details_of_driving_licence.last_transacted_atstringOffice where the last transaction was made.
details_of_driving_licence.addressstringAddress on the licence.
details_of_driving_licence.address_listarrayAddresses on the licence.
details_of_driving_licence.split_addressobjectThe licence holder's address broken into parts.
details_of_driving_licence.split_address.districtarrayDistrict name, as a list.
details_of_driving_licence.split_address.statearrayState name, as a list.
details_of_driving_licence.split_address.cityarrayCity name, as a list.
details_of_driving_licence.split_address.pincodestringSix-digit pincode.
details_of_driving_licence.split_address.countryarrayCountry name, as a list.
details_of_driving_licence.split_address.address_linestringStreet-level part of the address.
details_of_driving_licence.cov_detailsarrayClasses of vehicle the licence covers.
details_of_driving_licence.photostringLink 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.