Sync Gstin#
Given an GSTIN, you can sync its details from the GSTN common portal using this API.
Route
/basic/einv/{flynn-version}/{irp}/eivital/{e-invoice-api-version}/Master/syncgstin/{GSTIN}
- active ‘flynn-version’: v3.0
- method: GET
URL Parameters#
Name | Description | Type |
---|---|---|
flynn-version | version of the API for example, v3.0 |
string |
irp | IRP Provider as per GST registration for e-invoicing | enum (ni1, ni2) |
e-invoice-api-version | E-invoice API version | string |
GSTIN | GSTIN Number | string |
Headers#
All headers as mentioned in the Basic E-Invoice API introduction.
Tip
The only valid value for the header key accept
is application/json
.
Also, since no request body is sent, header key Content-type
is optional.
Response#
200
:#
Successful response will be the same payload as per the ‘E-Invoice API Documentation’ published by NIC.
Sample Response Body
{
"status": "1",
"data": {
"Gstin": "27AAAPI3182M002",
"TradeName": null,
"LegalName": "Clayfin Technologies Pvt Ltd",
"StateCode": 27,
"AddrBnm": null,
"AddrBno": null,
"AddrFlno": null,
"AddrSt": null,
"AddrLoc": null,
"TxpType": "REG",
"BlkStatus": "U",
"Status": "ACT",
"AddrPncd": 560009,
"DtReg": null,
"DtDReg": null
},
"error": null,
"info": null,
"additionalInfo": null,
"alert": null
}
502
:#
When the Gstin isn’t found.
Sample Response Body
{
"status": "0",
"data": null,
"error": {
"message": "err-irp-returned-error",
"type": "Irp",
"args": {
"details": [
{
"ErrorCode": "3001",
"ErrorMessage": "Requested data is not available"
}
]
}
},
"info": null,
"additionalInfo": null,
"alert": null
}
E-invoice errors are mentioned under common errors for v3.0 api.
Notes#
IRP - nic is deprecated. Instead of it please use ni1 or ni2