VI | EN
Message us on Messenger
Developer resources

Get diagnoses for ad groups — TikTok Business API

Get diagnoses for ad groups · 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 diagnoses for ad groups

GET/tool/diagnosis/get/Via 360: GET https://partner.quantri360.com/v1/tiktok_business/tool/diagnosis/get/
Description

Use this endpoint to get diagnoses, including possible issues and suggestions for corrections or improvements, for your active ad groups.

Ad groups with no suggestions will not be returned.

Request

Endpoint

GET https://partner.quantri360.com/v1/tiktok_business/tool/diagnosis/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
filteringqueryobjectNoFiltering conditions.

Request examples

curl -s "https://partner.quantri360.com/v1/tiktok_business/tool/diagnosis/get/" \
  -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/tool/diagnosis/get/",
    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_business/tool/diagnosis/get/');
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_business/tool/diagnosis/get/' . '?' . 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 Business)

NameTypeSampleDescription
codenumberResponse code. For the complete list of error codes and descriptions, see Appendix - Return Codes.
messagestringResponse message. For details, see Appendix - Return Codes.
request_idstringUnique ID of the request.
dataobjectReturned data.
resultsobject[]List of ad groups with the corresponding diagnoses.
adgroup_idstringAd group ID.
adgroup_namestringAd group name.
diagnosisobjectDiagnosis for the ad group .
diagnosis_timestringThe date and time (UTC + 0 time) when the diagnosis was requested, in the format of "YYYY-MM-DD HH:MM:SS". Example: "2024-01-01 00:00:01".
suggestionsobject[]Suggestions for the ad group.
creativeobject[]Suggestions for creatives in the ad group. If no issues are detected for the creatives in the ad group, the value of this field will be an empty list (`[]`).
suggestion_timestringThe date and time (UTC + 0 time) when the issue was detected and the suggestion was generated, in the format of "YYYY-MM-DD HH:MM:SS". Example: "2024-01-01 00:00:01".
vidstringVideo ID. Example: v07033g50000c1irpg9l3c4i8hcdp7hg.
namestringAd name.
ad_idstringAd ID. Example: 1700286510378002.
issue_suggestionstringThe suggestion for the issue. Enum values: - `NOBGM`: The video lacks background music. You need to add background music to the video. You can use /creative/quick_optimization/create/ to create a Quick Optimization task for the video. - `VIDEO_LENGTH`: The video duration is too short. Edit your video to increase its duration. You can use /creative/quick_optimization/create/ to create a Quick Optimization task for the video. - `VIDEO_RESOLUTION`: The video resolution is too low. Replace the video with a higher resolution version.
suggestion_idstringSuggestion ID.
bid_and_budgetobject[]Suggestions for the ad group regarding bidding and budget. If no issues are detected for the bidding and budget of the ad group, the value of this field will be an empty list (`[]`).
suggestion_timestringThe date and time (UTC + 0 time) when the issue was detected and the suggestion was generated, in the format of "YYYY-MM-DD HH:MM:SS". Example: "2024-01-01 00:00:01".
suggestion_idstringSuggestion ID.
issue_suggestionstringThe suggestion for the issue. Enum values: - `SUGGEST_BID`: A new suggested bid will be provided - `SUGGEST_BUDGET`: A suggested budget will be provided. - `NOBID_SWITCH`: Switch to the Maximum Delivery bidding strategy. - `BUDGET_EDR`: The Budget EDR (EDR) recommendations will be provided. To learn about EDR, see Estimated Delivery Results. - `BID_EDR`: The Bid EDR recommendations will be provided.
bidnumberReturned if `issue_suggestion` is `SUGGEST_BID`. Current bid value.
budgetnumberReturned if `issue_suggestion` is `SUGGEST_BID`, `SUGGEST_BUDGET`, or `NOBID_SWITCH`. Current budget.
suggest_bidnumberReturned if `issue_suggestion` is `SUGGEST_BID`. Suggested bid value.
suggest_budgetnumberReturned if `issue_suggestion` is `SUGGEST_BUDGET` or `NOBID_SWITCH`. Suggested budget value.
cost_floornumberReturned if `issue_suggestion` is `SUGGEST_BID`. Estimated minimum cost.
bid_edr_infoobject[]If `issue_suggestion` is not `BID_EDR`, the value of this field will be an empty list (`[]`). Bid EDR recommendations for the ad group. 9 sets of data for recommended bid raise ratios from -10% to 30% with a step of 5% and corresponding estimated results.
recommended_bidnumberRecommended bid. Adopt one suitable bid using /adgroup/update/ and pass the adopted bid price to `conversion_bid_price` within the same day (advertiser account time zone).
bid_increase_rationumberEstimated bid increase ratio.
estimated_costnumberEstimated cost.
cost_upliftnumberEstimated cost uplift.
cost_uplift_rationumberEstimated cost uplift ratio.
budget_edr_infoobject[]If `issue_suggestion` is not `BUDGET_EDR`, the value of this field will be an empty list (`[]`). Budget EDR recommendations for the ad group. 15 sets of data for recommended budget raise ratios from -20% to 50% with a step of 5%, and corresponding estimated results.
recommended_budgetnumberRecommended budget. Adopt one suitable budget using /adgroup/budget/update/ within the same day (advertiser account time zone).
budget_increase_rationumberEstimated budget increase ratio.
estimated_conversionnumberEstimated conversion.
conversion_upliftnumberEstimated conversion uplift.
conversion_uplift_rationumberEstimated conversion uplift ratio.
cpanumberEstimated CPA.
cpa_upliftnumberEstimated CPA uplift.
cpa_uplift_rationumberEstimated CPA uplift ratio.
impressionnumberEstimated impression.
event_trackobject[]Suggestions for the ad group regarding event tracking. If no issues are detected for the event tracking of the ad group, the value of this field will be an empty list (`[]`).
suggestion_timestringThe date and time (UTC + 0 time) when the issue was detected and the suggestion was generated, in the format of "YYYY-MM-DD HH:MM:SS". Example: "2024-01-01 00:00:01".
suggestion_idstringSuggestion ID.
issue_suggestionstringThe suggestion for the issue. Enum values: - `PIXEL`: This pixel had no activity in the last 7 days. Test your pixel settings.
pixel_idstringPixel ID.
pixel_codestringPixel code.

Response sample

{
    "code": 0,
    "message": "OK",
    "request_id": "{{request_id}}",
    "data": {
        "results": [
            {
                "adgroup_id": "{{adgroup_id}}",
                "adgroup_name": "{{adgroup_name}}",
                "diagnosis": {
                    "diagnosis_time": "{{diagnosis_time}}",
                    "suggestions": [
                        {
                            "bid_and_budget": [],
                            "creative": [],
                            "event_track": [
                                {
                                    "issue_suggestion": "PIXEL",
                                    "pixel_code": "{{pixel_code}}",
                                    "pixel_id": "{{pixel_id}}",
                                    "suggestion_id": "{{suggestion_id}}",
                                    "suggestion_time": "{{suggestion_time}}"
                                }
                            ]
                        }
                    ]
                }
            }
        ]
    }
}

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