KiotViet MCP by usefulapi

v1.18.1
io.usefulapi/kiotviet Checked 2 days ago Published 1 day ago

Read 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.

ParameterTypeDescription
branch_idsarrayOnly these branches (see kiotviet_list_branches).
category_idintegerOnly products in this category (see kiotviet_list_categories).
current_itemintegerRecord offset to start from (0 = first record). Pass the previous reply's next_item.
include_inventorybooleanInclude the stock on hand per branch.
include_pricebookbooleanInclude the price-book prices.
is_activebooleanOnly active (true) or inactive (false) products.
last_modified_fromstringOnly records changed at or after this date-time (shop local time).
namestringFilter by product name.
order_bystringSort field.
order_directionstringSort direction.
page_sizeintegerRecords 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}.

ParameterTypeDescription
product_id *integerKiotViet product id.

kiotviet_get_product_by_code Get product by code

One product by its product code (SKU). GET /products/code/{code}.

ParameterTypeDescription
code *stringKiotViet 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.

ParameterTypeDescription
category_id *integerProduct category (see kiotviet_list_categories).
name *stringProduct name.
allows_salebooleanWhether the product is sold directly.
bar_codestringBarcode, up to 16 characters.
base_pricenumberBase sale price.
codestringProduct code (SKU). Refused if a product already has it.
descriptionstringProduct description.
unitstringUnit, e.g. piece or kg.
weightnumberWeight.

kiotviet_list_categories List categories

List product categories (id, name, parent, whether it has children). Set hierarchical to get the category tree. GET /categories.

ParameterTypeDescription
current_itemintegerRecord offset to start from (0 = first record). Pass the previous reply's next_item.
hierarchicalbooleanReturn the nested tree (ignores last_modified_from).
last_modified_fromstringOnly records changed at or after this date-time (shop local time).
order_bystringSort field.
order_directionstringSort direction.
page_sizeintegerRecords 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}.

ParameterTypeDescription
category_id *integerKiotViet 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.

ParameterTypeDescription
codestringCustomer code.
contact_numberstringFilter by phone number.
current_itemintegerRecord offset to start from (0 = first record). Pass the previous reply's next_item.
group_idintegerOnly customers in this customer group.
include_customer_groupbooleanInclude each customer's groups.
include_totalbooleanInclude financial totals (debt, total invoiced, points).
last_modified_fromstringOnly records changed at or after this date-time (shop local time).
namestringFilter by customer name.
order_bystringSort field.
order_directionstringSort direction.
page_sizeintegerRecords 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}.

ParameterTypeDescription
customer_id *integerKiotViet customer id.

kiotviet_get_customer_by_code Get customer by code

One customer by customer code. GET /customers/code/{code}.

ParameterTypeDescription
code *stringKiotViet 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.

ParameterTypeDescription
name *stringCustomer name.
addressstringStreet address.
birth_datestringDate 2026-10-01 or date-time 2026-10-01T08:00:00 (shop local time).
codestringCustomer code (optional; KiotViet generates one).
commentsstringNote on the customer.
contact_numberstringPhone number.
emailstringEmail address.
group_idsarrayCustomer group ids.
organizationstringCompany name.
tax_codestringTax 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.

ParameterTypeDescription
branch_idsarrayOnly these branches (see kiotviet_list_branches).
current_itemintegerRecord offset to start from (0 = first record). Pass the previous reply's next_item.
customer_codestringOnly invoices of the customer with this code.
customer_idsarrayOnly invoices of these customers.
from_purchase_datestringDate 2026-10-01 or date-time 2026-10-01T08:00:00 (shop local time).
include_paymentbooleanInclude the payments.
last_modified_fromstringOnly records changed at or after this date-time (shop local time).
order_bystringSort field.
order_directionstringSort direction.
order_idintegerOnly the invoice created from this sales order.
page_sizeintegerRecords per page, 1-100 (default 20).
statusarrayKiotViet status code(s) to include.
to_purchase_datestringDate 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}.

ParameterTypeDescription
invoice_id *integerKiotViet invoice id.

kiotviet_get_invoice_by_code Get invoice by code

One invoice by invoice code (for example HD000123). GET /invoices/code/{code}.

ParameterTypeDescription
code *stringKiotViet 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.

ParameterTypeDescription
branch_idsarrayOnly these branches (see kiotviet_list_branches).
created_datestringOnly orders created at or after this date.
current_itemintegerRecord offset to start from (0 = first record). Pass the previous reply's next_item.
customer_codestringOnly orders of the customer with this code.
customer_idsarrayOnly orders of these customers.
include_order_deliverybooleanInclude the delivery details.
include_paymentbooleanInclude the payments.
last_modified_fromstringOnly records changed at or after this date-time (shop local time).
last_modified_tostringOnly 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_bystringSort field.
order_directionstringSort direction.
page_sizeintegerRecords per page, 1-100 (default 20).
sale_channel_idintegerOnly orders from this sales channel.
statusarrayKiotViet 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}.

ParameterTypeDescription
order_id *integerKiotViet 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}.

ParameterTypeDescription
code *stringKiotViet 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.

ParameterTypeDescription
branch_id *integerBranch the order is for (see kiotviet_list_branches).
items *arrayThe order lines.
customer_idintegerExisting customer id (see kiotviet_list_customers).
descriptionstringNote on the order.
discountnumberOrder discount amount.
sale_channel_idintegerSales channel id.
sold_by_idintegerSalesperson 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.

ParameterTypeDescription
current_itemintegerRecord offset to start from (0 = first record). Pass the previous reply's next_item.
page_sizeintegerRecords 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.

ParameterTypeDescription
branch_idsarrayOnly these branches (see kiotviet_list_branches).
current_itemintegerRecord offset to start from (0 = first record). Pass the previous reply's next_item.
last_modified_fromstringOnly records changed at or after this date-time (shop local time).
order_bystringSort field.
order_directionstringSort direction.
page_sizeintegerRecords 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.

ParameterTypeDescription
codestringSupplier code.
contact_numberstringFilter by phone number.
current_itemintegerRecord offset to start from (0 = first record). Pass the previous reply's next_item.
include_totalbooleanInclude financial totals (debt, total invoiced).
last_modified_fromstringOnly records changed at or after this date-time (shop local time).
namestringFilter by supplier name.
order_directionstringSort direction.
page_sizeintegerRecords per page, 1-100 (default 20).

kiotviet_get_supplier Get supplier

One supplier by id. GET /suppliers/{id}.

ParameterTypeDescription
supplier_id *integerKiotViet 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.

ParameterTypeDescription
branch_idsarrayOnly these branches (see kiotviet_list_branches).
current_itemintegerRecord offset to start from (0 = first record). Pass the previous reply's next_item.
from_purchase_datestringDate 2026-10-01 or date-time 2026-10-01T08:00:00 (shop local time).
include_paymentbooleanInclude the payments.
page_sizeintegerRecords per page, 1-100 (default 20).
statusarrayKiotViet status code(s) to include.
to_purchase_datestringDate 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}.

ParameterTypeDescription
purchase_order_id *integerKiotViet 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.

ParameterTypeDescription
branch_idintegerOnly this branch.
code_keystringOrder code.
current_itemintegerRecord offset to start from (0 = first record). Pass the previous reply's next_item.
page_sizeintegerRecords per page, 1-100 (default 20).
product_keystringProduct code or name.
statusintegerKiotViet status code.
supplier_keystringSupplier code, name or phone.

kiotviet_list_returns List returns

List customer returns (code, date, branch, customer, invoice, return total, lines). GET /returns.

ParameterTypeDescription
current_itemintegerRecord offset to start from (0 = first record). Pass the previous reply's next_item.
include_paymentbooleanInclude the payments.
last_modified_fromstringOnly records changed at or after this date-time (shop local time).
order_bystringSort field.
order_directionstringSort direction.
page_sizeintegerRecords per page, 1-100 (default 20).

kiotviet_get_return Get return

One customer return by id with its lines. GET /returns/{id}.

ParameterTypeDescription
return_id *integerKiotViet 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.

ParameterTypeDescription
branch_idsarrayOnly these branches (see kiotviet_list_branches).
codestringVoucher code.
current_itemintegerRecord offset to start from (0 = first record). Pass the previous reply's next_item.
end_datestringDate 2026-10-01 or date-time 2026-10-01T08:00:00 (shop local time).
is_receiptbooleantrue = receipts (money in), false = payments (money out).
page_sizeintegerRecords per page, 1-100 (default 20).
partner_namestringCustomer, supplier or other partner name.
start_datestringDate 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.

ParameterTypeDescription
current_itemintegerRecord offset to start from (0 = first record). Pass the previous reply's next_item.
page_sizeintegerRecords 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.

ParameterTypeDescription
current_itemintegerRecord offset to start from (0 = first record). Pass the previous reply's next_item.
include_branchesbooleanInclude the branches each price book applies to.
include_customer_groupsbooleanInclude the customer groups each price book applies to.
page_sizeintegerRecords 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}.

ParameterTypeDescription
price_book_id *integerKiotViet price book id.
current_itemintegerRecord offset to start from (0 = first record). Pass the previous reply's next_item.
page_sizeintegerRecords per page, 1-100 (default 20).