Actions22
Overview
The node integrates with the Distru API to perform various inventory and business management operations. Specifically, the "Post Stock Adjustment" operation allows users to create a stock adjustment record in Distru. This is useful for scenarios where inventory quantities need to be corrected due to reasons such as waste, theft, damage, or compliance adjustments.
Practical examples include:
- Adjusting inventory after discovering damaged goods.
- Recording stolen or lost items by reducing stock quantity.
- Making compliance-related quantity adjustments required by regulations.
- Updating stock levels after physical inventory counts.
This operation ensures that inventory records remain accurate and compliant with company or state requirements.
Properties
| Name | Meaning |
|---|---|
| Adjustment Reason | The reason for the stock adjustment (varies by state/company). |
| Quantity | The amount to adjust the stock by; can be negative for reductions like waste or theft. |
| Compliance Quantity | Optional compliance-specific quantity if required for this adjustment. |
| Unit Cost | Optional unit cost associated with the adjustment. |
| Description | Optional description providing additional details about the adjustment. |
| Location ID | Optional identifier of the location where the adjustment applies. |
| Batch ID | Optional batch identifier; exactly one of Batch ID, Package ID, or Product ID must be set. |
| Package ID | Optional package identifier; exactly one of Batch ID, Package ID, or Product ID must be set. |
| Product ID | Optional product identifier; exactly one of Batch ID, Package ID, or Product ID must be set. |
| Completion Datetime | The date and time when the adjustment was completed (ISO 8601 format). |
Output
The output is a JSON object representing the created stock adjustment record as returned by the Distru API. It includes all details of the adjustment such as reason, quantity, related batch/package/product, timestamps, and any other metadata provided by the API.
The node does not output binary data.
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.
- No other external dependencies are required.
Troubleshooting
Error: "Distru API token is not set!"
This indicates that the API authentication token is missing or not configured properly in the node credentials. Ensure you have set a valid API token before running the node.Error: "Exactly one of Batch ID, Package ID, or Product ID must be set."
When posting a stock adjustment, you must specify exactly one of these identifiers to indicate what the adjustment applies to. Providing none or more than one will cause this error. Check your input parameters.Network or Authorization Errors
If the API token is invalid or network connectivity issues occur, the request will fail. Verify your token validity and network access.Invalid Date Format
The completion datetime must be in ISO 8601 format. Incorrect formatting may cause errors.
Links and References
- Distru API Documentation (general reference for API endpoints and data models)
- ISO 8601 Date Format (for correct datetime formatting)