---
title: PAN Signature Extraction
slug: api-marketplace/pan-signature-extraction
createdAt: 2023-11-02T11:46:52.780Z
---

## Introduction

The PAN Signature Extraction API is a powerful tool designed to simplify extracting an individual's signature from their Permanent Account Number (PAN) card.


Our PAN Card Signature Extraction API provides a seamless solution to this challenge. By taking a PAN card document/image as input, this API utilizes advanced image processing techniques to locate and extract the individual's signature accurately.

***

## API details

### Endpoint

:::CodeblockTabs
Production environment

```jsx
POST https://api.signzy.app/api/v3/pan/signature-extraction
```
:::

:::CodeblockTabs
UAT/Testing environment

```jsx
POST https://api-preproduction.signzy.app/api/v3/pan/signature-extraction
```
:::

***

### Request headers&#x20;

| Name          | Value            | Required  | Description                                                                                                |
| ------------- | ---------------- | --------- | ---------------------------------------------------------------------------------------------------------- |
| Content-Type  | application/json | Mandatory | The type of content that the request body contains.                                                        |
| Authorization | XXXXXXXXXXXXXXX  | Mandatory | An authentication token to authorize the request. Reach out to the Signzy support team to get one created. |

***

### Request body parameters

```json
{
    "urls": [
        "https://preproduction-persist.signzy.tech/api/files/37100725/download/XXXXXXXXXX.jpg"
    ]
}
```

***

### Code samples

:::CodeblockTabs
```curl
curl --location 'https://api-preproduction.signzy.app/api/v3/pan/signature-extraction' \
--header 'Content-Type: application/json' \
--header 'Authorization: <Your access token>' \
--data '{
    "urls": [
        "https://preproduction-persist.signzy.tech/api/files/37100725/download/XXXXXXXXXX.jpg"
    ]
}'
```

```nodejs
const axios = require('axios');
let data = JSON.stringify({
  "urls": [
    "https://preproduction-persist.signzy.tech/api/files/37100725/download/XXXXXXXXXX.jpg"
  ]
});

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://api-preproduction.signzy.app/api/v3/pan/signature-extraction',
  headers: { 
    'Content-Type': 'application/json', 
    'Authorization': '<Your access token>'
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

```

```python
import http.client
import json

conn = http.client.HTTPSConnection("api-preproduction.signzy.app")
payload = json.dumps({
  "urls": [
    "https://preproduction-persist.signzy.tech/api/files/37100725/download/XXXXXXXXXX.jpg"
  ]
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': '<Your access token>'
}
conn.request("POST", "/api/v3/pan/signature-extraction", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
```

```go
package main

import (
  "fmt"
  "strings"
  "net/http"
  "io/ioutil"
)

func main() {

  url := "https://api-preproduction.signzy.app/api/v3/pan/signature-extraction"
  method := "POST"

  payload := strings.NewReader(`{
    "urls": [
        "https://preproduction-persist.signzy.tech/api/files/37100725/download/XXXXXXXXXX.jpg"
    ]
}`)

  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, payload)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Content-Type", "application/json")
  req.Header.Add("Authorization", "<Your access token>")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
```
:::

***

### Response body Parameters

| **Parameter** | **Data Type** | **Description**                    |
| ------------- | ------------- | ---------------------------------- |
| signature     | String        | The URL of the extracted signature |

:::CodeblockTabs
200

```json
{
    "signature": "https://persist.signzy.tech/api/files/807322843/download/xxxxxxx.jpg"
}
```

400

```json
// Invalid input url
{
    "error": {
        "statusCode": "400",
        "name": "Enter a valid URL/input parameter",
        "message": "Error",
        "status": "400"
    }
}

// Urls not in array format
{
    "error": {
        "statusCode": 400,
        "status": "Bad Request",
        "message": "\"requestBody.urls\" must be an array",
        "id": "8d1cc13f-1661-43fc-93c0-57c872c3ca91"
    }
}
```

401

```json
{
    "message": "Invalid authentication credentials"
}
```

409

```json
{
    "error": {
        "reason": "Error From Upstream",
        "status": 409,
        "message": "Upstream Down",
        "type": "Conflict",
        "statusCode": 409,
        "name": "error"
    }
}
```

422

```json
{
    "error": {
        "statusCode": 422,
        "name": "Error",
        "message": "File download failed. Please give valid URL or valid filetype.",
        "status": 422
    }
}
// Signature Not Found
{
    "error": {
        "message": "Unable to locate signature in document.",
        "status": 422,
        "name": "Unable to locate signature in document."
    }
}
```
:::

***

### Document related constraints

:::hint{type="info"}
The size of the document should not exceed&#x20;**&#x20;5 MB**.

For best results, ensure the image you use fits tightly in the camera view and horizontally aligned.

Supported document types:

- Image - JPEG, JPG, PNG and TIFF/TIF.
- Single page PDF - In the case of multipage PDF input the API will only consider the first page for extraction.
:::

***

**Contact Us for Any Assistance**

If you have any questions or need assistance, please reach out to our customer support team. You can contact us via email at <font color="#2166ae">**help\@signzy.com**</font>. We strive to provide prompt and reliable assistance, ensuring your queries are addressed effectively.

We value your feedback and are committed to making your experience smooth and enjoyable. Our team is dedicated to assisting you with any needs you may have. Thank you for choosing our services. We look forward to helping you!

