Distru icon

Distru

Interact with the Distru API

Overview

The node integrates with the Distru API to retrieve or manipulate data related to various business entities such as batches, products, orders, companies, contacts, and more. Specifically, the Get Batch operation fetches batch records from Distru, supporting filtering and pagination.

This node is beneficial in scenarios where you need to automate inventory management, track product batches, or synchronize batch data between Distru and other systems. For example, you could use it to:

  • Retrieve a list of product batches for reporting or auditing.
  • Fetch details of a specific batch by its ID.
  • Paginate through large sets of batch data to process them incrementally.

Properties

Name Meaning
Additional Fields Collection of optional filters and pagination settings:
- Inserted Datetime Filter batches by their creation datetime.
- Updated Datetime Filter batches by their last updated datetime.
- Page Number The page number of results to return (for pagination). Defaults to 1.
- Page Size Number of results per page (for pagination). Defaults to 100.

Output

The output is an array of JSON objects representing batch records retrieved from the Distru API. Each item corresponds to one batch and contains all available batch data fields as returned by the API.

If a specific batch ID is provided, the output will contain only that batch's data. Otherwise, it returns a paginated list of batches matching the filter criteria.

No binary data is produced by this operation.

Dependencies

  • Requires an API token credential for authenticating requests to the Distru API.
  • The base URL used depends on whether staging mode is enabled in credentials:
    • Production: https://app.distru.com/public/v1
    • Staging: https://staging.distru.com/public/v1
  • The node uses HTTP GET requests with Bearer token authorization to interact with the API.

Troubleshooting

  • Missing API Token: If the API token is not set in credentials, the node throws an error "Distru API token is not set!" Ensure the API key is configured correctly.
  • Invalid Batch ID Format: Batch IDs are normalized to UUID format internally. Providing an invalid ID may result in no data returned or errors.
  • Pagination Issues: If too many results are requested at once (page size too large), the API might reject the request or respond slowly. Use reasonable page sizes.
  • API Errors: Network issues or invalid parameters can cause API errors. The node surfaces these errors unless "Continue On Fail" is enabled, in which case errors are returned as JSON error messages.

Links and References


This summary focuses exclusively on the Get Batch operation of the Distru node based on the provided source code and property definitions.

Discussion