> For the complete documentation index, see [llms.txt](https://docs.cleartax.in/cleartax-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cleartax.in/cleartax-docs/e-invoicing-api/e-invoicing-api-reference/rcm-self-invoicing-purchase-documents-government-schema/generate-irn.md).

# Generate IRN

You can generate an IRN by sending a POST request to the E-Invoicing API with the following request headers.

## **Request URL**

```
POST: {{HOST}}/einv/v1/govt/api/Invoice/
```

### Request Headers

<table><thead><tr><th width="191">Parameter</th><th width="146">Data Type</th><th width="163">Field Validations</th><th>Description</th></tr></thead><tbody><tr><td>X-Cleartax-Auth-Token</td><td>String</td><td>NA</td><td>Mandatory. The auth token generated from ClearTax user id and password.</td></tr><tr><td>Content-Type</td><td>String</td><td>NA</td><td>Mandatory. This will always be <br>"application/json" for JSON </td></tr><tr><td>gstin</td><td>String</td><td>NA</td><td>Mandatory. GSTIN number for the user</td></tr></tbody></table>

### Sample Request and Response :

```json
{
  "Version": "1.1",
  "TranDtls": {
    "TaxSch": "GST",
    "SupTyp": "RCMIMP",
    "RegRev": "Y",
    "IgstOnIntra": "N"
  },
  "DocDtls": {
    "Typ": "INV",
    "No": "SI/2026/002",
    "Dt": "02/01/2027"
  },
  "SellerDtls": {
    "Gstin": "URP",
    "LglNm": "Global Consulting LLC",
    "Addr1": "500 Market Street",
    "Loc": "SAN FRANCISCO",
    "Pin": 999999,
    "Stcd": "96"
  },
  "BuyerDtls": {
    "Gstin": "29AWGPV7107B1Z1",
    "LglNm": "XYZ Company Pvt Ltd",
    "Pos": "29",
    "Addr1": "7th block, kuvempu layout",
    "Loc": "BENGALURU",
    "Pin": 562160,
    "Stcd": "29"
  },
  "ItemList": [
    {
      "SlNo": "1",
      "PrdDesc": "Management consulting services",
      "IsServc": "Y",
      "HsnCd": "998311",
      "Qty": 1,
      "Unit": "OTH",
      "UnitPrice": 100000,
      "TotAmt": 100000,
      "AssAmt": 100000,
      "GstRt": 18,
      "IgstAmt": 18000,
      "CgstAmt": 0,
      "SgstAmt": 0,
      "TotItemVal": 118000,
      "OrgCntry": "US"
    }
  ],
  "ValDtls": {
    "AssVal": 100000,
    "IgstVal": 18000,
    "CgstVal": 0,
    "SgstVal": 0,
    "TotInvVal": 118000
  }
}

```

### Response:&#x20;

```json
{
  "Success": "Y",
  "AckNo": 162010000001700,
  "AckDt": "2027-01-02 11:23:00",
  "Irn": "58f1669d31c5725ddcc39eeecd465e69543c639daeb1d582546aa3d28d66c3f8",
  "SignedInvoice": "eyJhbGciOiJSUzI1NiIsImt......",
  "SignedQRCode": "eyJhbGciOiJSUzI1NiIsImt......",
  "Status": "ACT"
}

```
