---
title: ITR OTP Get Request ID
slug: api-marketplace/itr-otp-get-request-id
createdAt: 2023-12-06T05:44:18.988Z
---

# Introduction:

This API facilitates patrons in obtaining Income Tax Return (ITR) forms in JSON and PDF formats by providing essential details such as PAN (Permanent Account Number) or username. In order to authorize, either OTP or password can be used to get the past three years' data. It is designed to efficiently retrieve the necessary information, catering to the needs of patrons who require both formats for their users.

The Get Requset ID API gives the information on whether OTP is supported for the given userName. And caters to both OTP and Password Flow depending on the user's choice. However, if userName supports only password then OTP would not be a viable option to continue in the process.&#x20;

# Endpoints:

This API consists of three main endpoints:

1. requestId
2. authorisation
3. Raw data fetch : getitrform | get-itr-v | get-itr-pull | itr-form-26as | itr-AIS | itr-analytics

### POST /requestId

This endpoint is used to initiate a request for an ITR form by providing a userName.
Returns a requestId that patrons can use to fetch the ITR form.

### Sample Curl:

:::CodeblockTabs
Preproduction

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

Production

```curl
curl --location 'https://api.signzy.app/api/v3/itr/requestId' \
--header 'Content-Type: application/json' \
--header 'Authorization: <authToken>' \
--data '{
    "userName": "<userName>"
}'
```
:::

### Input Parameters:

| Parameter | Type   | Description                                                                            | Mandatory/Optional                                                                                                        |
| --------- | ------ | -------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| panNumber | string | PAN of the user.                                                                       | Must match PAN format. Provide either this or userName — exactly one is required; supplying both is rejected              |
| userName  | string | The username of the end-customer on the ITR Portal. It usually is the PAN of the user. | IT portal username. <br />Provide either this or panNumber —<br />\| exactly one is required; supplying both is rejected. |

### Sample Response:

&#x20;Sample Response 200 — OTP supported

:::CodeblockTabs
200

```json
{
    "requestId": "12345a67-89b0-12c3-def4-5ghij67klmno",
    "userName": "<userName>",
    "panStatus": "Pan is registered",
    "userFlow": "otp and password",
    "statusCode": "200",
    "messageCode": "Request successfully submitted and OTP has been generated"
}
```

200

```json
{
    "requestId": "12345a67-89b0-12c3-def4-5ghij67klmno",
    "userName": "<userName>",
    "panStatus": "Pan is registered",
    "userFlow": "password",
    "statusCode": "200",
    "messageCode": "Request successfully submitted, enter the password"
}
```
:::

Sample Response 200 — OTP not supported, password only

:::CodeblockTabs
200

```json
{
    "requestId": "12345a67-89b0-12c3-def4-5ghij67klmno",
    "userName": "<userName>",
    "panStatus": "Pan is registered",
    "userFlow": "otp and password",
    "statusCode": "200",
    "messageCode": "Request successfully submitted and OTP has been generated"
}
```

200

```json
{
    "requestId": "12345a67-89b0-12c3-def4-5ghij67klmno",
    "userName": "<userName>",
    "panStatus": "Pan is registered",
    "userFlow": "password",
    "statusCode": "200",
    "messageCode": "Request successfully submitted, enter the password"
}
```
:::

### Output Parameters:

| Parameter   | Type    | Description                                                                                                                                                                                                                         |
| ----------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| requestId   | string  | A unique identifier (UUID) assigned to the request. This **requestId** is generated and returned by the API.                                                                                                                        |
| userName    | string  | The userName entered.                                                                                                                                                                                                               |
| panStatus   | string  | Determines whether the pan is registered with the ITR Portal                                                                                                                                                                        |
| userFlow    | string  | The userFlow lets the user know the available flows for the given userName. It can be 'otp and password' or 'password'                                                                                                              |
| statusCode  | integer | The HTTP status code indicating the success or failure of the API request. In this case, the **statusCode&#x20;**&#x6F;f 200 denotes a successful response.                                                                         |
| messageCode | string  | A code or identifier associated with the message. In this instance, the **messageCode&#x20;**"Request successfully submitted and OTP has been generated" provides additional context about the success of the requestId generation. |

# Sample Errors

:::CodeblockTabs
400

```json
  {
     "error": {
       "reason": "VALIDATION_ERROR",
       "status": 400,
       "message": "Provide at least one of userName or panNumber",
       "type": "Bad Request",
       "statusCode": 400,
       "name": "error"
     }
   }
```

400

```json
{
    "error": {
        "reason": "ERROR",
        "status": 400,
        "message": "userName does not exist / not registered with IT portal.",
        "type": "Unauthorized",
        "statusCode": 401,
        "name": "error"
    }
}
```

400

```json
  {
     "error": {
       "reason": "BAD_REQUEST",
       "status": 400,
       "message": "Your e-filing account has been locked due to security reasons, you can try after 15 min",
       "type": "Forbidden",
       "statusCode": 403,
       "name": "error"
     }
   }
```

400

```json
 {
     "error": {
       "reason": "BAD_REQUEST",
       "status": 400,
       "message": "x-consumer-id header is required",
       "type": "Bad Request",
       "statusCode": 400,
       "name": "error"
     }
   }
```

409

```json
{
    "error": {
        "reason": "CONFLICT",
        "status": 409,
        "message": "Unable to fetch data from upstream",
        "type": "Conflict",
        "statusCode": 409,
        "name": "error"
    }
}
```
:::

| **CODE** | **MESSAGE**                                                    |
| -------- | -------------------------------------------------------------- |
| 200      | Request successful                                             |
| 409      | Unable to fetch data from upstream                             |
| 400      | Bad Request - Mandatory parameters missing or Invalid userName |



Note: ITR services may experience disruption during ITR filling season, this may interrupt ITR form APIs.



