Actions22
Overview
This node integrates with the Distru API to retrieve and manipulate sales order data along with other related resources. Specifically, for the "Get Sales Order" operation, it fetches sales orders from Distru based on various filter criteria such as order ID, status, date ranges, and pagination options.
Use cases include:
- Retrieving specific sales orders by their unique ID.
- Filtering orders by status (e.g., completed, pending) or by date fields like delivery datetime or order datetime.
- Paginating through large sets of sales orders for reporting or synchronization purposes.
Practical example:
- A user wants to automate fetching all sales orders that are currently "PROCESSING" and were created within a certain date range to update an external system or trigger further workflows.
Properties
| Name | Meaning |
|---|---|
| Delivery Datetime | Filter orders by the delivery datetime (ISO 8601 format, e.g., 2022-07-10T00:00:00Z). |
| Due Datetime | Filter orders by the due datetime (ISO 8601 format). |
| ID | Specific Order ID to retrieve. |
| Inserted Datetime | Filter orders by their creation datetime (ISO 8601 format). |
| Order Datetime | Filter orders by the order datetime (can specify a range, ISO 8601 format). |
| Status | Filter orders by their status. Possible values: CANCELED, COMPLETED, DELIVERED, DELIVERING, PENDING, PROCESSING, READY_TO_SHIP. |
| Updated Datetime | Filter orders by the datetime they were most recently modified (ISO 8601 format). |
| Page Number | The page number of results to return for pagination (default is 1). |
| Page Size | Number of results per page for pagination (default is 100). |
Output
The output is an array of JSON objects representing sales orders retrieved from the Distru API. Each item in the output corresponds to one sales order record with all its associated fields as returned by the API.
The structure of each JSON object matches the Distru sales order schema, including fields such as order ID, company ID, order dates, status, items, charges, notes, and location information.
No binary data is output 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 (
https://app.distru.com/public/v1) or staging (https://staging.distru.com/public/v1) depending on configuration. - Proper network access to Distru's API endpoints is necessary.
Troubleshooting
- Missing API Token: If the API token is not set or invalid, the node will throw an error indicating the token is missing. Ensure the API key credential is configured correctly.
- Invalid Filters: Providing incorrectly formatted date strings or invalid IDs may result in API errors or empty responses. Use ISO 8601 date formats and valid UUIDs where required.
- Pagination Issues: If too many results are requested at once or page numbers exceed available pages, the API may return empty arrays. Adjust
Page NumberandPage Sizeaccordingly. - API Errors: Network issues or API downtime can cause request failures. Check connectivity and Distru service status.
- Unsupported Operation: If an unsupported operation name is used, the node throws an error specifying the operation is not supported.
Links and References
- Distru API Documentation (general reference for API endpoints and data models)
- ISO 8601 Date Format (for correct date/time formatting)
This summary focuses exclusively on the "Get Sales Order" operation of the node as requested.