With a separate end points, trigger emails to your clients/vendors, either at the time of creating an accounting document, or any time after.
There are two ways you can share a document with your client or vendor:
- While creating a document
- Via a separate endpoint for emails via POST
Email while creating an invoice
While creating an invoice, you can add a separate object for email.
Name | Type | Description |
email.to | object | Main recipient of email |
email.to.name | string | Name of main recipient |
email.to.email | Email of main recipient | |
email.cc | array[object] | email CC list |
email.cc[].name | string | Name of recipient |
email.cc[].email | Email of recipient |
Sample Payload
"email": {
"to": {
"name": "To Email",
"email": "toEmail@refrens.com"
},
"cc": {
"name": "CC Email",
"email": "carboncopy@refrens.com"
}
}
Via separate end-point, post invoice creation
URL:
Quotations:
https://api.refrens.com/businesses/:urlKey/quotations/:invoiceID/email
Delivery Challans:
https://api.refrens.com/businesses/:urlKey/deliverychallans/:invoiceID/email
Invoices and all other documents:
https://api.refrens.com/businesses/:urlKey/invoices/:invoiceID/email
urlKey: Your business URL key
invoiceID: the ID of the document you want to share over email. Find the document ID as part of the response under "_id"
Sample Payload
{ "cc": [ { "email": "carboncopy@refrens.com", "name": "CC Name" } ], "to": { "email": "toEmail@refrens.com", "name": "Client Email" }, "from": { "name": "Finance at Refrens" } }
Sample Response
{ "cc": [], "to": { "email": "toEmail@refrens.com", "name": "Client Email" }, "from": { "name": "Finance at Refrens" }, "emailType": "email", "isExpenditureEmail": false, "subject": "[Important] Email Invoice For API Client - #UG0262", "body": "Hi Infosys,\n\nPlease find attached invoice #UG0262.\n\nInvoice No: #UG0262\nInvoice Date: Dec 12, 2023\nBilled To: API Client\nInvoice Amount: ₹1,180.0\nAmount Received: ₹1,180.0\nTotal: ₹1,180\nPayment Date: Dec 12, 2023\n\nThank you for your business.\n\nRegards ,\nRefrens Demo" }