Skip to main content
POST
/
gst
/
compliance
/
e-invoice
/
tax-payer
/
invoice
curl --request POST \
  --url https://test-api.sandbox.co.in/gst/compliance/e-invoice/tax-payer/invoice \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <x-api-key>' \
  --data '
{
  "Version": "1.1",
  "TranDtls": {
    "TaxSch": "GST",
    "SupTyp": "B2B",
    "RegRev": "Y",
    "IgstOnIntra": "N"
  },
  "DocDtls": {
    "Typ": "INV",
    "No": "DOC/12101",
    "Dt": "18/08/2022"
  },
  "SellerDtls": {
    "Gstin": "29AAACQ3770E000",
    "LglNm": "Acme Industries Private Limited",
    "TrdNm": "Acme Industries Private Limited",
    "Addr1": "5th block, kuvempu layout",
    "Addr2": "kuvempu layout",
    "Loc": "GANDHINAGAR",
    "Pin": 414203,
    "Stcd": "27",
    "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,
      "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"
  }
}
'
{
  "code": 200,
  "data": {
    "Data": null,
    "ErrorDetails": [
      {
        "ErrorCode": "2258",
        "ErrorMessage": "Supplier GSTIN state codedoes not match with the state code passed in supplier details"
      }
    ],
    "InfoDtls": null,
    "Status": 0
  },
  "timestamp": 1763446641000,
  "transaction_id": "ebde421c-2720-4f24-a9ea-f71ec31fc31d"
}

Documentation Index

Fetch the complete documentation index at: https://developer.sandbox.co.in/llms.txt

Use this file to discover all available pages before exploring further.

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-api-version
string
default:1.0.0

API version

x-api-key
string
required

API key for identification

Body

application/json

Generate IRN

Response

200 - application/json

2258 Supplier state code does not match / 5002 Version field is required / 200 E-Invoice generated (Services) / 200 E-Invoice generated (Goods) / 2278 IRN generated and cancelled / 200 E-Invoice with EWB generated / 2150 Duplicate IRN / 2301 e-Commerce operator field empty / 3026 E-Invoice not enabled

code
number
Example:

200

data
object
timestamp
number
Example:

1763446641000

transaction_id
string
Example:

"ebde421c-2720-4f24-a9ea-f71ec31fc31d"