Generate IRN#
Generate IRN offers single e-invoice generation as opposed to its enriched counterpart.
Route
/basic/einv/{flynn-version}/{irp}/eicore/{e-invoice-api-version}/Invoice
- active ‘flynn-version’: v3.0
- method: POST
URL Parameters#
Name | Description | Type |
---|---|---|
flynn-version | version of the API for example, v3.0 |
string |
irp | IRP Provider as per GST registration for e-invoicing | enum (ni1, ni2) |
e-invoice-api-version | E-invoice API version | string |
Headers#
All headers as mentioned in the Basic E-Invoice API introduction.
Tip
The only valid values for the header keys Content-Type
and accept
must have to be application/json
.
Request#
Body consists of the payload guided by IRP documentation present on this page
Please refer the following request body for reference-
Sample request body
{
"Version": "1.1",
"TranDtls": {
"TaxSch": "GST",
"SupTyp": "B2B",
"RegRev": "Y",
"EcmGstin": null,
"IgstOnIntra": "N"
},
"DocDtls": {
"Typ": "INV",
"No": "DOC/001",
"Dt": "18/08/2020"
},
"SellerDtls": {
"Gstin": "37ARZPT4384Q1MT",
"LglNm": "NIC company pvt ltd",
"TrdNm": "NIC Industries",
"Addr1": "5th block, kuvempu layout",
"Addr2": "kuvempu layout",
"Loc": "GANDHINAGAR",
"Pin": 518001,
"Stcd": "37",
"Ph": "9000000000",
"Em": "abc@gmail.com"
},
"BuyerDtls": {
"Gstin": "29AWGPV7107B1Z1",
"LglNm": "XYZ company pvt ltd",
"TrdNm": "XYZ Industries",
"Pos": "12",
"Addr1": "7th block, kuvempu layout",
"Addr2": "kuvempu layout",
"Loc": "GANDHINAGAR",
"Pin": 562160,
"Stcd": "29",
"Ph": "91111111111",
"Em": "xyz@yahoo.com"
},
"DispDtls": {
"Nm": "ABC company pvt ltd",
"Addr1": "7th block, kuvempu layout",
"Addr2": "kuvempu layout",
"Loc": "Banagalore",
"Pin": 562160,
"Stcd": "29"
},
"ShipDtls": {
"Gstin": "29AWGPV7107B1Z1",
"LglNm": "CBE company pvt ltd",
"TrdNm": "kuvempu layout",
"Addr1": "7th block, kuvempu layout",
"Addr2": "kuvempu layout",
"Loc": "Banagalore",
"Pin": 562160,
"Stcd": "29"
},
"ItemList": [{
"SlNo": "1",
"PrdDesc": "Rice",
"IsServc": "N",
"HsnCd": "1001",
"Barcde": "123456",
"Qty": 100.345,
"FreeQty": 10,
"Unit": "BAG",
"UnitPrice": 99.545,
"TotAmt": 9988.84,
"Discount": 10,
"PreTaxVal": 1,
"AssAmt": 9978.84,
"GstRt": 12.0,
"IgstAmt": 1197.46,
"CgstAmt": 0,
"SgstAmt": 0,
"CesRt": 5,
"CesAmt": 498.94,
"CesNonAdvlAmt": 10,
"StateCesRt": 12,
"StateCesAmt": 1197.46,
"StateCesNonAdvlAmt": 5,
"OthChrg": 10,
"TotItemVal": 12897.7,
"OrdLineRef": "3256",
"OrgCntry": "AG",
"PrdSlNo": "12345",
"BchDtls": {
"Nm": "123456",
"ExpDt": "01/08/2020",
"WrDt": "01/09/2020"
},
"AttribDtls": [{
"Nm": "Rice",
"Val": "10000"
}]
}],
"ValDtls": {
"AssVal": 9978.84,
"CgstVal": 0,
"SgstVal": 0,
"IgstVal": 1197.46,
"CesVal": 508.94,
"StCesVal": 1202.46,
"Discount": 10,
"OthChrg": 20,
"RndOffAmt": 0.3,
"TotInvVal": 12908,
"TotInvValFc": 12897.7
},
"PayDtls": {
"Nm": "ABCDE",
"AccDet": "5697389713210",
"Mode": "Cash",
"FinInsBr": "SBIN11000",
"PayTerm": "100",
"PayInstr": "Gift",
"CrTrn": "test",
"DirDr": "test",
"CrDay": 100,
"PaidAmt": 10000,
"PaymtDue": 5000
},
"RefDtls": {
"InvRm": "TEST",
"DocPerdDtls": {
"InvStDt": "01/08/2020",
"InvEndDt": "01/09/2020"
},
"PrecDocDtls": [{
"InvNo": "DOC/002",
"InvDt": "01/08/2020",
"OthRefNo": "123456"
}],
"ContrDtls": [{
"RecAdvRefr": "Doc/003",
"RecAdvDt": "01/08/2020",
"TendRefr": "Abc001",
"ContrRefr": "Co123",
"ExtRefr": "Yo456",
"ProjRefr": "Doc-456",
"PORefr": "Doc-789",
"PORefDt": "01/08/2020"
}]
},
"AddlDocDtls": [{
"Url": "https://einv-apisandbox.nic.in",
"Docs": "Test Doc",
"Info": "Document Test"
}],
"ExpDtls": {
"ShipBNo": "A-248",
"ShipBDt": "01/08/2020",
"Port": "INABG1",
"RefClm": "N",
"ForCur": "AED",
"CntCode": "AE",
"ExpDuty": null
},
"EwbDtls": {
"TransId": "12AWGPV7107B1Z1",
"TransName": "XYZ EXPORTS",
"Distance": 100,
"TransDocNo": "DOC01",
"TransDocDt": "18/08/2020",
"VehNo": "ka123456",
"VehType": "R",
"TransMode": "1"
}
}
Response#
200
:#
Successful response will have the generated e-way bill entry in “data” attribute as a String
.
Sample response body
{
"status": "1",
"data": {
"AckNo": "162310048427387",
"AckDt": "2023-07-06 16:42:38",
"Irn": "9a36c874d574eda42385fd2796463577dbd66692e3b28a5301c88a1fe9429b91",
"SignedInvoice": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjE1MTNCODIxRUU0NkM3NDlBNjNCODZFMzE4QkY3MTEwOTkyODdEMUYiLCJ4NXQiOiJGUk80SWU1R3gwbW1PNGJqR0w5eEVKa29mUjgiLCJ0eXAiOiJKV1QifQ.eyJkYXRhIjoie1wiQWNrTm9cIjoxNjIzMTAwNDg0MjczODcsXCJBY2tEdFwiOlwiMjAyMy0wNy0wNiAxNjo0MjozOFwiLFwiSXJuXCI6XCI5YTM2Yzg3NGQ1NzRlZGE0MjM4NWZkMjc5NjQ2MzU3N2RiZDY2NjkyZTNiMjhhNTMwMWM4OGExZmU5NDI5YjkxXCIsXCJWZXJzaW9uXCI6XCIxLjFcIixcIlRyYW5EdGxzXCI6e1wiVGF4U2NoXCI6XCJHU1RcIixcIlN1cFR5cFwiOlwiQjJCXCIsXCJSZWdSZXZcIjpcIk5cIixcIklnc3RPbkludHJhXCI6XCJOXCJ9LFwiRG9jRHRsc1wiOntcIlR5cFwiOlwiSU5WXCIsXCJOb1wiOlwiUkFNSVJOSU5BMTk5XCIsXCJEdFwiOlwiMjEvMDYvMjAyMV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FuZGJveCJ9.ibQ-nD6SC6_khq8gM2EYvjLcSKgYBiBr4UYC8mG8cfA8lTX16h4j1r5HOoS2_xglcvldrTo9oCJ6YCQJxg4fcx-sxcN-nl2xaui_dF5vc8Dq9KIJmIRc94DvE5zyuDgLA-Tnf_sHkIl7OnbQ_2JmUkj4UBZoXEMROkuuJD5oopCyvKaxByWhJDDfkud03ID6GjjaEMPVKIzzUz6zC7rCN0cR6yiVxGyRTPe3B33tZWPmOLzrLUXJBZZGx95u1g3wfPH3MiYDPRqJREfdcJq2uWyrMm__sQ0deX3n-1YhYBhsUnjukoLElJyzjeQCB6i1XE34E1f8SUpaieRK3b7Elw",
"Status": "ACT",
"EwbNo": null,
"EwbDt": null,
"EwbValidTill": null,
"Remarks": null
},
"error": null,
"info": [
{
"InfCd": "EWBERR",
"Desc": [
{
"ErrorCode": "4019",
"ErrorMessage": "Provide Transporter ID in order to generate Part A of e-Way Bill"
}
]
}
],
"additionalInfo": null,
"alert": null
}
E-invoice errors are mentioned under common errors for v3.0 api.
Notes#
IRP - nic is deprecated. Instead of it please use ni1 or ni2