GST Large Files API
If number of Invoices to be downloaded is greater than 10,000 then token will be generated and returned in response to Get Data API call.
TaxPayer (or ASP) needs to get FileDetails using the token after the 'est' Estimated time returned along with token
{"est":"30","token":"9a8f880b60804e44add8361696d16e86"}
Get File Details API (API Action = 'FILEDET') returns list of urls along with file encryption key 'ek'. The list of files returned as response to the API needs to be downloaded one by one (in production over MPLS link to GSTN server) through GSP connectivity.
Sample response from GSTN to FILEDET API:
File Details Response;
{
"urls": [
{
"ul": "/returns/16012021/R1/7613eb66a13d4b269de42e91bfcf2ad2/returns_16012021_R1_27GSPMH0992G1ZF_b2b_0.tar.gz?md5=1m6TtTHIGszV2B6NaanPww&expires=1610868095",
"ic": 10000,
"hash": "38f46b623fdc8b937fab139c8d4660a15f9dbf07dce188fe279ba52f7c3e2780"
},
{
"ul": "/returns/16012021/R1/7613eb66a13d4b269de42e91bfcf2ad2/returns_16012021_R1_27GSPMH0992G1ZF_b2b_1.tar.gz?md5=VPGuLi0C9U3EGUhgYh3KLQ&expires=1610868095",
"ic": 4702,
"hash": "1d795e19921d5d13510bda6f4db40ed5f3d78a963486a111734791f716f88d1a"
}
],
"ek": "11VZrNwzUoUy4ykr3wEKzxb7SeNpjDbQ0vJKBTFV+Kg=",
"fc": 2
}
TaxPro GSP provides DownloadGstrFile api for this. The api needs to be called before file expiry date to download the file successfully.
HTTP Method: POST
Headers or Query String Param:
Property
|
Description
|
Data Type
|
aspid
|
AspUserId provided by GSP.
|
String
|
asp-secret
|
Encrypt AspPassword (Asp Secret Key) provided by GSP for pass through API access, Encrypted using AspEK (received in GetKey API)
Sample:
request.AddHeader("asp-secret", AesEncryptBase64(“Asp Secret Key”,AspEK)) [Algorithm: AES/ECB/PKCS7]
|
String
|
session-id
|
SessionID. ASP may create multiple Sessions.
|
string
|
txn
|
Unique Transaction ID even if calling GSP Service API. (Requires only once, which you are already passing as requirement for GST API.)
|
string
|
appver
|
Application Name and Version calling API. (Optional but Recommended)
|
string
|
Content-Type
|
application/json; charset=utf-8
|
string
|
ip-usr
|
123.123.123.123
|
string
|
gstin
|
GSTIN (mostly for logging and billing purpose)
|
|
Sample Url:
https://gstapi.charteredinfo.com/aspapi/v1.0/downloadgstrfile?
Body: Single Item from the urls list returned by FILEDET api call.
{
"ul": "/returns/16012021/R1/7613eb66a13d4b269de42e91bfcf2ad2/returns_16012021_R1_27GSPMH0992G1ZF_b2b_0.tar.gz?md5=1m6TtTHIGszV2B6NaanPww&expires=1610868095",
"ic": 10000,
"hash": "38f46b623fdc8b937fab139c8d4660a15f9dbf07dce188fe279ba52f7c3e2780"
}
Response: Read as Binary File.