Tiny ERP Auth2 icon

Tiny ERP Auth2

Interact with Tiny ERP API v3 with OAuth2

Produtos → Get Stock

AI-generated

Overview

This node interacts with the Tiny ERP API v3 using OAuth2 authentication. Specifically, for the "Produtos" resource and the "Get Stock" operation, it retrieves stock information for a specified product by its ID. This is useful in scenarios where you need to monitor inventory levels, automate stock checks, or integrate product availability data into other workflows such as order processing or reporting.

Practical example:
You can use this node to automatically fetch the current stock quantity of a product before creating a sales order, ensuring that orders are only placed for products that are in stock.

Properties

Name Meaning
Product ID ID of the product to get stock for (number)

Output

The output is a JSON object containing the stock information of the specified product. The exact structure depends on the Tiny ERP API response but typically includes fields such as available quantity, reserved stock, warehouse location, or similar stock-related details.

If multiple items are returned (unlikely for a single product ID), they will be output as an array of JSON objects.

No binary data output is indicated.

Dependencies

  • Requires an OAuth2 API credential configured in n8n to authenticate with the Tiny ERP API.
  • The node depends on the Tiny ERP API v3 being accessible and the provided credentials having permission to read product stock data.

Troubleshooting

  • Common issues:

    • Invalid or missing Product ID: Ensure the Product ID is correctly set and corresponds to an existing product.
    • Authentication errors: Verify that the OAuth2 credentials are valid and have not expired.
    • API connectivity problems: Check network access to the Tiny ERP API endpoint.
  • Error messages:

    • Unknown resource: Indicates the resource parameter is invalid; ensure "produtos" is selected.
    • Errors from the API (e.g., 404 Not Found): Usually mean the product does not exist or is inaccessible.
    • If continueOnFail is enabled, errors will be returned in the output JSON under an error field instead of stopping execution.

Links and References

Discussion