---
title: Tan Validation
slug: api-marketplace/tan-validation
createdAt: 2024-02-29T05:25:28.944Z
---

## Introduction

Our TAN Number Validation API - the ultimate solution for verifying TAN numbers swiftly and accurately. Simply input a TAN number, and instantly receive details confirming its validity, along with associated company information like the company name. This API is indispensable for financial institutions, businesses, and individuals needing to authenticate TAN numbers for compliance, taxation, or general purposes.

***

## API Details

### Endpoint

:::CodeblockTabs
Production Endpoint

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

:::CodeblockTabs
UAT Endpoint

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

***

### Request body parameters

| **Parameter** | **Data Type** | **Description**            | **Required** |
| ------------- | ------------- | -------------------------- | ------------ |
| tanNumber     | string        | TAN number to be validate. | Mandatory    |

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

***

### Request Headers

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

***

:::CodeblockTabs
```curl
curl --location 'https://api-preproduction.signzy.app/api/v3/tan/validate' \
--header 'Content-Type: application/json' \
--header 'Authorization: <authToken>' \
--data '{
    "tanNumber": "<tanNumber>"
}'
```

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

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

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

```

```python
import requests
import json

url = "https://api-preproduction.signzy.app/api/v3/tan/validate"

payload = json.dumps({
  "tanNumber": "<tanNumber>"
})
headers = {
  'Content-Type': 'application/json',
  'Authorization': '<authToken>'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

```

```go
package main

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

func main() {

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

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

  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", "<authToken>")

  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        | Object containing validation result.       |
| result.isValid     | String        | Indicates whether the data is valid or not |
| result.companyName | String        | Name of the company                        |

:::CodeblockTabs
200

```json
// When valid tan is passed
{
    "result": {
        "isValid": "true",
        "companyName": "NTPC LIMITED"
    }
}
```

400

```json
// When invalid tan is passed
{
    "error": {
        "statusCode": 400,
        "name": "Error",
        "message": "Invalid tanNumber",
        "status": 400
    }
}
//when empty string is passed
{
    "error": {
        "statusCode": 400,
        "name": "Error",
        "message": "tanNumber is not allowed to be an empty string",
        "status": 400
    }
}

```

401

```json
// When API key is not passed in headers
{
    "message": "No API key found in request"
}

// When wrong API key is passed in headers
{
    "message": "Invalid authentication credentials"
}
```

404

```json
// When invalid tan is passed
{
    "result": {
        "isValid": "false",
        "companyName": "companyName is not found"
    }
}
```
:::

***

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

