# E-Invoice & E-WayBills: Get Doc IRN Info

This API is used to get IRN details of already generated e-invoice.

## URL

```
GET https://cloud.octagst.com/api/octa/einvoice/getdocirninfo?gstin={value}&doctype={value}&docno={value}&docdate={value}
```

## Query Parameters

| Name      | Description                                                          | Type      | Value                                                       |
| --------- | -------------------------------------------------------------------- | --------- | ----------------------------------------------------------- |
| `gstin`   | It specifies GSTIN of seller GSTIN                                   | Mandatory |
| `doctype` | It specifies document type                                           | Mandatory | `INV`: Invoice<br/>`CRN`: Credit note<br/>`DBN`: Debit note |
| `docno`   | It specifies document number                                         | Mandatory |                                                             |
| `docdate` | It specifies document date                                           | Mandatory | `DD/MM/YYYY`                                                |
| `qrcode`  | Specify `yes` to include QR Code image in response                   | Optional  | `yes`, `no` (Default)                                       |
| `pdf`     | Specify `yes` to include e-invoice pdf and e-waybill pdf in response | Optional  | `yes`, `no` (Default)                                       |

## Success Response

Response payload will contain the success status along with IRN information.

```json
{
  "Success": true,
  "AckNo": "112010000002315",
  "AckTime": "27/11/2020 17:23:45",
  "IrnStatus": "ACT",
  "Irn": "11f8ef741fe294d4a14aad0b12457e62775d0fdc41a0dcf05b74fbb2ddc47acb",
  "SignedInvoice": "eyJhbGc...gumxIpg",
  "SignedQRCode": "eyJhbGc...oOZvxpw",
  "EwbStatus": "ACT",
  "EwbNo": "191008688443",
  "EwbTime": "27/11/2020 17:23:45",
  "EwbValidTill": "29/11/2020 17:23:45",
  "QRCodeImagePng": "gy72zt...3AAAAAElFTkSuQmCC",
  "EinvoicePdf": "i7gahsd...GY899RfTkSueba781Fg",
  "EwbPdf": "utwf19...34566AAAElFTkSuQmCC"
}
```

## Failure Response

If API request fails for some reason, response payload will contain the failure status and a list of errors.

```json
{
  "Success": false,
  "Errors": [
    {
      "Code": "ERR_CODE_1",
      "Message": "ERR MESSAGE 1"
    },
    {
      "Code": "ERR_CODE_n",
      "Message": "ERR MESSAGE n"
    }
  ]
}
```