Skip to main content

Voter ID Front Extraction

Extracts data fields from the front of an Indian Voter ID: ID number, name, guardian relation (father / husband), and the guardian's name.

POSThttps://sandbox/pcs/voter-id/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 Voter ID front image.

Example​

POST/pcs/voter-id/front
curl --location 'https://sandbox/pcs/voter-id/front' \
--header 'key: <your-api-key>' \
--header 'Content-Type: application/json' \
--data '{
  "recordId": "1",
  "image": "data:image/png;base64,<BASE64_STRING>"
}'
200
{
"recordId": "1",
"dataRetrievalStatus": "SUCCESS",
"data": {
  "side": "front",
  "idNumber": "12345",
  "name": "name-string",
  "guardian": "guardian-string",
  "guardianName": "name-string"
},
"utc_time_stamp": "07/11/2024, 07:35:09"
}

Response​

FieldTypeDescription
recordIdstringEchoes the recordId sent in the request.
dataRetrievalStatusstringSUCCESS when data was extracted.
data.sidestringDetected side of the document, front.
data.idNumberstringVoter ID number (EPIC number).
data.namestringHolder's name.
data.guardianstringGuardian relation, e.g. Father / Husband.
data.guardianNamestringGuardian's name.
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.