v2.product.get_item_limit
GET/api/v2/product/get_item_limitVia 360: GET https://partner.quantri360.com/v1/shopee/api/v2/product/get_item_limit
Description
Giới hạn khi đăng / sửa sản phẩm của gian hàng (và của một ngành nếu gửi category_id): khoảng giá, độ dài tên / mô tả, số ảnh, độ dài tên phân loại, tồn tối đa, số sản phẩm tối đa, có bắt buộc cân nặng / kích thước / bảng size. Kiểm dữ liệu trước khi gọi add_item để tránh bị từ chối.
- Không gửi category_id: chỉ có giới hạn chung (không có size_chart_limit, gtin_limit, days_to_ship_limit).
- Giới hạn tên của gian hàng VN thật: 20–120 ký tự; mô tả 100–5000 ký tự; tối đa 9 ảnh.
Request
Endpoint
GET https://partner.quantri360.com/v1/shopee/api/v2/product/get_item_limit
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 |
|---|---|---|---|---|---|
| category_id | query | int | No | 100102 | Mã ngành hàng — gửi để có thêm giới hạn riêng của ngành (hàng đặt trước, bảng size, GTIN). |
Request examples
curl -s "https://partner.quantri360.com/v1/shopee/api/v2/product/get_item_limit?category_id=100102" \ -H "Authorization: Bearer $KEY"
Python
import requests
KEY = "q360_live_..." # khóa API của brand
r = requests.get(
"https://partner.quantri360.com/v1/shopee/api/v2/product/get_item_limit",
params={
"category_id": 100102
},
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/shopee/api/v2/product/get_item_limit');
for (const [k, v] of Object.entries({"category_id":100102})) url.searchParams.set(k, typeof v === 'object' ? JSON.stringify(v) : String(v));
const r = await fetch(url, {
method: 'GET',
headers: { Authorization: `Bearer ${KEY}` },
});
console.log(r.status, await r.json());PHP
<?php $key = 'q360_live_...'; // khóa API của brand $url = 'https://partner.quantri360.com/v1/shopee/api/v2/product/get_item_limit' . '?' . http_build_query(['category_id' => 100102]); $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer ' . $key]); $res = curl_exec($ch); $status = curl_getinfo($ch, CURLINFO_HTTP_CODE); curl_close($ch); echo $status, "\n", $res;
Response
Response fields (as returned by Shopee)
| Name | Type | Sample | Description |
|---|---|---|---|
| request_id | string | d52ca43b277a4f9292fb8be658bfd33d | Mã request của Shopee để tra lỗi. |
| error | string | Mã lỗi Shopee; rỗng = thành công. | |
| message | string | Mô tả lỗi. | |
| warning | string | ||
| response | object | Mỗi giới hạn dạng {min_limit, max_limit}. | |
| price_limit | object | {"min_limit":1000,"max_limit":120000000} | Giá (VND). |
| stock_limit | object | {"min_limit":0,"max_limit":10000000} | Tồn mỗi phân loại. |
| item_name_length_limit | object | {"min_limit":20,"max_limit":120} | Độ dài tên (ký tự). |
| item_description_length_limit | object | {"min_limit":100,"max_limit":5000} | Độ dài mô tả. |
| item_image_count_limit | object | {"min_limit":1,"max_limit":9} | Số ảnh sản phẩm. |
| tier_variation_name_length_limit | object | {"min_limit":1,"max_limit":14} | Độ dài tên tầng phân loại (vd "Màu sắc"). |
| tier_variation_option_length_limit | object | {"min_limit":1,"max_limit":20} | Độ dài tên lựa chọn (vd "Xanh nhạt"). |
| wholesale_price_threshold_percentage | object | {"min_limit":10,"max_limit":100} | Giá sỉ tính theo % giá gốc. |
| item_count_limit | object | {"max_limit":20000} | Số sản phẩm tối đa của gian hàng. |
| extended_description_limit | object | Mô tả mở rộng: độ dài chữ 100–5000, 1–12 ảnh, ảnh rộng ≥ 700 px, tỷ lệ rộng / cao 0,5–32. | |
| dts_limit | object | Số ngày chuẩn bị hàng. | |
| non_pre_order_days_to_ship | int | 2 | Hàng thường. |
| days_to_ship_limit | object | {"min_limit":5,"max_limit":15} | Hàng đặt trước (chỉ khi gửi category_id). |
| support_pre_order | bool | true | |
| weight_limit | object | {"weight_mandatory":true} | Bắt buộc cân nặng. |
| dimension_limit | object | {"dimension_mandatory":false} | Bắt buộc kích thước gói. |
| size_chart_limit | object | Chỉ khi gửi category_id. | |
| size_chart_mandatory | bool | true | Bắt buộc bảng size. |
| support_image_size_chart | bool | true | Nhận bảng size dạng ảnh. |
| support_template_size_chart | bool | true | Nhận bảng size dạng mẫu (size_chart_id). |
| gtin_limit | object | Chỉ khi gửi category_id. | |
| gtin_validation_rule | string | Optional | `Mandatory` · `Flexible` (mã GTIN hoặc "00") · `Optional`. |
| debug_message | string |
Response sample
{
"error": "",
"message": "",
"warning": "",
"request_id": "e3e3e7f35ef6ccea…",
"response": {
"price_limit": {
"min_limit": 1000,
"max_limit": 120000000
},
"wholesale_price_threshold_percentage": {
"min_limit": 10,
"max_limit": 100
},
"stock_limit": {
"min_limit": 0,
"max_limit": 10000000
},
"item_name_length_limit": {
"min_limit": 20,
"max_limit": 120
},
"item_image_count_limit": {
"min_limit": 1,
"max_limit": 9
},
"item_description_length_limit": {
"min_limit": 100,
"max_limit": 5000
},
"tier_variation_name_length_limit": {
"min_limit": 1,
"max_limit": 14
},
"tier_variation_option_length_limit": {
"min_limit": 1,
"max_limit": 20
},
"item_count_limit": {
"max_limit": 20000
},
"extended_description_limit": {
"description_text_length_min": 100,
"description_text_length_max": 5000,
"description_image_num_min": 1,
"description_image_num_max": 12,
"description_image_width_min": 700,
"description_image_height_min": 32,
"description_image_aspect_ratio_min": 0.5,
"description_image_aspect_ratio_max": 32
},
"dts_limit": {
"days_to_ship_limit": {
"min_limit": 5,
"max_limit": 15
},
"non_pre_order_days_to_ship": 2,
"support_pre_order": true
},
"weight_limit": {
"weight_mandatory": true
},
"dimension_limit": {
"dimension_mandatory": false
},
"size_chart_limit": {
"size_chart_mandatory": true,
"support_image_size_chart": true,
"support_template_size_chart": true
},
"gtin_limit": {
"gtin_validation_rule": "Optional"
}
},
"debug_message": ""
}
Shopee error codes (12)
Show
| Code | Meaning |
|---|---|
| error_data | Dữ liệu không tồn tại hoặc không hợp lệ cho thao tác (vd mã không có, loại yêu cầu không cho phép). |
| error_param | Tham số sai / thiếu / sai kiểu — xem `message` để biết tham số nào. |
| error_server | Lỗi hệ thống Shopee — thử lại sau ít phút. |
| error_shop | Gian hàng không hợp lệ — kiểm tra platform_shop_id. |
| error_inner | Lỗi hệ thống Shopee — thử lại sau. |
| error_item_not_found | Không tìm thấy item_id. |
| error_auth | Ủy quyền gian hàng cho 360 đã hết hạn hoặc bị thu hồi (360 đã tự làm mới token một lần) — chủ gian hàng kết nối lại Shopee trong Partner. |
| error_system_busy | Hệ thống đang bận; thử lại sau. |
| error_limit | Chạm hạn mức gọi Shopee trong ngày của kết nối — 360 trả kèm thời điểm thử lại; giảm tần suất gọi. |
| error_rate_limit | Gọi quá nhanh — chờ vài giây rồi gọi lại (360 cũng giới hạn theo key: 429 + Retry-After). |
| shop_banned | Gian hàng đang bị Shopee khóa — mọi API tạm ngưng tới khi gỡ khóa. |
| error_kyc_auth | Gian hàng chưa hoàn tất đăng ký người bán trên Kênh Người Bán. |
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 Shopee channel)
- Call it as in the examples above