Generate GCS API#
Use this API to generate Good Corporate Score for the GSTINs provided in the request.
This is a long-running (asynchronous) task. The immediate response returns a reference ID (task-id). Use the Status API to track progress. When the status is completed, fetch the scores using the Result API.
Note
- Duplicate GSTINs are not allowed in a single API call.
- A maximum of 50 GSTINs is allowed in a single API call.
Route
/enriched/gcs/{flynn-version}/generate
- active ‘flynn-version’: v1.0
- method: POST
URL Parameters#
| Name | Description | Type |
|---|---|---|
| flynn-version | version of the API for example, v1.0 |
string |
Headers#
All headers are mentioned in common GSTN headers.
Tip
The only valid value for the header key accept is application/json.
Request#
The request body is a JSON array of GSTIN strings for which Good Corporate Score should be generated.
Sample Request Body
{
"gstins":[
"27GSPMH0791G9ZI",
"29AAACT2727Q1ZD"
]
}
Response#
Status Code: 200#
A successful response returns an asynchronous task-id. Use this task-id to track the status of the request.
Sample Response Body
{
"status": "1",
"data": {
"task-id": "2a51e392-529c-4b5a-bfd8-ca14d510a68d"
},
"error": null,
"info": null,
"additionalInfo": null,
"alert": null
}
When data.task.status = completed, proceed to the Result API to fetch the results.
Result API Response#
The Result API response is unique for each API. For Generate GCS, each item in data corresponds to one GSTIN from the request.
Successful Response
{
"status": "1",
"data": [
{
"status": "1",
"data": {
"gstin": "27GSPMH0791G9ZI",
"score": 450.0
},
"error": null,
"info": null,
"additionalInfo": null,
"alert": null
},
{
"status": "0",
"data": null,
"error": {
"type": "Runtime",
"message": "err-gcs-generation-failed",
"args": {
"gstin": "29AAACT2727Q1ZD"
}
},
"info": null,
"additionalInfo": null,
"alert": null
}
],
"error": null,
"info": null,
"additionalInfo": null,
"alert": null
}
Integration flow#
- Call Generate GCS with the GSTINs in the request body.
- Capture the async
task-idfrom the response and call the Status API. - When the task status is
completed, retrieve the scores from the Result API.