Tiny ERP icon

Tiny ERP

Interact with Tiny ERP API

Overview

This node integrates with the Tiny ERP system to manage product stock levels. Specifically, the "Product Stock" resource with the "Update Stock" operation allows users to update the quantity of a specific product in a particular deposit (warehouse or storage location). This is useful for businesses that need to keep their inventory synchronized between Tiny ERP and other systems or workflows.

Typical use cases include:

  • Automatically adjusting stock quantities after sales or returns.
  • Synchronizing stock levels from external inventory management systems.
  • Updating stock when new shipments arrive at specific deposits.

For example, if a warehouse receives 100 units of a product, this node can update the stock quantity for that product in the corresponding deposit within Tiny ERP.

Properties

Name Meaning
Product ID The unique identifier of the product whose stock is being updated.
Deposit ID The unique identifier of the deposit (warehouse/storage location) where stock is updated.
Quantity The new quantity of the product in stock at the specified deposit.

Output

The node outputs a JSON object representing the response from the Tiny ERP API after updating the stock. This typically includes confirmation details about the updated stock entry.

The output structure contains at least the following:

  • json: The API response confirming the stock update, which may include updated stock details.
  • pairedItem: Metadata linking the output to the input item index.

No binary data is produced by this operation.

Dependencies

  • Requires an active connection to the Tiny ERP API using OAuth2 authentication.
  • The node depends on the tinyOAuth2Api credential configured in n8n to authenticate requests.
  • Network access to the Tiny ERP API endpoint is necessary.

Troubleshooting

  • Common issues:

    • Incorrect or missing Product ID or Deposit ID will cause the API request to fail.
    • Insufficient permissions or invalid API credentials will result in authentication errors.
    • Providing a negative or invalid quantity might be rejected by the API.
  • Error messages:

    • "The operation "updateStock" is not supported for resource "produto_estoque"!" indicates a misconfiguration or unsupported operation/resource combination.
    • API errors returned from Tiny ERP will be passed through; check the error message for details such as invalid IDs or permission issues.
  • Resolution tips:

    • Verify that the Product ID and Deposit ID exist and are correct.
    • Ensure the API credentials have sufficient rights to update stock.
    • Confirm the quantity is a valid non-negative number.

Links and References

Discussion