Get E-Invoice PDF

You can get PDF version of an Invoice by submitting a GETrequest to E-Invoicing API with the following request headers.

Request Method

GET

Request URL

{{HOST}}/einv/v2/eInvoice/download

Request Headers

PARAMETER
PARAM TYPE
TYPE
DESCRIPTION

X-Cleartax-Auth-Token

Header

String

Mandatory. The auth token generated from ClearTax user id and password.

gstin

Header

String

Conditional. GSTIN of the organisation. Either of GSTIN or PAN is mandatory.

pan

Header

String

Conditional. PAN of the organisation. Either of GSTIN or PAN is mandatory.

Request Path Params

There are no path parameters for this API.

Request Query Params

KEY
PARAM TYPE
TYPE
DESCRIPTION

template

query

String

Optional.

CRN Template 1 - e281c115-dc47-467a-83c8-1b66c70de13e

DBN Template 1 - 9dba2d0a-eba9-4d55-8fed-c03bf8b23435

INV Template 1 - 6f376678-3cc0-4bea-a9e0-ff92a60a7b00

INV Template 2 - 179471da-fcc9-4a1e-bf17-33b57c5f445c

INV Template 3 - 6e351b87-35b4-48a5-bc5f-d085685410f7

Export - b91a628f-11e7-47a8-8eeb-833b5bd9a660

format

query

String

Optional.Accepted values include: PDF, ZIP

Default: PDF

irns

query

List

Required. List of IRNs generated. Multiple accepted

enableDsc

query

Boolean

Optional. If the user doesn’t send a value, the default value will be False. If the user sends a value, DSC will be enabled for the user.

Request Body

There is no request body for this API.

Response Status Codes

HTTP Status Code
Description

200

For a successfully processed request (may be a success or validation error).

401

If the user is not authenticated for the operation.

403

If the user is not authorized for the operation.

500

If there are any unhandled exceptions on the Clear side.

Response Schema

There is no sample response schema for this API.

Sample Request & Response

Request

There is no request body for this API.

Response - Success:

HTTP Status Code : 200 OK

Sample file containing IRN and QR Code-

Sample file containing IRN and QR Code along with Digital Signature-

Response - Failure:

HTTP Status Code: 200 OK

{
    "error_code": "107",
    "error_message": "Number of valid irn numbers in the request should be between 1 and 5. Please provide valid irn numbers and try again.",
    "error_source": "CLEARTAX"
}

API Validations

The user should have appropriate access to take the EInvoice PDF.

API Constraints

  1. A Maximum of 5 invoices can be printed per API call.

  2. The Invoice details should be present in the ClearTax database.

Last updated

Was this helpful?