AadhaarMasking
1 endpoint · Core API
Mask Aadhaar card image (Base64 approach)
docs.signcare.io/core/api/aadhaar/aadhaarmasking/#post-api-v1-aadhaar-mask
This API masks the Aadhaar number on the provided Aadhaar card image and returns:
- Base64 encoded masked Aadhaar image
- Response file name
Request parameters:data (base64-encoded Aadhaar image) is required and must be valid base64.
reference_id, file_name and data_content_type are accepted but not used.
Headers
- X-API-KEYstringrequiredYour secret API key for the environment you are calling (Stage and Live use different keys).
- X-API-APP-IDstringrequiredThe App ID issued together with the key.
- Content-Typestringrequiredapplication/json
Body parameters
application/json- consentstringrequiredRequired. The end user's consent to this verification. Send `Y`.minLength 1default Y
- consent_textstringrequiredRequired. The consent statement shown to the end user. Send the default text from the sample.minLength 1default I hear by declare my consent agreeme…
- request_idstringoptionalOptional. Your own id to correlate this call in your logs. A unique id is generated if you leave it out.nullable
- datastringrequiredRequired. Base64-encoded image of the Aadhaar card (JPEG or PNG). The Aadhaar number in the image is masked.minLength 1
- reference_idstringoptionalOptional. Your own reference for this request. Accepted but not used or returned.nullable
- file_namestringoptionalOptional. File name of the Aadhaar image. Accepted but not used.nullable
- data_content_typestringoptionalOptional. Image format of data: JPEG or PNG. Accepted but not used; the format is detected from the image.nullabledefault JPEG
Sample request body
{
"consent": "Y",
"consent_text": "I hear by declare my consent agreement for fetching my information via SignCare API",
"data": "string",
"reference_id": "",
"file_name": "",
"data_content_type": "JPEG"
}
Responses
200OK
- successbooleanoptionalNo description.
- statusCodeinteger (int32)optionalNo description.default 200
- messagestringoptionalNo description.nullabledefault XXXXX
- dataobjectoptionalNo description.
3 fields
- maskedOutputstringoptionalNo description.nullable
- alreadyMaskedCountinteger (int32)optionalNo description.
- maskingDoneCountinteger (int32)optionalNo description.
- messagesarray<string>optionalNo description.nullable
- request_idstringoptionalNo description.nullable
- isBillablebooleanoptionalWhether this request was charged: true if it was, false if not. Errors always show false. Flows that finish later (ITR Fetch, SHCIL eStamp, DigiLocker, eSign) show false here, because the charge is made when the result is ready. eSign charges each signer when they complete signing. DigiLocker deducts the credit when the link is created and refunds it automatically if the link expires before the user completes it.
Example
{
"success": false,
"statusCode": 200,
"message": "XXXXX",
"data": {
"maskedOutput": "string",
"alreadyMaskedCount": 0,
"maskingDoneCount": 0
},
"messages": [
"string"
],
"request_id": "string",
"isBillable": false
}
400Bad Request
- dataobjectoptionalNo description.
- messagesarray<string>optionalNo description.nullable
- request_idstringoptionalNo description.nullable
- successbooleanoptionalNo description.default false
- messagestringoptionalNo description.nullabledefault XXXXX
- isBillablebooleanoptionalNo description.
- statusCodeinteger (int32)optionalNo description.default 400
Example
{
"data": {},
"messages": [
"string"
],
"request_id": "string",
"success": false,
"message": "XXXXX",
"isBillable": false,
"statusCode": 400
}
401Unauthorized
- dataobjectoptionalNo description.
- messagesarray<string>optionalNo description.nullable
- request_idstringoptionalNo description.nullable
- successbooleanoptionalNo description.default false
- messagestringoptionalNo description.nullabledefault XXXXX
- isBillablebooleanoptionalNo description.
- statusCodeinteger (int32)optionalNo description.default 401
Example
{
"data": {},
"messages": [
"string"
],
"request_id": "string",
"success": false,
"message": "XXXXX",
"isBillable": false,
"statusCode": 401
}
500Internal Server Error
- dataobjectoptionalNo description.
- messagesarray<string>optionalNo description.nullable
- request_idstringoptionalNo description.nullable
- successbooleanoptionalNo description.default false
- messagestringoptionalNo description.nullabledefault XXXXX
- isBillablebooleanoptionalNo description.
- statusCodeinteger (int32)optionalNo description.default 500
Example
{
"data": {},
"messages": [
"string"
],
"request_id": "string",
"success": false,
"message": "XXXXX",
"isBillable": false,
"statusCode": 500
}
Code samplescurl · Node.js · Python
Stage: uat-ext.signcare.io
curl -X POST 'https://uat-ext.signcare.io/api/v1/aadhaar/mask' \
-H 'X-API-KEY: YOUR_API_KEY' \
-H 'X-API-APP-ID: YOUR_APP_ID' \
-H 'Content-Type: application/json' \
-d '{
"consent": "Y",
"consent_text": "I hear by declare my consent agreement for fetching my information via SignCare API",
"data": "string",
"reference_id": "",
"file_name": "",
"data_content_type": "JPEG"
}'