Lexware icon

Lexware

Interact with the Lexware API

Overview

This node integrates with the Lexware API to create invoices programmatically. It is designed for automating invoice generation workflows, such as billing customers after order fulfillment or generating recurring invoices based on dynamic data.

Typical use cases include:

  • Creating detailed invoices with line items, tax, payment, and shipping conditions.
  • Automating invoice creation in accounting or ERP systems.
  • Generating invoices with custom remarks, introductions, and finalization status.

For example, a user can input customer contact IDs, specify multiple line items with quantities and prices, set tax and payment terms, and finalize the invoice immediately upon creation.

Properties

Name Meaning
Title The title of the invoice.
Introduction Introductory text shown on the invoice.
Remark Remark or footer note on the invoice.
Voucher Date The date associated with the invoice voucher.
Contact ID Recipient contact identifier for whom the invoice is issued.
Line Items Collection of invoice line items. Each item includes:
- Type: "Custom" or "Text"
- Name: Item name
- Description: Item description
- Quantity: Number of units
- Unit Name: Unit label (e.g., pcs)
- Unit Price: Currency, net amount, gross amount, tax rate percentage
- Discount %: Discount applied to this item
Total Price Overall price summary including:
- Currency
- Total Net Amount
- Total Gross Amount
- Total Tax Amount
Tax Conditions Tax details specifying:
- Tax Type: "net" or "gross"
- Tax Type Note: Additional notes about tax
Payment Conditions Payment terms including:
- Payment Term Label (e.g., "Net 30")
- Payment Term Duration (days)
- Discount Conditions: Discount percentage and discount range in days
Shipping Conditions Shipping details including:
- Shipping Date
- Shipping End Date
- Shipping Type (e.g., delivery)
xRechnung (JSON) Optional JSON object to override buyer reference for electronic invoicing standards.
Finalize Boolean flag to finalize the invoice upon creation, setting its status to open.

Output

The node outputs an array of JSON objects representing the created invoice(s). Each output item contains the full invoice data as returned by the Lexware API, including identifiers, status, line items, pricing, and metadata.

If the invoice creation supports binary data (e.g., PDF invoice files), it would be included in the binary output field; however, this is not explicitly indicated in the provided code or properties.

Dependencies

  • Requires connection to the Lexware API via an API key credential configured in n8n.
  • The node depends on the Lexware API being accessible and properly authenticated.
  • No additional external dependencies are indicated.

Troubleshooting

  • Common issues:

    • Invalid or missing contact ID may cause invoice creation to fail.
    • Incorrect formatting of line items or missing required fields like quantity or unit price.
    • API authentication errors if the API key credential is invalid or expired.
    • Validation errors if total price or tax conditions do not match expected formats.
  • Error messages:

    • "Unsupported resource" error if the resource parameter is incorrect.
    • API errors returned from Lexware indicating missing or invalid parameters.
  • Resolutions:

    • Verify all required fields are filled correctly.
    • Ensure the API key credential is valid and has necessary permissions.
    • Check that numeric fields like amounts and percentages are within valid ranges.
    • Use the node's error output or logs to identify specific API response errors.

Links and References

Discussion