Generate IRN


Overview
The API is used to upload invoices and returns the Invoice Registration Number IRN
Endpoint
HTTP Method | Resource |
---|---|
|
Making the API Call
curl --request POST \
--url https://api.sandbox.co.in/ \
--header 'Accept: application/json' \
--header 'x-api-version: 1.0'
--data '
{
"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": "[email protected]"
},
"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": "[email protected]"
},
"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
Param | Type | Description | Example |
---|---|---|---|
AckNo |
| Transaction number | 1 |
AckDt |
| Date and time on which invoice is registered(Date format is "yyyy-MM-dd HH:mm:ss "). | |
Irn |
| SHA256 hash of Gstin, DocDtls.No, DocDtls.Typ, financial year of DoctDtls.Dt | |
SignedInvoice |
| Complete e-Invoice data digitally signed using JSON Web Token(JWT) and JSON Web Signature (JWS) with "SHA256RSA" algorithm | |
SignedQRCode |
| Complete QR- Code data digitally signed using JSON Web Token(JWT) and JSON Web Signature (JWS) with "SHA256RSA" algorithm | |
Status |
| "ACT" for Active and "CNL" for Cancelled | |
EwbNo |
| E Way Bill No. , if E Way Bill is generated | |
EwbDt |
| E Way Bill Date. , if E Way Bill is generated | |
EwbValidTill |
| E Way Bill validity date, if Part B details are provided in the payload |
Updated 25 days ago