VI | EN
Message us on Messenger
Developer resources

Get Coupon — TikTok Shop API

tiktok.promotion.202406.coupons.coupon_id · 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.promotion.202406.coupons.coupon_id

GET/promotion/202406/coupons/{coupon_id}Via 360: GET https://partner.quantri360.com/v1/tiktok/promotion/202406/coupons/{coupon_id}
Coming soon. This API already runs in production through 360 and pricing is being finalised — you can read the docs and prepare your integration now.
Description

Lấy chi tiết mã giảm giá theo coupon_id.

  • Gọi qua /v1/tiktok/promotion/202406/coupons/{coupon_id} với Authorization: Bearer <key>; dùng platform_shop_id khi có nhiều shop. 360 tự gắn app_key, shop_cipher, sign và access_token.
  • API chỉ đọc; code = 0 mới là thành công.

Request

Endpoint

GET https://partner.quantri360.com/v1/tiktok/promotion/202406/coupons/{coupon_id}

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
coupon_idpathstringYes100000000000000001Coupon mã.

Request examples

curl -s "https://partner.quantri360.com/v1/tiktok/promotion/202406/coupons/100000000000000001" \
  -H "Authorization: Bearer $KEY"
Python
import requests

KEY = "q360_live_..."  # khóa API của brand
r = requests.get(
    "https://partner.quantri360.com/v1/tiktok/promotion/202406/coupons/100000000000000001",
    params={},
    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/promotion/202406/coupons/100000000000000001');
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: 'GET',
  headers: { Authorization: `Bearer ${KEY}` },
});
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/promotion/202406/coupons/100000000000000001' . '?' . http_build_query([]);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer ' . $key]);
$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
codeint0Mã. Giá trị: API.
messagestringSuccessTin nhắn. Giá trị: API.
request_idstringDEMO_REQUEST_A_01Yêu cầu mã.
dataobjectDữ liệu.
couponobjectCoupon.
idstring100000000000000001Mã.
titlestringMinh họaTiêu đề.
display_typestringMinh họaDisplay loại. Giá trị: REGULAR, TTS, LIVE, CREATOR_EXCLUSIVE, CHAT, PROMO_CODE, URL.
statusstringNOT_STARTTrạng thái. Giá trị: NOT_START, ONGOING, EXPIRED, DEACTIVATED.
create_timenumber1793491200Tạo thời điểm. Giá trị: UNIX.
update_timenumber1793491200Update thời điểm. Giá trị: UNIX.
claim_durationobjectClaim thời lượng.
start_timenumber1793491200Mốc bắt đầu RFC 3339 có múi giờ, tính cả mốc.
end_timenumber1793577600Kết thúc (Unix giây).
redemption_durationobjectRedemption thời lượng.
typestringABSOLUTELoại. Giá trị: ABSOLUTE, RELATIVE.
start_timeint1793491200Mốc bắt đầu RFC 3339 có múi giờ, tính cả mốc.
end_timeint1793577600Kết thúc (Unix giây).
relative_timenumber1793491200Relative thời điểm. Giá trị: RELATIVE.
display_channelsobject[][{}]Display channels. Giá trị: ALL, SHOPPING_CENTER, CHAT, LIVE, PRIVATE, PRIVATE_WITH_ALLOW, VIDEO, SHOWCASE.
promo_codestringMinh họaPromo mã. Giá trị: PROMO_CODE.
target_buyer_segmentstringMinh họaMục tiêu người mua segment. Giá trị: ALL, TTS, NEW, REPEAT_CUSTOMERS, RECENT_CUSTOMERS, FREQUENT_CUSTOMERS, LAPSED_CUSTOMERS, NEW_FOLLOWERS, EXISTING_ACTIVE_FOLLOWERS, LIVE.
usage_limitsobjectUsage limits.
single_buyer_claim_limitnumber1Single người mua claim giới hạn.
total_claim_limitint1Tổng số quà được nhận theo SKU: số nguyên từ 1 đến 99999.
redemption_limitnumber1Redemption giới hạn.
usage_statsobjectUsage stats.
claimed_countnumber1Claimed số lượng.
redeemed_countnumber1Redeemed số lượng.
discountobjectCấu hình ưu đãi: shipping_discount cho SHIPPING_DISCOUNT; bmsm_discount cho BMSM; gift_discount cho GWP; bxgy_discount cho BXGY. Không dùng cho FIXED_PRICE / DIRECT_DISCOUNT / FLASHSALE.
typestringAMOUNT_OFFLoại. Giá trị: AMOUNT_OFF, PERCENT_OFF.
reduction_amountobjectReduction số tiền. Giá trị: AMOUNT_OFF.
amountstring10000Số tiền. Giá trị: AMOUNT_OFF.
currencystringVNDMã tiền tệ.
percentagestring0.1Phần trăm. Giá trị: PERCENT_OFF.
max_discountobjectMax giảm giá. Giá trị: PERCENT_OFF.
amountstring10000Số tiền.
currencystringVNDMã tiền tệ.
thresholdobjectNgưỡng.
typestringNONELoại. Giá trị: NONE, MIN_SPEND.
min_spendobjectMin spend. Giá trị: MIN_SPEND.
amountstring10000Số tiền.
currencystringVNDMã tiền tệ.
product_scopestringMinh họaSản phẩm phạm vi. Giá trị: FULL_SHOP, SPECIFIC_PRODUCTS, API.
product_ids[]string['100000000000000001']Sản phẩm ids. Giá trị: SPECIFIC_PRODUCTS.
seller_tncstringMinh họaNgười bán tnc.
creation_sourcestringMinh họaCreation nguồn. Giá trị: SELLER_CENTER, SELLER_APP, TTS_CRM, CRM.
live_tasks[]objectLive tasks. Giá trị: LIVE.
typestringNONELoại. Giá trị: NONE, LIVE, FOLLOW_HOST, WATCH_FOR_MIN_TIME.
min_watch_timestring1793491200Min xem thời điểm. Giá trị: LIVE.

Response sample

{
  "code": 0,
  "message": "Success",
  "request_id": "DEMO_REQUEST_A_01",
  "data": {
    "coupon": {
      "id": "100000000000000001",
      "title": "Minh họa",
      "display_type": "Minh họa",
      "status": "NOT_START",
      "create_time": 1793491200,
      "update_time": 1793491200,
      "claim_duration": {
        "start_time": 1793491200,
        "end_time": 1793577600
      },
      "redemption_duration": {
        "type": "ABSOLUTE",
        "start_time": 1793491200,
        "end_time": 1793577600,
        "relative_time": 1793491200
      },
      "display_channels": [
        {}
      ],
      "promo_code": "Minh họa",
      "target_buyer_segment": "Minh họa",
      "usage_limits": {
        "single_buyer_claim_limit": 1,
        "total_claim_limit": 1,
        "redemption_limit": 1
      },
      "usage_stats": {
        "claimed_count": 1,
        "redeemed_count": 1
      },
      "discount": {
        "type": "AMOUNT_OFF",
        "reduction_amount": {
          "amount": "10000",
          "currency": "VND"
        },
        "percentage": "0.1",
        "max_discount": {
          "amount": "10000",
          "currency": "VND"
        }
      },
      "threshold": {
        "type": "NONE",
        "min_spend": {
          "amount": "10000",
          "currency": "VND"
        }
      },
      "product_scope": "Minh họa",
      "product_ids": [
        "100000000000000001"
      ],
      "seller_tnc": "Minh họa",
      "creation_source": "Minh họa",
      "live_tasks": [
        {
          "type": "NONE",
          "min_watch_time": "1793491200"
        }
      ]
    }
  }
}

Get started

  1. Sign up for Partner
  2. Enable a data type of the Khuyến mãi (Promotion) group on the platform page
  3. Create an API key (tick the TikTok Shop channel)
  4. Call it as in the examples above