Lexware icon

Lexware

Interact with the Lexware API

Overview

The node integrates with the Lexware API to manage various business resources, including invoices. Specifically, for the Invoices resource and the Create By JSON operation, it allows users to create new invoices by providing invoice data in JSON format. This is useful for automating invoice creation workflows where invoice details are generated or stored as JSON objects, such as from other systems or databases.

Practical examples include:

  • Automatically generating invoices from order management systems by passing line items and pricing details as JSON.
  • Creating invoices with detailed tax, payment, and shipping conditions programmatically.
  • Finalizing invoices immediately upon creation to set their status as open.

Properties

Name Meaning
Total Price A fixed collection specifying currency and amounts related to the invoice total:
- Currency (string, e.g., "EUR")
- Total Net Amount (number)
- Total Gross Amount (number)
- Total Tax Amount (number)
Tax Conditions A fixed collection defining tax-related settings:
- Tax Type (options: "net" or "gross")
- Tax Type Note (string)
Payment Conditions A fixed collection describing payment terms:
- Payment Term Label (string)
- Payment Term Duration (number of days)
- Discount Conditions (nested fixed collection):
  - Discount % (number)
  - Discount Range (days) (number)
Shipping Conditions A fixed collection for shipping details:
- Shipping Date (dateTime)
- Shipping End Date (dateTime)
- Shipping Type (option: "delivery")
xRechnung (JSON) Optional JSON object to override buyer reference information in the invoice.
Finalize Boolean flag indicating whether to finalize the invoice on creation, which sets its status to open.
Line Items JSON JSON array of line item objects representing individual invoice entries (e.g., products or services).

Output

The node outputs an array of JSON objects representing the created invoice(s). Each output item contains the invoice data returned by the Lexware API after creation, including identifiers, status, and all invoice details as accepted or modified by the API.

If the node supports binary data output (not indicated explicitly here), it would typically represent attachments or documents related to the invoice, but this operation focuses on JSON data input/output.

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 beyond the Lexware API and standard n8n environment.

Troubleshooting

  • Common Issues:

    • Invalid JSON format in the "Line Items JSON" or "xRechnung (JSON)" fields can cause errors.
    • Missing required fields in the JSON payload may result in API validation errors.
    • Incorrect or missing API credentials will prevent successful communication with the Lexware API.
    • Setting incompatible combinations of tax, payment, or shipping conditions might lead to API rejection.
  • Error Messages:

    • "Unsupported resource" — indicates the selected resource is not recognized; ensure "invoices" is selected.
    • API errors related to invalid data will usually return descriptive messages; verify JSON structure and required fields.
    • Authentication errors suggest checking the API key credential configuration.
  • Resolution Tips:

    • Validate JSON inputs using online tools before use.
    • Double-check all required properties are provided.
    • Confirm API credentials and network connectivity.
    • Review Lexware API documentation for correct field usage.

Links and References

Discussion