Create a draft invoice
sevdesk_create_draft_invoiceCreate a normal invoice (type RE) with its line items, ALWAYS saved as a DRAFT (status 100): it is not sent, not booked and stays editable in sevdesk. contact_person_id is the sevdesk USER responsible for it — copy contactPerson.id from any existing invoice (sevdesk_get_invoice). Bookkeeping 2.0 accounts use tax_rule_id (1 = taxable sales in Germany, the usual choice); 1.0 accounts pass tax_type instead (check sevdesk_get_bookkeeping_system_version). sevdesk: POST /Invoice/Factory/saveInvoice.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| header | No | Invoice header/title line. | |
| address | No | Complete recipient address with line breaks. Omit to leave it empty. | |
| currency | No | ISO-4217 currency code. Default EUR. | EUR |
| show_net | No | If true (default), position prices are net. | |
| tax_text | No | VAT text printed on the invoice. Default 'Umsatzsteuer 19%'. | Umsatzsteuer 19% |
| tax_type | No | Bookkeeping 1.0 only — leave unset on 2.0 accounts. | |
| foot_text | No | Text below the line items (some HTML allowed). | |
| head_text | No | Text above the line items (some HTML allowed). | |
| positions | Yes | Line items (at least one). | |
| contact_id | Yes | The contact (customer)'s numeric id. | |
| tax_rule_id | No | Bookkeeping 2.0 VAT rule id. 1 taxable sales (Umsatzsteuerpflichtige Umsätze), 2 exports, 3 intra-EU supplies, 4 tax-free §4 UStG, 5 reverse charge §13b, 11 small business §19 (Kleinunternehmer), 17 not taxable in Germany, 18-20 One Stop Shop, 21 reverse charge §18b. Default 1. | 1 |
| time_to_pay | No | Payment term in days. | |
| invoice_date | Yes | Invoice date as dd.mm.yyyy. | |
| delivery_date | No | Delivery / service date as dd.mm.yyyy (must not be after invoice_date for a normal invoice). | |
| small_settlement | No | True if the account uses the small-business scheme (no VAT). | |
| contact_person_id | Yes | Id of the sevdesk user (SevUser) acting as contact person — e.g. contactPerson.id of an existing invoice. | |
| address_country_id | No | sevdesk StaticCountry id of the billing address (1 = Germany). Default 1. | |
| customer_internal_note | No | Reference / order number field. |