GSTR-2A
Pull
This API is used to pull latest GSTR-2A data from Govt Portal. This API supports pulling the data of one GSTIN and one return period at a time. To pull GSTR-2A of multiple GSTINs or multiple periods, you can use this API multiple times.
URL
POST https:/app.octagst.com/api/gstr2a/pull
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 |
---|---|---|---|
gstin | String | Required | Company GSTIN |
returnPeriod | String | Required | Period in YYYY-MM format |
{
"gstin": "08AASFB9647G1ZU",
"returnPeriod": "2025-05"
}
Successful Response
Since pulling data from the Government Portal can take time, Octa processes the request asynchronously. When you initiate a data pull, Octa immediately returns a JobId and begins fetching the data in the background. You can then track the progress and retrieve results by calling the Robot-JobStatus API.
HTTP/1.1 200 OK
Content-Type: application/json
{
"jobId": "6492341"
}
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 has not started pulling data from the Government Portal. To identify the exact issue, check the response
headers Octa-ErrorCode
and Octa-ErrorMessage
, which provide detailed error information.
For example, if a GSTIN is not connected to the Government Portal via OTP, the response will look like this:
HTTP/1.1 400 Bad Request
Octa-ErrorCode: 2000
Octa-ErrorMessage: Not connected to GST System