Create invoice draft
Create an invoice as a draft with its positions. Nothing is sent and the invoice number is not final.
POST https://cotlet.dev/api/v1/sevdesk/contacts/{contact_id}/invoice-drafts
Creates a draft invoice for a contact with one or more positions, like the invoice mask before you finish it. Positions are net or gross as you choose with price_mode. The draft is not sent and not booked, and its number is only provisional: sevdesk fixes it when the invoice is finished with send_invoice. create_invoice_draft runs without asking first because it reaches nobody; send_invoice is the step that does.
Parameters
| Name | Type | Description |
|---|---|---|
| contact_id string required | string | Customer ID from list_contacts or create_contact. |
| positions array required | array | Lines of {name, quantity, unit, unit_price, tax_rate, description}. unit_price is net or gross as set by price_mode. |
| price_mode enum | enum | net or gross (Netto or Brutto). Default: net. |
| invoice_date date | date | Invoice date. Default: today. |
| subject string | string | Subject line of the invoice. |
| e_invoice boolean | boolean | Switch on the E-Rechnung toggle. The contact needs an email address and your VAT ID must be set in sevdesk. Default: false. |
| customer_reference string | string | Kundenreferenz or Leitweg-ID, for public clients. |
Request
curl -X POST https://cotlet.dev/api/v1/sevdesk/contacts/3084417/invoice-drafts \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"positions":[{"name":"Website relaunch, phase 2","quantity":1,"unit":"piece","unit_price":1200,"tax_rate":19},{"name":"Workshop day","quantity":3,"unit":"day","unit_price":150,"tax_rate":19}],"price_mode":"net","subject":"Invoice website relaunch phase 2","e_invoice":true}' result = client.call("sevdesk", "create_invoice_draft", {"contact_id":"3084417","positions":[{"name":"Website relaunch, phase 2","quantity":1,"unit":"piece","unit_price":1200,"tax_rate":19},{"name":"Workshop day","quantity":3,"unit":"day","unit_price":150,"tax_rate":19}],"price_mode":"net","subject":"Invoice website relaunch phase 2","e_invoice":True}) const result = await cotlet.call('sevdesk', 'create_invoice_draft', {"contact_id":"3084417","positions":[{"name":"Website relaunch, phase 2","quantity":1,"unit":"piece","unit_price":1200,"tax_rate":19},{"name":"Workshop day","quantity":3,"unit":"day","unit_price":150,"tax_rate":19}],"price_mode":"net","subject":"Invoice website relaunch phase 2","e_invoice":true}); cotlet call sevdesk create_invoice_draft --data '{"contact_id":"3084417","positions":[{"name":"Website relaunch, phase 2","quantity":1,"unit":"piece","unit_price":1200,"tax_rate":19},{"name":"Workshop day","quantity":3,"unit":"day","unit_price":150,"tax_rate":19}],"price_mode":"net","subject":"Invoice website relaunch phase 2","e_invoice":true}' Example response
{
"invoice_id": "41873190",
"invoice_number": "RE-1043",
"number_final": false,
"status": "draft",
"contact": {
"contact_id": "3084417",
"name": "Nordlicht Studio"
},
"invoice_date": "2026-10-14",
"e_invoice": true,
"positions": 2,
"total_net": 1650,
"total_tax": 313.5,
"total_gross": 1963.5,
"currency": "EUR"
}