# GSTR-3B: Export

This API allows you to export the currently available filed GSTR-3B data from Octa into Excel format. Each request
exports one GSTIN and one return period.

## URL

```
POST https://cloud.octagst.com/api/octa/gstr3b/export
```

## Query Parameters

This API does not require any query parameters.

## Request Headers

This API requires the following HTTP headers:

- `Authorization`
- `Octa-Company`

## Request Body

| Parameter      | Data Type | Type     | Description                |
| -------------- | --------- | -------- | -------------------------- |
| `gstin`        | String    | Required | Company GSTIN              |
| `returnPeriod` | String    | Required | Period in `YYYY-MM` format |

```json
{
  "gstin": "08AASFB9647G1ZU",
  "returnPeriod": "2025-05"
}
```

## Successful Response

Octa processes the export asynchronously. When you initiate an export, Octa immediately returns a JobId and begins
generating the Excel file in the background. You can monitor the progress and download the result by calling the
[Robot-JobStatus](/octa/docs/api/robot/job-status) API.

```
HTTP/1.1 200 OK
Content-Type: application/json
```

```json
{
  "jobId": "6492390"
}
```

## Failed Response

If the HTTP status code in the response is in the error range (4xx or 5xx), it indicates that the API request has failed
and Octa will not export any data. To identify the exact issue, check the response headers `Octa-ErrorCode` and
`Octa-ErrorMessage`, which provide detailed error information.

For example, if required request fields are missing, the response will look like this:

```
HTTP/1.1 400 Bad Request
Octa-ErrorCode: 1000
Octa-ErrorMessage: Missing/Invalid field values in request.
```