Overview
This node manages branches ("Chi Nhánh") in the KiotViet system, a retail management platform. It allows users to create new branches, update existing ones, retrieve branch details by ID, list multiple branches with optional filters, and delete branches.
Common scenarios include:
- Adding a new store location to your KiotViet account.
- Updating branch information such as address or phone number.
- Fetching details of a specific branch for reporting or integration.
- Listing all branches or filtering them by status or search terms.
- Removing a branch that is no longer active.
Practical example: A retail chain expanding to new locations can automate adding new branches into KiotViet via this node, keeping their system up-to-date without manual entry.
Properties
| Name | Meaning |
|---|---|
| Thao Tác (operation) | The action to perform on branches. Options: Create (Tạo Mới), Delete (Xóa), Get by ID (Lấy Theo ID), Get Many (Get Many), Update (Cập Nhật). |
| ID Chi Nhánh (branchId) | The unique identifier of the branch. Required for get, update, and delete operations. |
| Tên Chi Nhánh (name) | The name of the branch. Required for create and update operations. |
| ĐịA Chỉ (address) | The physical address of the branch. Required for create and update operations. |
| Trường Bổ Sung (additionalFields) | Optional additional fields for create and update operations, including: - Số Điện Thoại (phoneNumber): Branch phone number - Mã Chi Nhánh (code): Branch code identifier - Ghi Chú (description): Notes about the branch |
| Lấy Toàn Bộ (returnAll) | Boolean option for "getAll" operation to return all results or limit the number returned. |
| Bộ Lọc (filters) | Filters for "getAll" operation, including: - Từ Khóa Tìm Kiếm (searchTerm): Search by branch name or code - Trạng Thái (status): Filter by branch status, options are Active or Inactive |
Output
The node outputs JSON data representing the branch or branches affected by the operation:
- For create and update, it returns the created or updated branch object with its properties.
- For get, it returns the branch object matching the specified ID.
- For getAll, it returns an array of branch objects, optionally filtered and/or limited.
- For delete, it returns confirmation of deletion or related response.
Each output item corresponds to one input item processed. If an error occurs and "Continue On Fail" is enabled, the output will contain an error message object instead.
The node does not output binary data.
Dependencies
- Requires an API key credential for authenticating with the KiotViet API.
- Uses the KiotViet API client implemented in the shared module
KiotVietApi. - No additional environment variables are explicitly required beyond the API credential.
Troubleshooting
- Invalid branch ID errors: Ensure the
branchIdprovided is a valid integer corresponding to an existing branch. - Missing required fields: For create and update operations,
nameandaddressmust be provided; missing these will cause errors. - API authentication failures: Verify that the API key credential is correctly configured and has necessary permissions.
- Rate limits or network issues: Temporary API unavailability may cause errors; retry or check network connectivity.
- Duplicate phone number fields in additionalFields: The property definition contains duplicate entries for phone number; ensure only one phone number is set to avoid confusion.
If the node throws an error and "Continue On Fail" is disabled, execution will stop immediately.
Links and References
- KiotViet Official Website
- KiotViet API Documentation (for detailed API endpoints and data models)