VI | EN
Message us on Messenger
Developer resources

Creative basic reports — TikTok Business API

Creative basic reports · 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.

Creative basic reports

GET/creative/report/get/Via 360: GET https://partner.quantri360.com/v1/tiktok_business/creative/report/get/
Description

Run a creative basic report

Use this endpoint to run a basic report on creative assets.

> Note

> The creative basic reports include data on both undeleted and deleted creative assets.

Request

Endpoint

GET https://partner.quantri360.com/v1/tiktok_business/creative/report/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
material_typequerystringYesMaterial type. Enum values: VIDEO, IMAGE, INSTANT_PAGE.
lifetimequerybooleanNoWhether to query all data. If this field is set to true, you do not need to specify start_date and end_date. Supported values: true, false. Default value: false.
start_datequerystringNoRequired when lifetime is set to false. Start time, closed interval. Format such as: 2020-01-01 (advertiser time zone).
end_datequerystringNoRequired when lifetime is set to false. End time, closed interval. Format such as: 2020-01-01 (advertiser time zone).
info_fieldsquerystring[]NoInformation you want to get about creatives. The default value is [material_id, video_id, image_id, page_id]. Allowed values: All data fields that are shown under info in the response.
metrics_fieldsquerystring[]NoThe metrics or dimension data that you need. The default value is: [impressions , spend]. Value range: all fields under metrics in the response.
filteringqueryobjectNoFiltering criteria
sort_fieldquerystringNoField to sort by. Support sorting according to the creation time of the material and all the index data. Not sorted by default.
sort_typequerystringNoSorting order. Enum values: ASC, DESC. Default value: DESC.
pagequerynumberNoCurrent number of pages. Default value: 1, range: ≥ 1
page_sizequerynumberNoPage size. Default value: 10, range: 1-1000

Request examples

curl -s "https://partner.quantri360.com/v1/tiktok_business/creative/report/get/?material_type=" \
  -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/creative/report/get/",
    params={
        "material_type": ""
    },
    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/creative/report/get/');
for (const [k, v] of Object.entries({"material_type":""})) 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/creative/report/get/' . '?' . http_build_query(['material_type' => '']);
$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.
listobject[]Report information
infoobjectMaterial information
material_idstringMaterial ID
video_idstringVideo ID
image_idstringImage ID
sourcestringSource of material. For enum values, see Enumeration - Material Source.
country_codestring[]Country or location code. For enum values, see Appendix - Location code
placementstring[]Placement. For enum values, see Enumeration - Placement
num_adsnumberThe number of ads.
total_active_daysnumberThe total active days. An active day is a day that has spending (`spend` > 0). This field only supports `VIDEO` type of material. Note: - This metric is supported only when `lifetime` is set to `false` in the request. - When `lifetime` is set to `true` in the request, the value of this field will be 0.
related_ad_idsstring[]The IDs of the related ads. This field only supports `VIDEO` type of material.
adgroup_numbernumberThe number of related ad groups. This field only supports `VIDEO` type of material.
related_adgroup_idsstring[]The IDs of the related ad groups. This field only supports `VIDEO` type of material.
page_idstringInstant page ID
page_statusstringInstant page status. Enum values: `DRAFT`, `READY`
page_biz_typestring[]Instant page business type. Enum values: `CUSTOM`, `APP_PROFILE`, `INSTANT_FORM`
page_template_typestring[]Instant page template types. When `page_biz_type` includes `CUSTOM`, the allowed values are - `CUSTOMIZED` - `INTRODUCTION` - `BRAND_STORY` - `SALES_PRODUCT` - `MOVIE_TRAILER`When `page_biz_type` includes `INSTANT_FORM`, the allowed values are `NORMAL_FORM` and `ADVANCED_FORM`.
page_thumbnailstringLink to the page thumbnail
app_profile_countrystring[]Codes of the countries or locations that the instant page is deployed to. Valid when `instant_page_biz_type` includes `APP_PROFILE`.
app_profile_external_app_idstring[]ID of the app that the instant page directs to. Valid when `instant_page_biz_type` includes `APP_PROFILE`
app_profile_iconstringApp icon
customized_page_external_actionstring[]Conversion events that are specific to customized instant pages
metricsobjectMetrics data. Please see the Metrics table for details.
page_infoobjectPaging information
pagenumbercurrent page number
page_sizenumberPaging Size
total_numbernumberTotal
total_pagenumberTotal number
request_idstringThe log id of a request, which uniquely identifies the request.

Response sample

HTTPS/1.1 200 OK
{
    "code": 0,
    "message": "OK",
    "request_id": "{{request_id}}",
    "data": {
        "list": [
            {
                "metrics": {
                    "clicks": "0",
                    "impressions": "0",
                    "spend": "0"
                },
                "info": {
                    "page_id": null,
                    "image_id": null,
                    "video_id": "{{video_id}}",
                    "material_id": "{{material_id}}"
                }
            },
            {
                "metrics": {
                    "clicks": "17",
                    "impressions": "30",
                    "spend": "0"
                },
                "info": {
                    "page_id": null,
                    "image_id": null,
                    "video_id": "{{video_id}}",
                    "material_id": "{{material_id}}"
                }
            },
            {
                "metrics": {
                    "clicks": "0",
                    "impressions": "0",
                    "spend": "0"
                },
                "info": {
                    "page_id": null,
                    "image_id": null,
                    "video_id": "{{video_id}}",
                    "material_id": "{{material_id}}"
                }
            },
            {
                "metrics": {
                    "spend": "0",
                    "clicks": "0",
                    "impressions": "0"
                },
                "info": {
                    "page_id": null,
                    "image_id": null,
                    "video_id": "{{video_id}}",
                    "material_id": "{{material_id}}"
                }
            },
            {
                "metrics": {
                    "spend": "0",
                    "clicks": "3",
                    "impressions": "3"
                },
                "info": {
                    "page_id": null,
                    "image_id": null,
                    "video_id": "{{video_id}}",
                    "material_id": "{{material_id}}"
                }
            },
            {
                "metrics": {
                    "clicks": "0",
                    "impressions": "0",
                    "spend": "0"
                },
                "info": {
                    "page_id": null,
                    "image_id": null,
                    "video_id": "{{video_id}}",
                    "material_id": "{{material_id}}"
                }
            },
            {
                "metrics": {
                    "clicks": "0",
                    "impressions": "0",
                    "spend": "0"
                },
                "info": {
                    "page_id": null,
                    "image_id": null,
                    "video_id": "{{video_id}}",
                    "material_id": "{{material_id}}"
                }
            },
            {
                "metrics": {
                    "clicks": "0",
                    "impressions": "0",
                    "spend": "0"
                },
                "info": {
                    "page_id": null,
                    "image_id": null,
                    "video_id": "{{video_id}}",
                    "material_id": "{{material_id}}"
                }
            },
            {
                "metrics": {
                    "impressions": "11",
                    "spend": "0",
                    "clicks": "1"
                },
                "info": {
                    "page_id": null,
                    "image_id": null,
                    "video_id": "{{video_id}}",
                    "material_id": "{{material_id}}"
                }
            },
            {
                "metrics": {
                    "spend": "0",
                    "clicks": "0",
                    "impressions": "0"
                },
                "info": {
                    "page_id": null,
                    "image_id": null,
                    "video_id": "{{video_id}}",
                    "material_id": "{{material_id}}"
                }
            }
        ],
        "page_info": {
            "total_number": 560,
            "total_page": 56,
            "page_size": 10,
            "page": 1
        }
    }
}
(/code);

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