---
title: Fetch Data
slug: api-marketplace/fetch-data
description: Learn how to use an API to consolidate GSTR raw data with a specific requestId. Obtain an authorization token from Signzy and follow the cURL snippets provided to make API calls. Include the authorization token and content type in the request headers, and
createdAt: 2023-09-21T15:49:46.090Z
---

### Introduction

This API is responsible for generating a consolidated GSTR raw data based on the requestId that was created during OTP Generation.
You will require an authorization token to use this API. This authorization token will be generated by Signzy for you and will be used in each API call. Please contact help\@signzy.com for this.

### cURL

:::CodeblockTabs
Production

```curl
curl --location --globoff 'https://api.signzy.app/api/v3/gstr-analytics/fetch-data' \
--header 'Authorization: <Access-Token>' \
--header 'Content-Type: application/json' \
--data '{
    "requestId": "d54becdf-05d9-49b9-9af8-7c93ae2772a4"
}
```

Pre-Production

```curl
curl --location --globoff 'https://api-preproduction.signzy.app/api/v3/gstr-analytics/fetch-data' \
--header 'Authorization: <Access-Token>' \
--header 'Content-Type: application/json' \
--data '{
    "requestId": "d54becdf-05d9-49b9-9af8-7c93ae2772a4"
}
```
:::

### Request Headers

| Key           | Value            |
| ------------- | ---------------- |
| Authorization | Shared by Signzy |
| Content-type  | application/json |

### Request Body

```json
{
    "requestId": "d54becdf-05d9-49b9-9af8-7c93ae2772a4"
}
```

| PARAMETERS | DESCRIPTION                                                 | TYPE   | VALUE (COMPULSORY OR OPTIONAL) |
| ---------- | ----------------------------------------------------------- | ------ | ------------------------------ |
| requestId  | The requestId that was created during Generate OTP API call | String | COMPULSORY                     |

### Response Data

:::CodeblockTabs
JSON

```json
{
    "result": {
        "requestId": "d54becdf-05d9-49b9-9af8-7c93ae2772a4",
        "gstin": "12ABCDE3456X7YZ",
        "gstr1": {...},
        "gstr2a": {...},
        "gstr2b": {...},
        "gstr3b": {...}
    }
}
```
:::

| PARAMETERS   | DESCRIPTION                                                                                                                                 | TYPE   | VALUE (COMPULSORY OR OPTIONAL) |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ------------------------------ |
| requestId    | This is an unique 36 character long alphanumeric string created during successful generation of OTP and to be used for subsequent GSTR APIs | String | OPTIONAL                       |
| gstin        | GSTIN of the business/customer for which the GSTR raw data is generated                                                                     | String | OPTIONAL                       |
| gstr1        | GSTR1 raw data segragated monthwise for the following APIs - B2B, B2CL, B2CS, AT, CDNR, CDNUR, EXP, RETSUM, NIL, etc.                       | String | OPTIONAL                       |
| gstr2a       | GSTR2A raw data segragated monthwise for the following APIs - B2B, CDN, IMPG, IMPGSEZ, etc.                                                 | String | OPTIONAL                       |
| gstr2b       | GSTR2B raw data segragated monthwise for AllDetails                                                                                         | String | OPTIONAL                       |
| gstr3b       | GSTR3B raw data segragated monthwise for RETSUM                                                                                             | String | OPTIONAL                       |
| status<br /> | This serves as an enum to indicate the status of the API call. Possible values - SUCCESS, FAILED                                            | String | OPTIONAL                       |
| message      | It indicates whether the OTP was successfully authenticated or the request is still in progress                                             | String | OPTIONAL                       |

### Status Codes

:::CodeblockTabs
200 OK

```json
{
    "result": {
        "status": "SUCCESS",
        "message": "Request is in progress."
    }
}
1. OTP is generated. Please proceed with the submit otp API to start processing.
2. Request is in progress.
3. OTP has expired. Please retry from OTP generation.
```

404

```json
{
    "error": {
        "name": "error",
        "message": "requestId not found",
        "status": 404,
        "reason": "NOT_FOUND",
        "type": "Not Found",
        "statusCode": 200
    }
}
```

400

```json
{
    "error": {
        "name": "error",
        "message": "\"requestId\" must be a valid GUID",
        "status": 400,
        "reason": "VALIDATION_ERROR",
        "type": "Bad Request",
        "statusCode": 200
    }
}

1. "\"requestId\" must be a valid GUID"
2. "\"requestId\" must be a string"
3. "\"requestId\" is required"
```

401

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

500

```json
{
    "error": {
        "name": "error",
        "message": "Internal Server Error",
        "status": 500,
        "reason": "ERROR",
        "type": "Internal Server Error",
        "statusCode": 500
    }
}
```
:::

***

:::hint{type="info"}
### Getting help

Please feel free to contact us if you have any questions, require clarification, or have ideas for how to make the documents or any of our services better.


You can reach out to us at [help@signzy.com](#).
:::

