Actions28
- Product Actions
- Product Stock Actions
Overview
This node integrates with the Tiny ERP API to manage product stock and variations. Specifically, for the Product Stock resource and the Delete Variation operation, it allows users to delete a specific variation of a product by providing the product ID and the variation ID.
This functionality is useful in scenarios where a product variation (such as a size or color variant) is no longer available or needs to be removed from the inventory system. For example, an e-commerce manager might use this node to automate the removal of discontinued product variations from their catalog.
Properties
| Name | Meaning |
|---|---|
| Product ID | The unique identifier of the product from which a variation will be deleted. |
Note: Although the provided properties JSON only lists productId, the code also requires a variationId property to identify which variation to delete. This is implied by the operation's logic but not included in the user-provided properties snippet.
Output
The output JSON object after deleting a variation contains:
success: A boolean indicating whether the deletion was successful (true).productId: The ID of the product from which the variation was deleted.variationId: The ID of the deleted variation.
Example output:
{
"success": true,
"productId": 123,
"variationId": 456
}
This confirms that the specified variation has been successfully removed.
Dependencies
- Requires an API key credential for authenticating with the Tiny ERP API.
- The node uses the Tiny ERP REST API endpoints to perform operations.
- No additional external dependencies are required beyond the configured API authentication.
Troubleshooting
- Missing or incorrect Product ID or Variation ID: The operation requires both IDs to be valid numbers. Ensure these inputs are correctly set; otherwise, the API call will fail.
- API Authentication Errors: If the API key or OAuth2 credentials are invalid or expired, requests will fail. Verify and refresh credentials as needed.
- Unsupported Operation or Resource: Attempting to use the delete variation operation on unsupported resources or with unsupported operations will throw errors.
- Network or API Downtime: Temporary network issues or API service downtime can cause request failures. Retry after some time or check API status.
Common error messages:
"The operation \"deleteVariation\" is not supported!"— indicates misuse of the operation name or resource.- HTTP errors from the API such as 404 (not found) if the product or variation does not exist.
Links and References
- Tiny ERP API Documentation (general reference for API endpoints)
- n8n documentation on Creating Custom Nodes