Actions28
- Product Actions
- Product Stock Actions
Overview
This node integrates with the Tiny ERP system to manage product-related data. Specifically, the Get Costs operation for the Product resource retrieves cost information associated with a given product. This is useful for businesses that want to track and analyze the historical or current costs of their products within their ERP system.
Typical use cases include:
- Fetching cost history for inventory valuation.
- Analyzing cost trends over specific periods.
- Integrating product cost data into financial reports or dashboards.
For example, a user can specify a product ID and optionally filter costs by date range, limit, and offset to retrieve paginated cost records relevant to that product.
Properties
| Name | Meaning |
|---|---|
| Product ID | The unique identifier of the product for which costs are being retrieved. |
| Cost Filters | A collection of optional filters to refine the cost data returned: |
| Start Date | Start date to filter costs from (inclusive). |
| End Date | End date to filter costs until (inclusive). |
| Limit | Maximum number of cost records to return (minimum 1, default 50). |
| Offset | Number of cost records to skip for pagination (minimum 0, default 0). |
Output
The output JSON contains the cost data retrieved from the Tiny ERP API for the specified product. The structure corresponds directly to the API response for product costs and typically includes details such as cost amounts, dates, and related metadata.
Each item in the output array represents a cost record matching the query parameters.
No binary data is output by this operation.
Dependencies
- Requires an active connection to the Tiny ERP API using OAuth2 authentication.
- The node depends on the
tinyErpApiRequestfunction to make HTTP requests to the Tiny ERP endpoints. - Proper credentials must be configured in n8n to authenticate API calls.
Troubleshooting
Common Issues:
- Invalid or missing Product ID will cause the API request to fail.
- Incorrect date formats in the filters may result in errors or no data returned.
- Exceeding API rate limits or network issues can cause request failures.
Error Messages:
"The operation "getCosts" is not supported!"— indicates the operation was not recognized; ensure the correct operation and resource are selected.- API errors returned from Tiny ERP will be passed through; check the error message for details such as invalid parameters or authentication issues.
Resolutions:
- Verify that the Product ID exists in Tiny ERP.
- Use ISO 8601 format for date-time fields.
- Confirm that the API credentials are valid and have sufficient permissions.
- Adjust limit and offset values to valid ranges.
Links and References
- Tiny ERP API Documentation (Note: link is illustrative, replace with actual if available)
- n8n Documentation on Creating Custom Nodes
- OAuth2 Authentication setup in n8n: OAuth2 Credentials