Tài liệu
Danh sách API
Toàn bộ endpoint chạy thật trên backend APISuper, base URL http://localhost:3007, xác thực bằng header Authorization: Bearer <api key> hoặc x-api-key. Danh sách trả { data, meta }.
curl http://localhost:3007/v1/products \
-H "Authorization: Bearer sk_live_..."Products
sản phẩmDanh mục sản phẩm đầy đủ: giá, giá sale, tồn kho, ảnh, danh mục, loại, tag.
Product
title, slug, price, salePrice, stock, status
status: 1 = đang bán, 0 = ẩn
Image
url, isPrimary, sortOrder
Tối đa theo nhu cầu, ảnh chính dùng isPrimary
Catalog
categories · types · tagsBa bộ phân loại dùng cho sản phẩm, mỗi workspace tự quản lý.
Category
name, slug
slug tự sinh, unique trong workspace
Type
name, slug
Loại sản phẩm (vật lý, số…)
Tag
name, slug
Gắn nhiều tag cho 1 sản phẩm
Orders
đơn hàngTạo đơn với danh sách sản phẩm; giá lấy từ DB, không tin giá client.
Order
orderCode, status, totalAmount, discount, finalAmount
orderCode tự sinh
Item
productId, quantity, price
price chụp lại tại thời điểm tạo
Coupons & Reviews
mã giảm giá · đánh giáMã giảm giá theo % hoặc số tiền, và kiểm duyệt đánh giá của khách.
Coupon
code, type, value, minOrder, maxDiscount, usageLimit
type: percent | fixed
Review
rating, title, comment, status
status: 1 hiện, 0 ẩn
Bản đầy đủ kèm body mẫu và mã lỗi nằm trong apisuper-be/docs/API-CONTRACT.md. Mọi truy vấn đều lọc theo workspace lấy từ credential — id gửi từ client không dùng để xác định chủ dữ liệu.