Skip to content

Schema#

Payloads for Version-1 and Version-2#

Sample erroneous payload

{
  "error": {
    "message": "some-error-message", /* string, mandatory */
    "type": "some-error-type", /* string, mandatory */
    "args": {} /* map(String, Any), optional */
  }
}

Sample successful payload

{
  "data": {
    /* here it could be any kind of valid json node */
  }
}

Payloads for Version-3#

Sample erroneous payload

{
  "status": "0",
  "data": null,
  "error":{
    "message": "some-error-message", /* string, mandatory */
    "type": "some-error-type", /* string, mandatory */
    "args": {} /* map(String, Any), optional */
    }
  },
  "info": null,
  "additionalInfo": null,
  "alert": null
}

Sample successful payload

{
  "status": "1",
  "data": {
    /* here it could be any kind of valid json node */
  },
  "error": null,
  "info": null,
  "additionalInfo": null,
  "alert": null
}

Patterns and Formats#

Regex for GSTIN

([0-9]{2}[a-zA-Z]{5}[0-9]{4}[a-zA-Z]{1}[1-9A-Za-z]{1}[Zz1-9A-Ja-j]{1}[0-9a-zA-Z]{1})|([0-9]{4}[A-Z]{3}[0-9]{5}[UO]{1}[N][A-Z0-9]{1})|([0-9]{2}[a-zA-Z]{4}[0-9]{5}[a-zA-Z]{1}[0-9]{1}[Z]{1}[0-9]{1})|([0-9]{4}[a-zA-Z]{3}[0-9]{5}[N][R][0-9a-zA-Z]{1})|([0-9]{2}[a-zA-Z]{4}[a-zA-Z0-9]{1}[0-9]{4}[a-zA-Z]{1}[1-9A-Za-z]{1}[D]{1}[0-9a-zA-Z]{1})|([0-9]{2}[a-zA-Z]{5}[0-9]{4}[a-zA-Z]{1}[1-9A-Za-z]{1}[C]{1}[0-9a-zA-Z]{1})|([9][9][0-9]{2}[a-zA-Z]{3}[0-9]{5}[O][S][0-9a-zA-Z]{1})

source: https://developer.gst.gov.in/apiportal/taxpayer/returns