Distru icon

Distru

Interact with the Distru Public API v1

Actions35

Companies → Upsert

AI-generated

Overview

This node interacts with the Distru Public API to upsert (create or update) company records. It is useful for automating company data management by either adding new companies or updating existing ones based on the provided company ID. For example, it can be used to synchronize company information from another system or update company details in bulk.

Use Case Examples

  1. Upsert a company by providing its ID and updated fields to modify existing company data.
  2. Create a new company by providing company details without an ID.

Properties

Name Meaning
Additional Fields Optional fields for the company including ID (to update existing company), name, category, legal business name, default email, phone number, website, and owner ID.

Output

JSON

  • json - The JSON output contains the upserted company data returned from the Distru API. If the response is an array, each item is output separately; otherwise, the single company object or a success confirmation is output.

Dependencies

  • Requires an API token credential for the Distru API to authenticate requests.

Troubleshooting

  • Error 'Distru API token is not set' indicates missing or invalid API token credential; ensure the API token is correctly configured in the node credentials.
  • Error 'Resource ID is required' occurs if the operation requires a resource ID but it is not provided; provide the company ID when updating an existing company.
  • Error 'Missing binary data in property' is not applicable for this operation as it does not handle binary data uploads.

Discussion