KiotViet MCP by usefulapi
v1.18.1Read KiotViet products, customers, invoices, orders and stock; create customers and orders.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
kiotviet_list_products List products
List products (code, barcode, name, category, base price, units, attributes). Optionally include stock per branch (include_inventory) and price-book prices. Filter by name, category, branch, active flag or last change. GET /products.
| Parameter | Type | Description |
|---|---|---|
branch_ids | array | Only these branches (see kiotviet_list_branches). |
category_id | integer | Only products in this category (see kiotviet_list_categories). |
current_item | integer | Record offset to start from (0 = first record). Pass the previous reply's next_item. |
include_inventory | boolean | Include the stock on hand per branch. |
include_pricebook | boolean | Include the price-book prices. |
is_active | boolean | Only active (true) or inactive (false) products. |
last_modified_from | string | Only records changed at or after this date-time (shop local time). |
name | string | Filter by product name. |
order_by | string | Sort field. |
order_direction | string | Sort direction. |
page_size | integer | Records per page, 1-100 (default 10). Pass next_item to continue. |
kiotviet_get_product Get product
One product by id: code, barcode, name, category, base price, units, attributes, images, stock per branch and price books. GET /products/{id}.
| Parameter | Type | Description |
|---|---|---|
product_id * | integer | KiotViet product id. |
kiotviet_get_product_by_code Get product by code
One product by its product code (SKU). GET /products/code/{code}.
| Parameter | Type | Description |
|---|---|---|
code * | string | KiotViet product code. |
kiotviet_create_product Create product
WRITE: create a product in the shop (name and category required). A code that already exists is refused. Always check the fields with the user first, and look the product up by code before creating it. POST /products.
| Parameter | Type | Description |
|---|---|---|
category_id * | integer | Product category (see kiotviet_list_categories). |
name * | string | Product name. |
allows_sale | boolean | Whether the product is sold directly. |
bar_code | string | Barcode, up to 16 characters. |
base_price | number | Base sale price. |
code | string | Product code (SKU). Refused if a product already has it. |
description | string | Product description. |
unit | string | Unit, e.g. piece or kg. |
weight | number | Weight. |
kiotviet_list_categories List categories
List product categories (id, name, parent, whether it has children). Set hierarchical to get the category tree. GET /categories.
| Parameter | Type | Description |
|---|---|---|
current_item | integer | Record offset to start from (0 = first record). Pass the previous reply's next_item. |
hierarchical | boolean | Return the nested tree (ignores last_modified_from). |
last_modified_from | string | Only records changed at or after this date-time (shop local time). |
order_by | string | Sort field. |
order_direction | string | Sort direction. |
page_size | integer | Records per page, 1-100 (default 10). Pass next_item to continue. |
kiotviet_get_category Get category
One product category by id (name, parent, children). GET /categories/{id}.
| Parameter | Type | Description |
|---|---|---|
category_id * | integer | KiotViet category id. |
kiotviet_list_customers List customers
List customers (code, name, phone, email, address, debt, total invoiced, reward points, groups). Contains personal data of the shop's customers. Filter by code, name, phone, group or last change. GET /customers.
| Parameter | Type | Description |
|---|---|---|
code | string | Customer code. |
contact_number | string | Filter by phone number. |
current_item | integer | Record offset to start from (0 = first record). Pass the previous reply's next_item. |
group_id | integer | Only customers in this customer group. |
include_customer_group | boolean | Include each customer's groups. |
include_total | boolean | Include financial totals (debt, total invoiced, points). |
last_modified_from | string | Only records changed at or after this date-time (shop local time). |
name | string | Filter by customer name. |
order_by | string | Sort field. |
order_direction | string | Sort direction. |
page_size | integer | Records per page, 1-100 (default 20). |
kiotviet_get_customer Get customer
One customer by id: contact data, debt, total invoiced, reward points, groups. GET /customers/{id}.
| Parameter | Type | Description |
|---|---|---|
customer_id * | integer | KiotViet customer id. |
kiotviet_get_customer_by_code Get customer by code
One customer by customer code. GET /customers/code/{code}.
| Parameter | Type | Description |
|---|---|---|
code * | string | KiotViet customer code. |
kiotviet_create_customer Create customer
WRITE: create a new customer in the shop (name required; code is generated by KiotViet if omitted). Always check with the user first, and look the customer up by phone before creating a duplicate. POST /customers.
| Parameter | Type | Description |
|---|---|---|
name * | string | Customer name. |
address | string | Street address. |
birth_date | string | Date 2026-10-01 or date-time 2026-10-01T08:00:00 (shop local time). |
code | string | Customer code (optional; KiotViet generates one). |
comments | string | Note on the customer. |
contact_number | string | Phone number. |
email | string | Email address. |
group_ids | array | Customer group ids. |
organization | string | Company name. |
tax_code | string | Tax code (ma so thue). |
kiotviet_list_invoices List invoices
List sales invoices (code, date, branch, customer, total, amount paid, status, lines). Filter by branch, customer, status, order, purchase-date range or last change. GET /invoices.
| Parameter | Type | Description |
|---|---|---|
branch_ids | array | Only these branches (see kiotviet_list_branches). |
current_item | integer | Record offset to start from (0 = first record). Pass the previous reply's next_item. |
customer_code | string | Only invoices of the customer with this code. |
customer_ids | array | Only invoices of these customers. |
from_purchase_date | string | Date 2026-10-01 or date-time 2026-10-01T08:00:00 (shop local time). |
include_payment | boolean | Include the payments. |
last_modified_from | string | Only records changed at or after this date-time (shop local time). |
order_by | string | Sort field. |
order_direction | string | Sort direction. |
order_id | integer | Only the invoice created from this sales order. |
page_size | integer | Records per page, 1-100 (default 20). |
status | array | KiotViet status code(s) to include. |
to_purchase_date | string | Date 2026-10-01 or date-time 2026-10-01T08:00:00 (shop local time). |
kiotviet_get_invoice Get invoice
One invoice by id with its lines, payments and delivery. GET /invoices/{id}.
| Parameter | Type | Description |
|---|---|---|
invoice_id * | integer | KiotViet invoice id. |
kiotviet_get_invoice_by_code Get invoice by code
One invoice by invoice code (for example HD000123). GET /invoices/code/{code}.
| Parameter | Type | Description |
|---|---|---|
code * | string | KiotViet invoice code. |
kiotviet_list_orders List sales orders
List sales orders (code, date, branch, customer, total, status, lines, delivery). Filter by branch, customer, status, creation date (from) or last change (from/to). GET /orders.
| Parameter | Type | Description |
|---|---|---|
branch_ids | array | Only these branches (see kiotviet_list_branches). |
created_date | string | Only orders created at or after this date. |
current_item | integer | Record offset to start from (0 = first record). Pass the previous reply's next_item. |
customer_code | string | Only orders of the customer with this code. |
customer_ids | array | Only orders of these customers. |
include_order_delivery | boolean | Include the delivery details. |
include_payment | boolean | Include the payments. |
last_modified_from | string | Only records changed at or after this date-time (shop local time). |
last_modified_to | string | Only orders last changed up to this date-time (KiotViet toDate is a bound on the modification time, not the creation time). Use with last_modified_from. |
order_by | string | Sort field. |
order_direction | string | Sort direction. |
page_size | integer | Records per page, 1-100 (default 20). |
sale_channel_id | integer | Only orders from this sales channel. |
status | array | KiotViet status code(s) to include. |
kiotviet_get_order Get sales order
One sales order by id with its lines, payments and delivery. GET /orders/{id}.
| Parameter | Type | Description |
|---|---|---|
order_id * | integer | KiotViet order id. |
kiotviet_get_order_by_code Get sales order by code
One sales order by order code (for example DH000123). GET /orders/code/{code}.
| Parameter | Type | Description |
|---|---|---|
code * | string | KiotViet order code. |
kiotviet_create_order Create sales order
WRITE: create a sales order (an order, not an invoice: no invoice is made and no payment is recorded) with lines of existing products in a branch, for an existing customer or none. Always confirm the products, quantities and prices with the user first. POST /orders.
| Parameter | Type | Description |
|---|---|---|
branch_id * | integer | Branch the order is for (see kiotviet_list_branches). |
items * | array | The order lines. |
customer_id | integer | Existing customer id (see kiotviet_list_customers). |
description | string | Note on the order. |
discount | number | Order discount amount. |
sale_channel_id | integer | Sales channel id. |
sold_by_id | integer | Salesperson user id (see kiotviet_list_users). |
kiotviet_list_branches List branches
List the shop's branches (id, name, code, phone, address). Use the ids to filter other tools. GET /branches.
| Parameter | Type | Description |
|---|---|---|
current_item | integer | Record offset to start from (0 = first record). Pass the previous reply's next_item. |
page_size | integer | Records per page, 1-100 (default 20). |
kiotviet_list_stock List stock on hand
Stock on hand and reserved quantity per product and branch. Filter by branch or last change. GET /productOnHands.
| Parameter | Type | Description |
|---|---|---|
branch_ids | array | Only these branches (see kiotviet_list_branches). |
current_item | integer | Record offset to start from (0 = first record). Pass the previous reply's next_item. |
last_modified_from | string | Only records changed at or after this date-time (shop local time). |
order_by | string | Sort field. |
order_direction | string | Sort direction. |
page_size | integer | Records per page, 1-100 (default 20). |
kiotviet_list_suppliers List suppliers
List suppliers (code, name, phone, email, address, debt, total invoiced). Filter by code, name, phone or last change. GET /suppliers.
| Parameter | Type | Description |
|---|---|---|
code | string | Supplier code. |
contact_number | string | Filter by phone number. |
current_item | integer | Record offset to start from (0 = first record). Pass the previous reply's next_item. |
include_total | boolean | Include financial totals (debt, total invoiced). |
last_modified_from | string | Only records changed at or after this date-time (shop local time). |
name | string | Filter by supplier name. |
order_direction | string | Sort direction. |
page_size | integer | Records per page, 1-100 (default 20). |
kiotviet_get_supplier Get supplier
One supplier by id. GET /suppliers/{id}.
| Parameter | Type | Description |
|---|---|---|
supplier_id * | integer | KiotViet supplier id. |
kiotviet_list_purchase_orders List goods receipts
List goods receipts from suppliers (nhap hang: code, date, branch, supplier, total, lines). Filter by branch, status or purchase-date range. GET /purchaseorders.
| Parameter | Type | Description |
|---|---|---|
branch_ids | array | Only these branches (see kiotviet_list_branches). |
current_item | integer | Record offset to start from (0 = first record). Pass the previous reply's next_item. |
from_purchase_date | string | Date 2026-10-01 or date-time 2026-10-01T08:00:00 (shop local time). |
include_payment | boolean | Include the payments. |
page_size | integer | Records per page, 1-100 (default 20). |
status | array | KiotViet status code(s) to include. |
to_purchase_date | string | Date 2026-10-01 or date-time 2026-10-01T08:00:00 (shop local time). |
kiotviet_get_purchase_order Get goods receipt
One goods receipt (nhap hang) by id with its lines. GET /purchaseorders/{id}.
| Parameter | Type | Description |
|---|---|---|
purchase_order_id * | integer | KiotViet goods receipt id. |
kiotviet_list_supplier_orders List supplier orders
List orders placed with suppliers (dat hang nhap: code, date, branch, supplier, status, lines, amount paid). Filter by branch, status, supplier or product text. GET /ordersuppliers.
| Parameter | Type | Description |
|---|---|---|
branch_id | integer | Only this branch. |
code_key | string | Order code. |
current_item | integer | Record offset to start from (0 = first record). Pass the previous reply's next_item. |
page_size | integer | Records per page, 1-100 (default 20). |
product_key | string | Product code or name. |
status | integer | KiotViet status code. |
supplier_key | string | Supplier code, name or phone. |
kiotviet_list_returns List returns
List customer returns (code, date, branch, customer, invoice, return total, lines). GET /returns.
| Parameter | Type | Description |
|---|---|---|
current_item | integer | Record offset to start from (0 = first record). Pass the previous reply's next_item. |
include_payment | boolean | Include the payments. |
last_modified_from | string | Only records changed at or after this date-time (shop local time). |
order_by | string | Sort field. |
order_direction | string | Sort direction. |
page_size | integer | Records per page, 1-100 (default 20). |
kiotviet_get_return Get return
One customer return by id with its lines. GET /returns/{id}.
| Parameter | Type | Description |
|---|---|---|
return_id * | integer | KiotViet return id. |
kiotviet_list_cashflow List cash flow
List cash-book entries (receipts and payments: code, branch, method, partner, amount, date, status). Filter by branch, direction or date range. GET /cashflow.
| Parameter | Type | Description |
|---|---|---|
branch_ids | array | Only these branches (see kiotviet_list_branches). |
code | string | Voucher code. |
current_item | integer | Record offset to start from (0 = first record). Pass the previous reply's next_item. |
end_date | string | Date 2026-10-01 or date-time 2026-10-01T08:00:00 (shop local time). |
is_receipt | boolean | true = receipts (money in), false = payments (money out). |
page_size | integer | Records per page, 1-100 (default 20). |
partner_name | string | Customer, supplier or other partner name. |
start_date | string | Date 2026-10-01 or date-time 2026-10-01T08:00:00 (shop local time). |
kiotviet_list_users List users
List the shop's staff users (id, username, name, phone, email). GET /users.
| Parameter | Type | Description |
|---|---|---|
current_item | integer | Record offset to start from (0 = first record). Pass the previous reply's next_item. |
page_size | integer | Records per page, 1-100 (default 20). |
kiotviet_list_price_books List price books
List price books (bang gia: name, active flag, validity dates, branches, customer groups). GET /pricebooks.
| Parameter | Type | Description |
|---|---|---|
current_item | integer | Record offset to start from (0 = first record). Pass the previous reply's next_item. |
include_branches | boolean | Include the branches each price book applies to. |
include_customer_groups | boolean | Include the customer groups each price book applies to. |
page_size | integer | Records per page, 1-100 (default 20). |
kiotviet_get_price_book Get price book prices
The product prices of one price book (product id, code, price), paged. GET /pricebooks/{id}.
| Parameter | Type | Description |
|---|---|---|
price_book_id * | integer | KiotViet price book id. |
current_item | integer | Record offset to start from (0 = first record). Pass the previous reply's next_item. |
page_size | integer | Records per page, 1-100 (default 20). |