VI | EN
Message us on Messenger
Developer resources

Update global item — Shopee API

v2.global_product.update_global_item · call it through Quantri360 with one API key for your own accounts / assets that you connected and authorized — 360 handles request signing and refreshing the authorization you granted.

v2.global_product.update_global_item

POST/api/v2/global_product/update_global_itemVia 360: POST https://partner.quantri360.com/v1/shopee/api/v2/global_product/update_global_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

CHỈ NGƯỜI BÁN TRUNG QUỐC ĐẠI LỤC VÀ HÀN QUỐC: Cập nhật nội dung và thông số của một sản phẩm toàn cầu.

  • HIỆN CHƯA GỌI ĐƯỢC QUA 360: đây là API cấp merchant, 360 hiện ký theo gian hàng nên Shopee trả error_param "There is no merchant_id in query.". Cần dùng API này → liên hệ 360.
  • Thị trường áp dụng: Người bán Trung Quốc đại lục và Hàn Quốc. Không áp dụng shop nội địa VN.
  • API GHI: thay đổi dữ liệu thật trên Shopee; cần key có quyền ghi (can_write) và gói mở module Sản phẩm. Sửa sản phẩm; weight, dimension và DTS cấp sản phẩm ghi đè thông số tương ứng của mọi phân loại.

Request

Endpoint

POST https://partner.quantri360.com/v1/shopee/api/v2/global_product/update_global_item

Authentication & shop

NameInTypeSampleDescription
AuthorizationheaderheaderBearer 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_idquerystring100001Gian 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

NameInTypeRequiredSampleDescription
global_item_idbodyint64Yes100021Mã sản phẩm toàn cầu.
category_idbodyint32No100041Mã ngành hàng sản phẩm toàn cầu.
global_item_namebodystringNoSản phẩm mẫuTên sản phẩm toàn cầu.
descriptionbodystringNoMô tả sản phẩm mẫuMô tả sản phẩm toàn cầu.
global_item_skubodystringNoDEMO-ITEMSKU sản phẩm toàn cầu.
weightbodyfloatNo0.5Khối lượng sản phẩm toàn cầu (kg); cập nhật sẽ ghi đè khối lượng tất cả phân loại bên dưới.
dimensionbodyobjectNo{"package_length": 1, "package_width": 1, "package_height": 1}Kích thước sản phẩm toàn cầu; cập nhật sẽ ghi đè kích thước tất cả phân loại bên dưới.
dimension.package_lengthbodyint32No1Chiều dài kiện của sản phẩm toàn cầu (cm).
dimension.package_widthbodyint32No1Chiều rộng kiện của sản phẩm toàn cầu (cm).
dimension.package_heightbodyint32No1Chiều cao kiện của sản phẩm toàn cầu (cm).
pre_orderbodyobjectNo{"days_to_ship": 3}Thông tin đặt trước; cập nhật DTS sản phẩm toàn cầu sẽ ghi đè DTS tất cả phân loại bên dưới.
pre_order.days_to_shipbodyint32Yes3Số ngày chuẩn bị hàng.
conditionbodystringNoNEWTình trạng sản phẩm toàn cầu: NEW hoặc USED.
imagebodyobjectNo{"image_id_list": ["demo-image"]}Thông tin ảnh sản phẩm toàn cầu.
image.image_id_listbodystring[]Yes["demo-image"]Danh sách mã ảnh sản phẩm toàn cầu.
video_upload_idbodystring[]No["demo-video"]Mã video đã tải của sản phẩm toàn cầu.
brandbodyobjectNo{"brand_id": 100042}Thông tin nhãn hàng.
brand.brand_idbodyint32No100042Mã nhãn hàng.
attribute_listbodyobject[]No[{"attribute_id": 100043, "attribute_value_list": [{"value_id": 100061, "original_value_name": "Giá trị mẫu", "value_unit": "kg"}]}]Thuộc tính sản phẩm.
attribute_list[].attribute_idbodyint32No100043Mã thuộc tính.
attribute_list[].attribute_value_listbodyobject[]No[{"value_id": 100061, "original_value_name": "Giá trị mẫu", "value_unit": "kg"}]Danh sách giá trị thuộc tính.
attribute_list[].attribute_value_list[].value_idbodyint32No100061Mã giá trị thuộc tính. Gửi 0 và bắt buộc original_value_name chứa giá trị tự nhập khi AttributeInputType=TEXT_FILED, hoặc COMBO_BOX/MULTIPLE_SELECT_COMBO_BOX và muốn dùng giá trị tự nhập.
attribute_list[].attribute_value_list[].original_value_namebodystringNoGiá trị mẫuTên giá trị thuộc tính từ get_attributes; bắt buộc khi value_id=0. Với DATE_TYPE hoặc TIMESTAMP_TYPE có thể gửi timestamp dạng chuỗi.
attribute_list[].attribute_value_list[].value_unitbodystringNokgĐơn vị giá trị, chỉ dành cho thuộc tính định lượng.
description_infobodyobjectNo{"extended_description": {"field_list": [{"field_type": "text", "text": "Nội dung mẫu", "image_info": {"image_id": "demo-image"}}]}}Mô tả mới chỉ dành cho người bán được cấp riêng. Dùng trường này phải gửi description_type=extended; nếu không dùng có thể bỏ description_type hoặc gửi normal.
description_info.extended_descriptionbodyobjectNo{"field_list": [{"field_type": "text", "text": "Nội dung mẫu", "image_info": {"image_id": "demo-image"}}]}Đặt nội dung mô tả tại đây khi description_type=extended.
description_info.extended_description.field_listbodyobject[]No[{"field_type": "text", "text": "Nội dung mẫu", "image_info": {"image_id": "demo-image"}}]Danh sách khối mô tả mở rộng.
description_info.extended_description.field_list[].field_typebodystringNotextLoại khối mô tả mở rộng: text hoặc image.
description_info.extended_description.field_list[].textbodystringNoNội dung mẫuVăn bản khi field_type=text.
description_info.extended_description.field_list[].image_infobodyobjectNo{"image_id": "demo-image"}Thông tin ảnh khi field_type=image.
description_info.extended_description.field_list[].image_info.image_idbodystringNodemo-imageMã ảnh.
description_typebodystringNonormalLoại mô tả: normal hoặc extended; bắt buộc khi dùng extended_description hoặc đổi loại mô tả.
size_chart_infobodyobjectNo{"size_chart": "demo-size-chart", "size_chart_id": 100061}Thông tin bảng kích cỡ.
size_chart_info.size_chartbodystringNodemo-size-chartMã ảnh bảng kích cỡ; gửi chuỗi rỗng để xóa ảnh. Chỉ cần ảnh hoặc mẫu; nếu gửi cả hai chỉ giữ mẫu. Hỗ trợ shop xuyên biên giới và nội địa.
size_chart_info.size_chart_idbodyint64No100061Mã mẫu bảng kích cỡ; gửi 0 để xóa mẫu. Chỉ cần ảnh hoặc mẫu; nếu gửi cả hai chỉ giữ mẫu. Hỗ trợ shop nội địa và xuyên biên giới; người bán cần thiết lập mẫu trước tại khu vực quản lý bán hàng xuyên biên giới.

Request examples

curl -s -X POST "https://partner.quantri360.com/v1/shopee/api/v2/global_product/update_global_item" \
  -H "Authorization: Bearer $KEY" \
  -H "Content-Type: application/json" \
  -d '{"global_item_id":100021}'
Python
import requests

KEY = "q360_live_..."  # khóa API của brand
r = requests.post(
    "https://partner.quantri360.com/v1/shopee/api/v2/global_product/update_global_item",
    params={},
    json={
        "global_item_id": 100021
    },
    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/global_product/update_global_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({"global_item_id":100021}),
});
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/global_product/update_global_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, '{"global_item_id":100021}');
$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)

Kiểm error / message trước khi đọc kết quả; error rỗng mới là thành công.

NameTypeSampleDescription
request_idstringd52ca43b277a4f9292fb8be658bfd33dMã request của Shopee để tra lỗi.
errorstringMã lỗi Shopee; rỗng = thành công.
messagestringMô tả lỗi.
warningstringCảnh báo.
responseobjectKết quả trả về.
global_item_idint64100021Mã sản phẩm toàn cầu vừa cập nhật.

Response sample

{
  "error": "",
  "message": "",
  "warning": "",
  "request_id": "demo-request",
  "response": {
    "global_item_id": 100021
  }
}

Shopee error codes (57)

Show
CodeMeaning
add_on.add_on_deal_expiredKhông sửa chương trình mua kèm đã hết hạn.
error_dataDữ 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_paramTham số sai / thiếu / sai kiểu — xem `message` để biết tham số nào.
error_serverLỗi hệ thống Shopee — thử lại sau ít phút.
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_merchant_not_foundKhông tìm thấy merchant.
error_invalid_days_to_shipSố ngày chuẩn bị hàng không hợp lệ.
error_invalid_category_attributeNgành hàng không khớp thuộc tính.
error_invalid_brandThông tin nhãn hàng thiếu hoặc không hợp lệ; xem `message`.
error_incalid_brandThông tin nhãn hàng thiếu hoặc không hợp lệ; xem `message`.
error_invalid_attributeThiếu thuộc tính bắt buộc.
error_busi_cannot_get_category_pathKhông lấy được đường dẫn ngành hàng; thử lại sau.
error_busi_update_global_item_failedCập nhật sản phẩm toàn cầu thất bại; thử lại sau.
error_busi_global_item_not_foundKhông tìm thấy sản phẩm toàn cầu.
error_busi_global_item_dimension_over_limitKích thước sản phẩm toàn cầu vượt giới hạn.
error_busi_global_item_weight_over_limitKhối lượng sản phẩm toàn cầu vượt giới hạn.
error_busi_global_tier_variation_over_limitSố tầng phân loại toàn cầu vượt giới hạn.
error_busi_global_item_tier_option_over_limitLựa chọn tầng phân loại vượt giới hạn.
error_busi_global_item_sku_over_limitSKU sản phẩm toàn cầu vượt giới hạn.
error_busi_item_days_to_ship_invalidSố ngày chuẩn bị hàng của sản phẩm toàn cầu không hợp lệ.
error_busi_region_not_supportedThị trường không được hỗ trợ.
error_invalid_categoryMã ngành hàng không hợp lệ; xem `message`.
error_busi_attribute_errorThuộc tính chứng nhận NCC/BSMI thiếu hoặc không hợp lệ; xem `message`.
error_attribute_fda_errorGiá trị thuộc tính FDA không hợp lệ.
error_innerLỗi hệ thống Shopee — thử lại sau.
error_updat_mtsku_failCập nhật MTSKU thất bại; xem `message`.
error_check_language_failKiểm tra ngôn ngữ thất bại; xem `message`.
error_price_agp_too_largeGiá cao nhất vượt bảy lần giá thấp nhất.
error_check_luc_failKiểm tra LUC thất bại; xem `message`.
error_repeated_mtskuSản phẩm tương tự đã được tải lên.
error_title_len_no_passĐộ dài tiêu đề chưa đạt yêu cầu; xem `message`.
error_desc_len_no_passĐộ dài mô tả chưa đạt yêu cầu; xem `message`.
error_image_hight_no_passChiều cao ảnh chưa đạt yêu cầu; xem `message`.
error_image_quantity_no_passSố lượng ảnh chưa đạt yêu cầu; xem `message`.
error_category_not_allowedNgành hàng không được phép; xem `message`.
error_wholesale_range_not_allowedPhạm vi bán sỉ không được phép; xem `message`.
error_dts_range_not_allowedPhạm vi số ngày chuẩn bị hàng không được phép; xem `message`.
error_stock_limit_no_passTồn kho chưa đạt giới hạn; xem `message`.
error_price_limit_no_passGiá chưa đạt giới hạn; xem `message`.
error_image_width_no_passChiều rộng ảnh chưa đạt yêu cầu; xem `message`.
error_no_dts_range_not_allowedThiết lập phạm vi ngày chuẩn bị hàng không được phép; xem `message`.
error_category_is_blockNgành hàng bị hạn chế.
error_less_required_attributeThiếu thuộc tính bắt buộc.
error_less_required_brandThiếu thông tin nhãn hàng bắt buộc.
error_permissionGian hàng không có quyền xem dữ liệu này (vd yêu cầu trả / đơn không thuộc gian hàng).
error_desc_image_no_passẢnh mô tả chưa được chấp nhận; xem `message`.
error_busi_mpsku_category_prohibitedNgành hàng MPSKU bị cấm; xem `message`.
error_param_validateThiết lập bán sỉ hoặc thị trường của merchant chưa hợp lệ; xem `message`.
error_busiMerchant/gian hàng có nhiều kho; cần gửi location_id.
error_duplicated_brandNhãn hàng đã tồn tại.
error_system_busyHệ thống đang bận; thử lại sau.
error_image_num_minSố ảnh chưa đạt mức tối thiểu; xem `message`.
error_incalid_categoryMã ngành hàng cấp 1 và cấp 2 không khớp.
error_limitChạ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_limitGọ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).
merchant_no_linkedMerchant chưa liên kết với 360.
partner_frozenỨng dụng kết nối đang bị tạm ngưng — liên hệ 360.

Get started

  1. Sign up for Partner
  2. Enable a data type of the Sản phẩm group on the platform page
  3. Create an API key (tick the Shopee channel)
  4. Call it as in the examples above