Driving License Check API

VERIFICATION OF DRIVING LICENSE NUMBER, VALIDITY, CATEGORY AND RELATED DETAILS

API Outcome

  • Name Of Holder Name of the driving license holder
  • Category Category, class of vehicle and issued date for each class
  • License Type Transport or non transport type
  • Registered Location Office of road transport where the license is registered
  • Associated Dates Issued and expiry dates

Get Free Trial

Create a free account Or “Talk to Us” for price information and other queries.

API Details

Request

TypeURL
POSThttps://api.attestr.com/api/{version}/public/checkx/dl

Request Body Parameters

TypeNameDescriptionOptional (default)Min VersionMax Version
StringregInput DL number to be verified.Requiredv1
StringdobDate of birth of license holder in DD-MM-YYYY formatRequiredv1
BooleanwebhookBoolean indicating whether webhook should be triggered after request is processedOptionalv1

Request Header Parameters

TypeNameValue / DescriptionOptionalMin VersionMax Version
StringContent-Typeapplication/jsonRequiredv1
StringAuthorizationBasic {authToken}Requiredv1

If you do not have the authentication token, please refer to Register App to generate one.

Sample Request Payload

JSON
Copy

Response

HTTP Status 200

KeyDescriptionTypeMin VersionMax Version
_idUnique request Id to be used later for querying the resultStringv1
numberUnique human readable number to be used for any reference laterStringv1
Driving License Check Response
Copy

Querying Driving License Check Result

Get Async Request Outcome API

TypeURLMin VersionMax Version
GEThttps://api.attestr.com/api/{version}/public/async/<asyncId>v1

Request Header Parameters

TypeNameValue / DescriptionOptionalMin VersionMax Version
StringContent-Typeapplication/jsonRequiredv1
StringAuthorizationBasic {authToken}Requiredv1

Request URL Parameters

NameDescriptionMin VersionMax Version
asyncIdReplace <asyncId> in the URL with the _id received in the driving license record search API response as described above.v1

Response

Http Status 200

KeyDescriptionTypeMin VersionMax Version
_idRequest Id as queried in the URLStringv1
numberRequest number as generated in the driving license search API responseStringv1
requestIdUnique ID used by Attestr for request tracing purposesStringv1
statusStatus of the request. Possible values are - COMPLETED, INITIATED, ERROREDStringv1
inputThe input details used for driving license searchStringv1
outputDriving License check output object. Details described as below. Null if status is errored or initiated.DrivingLicenseOutputRecordv1
errorError object if the operation ran into errors, null otherwise. Null if status is completed or initiated.Stringv1
createdUnix timestamp when the request was placed.Numberv1
updatedUnix timestamp when the request was last updated. Null if status is initiated.Numberv1
signatureSignature generated using the output and client secret. Used for validating the accuracy of data. Null if status is errored or initiated.Stringv1

Driving License Output Record

Please note that the valid key decides the availability of rest of the keys in the response. If the provided DL number does not exist, all keys except valid and message are omitted. If true, remaining keys will have appropriate data.

KeyDescriptionTypeMin VersionMax Version
validTrue | false depending on if provided DL number exists and is validBooleanv1
activeTrue | false depending on if provided DL number is currently activeBooleanv1
ownerName of the driving license holderStringv1
issuedDate of issue of driving license DD-MM-YYYYDatev1
rtoName of RTA office where license is registeredStringv1
ntpIssuedDate of issue of non transport category (Set as null if the non transport category is not applicable) DD-MM-YYYYDatev1
ntpExpiryDate of expiry of non transport category (Set as null if the non transport category is not applicable) DD-MM-YYYYDatev1
tpIssuedDate of expiry of transport category (Set as null if the transport category is not applicable) DD-MM-YYYYDatev1
tpExpiryDate of expiry of transport category (Set as null if the transport category is not applicable) DD-MM-YYYYDatev1
typeType of driving licenseDLTypeEnumv1
categoriesCategories mapped to provided licenseArray of DLCategory objectv1
messageError message if provided PAN is invalidStringv1

DLTypeEnum

Enum ValuesDescription
TRANSPORTTransport category driving license
NONTRANSPORTNon transport category driving license
BOTHRegistered under both transport and non transport category

DLCategory

KeyDescriptionTypeMin VersionMax Version
covClass Of VehicleStringv1
issuedDate of issue for this class of vehicle MM-DD-YYYYDatev1
typeType of this category. Can hold only one of the 2 values TRANSPORT | NONTRANSPORTStringv1

Sample Response

Sample response for valid DL

JSON
Copy

Sample response for invalid driving license details

JSON
Copy

Error Response

ParameterTypeDescription
codeNumberUnique error codes for different errors. Always available.
messageStringError message describing the error. Always Available.
detailsStringDetail error message. Available only for certain types of errors.

Error Codes

HTTP StatusError CodeError Message
4004001Malformed data or missing required parameter values
4004005Operation could not be performed due to low credits balance
4014016Invalid client authorization
4034031Unauthorized access
4034035Requested service is not provisioned for your account
4034039Client's IP address is not whitelisted
4034035Requested service is not provisioned for your account
4294291Maximum account rate limit exceeded
4294292Maximum API rate limit exceeded
4294293Maximum account daily limit exceeded
4294294Maximum API daily limit exceeded
5005001Request could not be processed

Sample Error Response

JSON
Copy

Webhooks

Driving License check supports the following two webhook events.

See Webhooks for more details on how to register webhooks.

  1. async.completed
  2. async.errored

To enable webhooks, the API input parameter webhook must be set as true while initiating the request.

Webhook Event Payload

KeyTypeDescriptionMin VersionMax Version
_idStringID of the async request. This is same as received in the output of Person / Business search API as described above.v1
requestIdStringUnique request ID for internal tracing purposes.v1
statusStringOne of INITIATED, COMPLETED OR ERROREDv1
outputObjectDriving License Check output object same as output key described in Querying Driving License Result API above.
errorObjectError object if the driving license check runs into errors. The structure of this is same as the Error Response object described above.v1
signatureStringgenerated using hmacHexDigest of output object and client secret. Null if archived.

Validating the signature

Generate signature on your server side code base and check if it matches the signature returned in the payload. To generate the signature, use the SHA256 algorithm, the client secret and the output value to generate a HMAC Hex Digest as shown in the sample code below.

NodeJS
Java
Copy

Get Free Trial

Create a free account Or “Talk to Us” for price information and other queries.

Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard