VI | EN
Message us on Messenger
Developer resources

Create Product — TikTok Shop API

tiktok.product.202309.products · 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.

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 v2 và gửi category_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_sku củ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ái PENDING chờ 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

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
save_modebodystringNoAS_DRAFTAS_DRAFT (lưu nháp) · LISTING (đăng ngay, mặc định).
titlebodystringYesĐầm xòe cổ tròn tay bồng Cửa hàng mẫu SPMAU003Tiêu đề — VN: 25–255 ký tự.
descriptionbodystringYes<p>Chất liệu Poplin…</p>Mô tả HTML (chỉ ảnh host TikTok — tải qua images/upload).
category_idbodystringYes601264Ngành LÁ.
category_versionbodystringNov2Gian hàng VN gửi v2.
main_imagesbodyobject[]Yes[{"uri":"tos-alisg-i-…"}]Tối đa 9 ảnh [{uri}] — uri từ images/upload (MAIN_IMAGE), kích thước 300–4000 px.
skusbodyobject[]YesTố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_attributesbodyobject[]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_weightbodyobjectNo{"value":"0.5","unit":"KILOGRAM"}Bắt buộc (trừ hàng ảo); KILOGRAM tối đa 3 chữ số lẻ.
package_dimensionsbodyobjectNo{"length":"30","width":"25","height":"5","unit":"CENTIMETER"}Số nguyên dương (chuỗi).
brand_idbodystringNoThương hiệu (bỏ trống = không thương hiệu).
size_chartbodyobjectNo{image:{uri}} hoặc {template:{id}} — bắt buộc với một số ngành.
videobodyobjectNo{id} video sản phẩm.
is_cod_allowedbodyboolNoCho thanh toán khi nhận hàng.
external_product_idbodystringNoMã sản phẩm ở hệ thống của bạn (để đối chiếu).
idempotency_keybodystringNocopy-1729000000000000001-shopAKhó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)

NameTypeSampleDescription
codeint00 = thành công; khác 0 xem message (105001–105003 = token, 360 đã tự làm mới một lần).
messagestringSuccessThông điệp của TikTok.
request_idstring2025101900000000000000000000Mã request TikTok.
dataobjectDữ liệu.
product_idstring1729000000000000003Mã sản phẩm vừa tạo.
skusobject[][{id, seller_sku, sales_attributes, external_sku_id}] — map SKU của bạn ↔ mã SKU TikTok.
warningsobject[][{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

  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 TikTok Shop channel)
  4. Call it as in the examples above