Actions22
Overview
This node integrates with the Distru API to retrieve or manipulate various business-related data entities such as companies, products, orders, contacts, batches, assemblies, inventory, invoices, locations, packages, purchases, stock adjustments, strains, and users. Specifically, the Get Location operation fetches location data from Distru, supporting filtering and pagination.
Typical use cases include:
- Automating retrieval of location information for inventory management or order processing.
- Synchronizing location data between Distru and other systems.
- Filtering locations by creation or update timestamps.
- Paginating through large sets of location records.
Example: Fetch all locations updated after a certain date, 100 per page, to keep an external database in sync.
Properties
| Name | Meaning |
|---|---|
| Inserted Datetime | Filter locations created on or after this datetime (ISO 8601 format). |
| Updated Datetime | Filter locations updated on or after this datetime (ISO 8601 format). |
| Page Number | The page number of results to return (for paginated responses). Defaults to 1. |
| Page Size | Number of results per page (pagination size). Defaults to 100. |
These properties are provided under the "Additional Fields" collection when the operation is Get Location.
Output
The output is an array of JSON objects representing location records retrieved from the Distru API.
- Each item in the output corresponds to one location entity.
- The structure of each location object matches the Distru API's location data schema.
- If a specific location ID was requested, the output contains only that location.
- Pagination parameters control how many locations are returned per request.
No binary data is produced 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:
- Production:
https://app.distru.com/public/v1 - Staging:
https://staging.distru.com/public/v1
- Production:
- No additional environment variables are required beyond the API token credential.
Troubleshooting
- Missing API Token Error: If the API token is not set in credentials, the node throws an error
"Distru API token is not set!". Ensure the API key credential is configured properly. - Invalid Date Filters: Providing incorrectly formatted dates for inserted or updated datetime filters may cause API errors or no results. Use ISO 8601 format.
- Pagination Issues: Requesting pages beyond available data will return empty arrays. Adjust page number and size accordingly.
- Network or Authorization Errors: Standard HTTP errors from the Distru API (e.g., 401 Unauthorized) indicate issues with the API token or network connectivity.
Links and References
- Distru API Documentation — Official API reference for understanding location data and other endpoints.
- ISO 8601 Date Format — Recommended format for datetime fields used in filters.
This summary covers the logic and usage of the Get Location operation within the Distru node based on static code analysis and provided property definitions.