---
title: TAN Fetch
slug: api-marketplace/tan-fetch
createdAt: 2024-01-30T08:15:11.070Z
---

## Introduction

The TAN Fetch API is an essential tool for obtaining concise and accurate tax-related information. Designed to swiftly retrieve details associated with a Tax Deduction and Collection Account Number (TAN), this API is a boon for financial and tax professionals. By simply inputting a TAN number via a straightforward request, users can quickly access key data such as the corresponding Permanent Account Number (PAN) and the name of the entity associated with the TAN. This API is invaluable for verifying tax credentials, ensuring compliance, and facilitating smoother financial operations by providing critical information at your fingertips.

***

## API details

### Endpoint

:::CodeblockTabs
Production Endpoint

```text
POST https://api.signzy.app/api/v3/tan/fetchDetails
```
:::

:::CodeblockTabs
UAT/Testing Endpoint

```text
POST https://api-preproduction.signzy.app/api/v3/tan/fetchDetails
```
:::

***

### Request body parameters

| **Parameter** | **Data Type** | **Description**            | **Required** |
| ------------- | ------------- | -------------------------- | ------------ |
| tanNumber     | String        | TAN number to be verified. | Mandatory    |

```json
{
    "tanNumber": "<TAN NUMBER>"
}
```

***

### Request Headers

| **Name&#x20;** | **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. |

***

### Code Samples

:::CodeblockTabs
Curl

```curl
curl --location 'https://api-preproduction.signzy.app/api/v3/tan/fetchDetails' \
--header 'Content-Type: application/json' \
--header 'Authorization: <--Your Authorization Token-->' \
--data '{
    "tanNumber": "<--TAN NUMBER-->"
}'
```

Node.js

```nodejs
const axios = require('axios');
let data = JSON.stringify({
  "tanNumber": "<--TAN NUMBER-->"
});

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

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

Python

```python
import http.client
import json

conn = http.client.HTTPSConnection("api-preproduction.signzy.app")
payload = json.dumps({
  "tanNumber": "<--TAN NUMBER-->"
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': '<--Your Authorization Token-->'
}
conn.request("POST", "/api/v3/tan/fetchDetails", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
```

GO

```go
package main

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

func main() {

  url := "https://api-preproduction.signzy.app/api/v3/tan/fetchDetails"
  method := "POST"

  payload := strings.NewReader(`{
    "tanNumber": "<--TAN NUMBER-->"
}`)

  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 Authorization 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**                                                             |
| ----------------- | ------------- | --------------------------------------------------------------------------- |
| result            | Object        | Contains the verification result for the input PAN number and company name. |
| result.pan        | String        | PAN associated with the TAN Number                                          |
| result.entityName | String        | Name of the entity associated with the TAN Number                           |

:::CodeblockTabs
200

```json
{
    "result": {
        "pan": "AAACN0255D",
        "entityName": "NTPC LIMITED"
    }
}
```

400

```json
// invalid tanNumber provided
{
    "error": {
        "statusCode": 400,
        "name": "Error",
        "message": "tanNumber must be a string",
        "status": 400
    }
}

// tanNumber field is empty
{
    "error": {
        "statusCode": 400,
        "name": "Error",
        "message": "tanNumber is not allowed to be empty",
        "status": 400
    }
}

// invalid tanNumber provided
{
    "error": {
        "statusCode": 400,
        "name": "Error",
        "message": "Invalid tanNumber",
        "status": 400
    }
}

// tanNumber is missing
{
    "error": {
        "statusCode": 400,
        "name": "Error",
        "message": "tanNumber is required",
        "status": 400
    }
}
```

401

```json
// If Authorization token is not passed
{
    "message": "No API key found in request"
}

// If Authorization token is invalid
{
    "message": "Invalid authentication credentials"
}
```

409

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

***

**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!
