Send e-invoice to SDI
Send an invoice to the Sistema di Interscambio as an electronic invoice.
POST https://cotlet.dev/api/v1/fatture-in-cloud/invoices/{invoice_id}/einvoices
Sends the e-invoice to SDI, which delivers it to the client. A sent e-invoice is legally binding and cannot be recalled by this tool. Needs e-invoicing active on the account. Set dry_run to true to run all checks without sending. The call returns at once; read the result later with get_einvoice_status. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| company_id integer | integer | Company ID. Optional when your account has one company. |
| invoice_id integer required | integer | Invoice ID from list_invoices or create_invoice. |
| dry_run boolean | boolean | true runs the checks without sending to SDI. Default: false. |
Request
curl -X POST https://cotlet.dev/api/v1/fatture-in-cloud/invoices/1/einvoices \
-H "Authorization: Bearer $COTLET_API_KEY" result = client.call("fatture-in-cloud", "send_einvoice", {"invoice_id":1}) const result = await cotlet.call('fatture-in-cloud', 'send_einvoice', {"invoice_id":1}); cotlet call fatture-in-cloud send_einvoice --data '{"invoice_id":1}' Example response
{
"invoice_id": 88120,
"sent": true,
"dry_run": false,
"ei_status": "attempt"
}