Tiny ERP icon

Tiny ERP

Interact with Tiny ERP API

Overview

This node integrates with the Tiny ERP system to manage product data, including product variations. Specifically, the Update Variation operation allows users to update details of an existing product variation such as GTIN, stock quantity, price, promotional price, and SKU.

Typical use cases include:

  • Adjusting prices or promotional prices for a specific product variation.
  • Updating stock quantities or SKUs after inventory changes.
  • Correcting or adding GTIN codes for better product identification.

For example, if you have a product with multiple size or color variations, you can use this node to update the price or stock of one particular variation without affecting others.

Properties

Name Meaning
Product ID The unique identifier of the product to which the variation belongs.
Variation ID The unique identifier of the product variation to update.
Variation Data A collection of fields to update on the variation:
- GTIN: Global Trade Item Number for the variation.
- Initial Stock: Starting stock quantity for the variation.
- Price: The selling price of the variation (supports two decimal places).
- Promotional Price: Discounted price for promotions (supports two decimal places).
- SKU: Stock Keeping Unit code for the variation.

Output

The output JSON object confirms the success of the update operation and echoes back the identifiers involved:

{
  "success": true,
  "productId": <number>,
  "variationId": <number>
}
  • success: Boolean indicating if the update was successful.
  • productId: The ID of the product whose variation was updated.
  • variationId: The ID of the updated variation.

No binary data is produced by this operation.

Dependencies

  • Requires an active connection to the Tiny ERP API.
  • Needs an API authentication token configured in n8n credentials (an OAuth2 API key).
  • The node uses the internal helper function to make HTTP requests to Tiny ERP endpoints.

Troubleshooting

  • Common issues:

    • Invalid or missing Product ID or Variation ID will cause errors.
    • Providing unsupported or incorrectly formatted fields in Variation Data may result in API rejections.
    • Network or authentication failures will prevent the update from completing.
  • Error messages:

    • "The operation "updateVariation" is not supported!" — indicates the operation parameter is incorrect or unsupported.
    • API error responses typically include descriptive messages; ensure that all required fields are correctly set.
  • Resolution tips:

    • Verify that the Product ID and Variation ID exist in Tiny ERP before updating.
    • Double-check field types and values, especially numeric precision for prices.
    • Ensure your API credentials are valid and have sufficient permissions.

Links and References

Discussion