Overview
This node manages branches ("Chi Nhánh") in the KiotViet system, a retail management platform. It supports creating new branches, retrieving branch details by ID, listing multiple branches with optional filters, updating existing branches, and deleting branches.
Typical use cases include:
- Automating branch creation when expanding retail locations.
- Fetching branch information for reporting or integration with other systems.
- Updating branch details such as address or phone number.
- Removing branches that are no longer active or relevant.
For example, a retailer could use this node to automatically add new store locations from an external database or delete closed stores from their KiotViet account.
Properties
| Name | Meaning |
|---|---|
| ID Chi Nhánh | The unique identifier of the branch. Required for "get", "update", and "delete" operations. |
Output
The node outputs JSON data representing the result of the performed operation:
- For create: Returns the newly created branch object with its details.
- For get: Returns the branch object corresponding to the specified ID.
- For getAll: Returns a list of branch objects, optionally filtered and limited.
- For update: Returns the updated branch object.
- For delete: Returns confirmation of deletion (usually an empty object or status).
No binary data output is produced by this node.
Dependencies
- Requires an API key credential for authenticating with the KiotViet API.
- The node depends on the KiotViet API service being accessible.
- No additional environment variables are explicitly required beyond the API credential.
Troubleshooting
Common issues:
- Invalid or missing branch ID when performing "get", "update", or "delete" operations will cause errors.
- Network or authentication failures with the KiotViet API can prevent successful execution.
- Providing incomplete required fields (e.g., missing name or address on create/update) will result in validation errors.
Error messages:
- Errors returned from the KiotViet API typically include descriptive messages about missing parameters or invalid IDs.
- If the node throws an error about authentication, verify that the API key credential is correctly configured.
- To handle intermittent API errors, enable "Continue On Fail" in the node settings to allow processing of subsequent items.
Links and References
- KiotViet Official API Documentation
- n8n documentation on Creating Custom Nodes