Create a draft invoice
lexware_create_draft_invoiceDestructive
WRITE: creates an invoice in Lexware Office as a DRAFT (never finalized, numbered or sent; Lexware assigns the number when the user finalizes it in the app). Address it to an existing customer (contact_id) or a one-time address (name + country_code). Prices are EUR. Returns the new id and lexwareAppUrl to review and finalize it in Lexware Office. POST /v1/invoices (without finalize).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| zip | No | One-time address ZIP code. | |
| city | No | One-time address city. | |
| name | No | One-time recipient name (no contact is created). Required without contact_id. | |
| title | No | Document title (max 25 characters; default from Lexware). | |
| remark | No | Closing remark (max 2000). | |
| street | No | One-time address street and number. | |
| language | No | Document language (default de; en needs the INVOICING_PRO feature). | |
| tax_type | No | Tax type (default net): net, gross, vatfree, intraCommunitySupply, constructionService13b, externalService13b, thirdPartyCountryService, thirdPartyCountryDelivery. | |
| contact_id | No | An existing Lexware contact with the customer role (from lexware_list_contacts). Give this OR name + country_code. | |
| line_items | Yes | 1-300 line items. | |
| supplement | No | One-time address supplement. | |
| country_code | No | ISO 3166 alpha-2 country code, e.g. DE, AT, CH (lexware_list_countries lists the supported codes). | |
| introduction | No | Introduction text (max 2000). | |
| voucher_date | Yes | Invoice date (yyyy-mm-dd). | |
| shipping_date | No | Service/delivery date, or the start of the period (yyyy-mm-dd). | |
| shipping_type | Yes | Leistungs-/Lieferdatum type: service or delivery (needs shipping_date), serviceperiod or deliveryperiod (needs shipping_date and shipping_end_date), none. | |
| tax_type_note | No | Note for a vat-free tax type (Lexware uses the organization's default when omitted). | |
| shipping_end_date | No | End of the service/delivery period (yyyy-mm-dd). | |
| payment_term_label | No | Payment terms text shown on the document. | |
| payment_term_duration | No | Days until payment is due (the organization's or contact's default when omitted). | |
| total_discount_percentage | No | Total discount in percent. |