Actions40
- Article Actions
- Contact Actions
- Country Actions
- Credit Note Actions
- Delivery Note Actions
- Event Subscription Actions
- File Actions
- Invoice Actions
- Order Confirmation Actions
- Payment Actions
- Payment Condition Actions
- Posting Category Actions
- Profile Actions
- Quotation Actions
- Voucher Actions
- Voucherlist Actions
Invoice → Create
AI-generatedSummary
Create a new invoice in Lexware Office with specified JSON data, optionally finalizing it and linking it to a preceding sales voucher.
Inputs
- Finalize — Boolean to determine if the invoice should be finalized ('open' status) immediately; finalized invoices cannot be edited.
- Preceding Sales Voucher ID — Optional ID of a preceding voucher (such as a quotation or order confirmation) to convert into this invoice.
- Invoice Data (JSON) (required) — The complete invoice data as JSON. Must include voucherDate, address (with at least name and countryCode), lineItems (with details like type, name, quantity, unitName, and unitPrice including currency, netAmount, and taxRatePercentage), totalPrice (with currency), taxConditions (must include taxType), and shippingConditions (must include shippingType and shippingDate).
Output shape
A single JSON object representing the created invoice record.
Returns the created invoice data as a JSON object from the Lexware Office API. If 'finalize' is true, the invoice status will be 'open'; otherwise, it will be a draft. Errors may be returned in the error output if creation fails.
Examples
Example 1: Create and finalize an invoice linked to a preceding quotation
Set 'Finalize' to true, provide the precedingSalesVoucherId as the quotation ID, and supply a fully formed invoiceBody JSON including required fields.