VI | EN
Message us on Messenger
Developer resources

Remove or add back creatives in a GMV Max Campaign — TikTok Business API

Remove or add back creatives in a GMV Max Campaign · 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.

Remove or add back creatives in a GMV Max Campaign

POST/campaign/gmv_max/creative/update/Via 360: POST https://partner.quantri360.com/v1/tiktok_business/campaign/gmv_max/creative/update/
Write endpoint — changes data on TikTok Business. The key must be created with "Allow write API calls" ticked, otherwise you get 403 write_not_allowed. Every call is logged.
Description

Gỡ video khỏi chiến dịch GMV Max (sản phẩm hoặc LIVE), hoặc thêm lại video đã gỡ trước đó.

  • Video gỡ được (REMOVE): lấy ở /gmv_max/report/get/ với filtering.creative_delivery_statuses = IN_QUEUE, LEARNING, DELIVERING, NOT_DELIVERYING, UNAVAILABLE, NOT_ACTIVE. Video thêm lại được (ADD): trạng thái EXCLUDED.
  • Chờ khoảng 20 phút rồi kiểm lại ở /gmv_max/report/get/: video đã gỡ có creative_delivery_status = EXCLUDED.
  • Tổng số video gỡ được mỗi chiến dịch: 10.000 (chiến dịch tạo qua API) hoặc 2.500 (tạo trên trình quản lý quảng cáo); hơn 400 thì chia nhiều lần gọi.
  • Chiến dịch chọn video thủ công (CUSTOM_SELECTION) không dùng API này — đổi danh sách video bằng /campaign/gmv_max/update/.
  • Với chiến dịch LIVE, id bài hiện chỉ xem được trên trình quản lý quảng cáo của TikTok.

Request

Endpoint

POST https://partner.quantri360.com/v1/tiktok_business/campaign/gmv_max/creative/update/

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_idquerystring7000000000000000001Tài sản TikTok Business đã kết nối — "Mã tài sản" ở trang Nền tảng hoặc GET /v1/platforms (tài khoản quảng cáo cho Marketing API, tài khoản TikTok cho Organic / Messaging). Có thể bỏ khi chỉ kết nối một tài sản.

Request parameters

NameInTypeRequiredSampleDescription
campaign_idbodystringYes1830000000000000001Id chiến dịch GMV Max ĐANG CHẠY. Chiến dịch sản phẩm phải ở chế độ chọn video tự động (product_video_specific_type = AUTO_SELECTION ở /campaign/gmv_max/info/).
actionbodystringYesREMOVEREMOVE = gỡ video · ADD = thêm lại video đã gỡ.
item_listbodyobject[]Yes[{"item_id":"7650000000000000001","spu_id_list":["1729000000000000001"]}]Video cần thao tác, tối đa 400 mỗi lần. Mỗi phần tử: item_id (id bài, bắt buộc) và spu_id_list (BẮT BUỘC với chiến dịch sản phẩm: SPU mà bài gắn trong chiến dịch, lấy ở /campaign/gmv_max/info/).

Request examples

curl -s -X POST "https://partner.quantri360.com/v1/tiktok_business/campaign/gmv_max/creative/update/?platform_shop_id=7000000000000000001" \
  -H "Authorization: Bearer $KEY" \
  -H "Content-Type: application/json" \
  -d '{"campaign_id":"1830000000000000001","action":"REMOVE","item_list":[{"item_id":"7650000000000000001","spu_id_list":["1729000000000000001"]}]}'
Python
import requests

KEY = "q360_live_..."  # khóa API của brand
r = requests.post(
    "https://partner.quantri360.com/v1/tiktok_business/campaign/gmv_max/creative/update/",
    params={
        "platform_shop_id": "7000000000000000001"
    },
    json={
        "campaign_id": "1830000000000000001",
        "action": "REMOVE",
        "item_list": [
            {
                "item_id": "7650000000000000001",
                "spu_id_list": [
                    "1729000000000000001"
                ]
            }
        ]
    },
    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_business/campaign/gmv_max/creative/update/');
for (const [k, v] of Object.entries({"platform_shop_id":"7000000000000000001"})) 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({"campaign_id":"1830000000000000001","action":"REMOVE","item_list":[{"item_id":"7650000000000000001","spu_id_list":["1729000000000000001"]}]}),
});
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_business/campaign/gmv_max/creative/update/' . '?' . http_build_query(['platform_shop_id' => '7000000000000000001']);
$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, '{"campaign_id":"1830000000000000001","action":"REMOVE","item_list":[{"item_id":"7650000000000000001","spu_id_list":["1729000000000000001"]}]}');
$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 Business)

Thành công: `code = 0`, `data` rỗng.

NameTypeSampleDescription
codeint00 = thành công; khác 0 xem `message` (TikTok trả HTTP 200 kèm code lỗi; vd 40002 = tham số sai, message liệt kê giá trị hợp lệ).
messagestringOKThông điệp của TikTok.
request_idstring2021080307532501024502410704A7306FMã request TikTok — ghi lại khi cần tra lỗi.
dataobjectDữ liệu.

Get started

  1. Sign up for Partner
  2. Enable a data type of the Ads (Marketing API) group on the platform page
  3. Create an API key (tick the TikTok Business channel)
  4. Call it as in the examples above