nhanh.v3.0.product.category
POST/v3.0/product/categoryVia 360: POST https://partner.quantri360.com/v1/nhanh/v3.0/product/category
Coming soon. This API already runs in production through 360 and pricing is being finalised — you can read the docs and prepare your integration now.
Description
Danh mục sản phẩm của doanh nghiệp trên Nhanh (cây cha – con theo parentId) — dùng để hiển thị tên danh mục cho categoryId của sản phẩm và gom báo cáo theo nhóm hàng.
- Phản hồi chỉ có id, parentId, code, name, order, status — không kèm ảnh / nội dung danh mục.
- Danh mục ít đổi — lấy toàn bộ một lần, lưu lại và dựng cây theo parentId.
Request
Endpoint
POST https://partner.quantri360.com/v1/nhanh/v3.0/product/category
Authentication & shop
| Name | In | Type | Sample | Description |
|---|---|---|---|---|
| Authorization | header | header | Bearer q360_live_ab12cd34_… | Khóa API của brand (tạo ở mục API key). Bắt buộc với mọi request. Brand suy từ key — không truyền mã brand. |
| platform_shop_id | query | string | 100001 | Gian hàng (lấy ở GET /v1/platforms → shops[].platform_shop_id). BẮT BUỘC khi brand có > 1 gian hàng trên nền tảng; 360 bỏ tham số này trước khi chuyển tiếp. |
Request parameters
| Name | In | Type | Required | Sample | Description |
|---|---|---|---|---|---|
| filters.ids | body | int[] | No | Id danh mục, tối đa 100. | |
| filters.name | body | string | No | Áo | Tìm theo tên (khớp một phần). |
| filters.code | body | string | No | Mã danh mục. | |
| filters.status | body | int | No | 1 | 1 đang dùng · 2 ngừng dùng. |
| paginator.size | body | int | No | 100 | Số danh mục mỗi trang — tối đa 100. |
| paginator.next | body | object | No | {"id": 588004} | Nguyên object paginator.next của trang trước; bỏ ở trang đầu. |
Pagination
Lặp khi phản hồi có paginator.next, gửi lại nguyên object; danh mục id lớn (mới tạo) trả trước.
Request examples
curl -s -X POST "https://partner.quantri360.com/v1/nhanh/v3.0/product/category" \
-H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" \
-d '{"paginator":{"size":100}}'
Python
import requests
KEY = "q360_live_..." # khóa API của brand
r = requests.post(
"https://partner.quantri360.com/v1/nhanh/v3.0/product/category",
params={},
json={
"paginator": {
"size": 100
}
},
headers={"Authorization": f"Bearer {KEY}"},
timeout=60,
)
print(r.status_code)
print(r.json())Node.js
const KEY = 'q360_live_...'; // khóa API của brand
const url = new URL('https://partner.quantri360.com/v1/nhanh/v3.0/product/category');
for (const [k, v] of Object.entries({})) url.searchParams.set(k, typeof v === 'object' ? JSON.stringify(v) : String(v));
const r = await fetch(url, {
method: 'POST',
headers: { Authorization: `Bearer ${KEY}`, 'Content-Type': 'application/json' },
body: JSON.stringify({"paginator":{"size":100}}),
});
console.log(r.status, await r.json());PHP
<?php
$key = 'q360_live_...'; // khóa API của brand
$url = 'https://partner.quantri360.com/v1/nhanh/v3.0/product/category' . '?' . http_build_query([]);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer ' . $key, 'Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"paginator":{"size":100}}');
$res = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $status, "\n", $res;Response
Response fields (as returned by Nhanh.vn)
| Name | Type | Sample | Description |
|---|---|---|---|
| code | int | 1 | 1 = thành công; 0 = lỗi (xem messages). |
| messages | string[] | [] | Thông điệp lỗi của Nhanh. |
| data | object[] | Dữ liệu. | |
| id | int | 588006 | Id danh mục. |
| parentId | int | 538679 | Danh mục cha; `0` = danh mục gốc. |
| code | string | 2.6.3 | Mã danh mục. |
| name | string | Quần âu 2 ly | |
| order | int | 0 | Thứ tự. |
| status | int | 1 | 1 đang dùng · 2 ngừng dùng (dữ liệu thật có cả giá trị `0`). |
| paginator | object | Phân trang. | |
| next | object | {"id": 588004} | Gửi lại nguyên ở request kế; không có = hết. |
Response sample
{
"code": 1,
"paginator": {
"next": {
"id": 588001
}
},
"data": [
{
"id": 588003,
"parentId": 0,
"code": "2.10",
"name": "Quần Linen",
"order": 0,
"status": 1
},
{
"id": 588002,
"parentId": 538657,
"code": "2.8.5",
"name": "Bộ Tanktop ",
"order": 0,
"status": 0
},
{
"id": 588001,
"parentId": 587996,
"code": "1.2.10",
"name": "Áo phao gile 3 lớp ",
"order": 0,
"status": 1
}
]
}
Get started
- Sign up for Partner
- Enable a data type of the Sản phẩm group on the platform page
- Create an API key (tick the Nhanh.vn channel)
- Call it as in the examples above