VI | EN
Nhắn Messenger
Dành cho developer

Chi tiết giá / khuyến mãi của đơn — API TikTok Shop

tiktok.order.202407.orders.order_id.price_detail · gọi qua Quantri360 bằng một API key cho chính tài khoản / tài sản bạn đã kết nối và ủy quyền — 360 lo việc ký request và làm mới phiên đăng nhập bạn đã cấp.

tiktok.order.202407.orders.order_id.price_detail

GET/order/202407/orders/{order_id}/price_detailGọi qua 360: GET https://partner.quantri360.com/v1/tiktok/order/202407/orders/{order_id}/price_detail
Mô tả API

Phân rã giá của một đơn: giá niêm yết, giảm giá người bán / sàn, voucher, phí ship và phần giảm phí ship, thuế — cho cả đơn và từng dòng hàng.

  • Gọi qua /v1/tiktok/order/202407/orders/{order_id}/price_detail 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.
  • Tiền là chuỗi số theo currency. Đây là giá phía NGƯỜI MUA; phí sàn / tiền người bán thực nhận nằm ở module Tài chính.

Request

Địa chỉ

GET https://partner.quantri360.com/v1/tiktok/order/202407/orders/{order_id}/price_detail

Xác thực & gian hàng

TênVị tríKiểuMẫuMô tả
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.

Tham số request

TênVị tríKiểuBắt buộcMẫuMô tả
order_idpathstringCó576400000000000001Mã đơn.

Ví dụ request

curl -s "https://partner.quantri360.com/v1/tiktok/order/202407/orders/576400000000000001/price_detail?platform_shop_id=7494000000000000000" \
  -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/order/202407/orders/576400000000000001/price_detail",
    params={
        "platform_shop_id": "7494000000000000000"
    },
    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/order/202407/orders/576400000000000001/price_detail');
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: '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/order/202407/orders/576400000000000001/price_detail' . '?' . 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]);
$res = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $status, "\n", $res;

Response

Tham số phản hồi (nguyên của TikTok Shop)

TênKiểuMẫuMô tả
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_idstringDEMO_REQUEST_0001Mã request TikTok.
dataobjectDữ liệu.
currencystringVND
totalstring10000Tổng giá gốc = sku_list_price + shipping_list_price.
paymentstring10000Người mua đã trả.
sku_list_pricestring10000Tổng giá niêm yết sản phẩm.
subtotal_deduction_sellerstring10000Giảm giá sản phẩm do người bán chịu (gồm voucher người bán).
subtotal_deduction_platformstring10000Giảm giá sản phẩm do sàn chịu.
sku_sale_pricestring10000Giá bán sau giảm = sku_list_price − 2 khoản giảm.
voucher_deduction_sellerstring10000Phần giảm từ voucher người bán (nằm trong subtotal_deduction_seller).
voucher_deduction_platformstring10000Phần giảm từ voucher sàn.
subtotalstring10000Tiền hàng sau giảm, gồm thuế.
subtotal_tax_amountstring10000Thuế trên sản phẩm.
shipping_list_pricestring10000Phí ship gốc.
shipping_fee_deduction_sellerstring10000Giảm phí ship người bán chịu.
shipping_fee_deduction_platformstring10000Giảm phí ship sàn chịu.
shipping_fee_deduction_platform_voucherstring10000Phần giảm phí ship từ voucher sàn.
shipping_sale_pricestring10000Phí ship người mua trả = shipping_list_price − 2 khoản giảm.
tax_amountstring10000Tổng thuế.
net_price_amountstring10000Giá chưa thuế (thị trường có VAT tách riêng; VN thường 0).
line_itemsobject[]Cùng các khoản trên cho từng dòng hàng.
idstring100000000000000001Id dòng (= line_items[].id của đơn).
sku_list_pricestring10000
subtotal_deduction_sellerstring10000
subtotal_deduction_platformstring10000
sku_sale_pricestring10000
voucher_deduction_sellerstring10000
voucher_deduction_platformstring10000
shipping_list_pricestring10000
shipping_sale_pricestring10000
sku_gift_original_pricestring10000Giá gốc quà tặng.
paymentstring10000Người mua trả cho dòng.
totalstring10000
currencystringVNDMã tiền tệ.
subtotalstring10000Tạm tính.
subtotal_tax_amountstring10000Tạm tính thuế số tiền.
shipping_fee_deduction_sellerstring10000Vận chuyển phí khấu trừ người bán.
shipping_fee_deduction_platformstring10000Vận chuyển phí khấu trừ nền tảng.
shipping_fee_deduction_platform_voucherstring10000Vận chuyển phí khấu trừ nền tảng voucher.
tax_amountstring10000Thuế số tiền.
tax_ratestring10000Thuế tỷ lệ.
net_price_amountstring10000Ròng giá số tiền.
cod_feestring10000Cod phí. Giá trị / trường liên quan: 0.00.
cod_fee_amountstring10000Cod phí số tiền. Giá trị / trường liên quan: 0.00.
sku_gift_net_pricestring10000Sku quà tặng ròng giá.
distance_shipping_feestring10000Khoảng cách vận chuyển phí.
distance_feestring10000Khoảng cách phí.
seller_funded_product_promotionsobject[]Người bán tài trợ sản phẩm khuyến mãi.
activity_idstring100000000000000001Mã hoạt động.
discount_amountstring10000Giảm giá số tiền.
discount_typestring10000Giảm giá loại.
seller_funded_shipping_promotionsobject[]Người bán tài trợ vận chuyển khuyến mãi.
activity_idstring100000000000000001Mã hoạt động.
discount_amountstring10000Giảm giá số tiền.
discount_typestring10000Giảm giá loại.
tax_ratestring10000Thuế tỷ lệ.
cod_feestring10000Cod phí. Giá trị / trường liên quan: 0.00.
cod_fee_net_amountstring10000Cod phí ròng số tiền. Giá trị / trường liên quan: 0.00.
sku_gift_original_pricestring10000Sku quà tặng gốc giá.
sku_gift_net_pricestring10000Sku quà tặng ròng giá.
distance_shipping_feestring10000Khoảng cách vận chuyển phí.
distance_feestring10000Khoảng cách phí.

Mẫu phản hồi

{
  "code": 0,
  "message": "Success",
  "request_id": "DEMO_REQUEST_0001",
  "data": {
    "currency": "VND",
    "total": "10000",
    "payment": "10000",
    "sku_list_price": "10000",
    "subtotal_deduction_seller": "10000",
    "subtotal_deduction_platform": "10000",
    "sku_sale_price": "10000",
    "voucher_deduction_seller": "10000",
    "voucher_deduction_platform": "10000",
    "subtotal": "10000",
    "subtotal_tax_amount": "10000",
    "shipping_list_price": "10000",
    "shipping_fee_deduction_seller": "10000",
    "shipping_fee_deduction_platform": "10000",
    "shipping_fee_deduction_platform_voucher": "10000",
    "shipping_sale_price": "10000",
    "tax_amount": "10000",
    "net_price_amount": "10000",
    "line_items": [
      {
        "id": "100000000000000001",
        "sku_list_price": "10000",
        "subtotal_deduction_seller": "10000",
        "subtotal_deduction_platform": "10000",
        "sku_sale_price": "10000",
        "voucher_deduction_seller": "10000",
        "voucher_deduction_platform": "10000",
        "shipping_list_price": "10000",
        "shipping_sale_price": "10000",
        "sku_gift_original_price": "10000",
        "payment": "10000",
        "total": "10000",
        "currency": "VND",
        "subtotal": "10000",
        "subtotal_tax_amount": "10000",
        "shipping_fee_deduction_seller": "10000",
        "shipping_fee_deduction_platform": "10000",
        "shipping_fee_deduction_platform_voucher": "10000",
        "tax_amount": "10000",
        "tax_rate": "10000",
        "net_price_amount": "10000",
        "cod_fee": "10000",
        "cod_fee_amount": "10000",
        "sku_gift_net_price": "10000",
        "distance_shipping_fee": "10000",
        "distance_fee": "10000",
        "seller_funded_product_promotions": [
          {
            "activity_id": "100000000000000001",
            "discount_amount": "10000",
            "discount_type": "10000"
          }
        ],
        "seller_funded_shipping_promotions": [
          {
            "activity_id": "100000000000000001",
            "discount_amount": "10000",
            "discount_type": "10000"
          }
        ]
      }
    ],
    "tax_rate": "10000",
    "cod_fee": "10000",
    "cod_fee_net_amount": "10000",
    "sku_gift_original_price": "10000",
    "sku_gift_net_price": "10000",
    "distance_shipping_fee": "10000",
    "distance_fee": "10000"
  }
}

Bắt đầu dùng

  1. Đăng ký tài khoản Partner
  2. Mở loại dữ liệu thuộc nhóm Đơn hàng ở trang nền tảng
  3. Tạo API key (tick kênh TikTok Shop)
  4. Gọi theo ví dụ ở trên