Endpoint
POST /v1/verify/driving-license
POST
/v1/verify/driving-licenseScope verification.dl.readप्रति सफल call ₹5 से शुरूलाइवDriving Licence को validate और verify करता है। API key पर verification.dl.read scope ज़रूरी है। सफल response के बाद इसे dl.verify के रूप में metered किया जाता है - usage तभी दर्ज होता है (और priced services के लिए fulfilment wallet तभी debit होता है) जब verification सफलतापूर्वक पूरा हो जाए। नीचे दिया गया response /v1/verify/driving-license से लौटने वाला असली shape है, जिसमें referenceId field भी शामिल है।
Request
Request के parameters
| Field | Type | विवरण |
|---|---|---|
Authorizationज़रूरी | header | Bearer <api-key> (जैसे sandbox में sk_test_..., production में sk_live_...)। x-api-key header भी स्वीकार किया जाता है। |
dlNumberज़रूरी | string | Driving licence number। |
dobज़रूरी | string | जन्म तिथि (YYYY-MM-DD)। |
उदाहरण
Call करके देखें
curl -X POST "https://api-b2b.stampmitra.in/v1/verify/driving-license" \
-H "Authorization: Bearer sk_test_xxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"dlNumber":"MH1420110012345","dob":"1990-01-01"}'Playground
Try करें
Response
Response का उदाहरण
ResponseJSON
{
"referenceId": "SMV-20260927-2Q56T8",
"verificationId": "VRF-4H8Z2M6TQ9KW",
"valid": true,
"dlNumber": "KA51201900089895",
"dob": "1994-08-05",
"status": "VALID",
"dlStatus": "VALID",
"name": "JOHN DOE",
"fatherOrHusbandName": "JOHN DOE",
"address": "FLAT NO D-901 SUN,BELLANDUR, BANGALORE SOUTH,BANGALORE,KA 560103",
"validUpto": "09/05/2039",
"badgeDetails": [
{
"badgeIssueDate": null,
"badgeNo": null,
"classOfVehicle": [
"LMV"
]
}
],
"dlValidity": {
"nonTransport": {
"to": "09/05/2039",
"from": "10/05/2019"
},
"hazardousValidTill": null,
"transport": {
"to": null,
"from": null
},
"hillValidTill": null
},
"detailsOfDrivingLicence": {
"dateOfIssue": "10/05/2019",
"dateOfLastTransaction": null,
"status": null,
"lastTransactedAt": null,
"name": "JOHN DOE",
"fatherOrHusbandName": "JOHN DOE",
"addressList": [
{
"completeAddress": "FLAT NO D-901 SUN,BELLANDUR, BANGALORE SOUTH,BANGALORE,KA 560103",
"type": "permanent",
"splitAddress": {
"district": [
"BANGALORE"
],
"state": [
"KARNATAKA",
"KA"
],
"city": [
"BELLANDUR"
],
"pincode": "560103",
"country": [
"IN",
"IND",
"INDIA"
],
"addressLine": "FLAT NO D-901 SUN,BELLANDUR, BANGALORE SOUTH,BANGALORE,KA 560103"
}
},
{
"completeAddress": "FLAT NO D-901 SUN,BELLANDUR, BANGALORE SOUTH,BANGALORE,KA 560103",
"type": "temporary",
"splitAddress": {
"district": [
"BANGALORE"
],
"state": [
"KARNATAKA",
"KA"
],
"city": [
"BELLANDUR"
],
"pincode": "560103",
"country": [
"IN",
"IND",
"INDIA"
],
"addressLine": "FLAT NO D-901 SUN,BELLANDUR, BANGALORE SOUTH,BANGALORE,KA 560103"
}
}
],
"address": "FLAT NO D-901 SUN,BELLANDUR, BANGALORE SOUTH,BANGALORE,KA 560103",
"photoUrl": "https://example.com/dl-photos/KA51201900089895.jpeg",
"splitAddress": {
"district": [
"BANGALORE"
],
"state": [
""
],
"city": [
"BELLANDUR"
],
"pincode": "560103",
"country": [
"IN",
"IND",
"INDIA"
],
"addressLine": "FLAT NO D-901 SUNCITY,BELLANDUR, BANGALORE SOUTH,BANGALORE,KA 560103"
},
"covDetails": []
}
}| Field | Type | Description |
|---|---|---|
referenceId | string | इस call के लिए StampMitra की अपनी transaction id (SMV-YYYYMMDD-XXXXXXX)। negative result में भी हमेशा मौजूद। |
verificationId | string | इस verification की StampMitra की अपनी id (VRF- के बाद 12 base32 characters)। हर call के लिए नई बनती है और उसी call की होती है। हमेशा मौजूद। Support requests में यही बताएँ। |
valid | boolean | Driving licence valid है या नहीं। हमेशा मौजूद। |
dlNumber | string | जिस driving licence number को देखा गया। |
dob | string | Licence धारक की जन्म तिथि, ISO yyyy-mm-dd। |
status | string | Lookup का नतीजा: VALID या INVALID। |
dlStatus | string | status जैसा ही मान। मौजूदा integrations चलते रहें, इसलिए रखा गया है। |
name | string | Licence धारक का registered नाम। detailsOfDrivingLicence.name जैसा ही। मौजूदा integrations के लिए रखा गया है। |
fatherOrHusbandName | string | धारक के पिता या पति का नाम। detailsOfDrivingLicence.fatherOrHusbandName जैसा ही। मौजूदा integrations के लिए रखा गया है। |
address | string | Registered address एक string में। detailsOfDrivingLicence.address जैसा ही। मौजूदा integrations के लिए रखा गया है। |
validUpto | string | Non-transport classes की वैधता का अंत, तारीख़ की string ठीक वैसी जैसी मिली (उदाहरण में dd/mm/yyyy)। dlValidity.nonTransport.to जैसा ही। मौजूदा integrations के लिए रखा गया है। |
badgeDetails | array or null | Transport badge का विवरण और कवर की गई vehicle classes। record में badge block न हो तो null। |
badgeDetails[].badgeIssueDate | string or null | Transport badge जारी होने की तारीख़, जैसी मिली। licence में badge न हो तो null। |
badgeDetails[].badgeNo | string or null | Transport badge का नंबर। licence में badge न हो तो null। |
badgeDetails[].classOfVehicle | array of string or null | Licence जिन vehicle classes को कवर करता है, जैसे LMV। |
dlValidity | object or null | Class के हिसाब से licence की वैधता: non-transport, transport, hazardous goods और hill area। |
dlValidity.nonTransport | object or null | Non-transport (निजी वाहन) classes की वैधता। |
dlValidity.nonTransport.to | string or null | वैधता अवधि का अंत, तारीख़ की string ठीक वैसी जैसी मिली (उदाहरण में dd/mm/yyyy)। class लागू न हो तो null। |
dlValidity.nonTransport.from | string or null | वैधता अवधि की शुरुआत, तारीख़ की string ठीक वैसी जैसी मिली (उदाहरण में dd/mm/yyyy)। class लागू न हो तो null। |
dlValidity.hazardousValidTill | string or null | Hazardous-goods वाहनों की वैधता का अंत, जैसा मिला। लागू न हो तो null। |
dlValidity.transport | object or null | Transport (commercial वाहन) classes की वैधता। licence में transport class न हो तो दोनों तारीख़ें null। |
dlValidity.transport.to | string or null | वैधता अवधि का अंत, जैसा मिला। transport class न हो तो null। |
dlValidity.transport.from | string or null | वैधता अवधि की शुरुआत, जैसी मिली। transport class न हो तो null। |
dlValidity.hillValidTill | string or null | Hill-area में चलाने की वैधता का अंत, जैसा मिला। लागू न हो तो null। |
detailsOfDrivingLicence | object or null | Licence record में दर्ज विवरण: जारी होने की तारीख़, धारक के नाम, addresses, photograph का link और class-of-vehicle विवरण। |
detailsOfDrivingLicence.dateOfIssue | string or null | Licence जारी होने की तारीख़, string ठीक वैसी जैसी मिली (उदाहरण में dd/mm/yyyy)। |
detailsOfDrivingLicence.dateOfLastTransaction | string or null | Licence record पर आख़िरी transaction की तारीख़, जैसी मिली। न हो तो null। |
detailsOfDrivingLicence.status | string or null | Licence record पर status का text। record में न हो तो null। |
detailsOfDrivingLicence.lastTransactedAt | string or null | जिस office में आख़िरी transaction हुआ। न हो तो null। |
detailsOfDrivingLicence.name | string or null | Licence धारक का नाम। |
detailsOfDrivingLicence.fatherOrHusbandName | string or null | धारक के पिता या पति का नाम। |
detailsOfDrivingLicence.addressList | array or null | Record में दर्ज addresses, हर एक अपने type (permanent या temporary) के साथ। |
detailsOfDrivingLicence.addressList[].completeAddress | string or null | पूरा address एक string में। |
detailsOfDrivingLicence.addressList[].type | string or null | Address का type: permanent या temporary। |
detailsOfDrivingLicence.addressList[].splitAddress | object or null | वही address हिस्सों में बँटा हुआ। |
detailsOfDrivingLicence.addressList[].splitAddress.district | array of string or null | District का नाम (एक या अधिक)। |
detailsOfDrivingLicence.addressList[].splitAddress.state | array of string or null | State का नाम और code, एक ही flat list में। record में state न हो तो [""] भी हो सकता है। |
detailsOfDrivingLicence.addressList[].splitAddress.city | array of string or null | City या locality का नाम (एक या अधिक)। |
detailsOfDrivingLicence.addressList[].splitAddress.pincode | string or null | छह अंकों का PIN code। |
detailsOfDrivingLicence.addressList[].splitAddress.country | array of string or null | Country के code और नाम। |
detailsOfDrivingLicence.addressList[].splitAddress.addressLine | string or null | पूरा address एक line में। |
detailsOfDrivingLicence.address | string or null | धारक का address एक string में। |
detailsOfDrivingLicence.photoUrl | string or null | Licence धारक की photograph का link (URL, image data कभी नहीं)। link अस्थायी है: image चाहिए तो जल्दी download कर लें। |
detailsOfDrivingLicence.splitAddress | object or null | धारक का address हिस्सों में बँटा हुआ। |
detailsOfDrivingLicence.splitAddress.district | array of string or null | District का नाम (एक या अधिक)। |
detailsOfDrivingLicence.splitAddress.state | array of string or null | State का नाम और code, एक ही flat list में। record में state न हो तो [""] भी हो सकता है। |
detailsOfDrivingLicence.splitAddress.city | array of string or null | City या locality का नाम (एक या अधिक)। |
detailsOfDrivingLicence.splitAddress.pincode | string or null | छह अंकों का PIN code। |
detailsOfDrivingLicence.splitAddress.country | array of string or null | Country के code और नाम। |
detailsOfDrivingLicence.splitAddress.addressLine | string or null | पूरा address एक line में। |
detailsOfDrivingLicence.covDetails | array or null | Record में class-of-vehicle विवरण हों तो उनकी entries; वरना खाली list। |
Errors
Error responses
401API key missing या invalid
{
"error": {
"code": "UNAUTHORIZED",
"message": "Missing or invalid API key.",
"requestId": "a1b2c3d4-e5f6-4a1b-8c2d-9f0e1a2b3c4d"
}
}403Key valid है, पर ज़रूरी scope नहीं है
{
"error": {
"code": "FORBIDDEN",
"message": "API key is valid but lacks the required scope for this endpoint.",
"requestId": "a1b2c3d4-e5f6-4a1b-8c2d-9f0e1a2b3c4d"
}
}400Validation error
{
"error": {
"code": "BAD_REQUEST",
"message": "dlNumber must match the format MH1420110012345",
"requestId": "a1b2c3d4-e5f6-4a1b-8c2d-9f0e1a2b3c4d"
}
}402Wallet balance अपर्याप्त
{
"error": {
"code": "PAYMENT_REQUIRED",
"message": "Insufficient fulfilment wallet balance to cover this call.",
"requestId": "a1b2c3d4-e5f6-4a1b-8c2d-9f0e1a2b3c4d"
}
}429Rate limit पार हो गई
{
"error": {
"code": "TOO_MANY_REQUESTS",
"message": "Rate limit exceeded: 60 requests per 60 seconds for this endpoint.",
"requestId": "a1b2c3d4-e5f6-4a1b-8c2d-9f0e1a2b3c4d"
}
}502Upstream verification service तक पहुँच नहीं हो पाई
{
"error": {
"code": "INTERNAL_ERROR",
"message": "Unable to reach the order/customer service right now",
"requestId": "5c1c1e9e-2f7b-4b7a-9b0e-0f1a2b3c4d5e"
}
}ध्यान दें
जानने लायक बातें
नोट
Input format पहले ही validate किया जाता है - गलत format वाला pan/gstin/आदि verification के लिए भेजे जाने के बजाय तुरंत 400 के साथ fail हो जाता है। referenceId (format SMV-YYYYMMDD-XXXXXXX) इस call के लिए StampMitra की अपनी transaction id है और हमेशा मौजूद रहती है, negative (valid: false / found: false) result में भी - positive और negative दोनों determinations पूरे, billable verifications हैं। यह idempotency key नहीं है। verificationId (format VRF-XXXXXXXXXXXX) इस verification की StampMitra की अपनी id है, जो हर call के लिए बनती है; support requests में यही बताएँ। referenceId, verificationId और valid के अलावा हर field optional है और licensing data के न देने पर response में नहीं आता; जो मान licensing data में null है (badge नहीं, transport class नहीं, आख़िरी transaction नहीं) वह null ही लौटता है। validUpto, dlValidity और dateOfIssue तारीख़ की strings हैं, ठीक वैसी जैसी मिलीं (उदाहरण में dd/mm/yyyy), इसलिए उन्हें सावधानी से parse करें; dob ISO yyyy-mm-dd है। status और dlStatus में एक ही मान होता है, और name, fatherOrHusbandName, address और validUpto वही मान दोहराते हैं जो detailsOfDrivingLicence और dlValidity में हैं; ये मौजूदा integrations के लिए रखे गए हैं। photoUrl धारक की photograph का link है और अस्थायी है।