Distru icon

Distru

Interact with the Distru API

Overview

This node integrates with the Distru API to retrieve or manipulate data related to various business entities such as users, companies, products, orders, batches, and more. Specifically, the Get User operation fetches user information from the Distru platform.

Typical use cases include:

  • Retrieving detailed user data for reporting or synchronization with other systems.
  • Automating workflows that require user information from Distru.
  • Paginating through large sets of user records using filters like insertion or update datetime.

For example, you might use this node to get a list of all users created after a certain date or to fetch details of a specific user by their ID.

Properties

Name Meaning
Inserted Datetime Filter users by their creation datetime (ISO 8601 format).
Updated Datetime Filter users 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 operation is set to "Get User". They allow filtering and paginating the user data returned by the API.

Output

The output is an array of JSON objects representing user data retrieved from the Distru API. Each item in the output corresponds to one user record and contains all fields returned by the API for that user.

Example structure of each output item:

{
  "json": {
    "id": "user-uuid",
    "name": "User Name",
    "email": "user@example.com",
    "inserted_datetime": "2023-01-01T12:00:00Z",
    "updated_datetime": "2023-06-01T12:00:00Z",
    ...
  }
}

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

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:
    • Production: https://app.distru.com/public/v1
    • Staging: https://staging.distru.com/public/v1
  • No additional external dependencies beyond standard HTTP requests.

Troubleshooting

  • Missing API Token: If the API token is not set in credentials, the node throws an error:
    "Distru API token is not set!"
    Resolution: Configure the node's credentials with a valid Distru API token.

  • Invalid Filters or Pagination Parameters: Providing invalid date formats or non-numeric pagination values may cause API errors.
    Resolution: Ensure date/time inputs follow ISO 8601 format and pagination numbers are positive integers.

  • User Not Found: If a specific user ID is provided but does not exist, the output may be empty or contain an error message.
    Resolution: Verify the user ID is correct and exists in the Distru system.

  • API Connectivity Issues: Network problems or incorrect staging/production settings can cause request failures.
    Resolution: Check network connectivity and verify the staging toggle in credentials matches your environment.

Links and References

Discussion