Send a commercial document by email
Changed onThis endpoint allows you to send a commercial document by email to your customer. This requires that the PDF file for that document has been generated (this process can take a few minutes), so if you just created the commercial document 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.
The subject and body come from the company's default billing email template for the customer's billing language, unless email_template_id is set. A proforma uses the invoice template. A shipping order or a purchasing order uses the quote template.
For more information about email sending, please read [this guide](https://pennylane.readme.io/v2.0/docs/sending-documents-by-email).
ℹ️ This endpoint requires the following scope: commercial_documents:all
Request
- Base URLhttps://app.pennylane.com
- URLhttps://app.pennylane.com/api/external/v2/commercial_documents/{id}/send_by_email
- AuthOAuth 2Authorization code: https://app.pennylane.com/oauth/authorizeToken URL: https://app.pennylane.com/oauth/oauth/token scopes: commercial_documents:all
Path parameters
Headers
Numeric ID of the company to act on. Required when authenticating with a firm token. Ignored when the token is already bound to a company.
Request body
Example request
{
"recipients": [
"audit@company.com"
],
"email_template_id": 42
}Response
Commercial document is being sent by email
Changes
- info
endpoint added
- info