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: 

  1. While creating a document
  2. 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.


NameTypeDescription
email.toobjectMain recipient of email
email.to.namestringName of main recipient
email.to.emailemailEmail of main recipient
email.ccarray[object]email CC list
email.cc[].namestringName of recipient
email.cc[].emailemailEmail 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


  1. urlKey: Your business URL key
  2. 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"
}