mittwald icon

mittwald

Interact with mittwald mStudio API

Actions409

Overview

This node interacts with the mittwald mStudio API to list customer invoices related to contracts. It is designed to retrieve detailed invoice data filtered by various criteria such as customer ID, invoice types, status, search terms, pagination, and sorting preferences.

Common scenarios where this node is beneficial include:

  • Fetching all invoices for a specific customer to generate reports or perform audits.
  • Filtering invoices by type (e.g., regular or correction) and payment status (e.g., paid or overpaid).
  • Implementing pagination and sorting to manage large datasets efficiently.
  • Searching invoices by keywords or invoice numbers.

Practical example: A finance team could use this node to automatically pull all paid and overpaid invoices of a particular customer, sorted by invoice number in descending order, to reconcile payments or prepare statements.

Properties

Name Meaning
Customer Id The unique identifier of the customer whose invoices are to be listed. (Required)
Invoice Types Types of invoices to include in the results. Options: REGULAR, CORRECTION
Status Payment status filter for invoices. Options: PAID, OVERPAID
Search Search term to filter invoices, e.g., invoice number or keyword like "RG5457"
Limit Maximum number of invoices to return in one response (default 1000)
Skip Number of items to skip for pagination; should be a multiple of limit
Page Page number to display; functions similarly to skip. If both set, skip takes precedence
Sort List of fields to sort the results by, e.g., ["invoiceNumber"]
Order Sorting order corresponding to each field in Sort. Options: asc (ascending), desc (descending)

Output

The node outputs JSON data containing a list of invoices matching the specified filters. Each invoice object typically includes details such as invoice number, type, status, amounts, dates, and other relevant metadata provided by the mittwald mStudio API.

If binary data were involved (e.g., PDF invoice files), it would be summarized here, but based on the code and properties, the output is purely JSON structured invoice data.

Dependencies

  • Requires an API key credential for authenticating with the mittwald mStudio API.
  • The node uses the base URL https://api.mittwald.de to send requests.
  • No additional external dependencies beyond the API and n8n's HTTP request capabilities.

Troubleshooting

  • Invalid Customer Id: If the customer ID is missing or incorrect, the API will likely return an error or empty result. Ensure the customer ID is valid and correctly formatted.
  • API Authentication Errors: Missing or invalid API credentials will cause authentication failures. Verify that the API key credential is properly configured in n8n.
  • Pagination Issues: Setting skip to a value not multiple of limit may cause unexpected behavior. Use multiples of limit for skip.
  • Empty Results: If no invoices match the filters, the output will be empty. Try broadening search criteria or checking the invoice types and statuses.
  • Sorting Errors: Incorrect field names in Sort or mismatched Order array lengths might cause API errors or ignored sorting parameters.

Links and References

Discussion