Overview

This API is used for cancelling an e-Invoice within stipulated time by passing the IRN.

Sequence Diagram

The format and details of Cancellation of IRN API request is depicted in following table.

URL <URL>/api/Cancel

Content-Type

application/json

Method

POST

Request Header

Attributes Description
client_id

client id to be provided by E-Invoice System

client_secret

client secret to be provided by E-Invoice System

Gstin

GSTIN of the authenticated user

user_name

User name of the authenticated user

AuthToken

Authentication token returned by the E-Invoice system

Request Payload

Attributes Description
Data encoded string of encrypted Cancel e-invoice JSON using Sek.

Response Payload

Attributes Description
Status Status of the Cancel  IRN request(values 1-Success and 0- Failure)
Data If Status is ‘1’
Irn IRN that is cancelled
CancelDate Date of cancellation of the IRN
ErrorDetails If Status is ‘0’
ErrorCode Unique error code
ErrorMessage Error Description
InfoDtls Any additional message to be conveyed would be passed.

Sample JSON (Request)

Cancel IRN Request

{
"Data": "cwMtQmlx/upJuEqKfTMTQ6RH1s6SOQwm9SknTMBvHm9CFeJCCs4otZZbdf76sP/xpR4K3H5qvf1FmSrIFw1kmcPG1fSrE+AhZXjicr07dFsFmngugxwcTu 4BScdA75FgIolVbvDnDgvzJyg9mDWxMIM3Mkbtt7by5XC9CqVqqhnPSri9R5UE3PJgVKcMsM3aBewBdNGiQ/2Z9fITZwCp1l/z6h6pMDd93GT30I8nxMsn3"
}

JSON corresponds to the "Data" element of Cancel E-Invoice Request above

{
"Irn":"a5c12dca80e743321740b001fd70953e8738d109865d28ba4013750f2046f229",
"CnlRsn":"1 ",
"CnlRem":"Wrong entry"
}

Sample JSON (Response)

{
"status":"1",
"data":"<Encrypted response>",
"ErrorDetails":null,
"InfoDtls":"<alert message >"
}

JSON (corresponds to the data element of Cancelled e-Invoice Response(Success))

{   
"Irn":"a5c12dca80e743321740b001fd70953e8738d109865d28ba4013750f2046f229",
"CancelDate": "2019-12-05 14:26:00"
}

JSON(in case of error)


"status": "0",
"Data": null,
"ErrorDetails":"<Errors JSON >",
"InfoDtls": "<alert message >"
}

JSON Schema

{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"Irn": {
"type": "string",
"description": "IRN number"
},
"CnlRsn": {
"type": "string",
"description": "Cancel reason"
},
"CnlRem": {
"type": "string",
"description": "Cancel Remarks"
}
}
}

Validations

  1. IRN cannot be cancelled, if the Valid/Active E-way Bill exists for the same.

Frequently Asked Questions

Content will be updated shortly.