Send a customer invoice
Email a customer invoice to the customer or to the addresses you give.
POST https://cotlet.dev/api/v1/pennylane/invoices/{invoice_id}/customer-invoices
Emails the invoice PDF. Without recipients it goes to the email on the customer. If the customer has none, the call fails and asks for one. Pennylane generates the PDF first, which can take a few minutes, so a call made right after creation can fail with a conflict; try again later. CC and BCC are not available, and the email uses Pennylane's default invoice template in French or English by the customer's billing language. The email reaches your customer. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| invoice_id integer required | integer | Invoice ID from list_customer_invoices or create_customer_invoice. |
| recipients array | array | Email addresses to send to. Default: the email on the customer. |
Request
curl -X POST https://cotlet.dev/api/v1/pennylane/invoices/1/customer-invoices \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("pennylane", "send_customer_invoice", {"invoice_id":1}) const result = await cotlet.call('pennylane', 'send_customer_invoice', {"invoice_id":1}); cotlet call pennylane send_customer_invoice --data '{"invoice_id":1}' Example response
{
"invoice_id": 118390,
"invoice_number": "F-2026-0151",
"sent": true,
"recipients": [
"compta@atelier-lumen.example"
]
}