Send an E-Invoice via Email

Send an Email

You can send an E-Invoice via Email by sending a POST request to the below API

x-cleartax-auth-token: {{USER_AUTH_TOKEN}}
gstin: GSTIN

Parameter

Parameter Type

Type

Description

X-Cleartax-Auth-Token

Header

String

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

gstin

Header

String

Users GSTIN

user-agent

Header

String

Example: 'Tally' or 'SAP'

Request URL

POST: {{HOST}}/einv/v0/communication/send

Sample Request Body

{
  "attachment_details": {
   "printTemplate": "62cfd0a9-d1ed-47b0-b260-f8y6f57e9c5e",
   "invoice_details": {
      "invoice_id": "DOC-1",
      "invoice_date": "17/12/2020",
      "invoice_type": "INV"
    }
  },
  "communication_details": {
    "template": {
      "template_type": "INVOICE_GENERATED"
    },
    "contacts": [
      {
        "recipients": [
          {
            "name": "Contact Person Name",
            "email": "recipient@gmail.com",
            "email_recipient_type": "TO"
          }
        ]
      }
    ]
  }
}

Request Parameters:

Parameters

Parameter Type

Type

Description

attachment_details

Body

Object

Mandatory, Attachment Details

communication_details

Body

Object

Mandatory, Communication Details like Template Type and Email Information

Attachment Details

Parameters

Parameter Type

Type

Description

invoice_details

Body

Object

Mandatory, Invoice Details for which E-Invoice is to be sent in attachments

Invoice Details

Parameters

Parameter Type

Type

Validations

Description

invoice_id

Body

String

minLength: 1

maxLength: 16

pattern: "^([a-zA-Z1-9]{1}[a-zA-Z0-9\/-]{0,15})$"

Mandatory, Invoice/ Document Number

invoice_date

Body

String

Format DD/MM/YYYY

Document Date

invoice_type

Body

Enum

Enum Values: INV, CDN, DBN

Document Type: Invoice, Credit Note, or Debit Note

Communication Details

Parameters

Parameter Type

Type

Description

template

Body

Object

Mandatory, Template Type

contacts

Body

List

Mandatory, Contact Details

Template Details

Parameters

Parameter Type

Type

Validations

Description

template_type

Body

Enum

INVOICE_GENERATED, INVOICE_CANCELLED, INVOICE_PAYMENT_REMINDER

Mandatory

Contact Details

Parameters

Parameter Type

Type

Description

recipients

Body

List

Mandatory, Email Recipients - You can send multiple recipients for sending email

Email Recipient Details

Parameters

Parameter Type

Type

Validations

Description

name

Body

String

maxLength: 100

Optional, Name of the Person

email

Body

String

maxLength:100

Mandatory, Email of the Person

email_recipient_type

Body

Enum

TO, CC, BCC

Mandatory, Scope of the Email

Sample Response

{
    "success": true,
    "errors": null
}

Response Parameters

  • For Successful request

Parameter

Type

Description

success

boolean

true if request is successful

  • For Failed requests

Parameter

Type

Description

success

boolean

false for the failed request

errors

Object

Details of 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

Last updated