# Get Invoice by IRN

You can get an Invoice by IRN by sending a `GET` request to E-Invoicing API with the following request headers.

## **Request URL**

```
GET: {{HOST}}/einv/v1/govt/api/Invoice/irn/{{IRN}}
```

## Request Headers

| Parameter             | Type   | Description                                              |
| --------------------- | ------ | -------------------------------------------------------- |
| x-cleartax-auth-token | String | Mandatory. The access token generated for the workspace. |
| x-cleartax-product    | String | Should always be "EInvoice" without the double quotes.   |
| gstin                 | String | Users GSTIN                                              |

#### Request Parameters:

| Parameters | Parameter Type | Type   | Description                               |
| ---------- | -------------- | ------ | ----------------------------------------- |
| IRN        | Path           | String | Mandatory. IRN generated for the invoice. |

**Sample Request:**

```
https://api.clear.in/einv/v1/govt/api/Invoice/irn/2d5b90edf2819c91f660a6d6843346fab0d57a27badf92ac8f7fbc8762f50ab1
```

#### Response Parameters

* For Successful request

| **Parameter** | Type   | Description                                                              |
| ------------- | ------ | ------------------------------------------------------------------------ |
| Success       | String | <p>"Y" if the request is successful, </p><p>"N" otherwise</p>            |
| AckNo         | Long   | Acknowledgement Number                                                   |
| AckDt         | String | <p>Format YYYY-MM-DD HH:MM:SS, </p><p>Acknowledgement date</p>           |
| Irn           | String | Invoice Reference Number                                                 |
| SignedInvoice | String | Signed Invoice Data                                                      |
| SignedQRCode  | String | QR Code for Invoice                                                      |
| Status        | String | <p>"ACT" for an active invoice, </p><p>"CNL" for a cancelled invoice</p> |
| EwbNo         | Number | E-waybill number                                                         |
| EwbDt         | String | E-Waybill date                                                           |
| EwbValidTill  | String | E-waybill valid till                                                     |
| Remarks       | String | Remarks if any                                                           |

* For Failed requests&#x20;

| **Parameter** | Type   | Description                |
| ------------- | ------ | -------------------------- |
| Success       | String | "N" if the request failed. |
| ErrorDetails  | Array  | Details of all errors      |

#### Error Detail

| **Parameter**  | Type   | Description                                 |
| -------------- | ------ | ------------------------------------------- |
| error\_code    | String | Error Code                                  |
| error\_message | String | Error Message                               |
| error\_source  | String | Error Source can either be GOVT or CLEARTAX |

**Sample Response**

{% tabs %}
{% tab title="Valid Response" %}
```
{
  "Success": "Y",
  "AckNo": 162010000001700,
  "AckDt": "2020-08-08 11:23:00",
  "Irn": "58f1669d31c5725ddcc39eeecd465e69543c639daeb1d582546aa3d28d66c3f8",
  "SignedInvoice": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjExNUY0NDI2NjE3QTc5MzhCRTFCQTA2REJFRTkxQTQyNzU4NEVEQUIiLCJ0eXAiOiJKV1QiLCJ4NXQiOiJFVjlFSm1GNmVUaS1HNkJ0dnVrYVFuV0U3YXMifQ.eyJkYXRhIjoie1wiQWNrTm9cIjoxNjIwMTAwMDAwMDE3MDAsXCJBY2tEdFwiOlwiMjAyMC0wOC0wOCAxMToyMzowMFwiLFwiSXJuXCI6XCI1OGYxNjY5ZDMxYzU3MjVkZGNjMzllZWVjZDQ2NWU2OTU0M2M2MzlkYWViMWQ1ODI1NDZhYTNkMjhkNjZjM2Y4XCIsXCJWZXJzaW9uXCI6XCIxLjAxXCIsXCJUcmFuRHRsc1wiOntcIlRheFNjaFwiOlwiR1NUXCIsXCJTdXBUeXBcIjpcIkIyQlwiLFwiUmVnUmV2XCI6XCJZXCIsXCJJZ3N0T25JbnRyYVwiOlwiTlwifSxcIkRvY0R0bHNcIjp7XCJUeXBcIjpcIklOVlwiLFwiTm9cIjpcIkRPQy8wMDdcIixcIkR0XCI6XCIwOC8wOC8yMDIwXCJ9LFwiU2VsbGVyRHRsc1wiOntcIkdzdGluXCI6XCIyNEFBRkNENTg2MlIwMDVcIixcIkxnbE5tXCI6XCJOSUMgY29tcGFueSBwdnQgbHRkXCIsXCJUcmRObVwiOlwiTklDIEluZHVzdHJpZXNcIixcIkFkZHIxXCI6XCI1dGggYmxvY2ssIGt1dmVtcHUgbGF5b3V0XCIsXCJBZGRyMlwiOlwia3V2ZW1wdSBsYXlvdXRcIixcIkxvY1wiOlwiR0FOREhJTkFHQVJcIixcIlBpblwiOjM4MjAxMCxcIlN0Y2RcIjpcIjI0XCIsXCJQaFwiOlw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I9h_JMF-E_BD0DoLE-axLvl-NM1Xb7kBFMQyzK-Y8AlXQEf_oAOxZcxqR8amJfIrN4mSTbcjcfUxT_16DECTW0Bbm83BFi1jtf_CQX4qZio-4WPCKbo1iZNzD9LXzAd8nt9ErzAqud8pKFWTHo3fVcX7TdfSc19G6PIk7GWy3FeQCvC_sZSkWfOR9eOJowNQ",
  "Status": "ACT",
  "EwbNo": 681008686014,
  "EwbDt": "2020-08-08 11:23:00",
  "EwbValidTill": "2020-08-09 23:59:00",
  "Remarks":"Pin-Pin calc distance: 997KM"
}
```
{% endtab %}

{% tab title="Invalid Response" %}
```
{
  "Success": "N",
  "ErrorDetails": [
    {
      "error_code": "2148",
      "error_message": "Requested IRN data is not available",
      "error_source": "GOVT"
    }
  ]
```
{% endtab %}
{% endtabs %}
