v2.product.update_item
POST/api/v2/product/update_itemVia 360: POST https://partner.quantri360.com/v1/shopee/api/v2/product/update_item
Write endpoint — changes data on Shopee. The key must be created with "Allow write API calls" ticked, otherwise you get 403 write_not_allowed. Every call is logged.
Description
SỬA thông tin một sản phẩm đã có: tên, mô tả, ảnh, ảnh khuyến mãi, thuộc tính, cân nặng / kích thước, kênh vận chuyển, thương hiệu, SKU cha, trạng thái. Chỉ gửi trường muốn đổi kèm item_id.
- Là API GHI — thay đổi dữ liệu thật trên Shopee; key cần quyền ghi. Gọi bằng POST, body JSON.
- Không sửa giá / tồn ở đây: tồn dùng update_stock; phân loại dùng init_tier_variation.
image_ratiomặc định1:1— sản phẩm đang 3:4 mà gửi image không kèmimage_ratio: "3:4"sẽ bị đổi tỷ lệ.- Ảnh mới phải tải lên trước bằng media_space/upload_image; ảnh cũ giữ lại bằng image_id ở get_item_base_info.
Request
Endpoint
POST https://partner.quantri360.com/v1/shopee/api/v2/product/update_item
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 |
|---|---|---|---|---|---|
| item_id | body | int | Yes | 10000000081 | Mã sản phẩm cần sửa. |
| item_name | body | string | No | Tên mới. | |
| description | body | string | No | Mô tả chữ mới (description_type = normal). | |
| image | body | object | No | {"image_id_list":["vn-10000000092-…"],"image_ratio":"1:1"} | Thay TOÀN BỘ danh sách ảnh (gửi đủ các ảnh muốn giữ, ảnh đầu = ảnh bìa). Gửi kèm image_ratio đúng tỷ lệ hiện tại của sản phẩm. |
| promotion_images | body | object | No | {"image_id_list":["vn-10000000092-…"]} | Ảnh khuyến mãi (một ảnh) — chỉ đặt được khi ảnh sản phẩm tỷ lệ 3:4. |
| attribute_list | body | object[] | No | Thuộc tính (cấu trúc như add_item). | |
| item_sku | body | string | No | SKU cha. | |
| item_status | body | string | No | NORMAL | NORMAL · UNLIST. |
| weight | body | float | No | 0.5 | Cân nặng (kg) — ghi đè cân nặng MỌI phân loại. |
| dimension | body | object | No | Kích thước gói (cm) — ghi đè MỌI phân loại. | |
| logistic_info | body | object[] | No | Kênh vận chuyển. | |
| brand | body | object | No | brand_id + original_brand_name. | |
| pre_order | body | object | No | ||
| condition | body | string | No | ||
| size_chart_info | body | object | No | Bảng size; gỡ: size_chart rỗng hoặc size_chart_id = 0. | |
| description_type | body | string | No | Bắt buộc khi đổi kiểu mô tả. |
Request examples
curl -s -X POST "https://partner.quantri360.com/v1/shopee/api/v2/product/update_item" \
-H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" \
-d '{"item_id":10000000081,"image":{"image_id_list":["sg-10000000095-8258g-mtrn1z8ec64mdd","vn-10000000092-7r98o-lxm45esiq5zt3b"],"image_ratio":"1:1"}}'
Python
import requests
KEY = "q360_live_..." # khóa API của brand
r = requests.post(
"https://partner.quantri360.com/v1/shopee/api/v2/product/update_item",
params={},
json={
"item_id": 10000000081,
"image": {
"image_id_list": [
"sg-10000000095-8258g-mtrn1z8ec64mdd",
"vn-10000000092-7r98o-lxm45esiq5zt3b"
],
"image_ratio": "1:1"
}
},
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/update_item');
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({"item_id":10000000081,"image":{"image_id_list":["sg-10000000095-8258g-mtrn1z8ec64mdd","vn-10000000092-7r98o-lxm45esiq5zt3b"],"image_ratio":"1:1"}}),
});
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/update_item' . '?' . 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, '{"item_id":10000000081,"image":{"image_id_list":["sg-10000000095-8258g-mtrn1z8ec64mdd","vn-10000000092-7r98o-lxm45esiq5zt3b"],"image_ratio":"1:1"}}');
$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 | Thông tin sản phẩm sau khi sửa. | |
| item_id | int | 10000000081 | |
| item_name | string | ||
| item_status | string | ||
| images | object | image_id_list, image_url_list. | |
| category_id | int | ||
| weight | float | ||
| dimension | object | ||
| logistic_info | object[] | ||
| brand | object | ||
| description | string | ||
| pre_order | object | ||
| condition | string |
Response sample
{
"error": "",
"message": "",
"warning": "",
"request_id": "326527603d034fd1…",
"response": {
"item_id": 10000000081,
"item_name": "Sản phẩm mẫu",
"item_status": "NORMAL",
"category_id": 100102,
"images": {
"image_id_list": [
"sg-10000000095-8258g-mtrn1z8ec64mdd",
"vn-10000000092-7r98o-lxm45esiq5zt3b"
],
"image_url_list": [
"https://example.com/anh-mau.jpg",
"https://example.com/anh-mau.jpg"
]
},
"weight": 0.5,
"dimension": {
"package_length": 25,
"package_width": 20,
"package_height": 10
}
}
}
Shopee error codes (90)
Show
| Code | Meaning |
|---|---|
| product.error_busi | The GTIN code is mandatory, please check and upload again. |
| 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_auth_shop_not_found | Không tìm thấy gian hàng — kiểm tra platform_shop_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_item_not_found | Không tìm thấy item_id. |
| error_param_shop_id_not_found | Shop_id is not found. |
| error_invalid_days_to_ship | Số ngày chuẩn bị hàng không hợp lệ. |
| error_value_name_required | Value_name is required. |
| error_value_id_must_equal_zero | Value_id must equal 0. |
| error_invalid_category_attribute | Ngành hàng không khớp thuộc tính. |
| error_busi | Merchant/gian hàng có nhiều kho; cần gửi location_id. |
| error_invalid_brand | Thông tin nhãn hàng thiếu hoặc không hợp lệ; xem `message`. |
| error_incalid_brand | Thông tin nhãn hàng thiếu hoặc không hợp lệ; xem `message`. |
| error_invalid_attribute | Thiếu thuộc tính bắt buộc. |
| error_get_shop_fail | Không lấy được gian hàng; thử lại sau. |
| error_busi_invalid_shop_status | Shop status invalid. |
| error_busi_cannot_update_field | Update item failed , {{.error_info}}. |
| error_busi_item_status_invalid | Invalid item status. |
| error_busi_update_item_failed | Update item failed, please try later. |
| error_invalid_category | Mã ngành hàng không hợp lệ; xem `message`. |
| error_busi_attribute_error | Thuộc tính chứng nhận NCC/BSMI thiếu hoặc không hợp lệ; xem `message`. |
| error_attribute_fda_error | Giá trị thuộc tính FDA không hợp lệ. |
| error_inner | Lỗi hệ thống Shopee — thử lại sau. |
| error_unknown | {{.error_info}} |
| error_check_luc_fail | Kiểm tra LUC thất bại; xem `message`. |
| error_repeated_mtsku | Sản phẩm tương tự đã được tải lên. |
| error_invalid_price | Invalid price, please use the correct format |
| error_category_is_block | Ngành hàng bị hạn chế. |
| error_less_required_attribute | Thiếu thuộc tính bắt buộc. |
| error_less_required_brand | Thiếu thông tin nhãn hàng bắt buộc. |
| error_unlist_item_fail | Please upload your products to UNLIST status. Products will be published automatically by Shopee at the official launch date. |
| error_invalid_logistic_info | invalid logistic info , {{.error_info}} |
| error_invalid_price_for_logistic | Shipping channel cannot be enabled as product price exceeds limit. |
| error_param_validate | Thiết lập bán sỉ hoặc thị trường của merchant chưa hợp lệ; xem `message`. |
| error_desc_image_no_pass | Ảnh mô tả chưa được chấp nhận; xem `message`. |
| error_busi_cannot_edit_vsku | Can not use OpenAPI to edit/create VSKU, please connect with your manager |
| error attribute | Your attribute info is invalid. Please fill in the category related attributes with correct attribute value. |
| error_duplicated_brand | Nhãn hàng đã tồn tại. |
| error category | Your category is invalid or prohibited. |
| error brand | Your brand is invalid. Please use the valid brand under your category. |
| error_marshal | Interal error, please contact openapi team |
| error_system_busy | Hệ thống đang bận; thử lại sau. |
| error_item_or_variation_not_found | Item or model doesn't exist. |
| error_nil_item_in_req | Interal error, please contact openapi team. |
| error_image_unavailable | Ảnh không khả dụng; xem `message`. |
| error_name_length_limit | Exceeded item_name length limitation. |
| error_seller_under_penalty | The shop is under penalty. |
| error_nil_shopid_or_itemid | Query information failed. |
| error_estimated_days_limit | Days_to_ship limitation exceeded. |
| error_item_uneditable | Can't edit this item. item status can not support editing. |
| error_perm_non_admin | Don't have permission. |
| error_desc_hash_tag_over_limit | Count of hash tags is more than 18 |
| error_item_name_empty | Item name could not be empty. |
| error_item_name_is_too_short | Item_name length is less than min limit. |
| error_title_exceeds_max_length | The length of item_name is bigger than max limit. |
| error_title_character_forbidden | Item_name contains forbidden characters. |
| error_desc_length_min_limit | Description length is less than the min limit. |
| error_image_num_min | Số ảnh chưa đạt mức tối thiểu; xem `message`. |
| error_forbidden_category | The category is forbidden. |
| error_brand_forbidden | The brand is forbidden. |
| error_param_dts_exceeds_max_limit | Days_to_ship exceeds max limit |
| error_param_category_not_support_pre_order | Category does not support pre-order. |
| error_cannt_edit_name_in_promotion | Item_name cannot be edited when item is under promotion.. |
| error_cannt_edit_description_in_promotion | Description of item cannot be edited when item is under promotion.. |
| error_cannt_edit_image_in_promotion | Image of item cannot be edited when item is under promotion.. |
| error_cannt_edit_pre_order_in_promotion | Item cannot be changed to pre-order when item is under promotion.. |
| error_cannt_edit_estimated_days_in_promotion | Days_to_ship cannot be edited when item is under promotion. |
| error_item_in_promotion | item is in promotion can not set category |
| error_invalid_attribute_value | Invalid attribute value. |
| error_wrong_attrsnapshot | Invalid attribute. |
| error_category_level | Interal error, please contact openapi team. |
| error_category_path_count_limit | Interal error, please contact openapi team. |
| error_incalid_category | Mã ngành hàng cấp 1 và cấp 2 không khớp. |
| error_category_dts | The current day_to_ship is bigger than category's max days_to_ship. |
| error_in_item_promotion_image_item_lock | Can't update images when item is under promotion. |
| error_in_item_promotion_name_item_lock | Can't update item_name when item is under promotion. |
| error_in_item_promotion_unlsit_lock | Can't unlist item when item is under promotion. |
| error_in_item_promotion_description_lock | Can't update description when item is under promotion. |
| error_flash_sale_days_to_ship_lock | Days_to ship cannot be changed when item is under ongoing/upcoming flash sale. |
| error_slash_price_not_lowest | In slash sale, price should not be lower or same as slash price. |
| error_whole_sale_min_count_incorrect | Interal error, please contact openapi team. |
| error_whole_sale_price_setting_incorrect | Wholesale price can't more than original price. |
| error_video_info_not_found | Video_info not found. |
| 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