Get e-Invoice Details#
Given Document details of an invoice reference number (IRN), you can get e-invoice details using this API.
Route
/basic/einv/{flynnApiVersion}/{irp}/eicore/{e-invoice-api-version}/Invoice/irnbydocdetails?doctype={document-type}&docnum={document-number}&docdate={document-date}
- active ‘flynn-version’: v3.0
- method: GET
URL Parameters#
Name | Description | Type |
---|---|---|
flynn-version | version of the API for example, v3.0 |
string |
irp | IRP Provider as per GST registration for e-invoicing | enum (ni1, ni2) |
e-invoice-api-version | E-invoice API version | string |
QUERY Parameters#
Name | Description | Type |
---|---|---|
doctype | Document type (INV/CRN/DBN) | string |
docnum | Document number number | string |
docdate | Document date (format DD/MM/YYYY, like 31/12/2020) | string |
Headers#
All headers as mentioned in the Basic E-Invoice API introduction.
Apart from the common headers need to pass below headers
header | Description |
---|---|
irp | This request header is mandatory if Taxpayer wants to perform interoperability / criss-cross operations on IRN. Accepted values are NIC1 or NIC2 |
Tip
The only valid value for the header key accept
is application/json
.
Also, since no request body is sent, header key Content-type
is optional.
Response#
200
:#
Successful response will be the same payload as per the ‘E-Invoice API Documentation’ published by NIC.
Sample Response Body
{
"status": "1",
"data": {
"AckNo": "162310048427387",
"AckDt": "2023-07-06 16:43:00",
"Irn": "9a36c874d574eda42385fd2796463577dbd66692e3b28a5301c88a1fe9429b91",
"SignedInvoice": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjE1MTNCODIxRUU0NkM3NDlBNjNCODZFMzE4QkY3MTEwOTkyODdEMUYiLCJ4NXQiOiJGUk80SWU1R3gwbW1PNGJqR0w5eEVKa29mUjgiLCJ0eXAiOiJKV1QifQ.eyJkYXRhIjoie1wiQWNrTm9cIjoxNjIzMTAwNDg0MjczODcsXCJBY2tEdFwiOlwiMjAyMy0wNy0wNiAxNjo0MjozOFwiLFwiSXJuXCI6XCI5YTM2Yzg3NGQ1NzRlZGE0MjM4NWZkMjc5NjQ2MzU3N2RiZDY2NjkyZTNiMjhhNTMwMWM4OGExZmU5NDI5YjkxXCIsXCJWZXJzaW9uX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zQyLjMyLFwiSXRlbUNudFwiOjEsXCJNYWluSHNuQ29kZVwiOlwiMzQwMTMwOTBcIixcIklyblwiOlwiOWEzNmM4NzRkNTc0ZWRhNDIzODVmZDI3OTY0NjM1NzdkYmQ2NjY5MmUzYjI4YTUzMDFjODhhMWZlOTQyOWI5MVwiLFwiSXJuRHRcIjpcIjIwMjMtMDctMDYgMTY6NDI6MzhcIn0iLCJpc3MiOiJOSUMgU2FuZGJveCJ9.ibQ-nD6SC6_khq8gM2EYvjLcSKgYBiBr4UYC8mG8cfA8lTX16h4j1r5HOoS2_xglcvldrTo9oCJ6YCQJxg4fcx-sxcN-nl2xaui_dF5vc8Dq9KIJmIRc94DvE5zyuDgLA-Tnf_sHkIl7OnbQ_2JmUkj4UBZoXEMROkuuJD5oopCyvKaxByWhJDDfkud03ID6GjjaEMPVKIzzUz6zC7rCN0cR6yiVxGyRTPe3B33tZWPmOLzrLUXJBZZGx95u1g3wfPH3MiYDPRqJREfdcJq2uWyrMm__sQ0deX3n-1YhYBhsUnjukoLElJyzjeQCB6i1XE34E1f8SUpaieRK3b7Elw",
"Status": "ACT",
"EwbNo": 661010233323,
"EwbDt": "2023-07-06 16:44:00",
"EwbValidTill": "2023-07-13 23:59:00",
"Remarks": null
},
"error": null,
"info": null,
"additionalInfo": null,
"alert": null
}
502
:#
When the E-invoice isn’t found.
Sample Response Body
{
"status": "0",
"data": null,
"error": {
"message": "err-irp-returned-error",
"type": "Irp",
"args": {
"details": [
{
"ErrorCode": "2154",
"ErrorMessage": "IRN details are not found"
}
]
}
},
"info": null,
"additionalInfo": null,
"alert": null
}
E-invoice errors are mentioned under common errors for v3.0 api.
Notes#
IRP - nic is deprecated. Instead of it please use ni1 or ni2