Skip to main content
POST

Request body schema

View request body schema

Headers

authorization
string
required

E-Invoice access token. For token-generation steps, refer to the Generate E-Invoice Session recipe, then pass the token in the authorization header.

x-source
enum<string>
default:primary

Specifies the source to access, either primary (NIC 1) or secondary (NIC 2)

Available options:
primary,
secondary
Example:

"primary"

x-proxy
enum<string>

Enables criss-cross operations by routing requests through the specified source (e.g., access primary via secondary if primary is unavailable)

Available options:
primary,
secondary
Example:

"secondary"

x-api-version
string
default:1.0.0

API version

x-api-key
string
required

API key for identification

Path Parameters

irn
string
required

Body

application/json
Irn
string
required

Invoice Reference Number

Required string length: 64
CnlRsn
enum<string>
required

Cancel Reason 1- Duplicate, 2 - Data entry mistake, 3- Order Cancelled, 4 - Others

Available options:
1,
2,
3,
4
Required string length: 1
CnlRem
string

Cancel Remarks

Maximum string length: 100

Response

200 - application/json

200 IRN cancelled / 9999 IRN is not active / 2270 More than 24 hrs old / 2230 IRN cannot be cancelled as EWB is active / 2143 IRN doesn't belong to user

A successful NIC response or a NIC business-error response. Both 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
object
required