Skip to main content
POST

NIC validations

  1. Only taxpayer GSTINs enabled for e-invoicing are allowed for authentication.

Request body schema

View request body schema

Prerequisites: You must have API credentials to hit E-Invoice APIs. If not, create API credentials.
The returned access_token works with both e-Invoice and E-Way Bill APIs until it expires.
See NIC1 and NIC2 routing for x-source and x-proxy.

Authorizations

authorization
string
header
required

Sandbox access token returned by /authenticate.

x-api-key
string
header
required

Sandbox API key from your Sandbox account.

Headers

x-source
enum<string>
default:primary

NIC server for authentication. primary selects NIC1. secondary selects NIC2. Defaults to primary. See NIC1 and NIC2 routing.

Available options:
primary,
secondary
Example:

"primary"

x-api-version
string
default:1.0.0

API version

x-proxy
enum<string>

NIC server that receives the request. If omitted, the request goes to the server selected by x-source. When specified, selects the other server. See NIC1 and NIC2 routing.

Available options:
primary,
secondary

Query Parameters

force
string
required

The value of this attribute is to be set true if the client needs to refresh the token 10 minutes before expiry. Possible Values - true or false

Example:

"true"

Body

application/json
password
string
required
username
string
required
gstin
string
required
Required string length: 15
Pattern: ^([0-9]{2}[0-9A-Z]{13})$

Response

200 - application/json

1015 Invalid GSTIN for user / 200 Authenticated / 1019 Incorrect password / 1017 Incorrect user id / GEN5008 GSTN Server Error

Authentication success, NIC business error, or platform error. These variants use HTTP 200.

code
enum<integer>
required

HTTP-compatible Sandbox response code.

Available options:
200
timestamp
integer<int64>
required

Unix timestamp in milliseconds.

transaction_id
string
required

Request transaction identifier.

data
E-Invoice authentication success payload · object
required