GSTR-2A
Export
This API allows you to export the currently available GSTR-2A data from Octa into Excel format. It supports exporting data for multiple GSTINs and multiple periods in a single request, making it easier to generate consolidated reports efficiently.
URL
POST https:/app.octagst.com/api/gstr2a/export
Query Parameters
This API does not require any query parameters.
Request Headers
This API requires following HTTP headers:
Authorization
Octa-Company
Request Body
Parameter | Data Type | Type | Description |
---|---|---|---|
gstins | String[] | Required | Company GSTINs |
startReturnPeriod | String | Required | Start period in YYYY-MM format |
endReturnPeriod | String | Required | End period in YYYY-MM format |
reportType | Integer | Optional | Report format – Default: 100 |
Supported report types:
ReportType | Description |
---|---|
100 | Full - All documents in one sheet, one row for each GST rate in invoices |
101 | Smart - All documents in one sheet, one row for each invoice, with net value for amendments |
{
"gstins": ["08AASFB9647G1ZU"],
"startReturnPeriod": "2024-04",
"endReturnPeriod": "2025-03",
"reportType": 101
}
Successful Response
Since exporting data for multiple GSTINs and periods may take time, Octa processes the request asynchronously. When you initiate an export, Octa immediately returns a JobId and begins generating the export in the background. You can monitor the progress and download the results by calling the Robot-JobStatus API.
HTTP/1.1 200 OK
Content-Type: application/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 the return period range is too long, the response will look like this:
HTTP/1.1 400 Bad Request
Octa-ErrorCode: 100
Octa-ErrorMessage: Maximum 24 month data can be exported