Actions28
- Product Actions
- Product Stock Actions
Overview
This node integrates with the Tiny ERP system to manage product-related data, specifically focusing on retrieving cost information for products under the "Product Stock" resource. The "Get Costs" operation fetches detailed cost records associated with a specified product, optionally filtered by date range and pagination parameters.
Typical use cases include:
- Analyzing historical cost data of products for accounting or inventory valuation.
- Integrating cost information into financial reports or dashboards.
- Automating procurement decisions based on cost trends.
For example, a user can input a product ID and specify a date range to retrieve all cost entries within that period, helping them understand how the product's costs have evolved over time.
Properties
| Name | Meaning |
|---|---|
| Product ID | The unique identifier of the product for which to retrieve cost information. |
Additional optional filters (under "Cost Filters") that can be set when using this operation (not listed in the provided properties but available in the node) include:
- Start Date: Filter costs from this date onward.
- End Date: Filter costs up to this date.
- Limit: Maximum number of cost records to return.
- Offset: Number of cost records to skip (for pagination).
Output
The output is a JSON object containing the cost data retrieved from the Tiny ERP API for the specified product. This typically includes an array of cost entries, each detailing cost amounts, dates, and possibly other metadata related to product costs.
The exact structure depends on the API response but generally provides comprehensive cost history for the product.
No binary data output is produced by this operation.
Dependencies
- Requires an active connection to the Tiny ERP API.
- Needs an API authentication credential configured in n8n (an OAuth2 or API key credential).
- The node uses internal helper functions to make HTTP requests to the Tiny ERP endpoints.
Troubleshooting
Common Issues:
- Invalid or missing Product ID: Ensure the Product ID is correct and exists in Tiny ERP.
- Authentication errors: Verify that the API credentials are valid and have sufficient permissions.
- Date filter format errors: Use proper ISO 8601 date-time strings for start and end dates.
- API rate limits: If many requests are made rapidly, the API might throttle calls.
Error Messages:
"The operation "getCosts" is not supported!": This indicates a misconfiguration or unsupported operation; verify the selected resource and operation.- Network or timeout errors: Check network connectivity and API availability.
- Permission denied or unauthorized: Recheck API credentials and scopes.
Links and References
- Tiny ERP Official API Documentation (Note: link is illustrative; please refer to actual Tiny ERP API docs)
- n8n Documentation on Creating Custom Nodes
- General REST API best practices for filtering and pagination
If you need details on other operations or resources, feel free to ask!