Get E-Invoice PDF

Get the PDF/A3 version of an E-Invoice with the XML attached based on the invoice identifiers of the invoice data already sent to Clear earlier.

Request Method

POST

Request URL

{{BASE_URL}}/api/v1/einvoices/print

Replace the {{BASE_URL}} with the one mentioned here based on whether you are using sandbox or production.

Request Headers

Parameter
Data Type
Validations and Example
Description

x-evs-auth-token

String

Required

Mandatory. User auth token.

vat

String

Required

Mandatory. VAT or Group VAT of the entity.

Request Body

Parameter
Data Type
Description

InvoiceXmlBase64

String

Invoice XML is base 64 format.

CompanyLogoBase64

String

Company logo in base 64 format

Sample Request

{ 
    "InvoiceXmlBase64": "DQo8SW52b2ljZSB4bWxucz0idXJuOm..........",
    "CompanyLogoBase64": "data:image/png;base64,iVBORw0KGgoAAAANSUhE......."
}

Response Status Codes

HTTP Status Code
Description

200

For a successful Get E-Invoice PDF

400

For any kind of validation issues.

401

If the user is not authenticated for the operation.

403

If the user is not authorized for the operation.

500

HTTP Internal Server Error. Returned when the service faces internal errors.

Response Schema

Parameter
Data Type
Description

Base64EncodedPdfFile

String

A3 PDF with attach XML in base 64

Sample Response

Success - HTTP Status Code - 200

{
    "Base64EncodedPdfFile": "JVBERi0xLjcKJeLjz9MKOSAwIG9....."
}

Error - HTTP Status Code - 400

{
    "ErrorCode": "00400",
    "ErrorMessage": "InvoiceXmlBase64 is Required",
    "ErrorSource": "EVS_Engine"
}

Error - HTTP Status Code - 401

{
    "ErrorCode": "100401",
    "ErrorMessage": "Authentication Failed",
    "ErrorSource": "EVS_Engine"
}

Error - HTTP Status Code - 403

{
  "ErrorCode": "100403",
  "ErrorMessage": "Authorization Failed",
  "ErrorSource": "EVS_Engine"
}

Error - HTTP Status Code - 500

{
    "ErrorCode": "00500",
    "ErrorMessage": "Something Went wrong While Generating PDF A-3",
    "ErrorSource": "EVS_Engine"
}

API Validations

  1. Invoice XML base is Required.

  2. Company logo base 64 is optional.

API Constraints

  1. This API needs to be authenticated with a valid user authentication token. If the auth token is not present or is invalid, the API will return HTTP Status Code 401.

  2. If the auth token is valid, but the user does not have the authorization to generate device ID, then the API will return HTTP Status Code 403. The user, whose auth token is used, should have an Admin role for the particular VAT used in the request.

Last updated