With this API you can send by emails the invoices or estimates you've just created.
- Send the email to the client using this endpoint: we will ask you the invoice external_id.
- Create the estimate
- Get the external_id of the estimate in the response
- Send the email to the client using this endpoint: we will ask you the estimate external_id.
Sending those emails requires that the PDF file for the document has been generated (this process can take a few minutes), so if you just created the invoice / estimate in our system, we may return a 409 error. You should retry the request in a few minutes - if you receive a 204 response, that means that the email is on its way.
To send the email you need to specify the email address of the client before. You can do it when creating the estimate / invoice.
If the email address of the client is missing, you will receive an error message telling you to first specify the email address.
You can add several email addresses to the client (it's an array field), we will send the document to all of them.
At the moment, it is not possible to specify another email address in cc or bcc.
The emails will be sent with the following address: [email protected]. If your client answers the email, their answer will be automatically transferred to the email address you've specified in the Paramètres > "Facturation clients" in the platform.
At the moment, it is not possible for you to select or create email templates with the API. We use by default the default invoice and estimate templates you already have in the platform. Depending of the billing language of the customer, we will either select the French default one or the English default one.
You can see them in the Parameters > "Facturation clients" > "Emails" . Feel free to modify the content of those templates if needed.