Tiny ERP Auth2 icon

Tiny ERP Auth2

Interact with Tiny ERP API v3 with OAuth2

Estoque → Get Stock

AI-generated

Overview

This node integrates with the Tiny ERP API v3 using OAuth2 authentication to perform various operations on different resources within the ERP system. Specifically, for the Estoque (Stock) resource and the Get Stock operation, it retrieves stock information related to a product by its identifier.

Typical use cases include:

  • Fetching current stock levels of a specific product in inventory management workflows.
  • Integrating stock data into other systems or dashboards for real-time inventory tracking.
  • Automating alerts or reorder processes based on stock availability.

For example, you might use this node to get the stock details of a product by providing its Product ID, then use that data downstream to decide whether to trigger a purchase order.

Properties

Name Meaning
Product ID The numeric identifier of the product whose stock information you want to retrieve.

Note: Although there is a generic "ID" property defined for multiple operations, for the Estoque - Get Stock operation specifically, the relevant input is Product ID.

Output

The node outputs JSON data representing the stock information of the specified product. The exact structure depends on the Tiny ERP API response but typically includes fields such as quantity available, reserved stock, warehouse location, and other stock-related metadata.

If multiple items are returned, each will be output as a separate JSON object in the array.

No binary data output is indicated in the source code.

Dependencies

  • Requires an OAuth2 API credential configured in n8n to authenticate with the Tiny ERP API v3.
  • Depends on the external Tiny ERP API service being accessible and the provided credentials having sufficient permissions to read stock data.

Troubleshooting

  • Common issues:

    • Invalid or expired OAuth2 token leading to authentication errors.
    • Providing an incorrect or non-existent Product ID resulting in empty or error responses.
    • Network connectivity problems preventing access to the Tiny ERP API.
  • Error messages:

    • Errors thrown by the node will include messages from the API or internal validation. For example, "Unknown resource" if the resource name is invalid.
    • If continueOnFail is enabled, errors for individual items will be included in the output JSON under an error field instead of stopping execution.
  • Resolutions:

    • Ensure the OAuth2 credentials are correctly set up and refreshed.
    • Verify the Product ID exists in the ERP system.
    • Check network settings and API endpoint accessibility.

Links and References

Discussion