TaxPro GSP - eInvoiceAPI
User Guide
 
 
×
Menu
Index

Sample Code for Cancel IRN

 
Type
Url
Headers
SandBox
https://gstsandbox.charteredinfo.com/eicore/dec/v1.03/Invoice/Cancel
1. aspid
2. password
3. Gstin
4. user_name
5. AuthToken
Production
https://einvapi.charteredinfo.com/eicore/dec/v1.03/Invoice/Cancel
1. aspid
2. password
3. Gstin
4. user_name
5. AuthToken
 
 
 
ReqPlCancelIRN reqPlCancelIRN = new ReqPlCancelIRN();
            reqPlCancelIRN.CnlRem = "Wrong entry";
            reqPlCancelIRN.CnlRsn = "1";
            reqPlCancelIRN.Irn = "7066a6a6177a663f9df4a6a25512c6e3b68eddaf417fd5f80083982c9f65434d";
 
RestClient client = new RestClient("https://gstsandbox.charteredinfo.com/eicore/dec/v1.03/Invoice/Cancel");
            RestRequest request = new RestRequest(Method.POST);
            request.AddHeader("Gstin", "<---->");
            request.AddHeader("user_name", "<---->");
            request.AddHeader("AuthToken", "<----->");
            request.AddHeader("aspid", "<------>");
            request.AddHeader("password", "<------>");
            request.AddHeader("Content-Type", "application/json; charset=utf-8");
            request.RequestFormat = DataFormat.Json;
            request.AddBody(reqPlCancelIRN);     //Request Payload of cancel IRN in object format
            IRestResponse response = await client.ExecuteTaskAsync(request);
 
    RespPlCancelIRN respPlCancelIRN = new RespPlCancelIRN();
            respPlCancelIRN = JsonConvert.DeserializeObject<RespPlCancelIRN>(response.Content);
 
Success Responce
 
{
    "Status": "1",
    "Data": "{\"Irn\":\"716a970b33ee7be98b493d478650dc9af12424b9712e4e070547864fa065644e\",\"CancelDate\":\"2020-03-11 17:13:00\"}",
    "ErrorDetails": null,
    "InfoDtls": null
}