Distru icon

Distru

Interact with the Distru API

Overview

The node interacts with the Distru API to retrieve inventory data grouped by specified attributes. It is useful for businesses that need to monitor and analyze their product inventory across different locations or batches. For example, a retail company can use this node to get an overview of stock levels grouped by product and location, helping optimize restocking and distribution.

This operation supports filtering by product IDs and updated datetime, as well as pagination controls to manage large datasets.

Properties

Name Meaning
Group By Attributes to group inventory by. Options: Product, Location, Batch Number. Product is required.
Product IDs Filter inventory results by one or more product IDs (UUID strings).
Updated Datetime Filter inventory records updated since this datetime (ISO 8601 format).
Page Number The page number of results to return (for pagination).
Page Size Number of results per page (for pagination).

Output

The output is an array of JSON objects representing inventory data grouped according to the selected attributes. Each item in the output corresponds to an inventory record or group, containing fields such as product details, location, batch number, quantities, and other relevant inventory information as returned by the Distru API.

No binary data output is produced by this operation.

Dependencies

  • Requires an API token credential for authenticating requests to the Distru API.
  • The node uses the Distru public API endpoint, either production or staging based on configuration.
  • No additional external dependencies are needed beyond standard HTTP request capabilities provided by n8n.

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 Product IDs: Providing invalid or malformed product IDs may result in empty or error responses from the API.
  • Pagination Issues: Requesting pages beyond available data will return empty results; adjust page number accordingly.
  • Grouping Requirements: The "Product" attribute must be included in the grouping options; omitting it may cause unexpected behavior or errors.
  • API Errors: Network issues or API downtime will cause request failures. Check connectivity and API status.

Links and References

Discussion