PAN face extraction V2
Introduction
The PAN Face Extraction API is a service provided by Signzy Technologies Private Limited that allows developers to extract a face from a PAN card image. This API takes as input a PAN card image in JPEG format, and returns a cropped image of the face detected in the PAN card. The output image is in PNG format and contains only the face region, which can be used for further processing or analysis. The API is designed to work with horizontally-aligned images only, and it returns an error if the input image is not horizontally-aligned. The API provides a simple and efficient way for developers to extract faces from PAN card images and use them in their applications. In this documentation, we will explain how to use the PAN Face Extraction API, provide examples of requests and responses, and list the possible error messages that the API can return.
API description
API Endpoint's
Identity Object
POST https://preproduction.signzy.tech/api/v2/patrons/<patron-id>/identitiesPOST https://signzy.tech/api/v2/patrons/<patron-id>/identitiesHeaders
Key | Value |
|---|---|
Authorization | access token (returned as id field of login request) |
Content-type | application/json |
Request Data
{
"type": "individualPan",
"email": "[email protected]",
"callbackUrl": "https://your-domain.com/your-callback-system",
"images": [
"<urls-to-uploaded-files>"
]
}PARAMETERS | DESCRIPTION | TYPE | VALUE (COMPULSORY OR OPTIONAL) |
|---|---|---|---|
type | Supported type parameter for creation of Identity objects
| String | COMPULSORY |
E-mail can't be empty | String | COMPULSORY | |
callbackUrl | callbackUrl is where the data is posted on each activity performed on this Identity object. | String | COMPULSORY |
images | urls's to be extracted | List | COMPULSORY |
Response
{
"type": "individualPan",
"email": "[email protected]",
"callbackUrl": "https://your-domain.com/your-callback-system",
"images": [
"<urls-to-uploaded-files>"
],
"autoRecognition": [],
"verification": [],
"forgeryCheck": [],
"accessToken": "..access-token-for-the-snoop-request..",
"id": "..itemId-for-the-snoop-request....",
"patronId": "..your-id-into-signzy-system-(userId-returned-from-the-login-call).."
}
Snoops
POST https://preproduction.signzy.tech/api/v2/snoopsPOST https://signzy.tech/api/v2/snoopsHeaders
Key | Value |
|---|---|
Authorization | access token (returned as id field of login request) |
Content-type | application/json |
Request Data
{
"service": "Identity",
"itemId": "<..itemId-from-the-Identity-Object-request....>",
"task": "faceExtraction",
"accessToken": "<..access-token-from-the-Identity-Object-request..>",
"essentials": {
"url": "..url-of-image-from-where-face-needs-to-be-extracted"
}
}Details of the request properties
Parameter | Type | Required | Description |
|---|---|---|---|
service | string | Yes | The name of the service being used. For this API, the value should be "Identity". |
itemId | string | Yes | The unique ID of the item being processed. |
accessToken | string | Yes | The access token for the API. |
task | string | Yes | The name of the task being performed. For this API, the value should be "faceExtraction". |
essentials.url | string | Yes | The URL of the image to be processed. The image should be a horizontally-aligned PAN card image. |
Response
{
"service": "Identity",
"itemId": "<Identity-object-id>",
"task": "autoRecognition",
"essentials": {},
"accessToken": "<Identity-access-token>",
"id": "ID-of-the-snoop-request",
"response": {
"files": [
"<url-to-the-front-side>"
],
"type": "individualPan | businessPan",
"id": ...integer...,
"instance": {},
"result": {
"cropped": "...extracted face image url..."
}
}
}The response object contains the following sub-properties:
Details of the response properties
Property | Example Value | Description |
|---|---|---|
cropped | "<url of face extracted>" | The URL of the extracted face image. |
Error Codes
Error Code | Description |
|---|---|
400 | Could not process this request, please recheck parameters and try another one. |
401 | Unauthorized access. Please ensure that you are using valid credentials. |
404 | The requested resource was not found. Please ensure that the endpoint and parameters are correct. |
500 | An unexpected error occurred on the server. Please try again later. |
Troubleshooting
Issue | Description | Troubleshooting |
|---|---|---|
Incorrect image format | The API only supports PNG, JPG, and JPEG image formats. | Ensure that the image you are providing is in one of the supported formats. |
Image orientation | The image should be horizontally aligned. | Rotate the image if needed to ensure it is horizontally aligned. |
Invalid access token | The access token provided in the request is invalid or has expired. | Generate a new access token and use it in the request. |
Missing or invalid parameter | One or more required parameters are missing or have invalid values. | Check that all required parameters are included in the request and have valid values. Refer to the API documentation for more information on the required parameters. |
Server error | An unexpected error occurred on the server. | Wait for some time and try the request again later. If the issue persists, contact the API provider for assistance. |