Actions22
Overview
This node integrates with the Distru API to retrieve invoice data. Specifically, the "Get Invoice" operation allows users to fetch invoices from their Distru account based on various filtering criteria such as invoice ID, due date, status, and pagination options. This is useful for automating workflows that require invoice data retrieval, such as financial reporting, payment processing, or syncing invoice information with other systems.
Practical examples include:
- Fetching all unpaid invoices due within a certain date range.
- Retrieving a specific invoice by its unique ID.
- Paginating through large sets of invoices to process them in batches.
Properties
| Name | Meaning |
|---|---|
| ID | Filter invoices by a specific invoice ID. |
| Due Datetime | Filter invoices by their due date/time. |
| Inserted Datetime | Filter invoices by their creation date/time. |
| Invoice Datetime | Filter invoices by the invoice date/time. |
| Invoice Number | Filter invoices where the invoice number contains the given string. |
| Order IDs | Filter invoices associated with one or more order IDs. |
| Status | Filter invoices by their payment status. Options: Not Paid, Over Paid, Fully Paid, Partially Paid. |
| Updated Datetime | Filter invoices by the last modified date/time. |
| Page Number | Specify which page of results to return (for pagination). |
| Page Size | Specify the number of results per page (for pagination). |
Output
The output is an array of JSON objects representing invoices retrieved from the Distru API. Each item corresponds to one invoice record containing all relevant invoice fields as returned by the API.
If a specific invoice ID is provided, the output will be a single invoice object; otherwise, it may be multiple invoices depending on filters and pagination.
No binary data is output by this node.
Dependencies
- Requires an API token credential for authenticating requests to the Distru API.
- The node supports switching between production and staging API endpoints based on configuration.
- No additional external dependencies are required beyond network access to the Distru API.
Troubleshooting
- Missing API Token: If the API token is not set in credentials, the node will throw an error "Distru API token is not set!" Ensure the API key credential is configured properly.
- Invalid Filters: Providing invalid filter values (e.g., malformed dates or IDs) may result in API errors or empty results.
- Pagination Issues: If too many results are requested without proper pagination, the API might limit responses or cause performance issues.
- API Errors: Network issues or API downtime can cause request failures. Check connectivity and API status.
- Operation Not Supported: If an unsupported operation name is used, the node throws an error indicating the operation is not supported.
To resolve errors:
- Verify API token validity and permissions.
- Double-check filter input formats.
- Use pagination parameters to manage large datasets.
- Enable "Continue On Fail" in the node settings to handle errors gracefully during batch processing.
Links and References
- Distru API Documentation (general reference for API endpoints and data structures)
- n8n Documentation on Creating Custom Nodes