Overview
This node integrates with the KiotViet platform to manage product data. It supports various operations such as creating new products, deleting products, retrieving product details by ID or code, listing multiple products, updating existing products, and fetching inventory levels.
The "Lấy Theo Mã" (Get By Code) operation specifically retrieves detailed information about a product using its unique product code. This is useful when you have the product code and want to fetch all associated product details without needing the internal product ID.
Practical examples:
- Fetching product details for display in an external system or dashboard by providing the product code.
- Automating workflows that require validation or enrichment of product data based on product codes.
- Integrating with inventory or sales systems where product codes are primary identifiers.
Properties
| Name | Meaning |
|---|---|
| Mã Sản Phẩm | The unique product code used to identify and retrieve the product from KiotViet. |
Output
The output is a JSON object containing the full product details retrieved from KiotViet by the given product code. This includes fields such as product name, category, pricing, attributes, inventory information, images, and other metadata related to the product.
If the operation succeeds, the output JSON will represent the product's complete data structure as returned by the KiotViet API.
No binary data output is produced by this operation.
Dependencies
- Requires an API key credential for authenticating with the KiotViet API.
- The node depends on the KiotViet API client implemented in the shared module (
KiotVietApiBase). - Proper configuration of the API credentials within n8n is necessary for successful communication.
Troubleshooting
Common issues:
- Invalid or missing product code parameter will cause the API call to fail.
- Network or authentication errors if the API key is incorrect or expired.
- Product not found if the provided product code does not exist in KiotViet.
Error messages:
- Errors returned from the KiotViet API will be propagated, often indicating invalid parameters or authorization failures.
- If the node is set to continue on failure, error messages will be included in the output JSON under an
errorfield.
Resolutions:
- Verify the product code is correct and exists in KiotViet.
- Check API credentials and renew if necessary.
- Ensure network connectivity to KiotViet services.
Links and References
- KiotViet Official Website
- KiotViet API documentation (refer to your KiotViet account or developer portal for access)