Distru icon

Distru

Interact with the Distru API

Overview

This node integrates with the Distru API to retrieve or manipulate stock adjustment data within an inventory management context. Specifically, the "Get Stock Adjustment" operation fetches stock adjustment records, which represent changes in inventory quantities due to reasons such as waste, theft, or corrections.

Use cases include:

  • Auditing inventory changes by retrieving detailed stock adjustment records.
  • Monitoring compliance and operational adjustments in inventory.
  • Integrating stock adjustment data into workflows for reporting or further processing.

For example, a user might use this node to pull all stock adjustments made within a certain date range or page through large sets of adjustment records for reconciliation purposes.

Properties

Name Meaning
Inserted Datetime Filter stock adjustments by their creation datetime (ISO 8601 format).
Updated Datetime Filter stock adjustments by their last updated datetime (ISO 8601 format).
Page Number The page number of results to return for pagination (default is 1).
Page Size The number of results per page to return for pagination (default is 100).

These properties are provided under the "Additional Fields" collection when the "Get Stock Adjustment" operation is selected. They allow filtering and paginating the retrieved stock adjustment records.

Output

The output is an array of JSON objects representing stock adjustment records fetched from the Distru API. Each item corresponds to one stock adjustment entry and contains fields as returned by the API under the data property.

The structure typically includes details such as:

  • Adjustment reason
  • Quantity adjusted
  • Compliance quantity (if applicable)
  • Unit cost
  • Description
  • Location, batch, package, or product identifiers related to the adjustment
  • Completion datetime

No binary data is output by this operation.

Dependencies

  • Requires an API token credential for authenticating requests to the Distru API.
  • The base URL for API requests depends on whether staging mode is enabled in credentials:
    • Production: https://app.distru.com/public/v1
    • Staging: https://staging.distru.com/public/v1

No additional external dependencies are required beyond the API token.

Troubleshooting

  • Missing API Token: If the API token is not set in the credentials, the node will throw an error indicating that the Distru API token is missing. Ensure the API token is configured correctly in the node's credentials.
  • Invalid Pagination Parameters: Providing invalid values for page number or page size may result in unexpected responses or errors from the API. Use positive integers for these fields.
  • Filtering Issues: Incorrectly formatted datetime filters may cause the API to reject the request or return no results. Use ISO 8601 format for datetime fields.
  • API Errors: Network issues or API downtime can cause request failures. Check connectivity and API status if errors occur.

Links and References

Discussion