Skip to main content

Aadhaar Front Extraction

Extracts data fields from the front of an Aadhaar card — name, date of birth, sex, Aadhaar number and, optionally, the face image.

POSThttps://sandbox/pcs/aadhaar/front

Content-Type: application/json

Headers​

HeaderTypeRequiredDescription
keystringYesAPI key issued for authentication.

Request body​

FieldTypeRequiredDescription
recordIdstringYesUnique ID you assign to correlate the request with the response.
imagestringYesBase64 string / data URI of the Aadhaar front image.
face_image_requiredbooleanNoReturn the extracted face image. Defaults to false.

Example​

POST/pcs/aadhaar/front
curl --location 'https://sandbox/pcs/aadhaar/front' \
--header 'key: <your-api-key>' \
--header 'Content-Type: application/json' \
--data '{
  "recordId": "1",
  "image": "data:image/png;base64,<BASE64_STRING>",
  "face_image_required": false
}'
200
{
"recordId": "1",
"dataRetrievalStatus": "SUCCESS",
"data": {
  "name": "name-string",
  "dob": "dob-string",
  "sex": "sex-string",
  "aadhaarNumber": "aadhaar-number-string",
  "face_detection_status": "FACE NOT REQUIRED",
  "faceImage": ""
},
"utc_time_stamp": "25/06/2024, 07:45:32"
}

Response​

FieldTypeDescription
recordIdstringEchoes the recordId sent in the request.
dataRetrievalStatusstringSUCCESS when data was extracted.
data.namestringHolder's name.
data.dobstringDate of birth.
data.sexstringHolder's sex.
data.aadhaarNumberstringAadhaar number.
data.face_detection_statusstringOutcome of face detection, e.g. FACE NOT REQUIRED when face_image_required is false.
data.faceImagestringBase64 face image, returned only when face_image_required is true.
utc_time_stampstringUTC timestamp of the response, DD/MM/YYYY, HH:mm:ss.

Error handling​

200 on success, 422 on a validation error — see Error handling for the common error shape.