tiktok.product.202309.products
POST/product/202309/productsVia 360: POST https://partner.quantri360.com/v1/tiktok/product/202309/products
Write endpoint — changes data on TikTok Shop. The key must be created with "Allow write API calls" ticked, otherwise you get 403 write_not_allowed. Every call is logged.
Description
Tạo sản phẩm mới trên TikTok Shop (lưu nháp hoặc đăng bán ngay — đăng bán thì chờ sàn duyệt): tiêu đề, mô tả, ngành, ảnh, thuộc tính, biến thể (SKU, giá, tồn theo kho), cân nặng, bảng size.
- Là API GHI — thay đổi dữ liệu thật trên TikTok Shop (tạo sản phẩm); key cần quyền ghi.
- Gian hàng VN: dùng mã ngành + thuộc tính của cây
v2và gửicategory_version: "v2"— dùng cây v1 → lỗi 12052217. - Ảnh (kể cả ảnh trong mô tả, ảnh biến thể, bảng size) phải là ảnh đã tải lên TikTok qua POST /product/202309/images/upload; link ngoài không được nhận.
- Giữ nguyên
seller_skucủa hệ thống bạn (TikTok cho phép dấu cách, vd "SQDBF2007-Màu 1-S") để ghép tồn kho / đơn về sau. - Lỗi 105005 = app chưa được cấp quyền ghi sản phẩm cho gian hàng — cần ủy quyền lại.
save_mode: LISTING→ sản phẩm vào trạng tháiPENDINGchờ duyệt; theo dõi bằng GET /product/202309/products/{product_id}.
Request
Endpoint
POST https://partner.quantri360.com/v1/tiktok/product/202309/products
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 |
|---|---|---|---|---|---|
| save_mode | body | string | No | AS_DRAFT | AS_DRAFT (lưu nháp) · LISTING (đăng ngay, mặc định). |
| title | body | string | Yes | Đầm xòe cổ tròn tay bồng Cửa hàng mẫu SPMAU003 | Tiêu đề — VN: 25–255 ký tự. |
| description | body | string | Yes | <p>Chất liệu Poplin…</p> | Mô tả HTML (chỉ ảnh host TikTok — tải qua images/upload). |
| category_id | body | string | Yes | 601264 | Ngành LÁ. |
| category_version | body | string | No | v2 | Gian hàng VN gửi v2. |
| main_images | body | object[] | Yes | [{"uri":"tos-alisg-i-…"}] | Tối đa 9 ảnh [{uri}] — uri từ images/upload (MAIN_IMAGE), kích thước 300–4000 px. |
| skus | body | object[] | Yes | Tối đa 100 SKU. Mỗi SKU: price {amount (chuỗi), currency "VND"} (bắt buộc), inventory [{warehouse_id, quantity}] (bắt buộc), seller_sku, sales_attributes [{id | name, value_name, sku_img{uri}}] (bắt buộc khi > 1 SKU), external_sku_id, sku_weight, sku_dimensions. | |
| product_attributes | body | object[] | No | [{"id":"100149","values":[{"id":"1000854"}]}] | [{id, values[{id} | {name}]}] — đủ các thuộc tính bắt buộc của ngành. |
| package_weight | body | object | No | {"value":"0.5","unit":"KILOGRAM"} | Bắt buộc (trừ hàng ảo); KILOGRAM tối đa 3 chữ số lẻ. |
| package_dimensions | body | object | No | {"length":"30","width":"25","height":"5","unit":"CENTIMETER"} | Số nguyên dương (chuỗi). |
| brand_id | body | string | No | Thương hiệu (bỏ trống = không thương hiệu). | |
| size_chart | body | object | No | {image:{uri}} hoặc {template:{id}} — bắt buộc với một số ngành. | |
| video | body | object | No | {id} video sản phẩm. | |
| is_cod_allowed | body | bool | No | Cho thanh toán khi nhận hàng. | |
| external_product_id | body | string | No | Mã sản phẩm ở hệ thống của bạn (để đối chiếu). | |
| idempotency_key | body | string | No | copy-1729000000000000001-shopA | Khóa chống tạo trùng khi gửi lại do lỗi mạng — mỗi sản phẩm một khóa. |
Request examples
curl -s -X POST "https://partner.quantri360.com/v1/tiktok/product/202309/products?platform_shop_id=7494000000000000000" \
-H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" \
-d '{"save_mode":"AS_DRAFT","title":"Đầm xòe cổ tròn tay bồng Cửa hàng mẫu thiết kế trẻ trung SPMAU003","description":"<p>Chất liệu Poplin cao cấp.</p>","category_id":"601264","category_version":"v2","main_images":[{"uri":"tos-alisg-i-aphluv4xwc-sg/abc123"}],"product_attributes":[{"id":"100149","values":[{"id":"1000854"}]}],"package_weight":{"value":"0.5","unit":"KILOGRAM"},"skus":[{"seller_sku":"SPMAU003-Màu 1-S","price":{"amount":"219000","currency":"VND"},"inventory":[{"warehouse_id":"7093000000000000001","quantity":10}],"sales_attributes":[{"id":"100000","value_name":"Màu 1"},{"id":"100007","value_name":"S"}]}],"idempotency_key":"SPMAU003-shopA"}'
Python
import requests
KEY = "q360_live_..." # khóa API của brand
r = requests.post(
"https://partner.quantri360.com/v1/tiktok/product/202309/products",
params={
"platform_shop_id": "7494000000000000000"
},
json={
"save_mode": "AS_DRAFT",
"title": "Đầm xòe cổ tròn tay bồng Cửa hàng mẫu thiết kế trẻ trung SPMAU003",
"description": "<p>Chất liệu Poplin cao cấp.</p>",
"category_id": "601264",
"category_version": "v2",
"main_images": [
{
"uri": "tos-alisg-i-aphluv4xwc-sg/abc123"
}
],
"product_attributes": [
{
"id": "100149",
"values": [
{
"id": "1000854"
}
]
}
],
"package_weight": {
"value": "0.5",
"unit": "KILOGRAM"
},
"skus": [
{
"seller_sku": "SPMAU003-Màu 1-S",
"price": {
"amount": "219000",
"currency": "VND"
},
"inventory": [
{
"warehouse_id": "7093000000000000001",
"quantity": 10
}
],
"sales_attributes": [
{
"id": "100000",
"value_name": "Màu 1"
},
{
"id": "100007",
"value_name": "S"
}
]
}
],
"idempotency_key": "SPMAU003-shopA"
},
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/tiktok/product/202309/products');
for (const [k, v] of Object.entries({"platform_shop_id":"7494000000000000000"})) 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({"save_mode":"AS_DRAFT","title":"Đầm xòe cổ tròn tay bồng Cửa hàng mẫu thiết kế trẻ trung SPMAU003","description":"<p>Chất liệu Poplin cao cấp.</p>","category_id":"601264","category_version":"v2","main_images":[{"uri":"tos-alisg-i-aphluv4xwc-sg/abc123"}],"product_attributes":[{"id":"100149","values":[{"id":"1000854"}]}],"package_weight":{"value":"0.5","unit":"KILOGRAM"},"skus":[{"seller_sku":"SPMAU003-Màu 1-S","price":{"amount":"219000","currency":"VND"},"inventory":[{"warehouse_id":"7093000000000000001","quantity":10}],"sales_attributes":[{"id":"100000","value_name":"Màu 1"},{"id":"100007","value_name":"S"}]}],"idempotency_key":"SPMAU003-shopA"}),
});
console.log(r.status, await r.json());PHP
<?php
$key = 'q360_live_...'; // khóa API của brand
$url = 'https://partner.quantri360.com/v1/tiktok/product/202309/products' . '?' . http_build_query(['platform_shop_id' => '7494000000000000000']);
$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, '{"save_mode":"AS_DRAFT","title":"Đầm xòe cổ tròn tay bồng Cửa hàng mẫu thiết kế trẻ trung SPMAU003","description":"<p>Chất liệu Poplin cao cấp.</p>","category_id":"601264","category_version":"v2","main_images":[{"uri":"tos-alisg-i-aphluv4xwc-sg/abc123"}],"product_attributes":[{"id":"100149","values":[{"id":"1000854"}]}],"package_weight":{"value":"0.5","unit":"KILOGRAM"},"skus":[{"seller_sku":"SPMAU003-Màu 1-S","price":{"amount":"219000","currency":"VND"},"inventory":[{"warehouse_id":"7093000000000000001","quantity":10}],"sales_attributes":[{"id":"100000","value_name":"Màu 1"},{"id":"100007","value_name":"S"}]}],"idempotency_key":"SPMAU003-shopA"}');
$res = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $status, "\n", $res;Response
Response fields (as returned by TikTok Shop)
| Name | Type | Sample | Description |
|---|---|---|---|
| code | int | 0 | 0 = thành công; khác 0 xem message (105001–105003 = token, 360 đã tự làm mới một lần). |
| message | string | Success | Thông điệp của TikTok. |
| request_id | string | 2025101900000000000000000000 | Mã request TikTok. |
| data | object | Dữ liệu. | |
| product_id | string | 1729000000000000003 | Mã sản phẩm vừa tạo. |
| skus | object[] | [{id, seller_sku, sales_attributes, external_sku_id}] — map SKU của bạn ↔ mã SKU TikTok. | |
| warnings | object[] | [{message}] — trường bị sàn tự sửa / bỏ qua, cần xem lại. |
Response sample
{
"code": 0,
"message": "Success",
"request_id": "202203070749000101…",
"data": {
"product_id": "1729000000000000003",
"skus": [
{
"id": "1729000000000000004",
"seller_sku": "SPMAU003-Màu 1-S",
"sales_attributes": [
{
"id": "100000",
"value_id": "1729000000000000005"
},
{
"id": "100007",
"value_id": "1729000000000000006"
}
],
"external_sku_id": ""
}
],
"warnings": []
}
}
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 TikTok Shop channel)
- Call it as in the examples above