VI | EN
Message us on Messenger
Developer resources

Get the results of a split test — TikTok Business API

Get the results of a split test · 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.

Get the results of a split test

GET/split_test/result/get/Via 360: GET https://partner.quantri360.com/v1/tiktok_business/split_test/result/get/
Description

Use this endpoint at least 24 hours after the test ends to get test results, including p-values for each metric.

Request

Endpoint

GET https://partner.quantri360.com/v1/tiktok_business/split_test/result/get/

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
split_test_group_idquerystringYesSplit test group ID.

Request examples

curl -s "https://partner.quantri360.com/v1/tiktok_business/split_test/result/get/?split_test_group_id=" \
  -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_business/split_test/result/get/",
    params={
        "split_test_group_id": ""
    },
    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/split_test/result/get/');
for (const [k, v] of Object.entries({"split_test_group_id":""})) 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_business/split_test/result/get/' . '?' . http_build_query(['split_test_group_id' => '']);
$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 Business)

NameTypeSampleDescription
codenumberResponse code. For the complete list of response codes and descriptions, see Appendix - Return Codes.
messagestringResponse message. For details, see Appendix - Return Codes.
dataobjectReturned data.
split_test_statusstringStatus of the split test. Enum values: - `UNKNOWN`: The status of the split test is unavailable. - `NOT_STARTED`: The split test has not started because the `start_time` of the split test has not arrived yet. - `IN_PROGRESS`: The split test is running. - `REPORTING_GENERATING`: The `end_time` of the split test has passed and a report is being generated. - `COMPLETED`: The split test either ends automatically, or is manually stopped via /split_test/end/. - `CANCELLED`: The split test was canceled before the `start_time`. This enum value is only available for campaign level split test.
split_test_levelstringSplit test level. Enum values: - `ADGROUP`(Ad group level split test.) - `CAMPAIGN`(Campaign level split test.)
object_infoobject[]Information about the two ad groups that are associated with the split test.
adgroup_idstringAd group ID.
adgroup_namestringAd group name.
optimization_goalstringOptimization goal of the ad group. For enum values, see Enumeration - Optimization Goal.
cellsobject[]Cell list of the split test.
object_idsstring[]List of `campaign_id` or `adgroup_id` in the cell that are associated with the split test.
test_variablestringSplit test variable. Enum values: - `BIDDING_OPTIMIZATION`: Set different optimization values for bidding & optimization fields to compare how optimization methods impact your ad performance. - `TARGTING`: Set different targeting values at the ad group level for comparing how effective your ad groups are at reaching different audiences or demographics. - `CREATIVE`: Set different creatives to compare how different creatives impact your ad performance. - `CUSTOM`: Set multiple variables to compare how these variables impact your ad performance. This enum value is only available for campaign level split test.
key_metricstringThe key metric when you created this split test. If no value is specified for this field, the following default values will be used: - For ad group level split test, if both ad groups use `REACH` optimization goal, the default key metric will be `COST_PER_REACH`. Otherwise, the default key metric will be `COST_PER_SHOW`. - For campaign level split test, the default key metric is `UNSET`.
start_timestringThe start time of this split test, in the format of `YYYY-MM-DD HH:MM:SS` (ad account time zone). Example: `2022-01-01 00:00:00`.
end_timestringThe end time of this split test, in the format of `YYYY-MM-DD HH:MM:SS` (ad account time zone). Example: `2022-01-01 00:00:00`.
p_value_infoobject[]Test result information.
metricstringMetric name. - `UNSET`: Unset. - `CONVERT_RATE`: CVR (Conversion rate). - `CLICK_THROUGH_RATE`: Click through rate (CTR). - `COST_PER_SHOW`: Cost per mille (CPM). - `COST_PER_CONVERT`: Cost per conversion. - `COST_PER_REACH`: Cost per reach. - `COST_PER_CLICK`: Cost per click. - `COST_PER_FOCUSED_VIEW`: Cost per focused view. - `FOCUSED_VIEW_RATE`: Focused view rate. - `COMPLETE_PAYMENT_ROAS`: Complete Payment ROAS. - `COST_PER_LANDING_PAGE_VIEW`: Cost per landing page view. - `LANDING_PAGE_VIEW_RATE`: Landing page view rate. - `CLICK`: Click. - `REACH`: Reach. - `SHOW`: Impression. - `CONVERT`: Conversion. - `COST`: Cost.
p_valuefloatP value of each metric. There will be a winning ad group or campaign when the p value <= 0.1.
request_idstringThe log id of the request, which uniquely identifies a request.

Response sample

HTTPS/1.1 200 OK
{
    "code": 0,
    "message": "OK",
    "request_id": "{{request_id}}",
    "data": {
        "key_metric": "FOCUSED_VIEW_RATE",
        "object_info": [
            {
                "optimization_goal": "FOCUSED_VIEW_RATE",
                "adgroup_name": "{{adgroup_name}}",
                "adgroup_id": "{{adgroup_id}}"
            },
            {
                "optimization_goal": "ENGAGED_VIEW_FIFTEEN",
                "adgroup_name": "{{adgroup_name}}",
                "adgroup_id": "{{adgroup_id}}"
            }
        ],
        "start_time": "{{start_time}}",
        "test_variable": "BIDDING_OPTIMIZATION",
        "p_value_info": [],
        "end_time": "{{end_time}}",
        "split_test_status": "NOT_STARTED"
    }
}

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