Extraction API
Introduction
Aadhaar is a 12-digit unique identity number that can be obtained by residents or passport holders of India, based on their biometric and demographic data. This API is used to extract data (like name,UID number,etc) from the image of aadhar card provided.
How to call the API
Before going for Auto reading or Verification calls, you first need to create an Identity object. For best results, please make sure that the image you use fits tightly in camera view and is horizontally aligned. Each image/pdf should be less than 2MB in size. The Aadhaar Card reading system accepts direct URL of the front and back side of aadhaar.
API Input Guidelines
- The Image should be of good quality
- The Image should be less than 2MB in size
- This API accepts only image, pdf, or URLs of image(png/jpg/jpeg/tiff). Though this engine support extraction of images as well as pdf files, our test results indicate that there is much better accuracy and faster response time for image extraction. We would suggest you to pass image file and not pdf for better results.
Step 1: Hit Identities API
Sample cURL
curl --location --request POST
'https://preproduction.signzy.tech/api/v2/patrons/<Patron ID>/identities' \
--header 'Authorization: <Auth Key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"type": "aadhaar",
"email": "<email Id>",
"callbackUrl": "<https://www.w3schools.com",>
"essentials": {<images Url>}
}'Input Parameters
Parameter Name | Required/Optional | Description |
|---|---|---|
Authorization | Required | Access token returned as id field of login request |
Content-Type | Required | application/json |
type | Required | Type of identity |
Required | e-mail ID | |
callbackurl | Required | URL where response will be posted |
essentials | Required | This parameter contains the essential data for generating the output. |
images | Required | Front and back image url of aadhaar |
Sample Response
{
"type": "aadhaar",
"email": "..email..
"callbackUrl": "<https://www.w3schools.com",>
"images": [
"<https://<Front> side image URL>",
"<https://<Back> side image URL>"
],
"accessToken": "..accessToken..",
"autoRecognition": [],
"verification": [],
"forgeryCheck": [],
"id": "..id..",
"patronId": "..patronId.."
}Response Parameter
Parameter Name | Description |
|---|---|
accessToken | This is provided by identities API |
autoRecognition | Auto recognises text from upload image |
verification | It verifies the identity card |
forgeryCheck | Checks for any forgery on the aadhar card |
id | The access token generated during login request is held here |
patronId | Unique patron id |
Step 2: Hit Snoops API and receives a response
Sample cURL
curl --request POST \
--url https://preproduction.signzy.tech/api/v2/snoops> \
--header 'accept: */*' \
--header 'accept-language: en-US,en;q=0.8' \
--header 'content-type: application/json' \
--data '
{
"service":"Identity",
"itemId":"<Identity-ID>",
"accessToken":"<Identity-token>",
"task":"autoRecognition",
"essentials":{}
}'Input Parameters
Parameter Name | Required/Optional | Description |
|---|---|---|
Authorization | Required | Contains the id parameter returned from the login step |
Content-Type | Required | application/json |
service | Required | Type of Signzy service - “identity extraction” |
itemId | Required | Contains the identity item id |
accessToken | Required | This is provided by the identities API |
task | Required | This value always remains fixed for Aadhaar extraction API, it is always AutoRecognition |
essentials | Required | Contains the essential input data |
Sample API Response
{
"service": "Identity",
"itemId": "..itemId..",
"task": "autoRecognition",
"essentials": {},
"accessToken": "<Identity access token>",
"id": "<ID of the snoop request>",
"response": {
"files": [
"<Front aadhaar image URL>",
"<Back aadhaar image URL>"
],
"id": 47179,
"instance": {
"id": "..<token>..",
"callbackUrl": "<https://www.w3schools.com">
},
{
"uid": "...uid no...",
"vid": "",
"name": "..name..",
"dob": "..dob..",
"yob": "..year of birth...",
"pincode": "..pin cide..",
"address": "<Address of Aadhaar Holder>,
"gender": "..gender..",
"splitAddress": {
"district": [
"..name of the district.."
],
"state": [
[
"...name of the state...",
"..state code.."
]
],
"city": [
"...name of the city.."
],
"pincode": "...Pin code...",
"country": [
"IN",
"IND",
"INDIA"
],
"addressLine": "<Address of Aadhaar Holder>"
},
"uidHash": "<Encrypted hash value>",
"summary": {
"number": "...uid no..",
"name": "..name of the card holder..",
"dob": "..dob..",
"address": "<Address of Aadhaar Holder>",
"splitAddress": {
"district": [
"...name of the district.."
],
"state": [
[
"...name of the state...",
"..state code.."
]
],
"city": [
"..name of the city.."
],
"pincode": "..pin code..",
"country": [
"IN",
"IND",
"INDIA"
],
"addressLine": "Address of Aadhaar Holder"
},
"gender": "..gender..",
"guardianName": "...name of the guardian..",
"issueDate": "..date of issue of card..",
"expiryDate": "..date of expiry of the card"
}
}Output Parameters
Parameter Name | Description |
|---|---|
service | Type of Signzy service - “identity extraction” |
itemId | Contains the identity item id |
task | The type of task performed - “Auto Recognition” |
essentials | Contains the essential output data |
essentials.accessToken | Contains the access token that was received from identity request |
essentials.Id | Contains the unique Id of the snoop request |
response | Contains the output files |
files | Contains the image URL of the output |
result | This parameter holds the final result parameters of the response. |
result.uid | The unique Aadhaar ID number |
result.vid | The Virtual Aadhaar ID number |
result.name | This parameter contains the name on the ID card |
result.yob | This parameter returns the Year of birth of the ID holder |
result.dob | Date of birth of the ID holder |
result.pincode | The pincode of the ID card holder’s address |
result.address | The address of the ID card holder |
result.gender | The gender of the ID card holder |
result.splitAddress | This parameter distinguishes the various parts of the address of the ID holder into separate categories like district, state, city, Pincode, and country. For the country category, acceptable values (for Indian ID cards) is “IN”,” IND”and” INDIA” |
uidHash | Contains the encrypted hash value of the UID |
Getting help
Please feel free to contact us if you have any questions, require clarification, or have ideas for how to make the documents or any of our services better.
You can reach out to us at [email protected].