VI | EN
Message us on Messenger
Developer resources

Get catalog event source diagnostic information — TikTok Business API

Get catalog event source diagnostic information · 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 catalog event source diagnostic information

GET/diagnostic/catalog/eventsource/issue/Via 360: GET https://partner.quantri360.com/v1/tiktok_business/diagnostic/catalog/eventsource/issue/
Description

Use this endpoint to retrieve diagnostic information for the event sources that are bound to your catalog.

Request

Endpoint

GET https://partner.quantri360.com/v1/tiktok_business/diagnostic/catalog/eventsource/issue/

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
bc_idquerystringYesBusiness Center ID. To get the list of Business Centers that you can access, use /bc/get/.
catalog_idquerystringYesCatalog ID. To get the catalogs under a Business Center, use /catalog/get/.
event_source_typequerystringYesThe event source type. Enum values: - APP: App. Pass app_id at the same time. - PIXEL: Pixel. Pass pixel_code at the same time.
pixel_codequerystringNoRequired when event_source_type is set to PIXEL. The Pixel code. To retrieve the Pixel codes that are bound to your catalog (catalog_id), use /catalog/eventsource_bind/get/..
event_typequerystringNoThe event type that you want to retrieve data for. Enum values: - VIEW_CONTENT: View Content. - ADD_TO_CART: Add to Cart. - PURCHASE: Complete Payment. Default value: VIEW_CONTENT.
time_rangequerystringNoThe time range that you want to retrieve data for. Enum values: - YESTERDAY: Yesterday. - LAST_7_DAYS: Last 7 days. - LAST_30_DAYS: Last 30 days. Default value: LAST_7_DAYS.

Request examples

curl -s "https://partner.quantri360.com/v1/tiktok_business/diagnostic/catalog/eventsource/issue/?bc_id=&catalog_id=&event_source_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/diagnostic/catalog/eventsource/issue/",
    params={
        "bc_id": "",
        "catalog_id": "",
        "event_source_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/diagnostic/catalog/eventsource/issue/');
for (const [k, v] of Object.entries({"bc_id":"","catalog_id":"","event_source_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/diagnostic/catalog/eventsource/issue/' . '?' . http_build_query(['bc_id' => '', 'catalog_id' => '', 'event_source_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 Code.
messagestringResponse message. For details, see Appendix - Return Codes.
request_idstringThe log ID of a request, which uniquely identifies the request.
dataobjectReturned data.
listobject[]A list of returned data.
diagnostic_resultstringThe issue detected from diagnostics. If no issues are detected, the value of this field will be "No Issues Found". Example: `"You have fewer View Content events than Add to Cart events." ` To learn about detectable issues, see Detectable catalog event source issues.
levelstringIssue level. Enum value: - `ERROR`: Error. This issue affects ad delivery and should be resolved. - `WARNING`: Warning. This issue may affect ad delivery and should be reviewed. - `INFO`: No issue.
diagnostic_solutionstringThe suggested solution for the issue. If no issues are detected, the value of this field will be empty.

Response sample

HTTPS/1.1 200 OK
{
    "code": 0,
    "message": "OK",
    "request_id": "{{request_id}}",
    "data": {
        "list": [
            {
                "diagnostic_result": "Less than 100k events were received with content IDs that match the catalog's SKU IDs or item group IDs.",
                "diagnostic_solution": "Export content IDs that don't match the products in this catalog.",
                "level": "ERROR"
            }
        ]
    }
}

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