VI | EN
Message us on Messenger
Developer resources

Get pixels — TikTok Business API

Get pixels · 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 pixels

GET/pixel/list/Via 360: GET https://partner.quantri360.com/v1/tiktok_business/pixel/list/
Description

Use this endpoint to obtain a list of Pixel information. The returned list contains Pixel Event list.

> Important

> By using Events API endpoints, you agree to the TikTok Business Products (Data) Terms and that you will not share sensitive data with TikTok.

Request

Endpoint

GET https://partner.quantri360.com/v1/tiktok_business/pixel/list/

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
codequerystringNoPixel Code . If specified, the returned information will be filtered by Pixel Code.
pixel_idquerystringNoPixel ID. If specified, the returned information will be filtered by Pixel ID.
namequerystringNoPixel name. Fuzzy matching is supported. If specified, the returned information will be filtered by pixel whose name contains the passed-in data.
order_byquerystringNoSorting method, optional values include: EARLIEST_CREATE (Prioritizes the earliest created pixel), LATEST_CREATE (Prioritizes the latest created pixel). Default value is EARLIEST_CREATE
filteringqueryobjectNoFilter conditions.
pagequerynumberNoCurrent page number. Default value is 1, value range: ≥ 1
page_sizequerynumberNoPage size. Default value is 10, value range: 1-20

Request examples

curl -s "https://partner.quantri360.com/v1/tiktok_business/pixel/list/" \
  -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/pixel/list/",
    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/pixel/list/');
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/pixel/list/' . '?' . 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
codenumberReturn code, see Appendix-Return codes.
messagestringReturn message, see Appendix-Return information.
dataobjectReturn data.
pixelsobject[]A list of Pixels.
pixel_idstringPixel ID.
pixel_codestringPixel Code. The ID you see on the Events Manager platform.
pixel_namestringPixel name.
pixel_categorystringThe Pixel data connection event category for the Pixel. Enum values: - `ONLINE_STORE`: E-commerce events. - `FILLING_FORM`: Form. - `CONTACTS`: Consultation events. - `LANDING_PAGE`: APK download events. - `CUSTOMIZE_EVENTS`: Custom events. Note: This field no longer determines the pixel events that the Pixel can measure and will be deprecated in the next API version.
pixel_scriptstringPixel code, generated by the system. You need to include the Pixel code on your website for event data connection. Please see Help center for help.
create_timestringTime when the pixel was created, in the format of YYYY-MM-DD HH:MM:SS. See ISO 8601.
pixel_setup_modestringSetup mode of the pixel. Enum values: `STANDARD`, `DEVELOPER`. Pixels that are created via the `/pixel/create/` endpoint after September 15th, 2022 are in the `DEVELOPER` mode.
partner_namestringPartner name.
advanced_matching_fieldsobjectManual Advanced Matching settings for the pixel.
phone_numberbooleanWhether phone number is enabled for Manual Advanced Matching. Supported values: `true`, `false`.
emailbooleanWhether email is enabled for Manual Advanced Matching. Supported values: `true`, `false`.
automatic_advanced_matching_fieldsobjectAutomatic Advanced Matching settings for the pixel. Automatic Advanced Matching automatically uses customer information collected through your TikTok Pixel, like email, name, and phone number, to improve match rates, conversion tracking, and retargeting.
phone_numberbooleanWhether phone number is enabled for Automatic Advanced Matching. Supported values: `true`, `false`.
emailbooleanWhether email is enabled for Automatic Advanced Matching. Supported values: `true`, `false`.
namebooleanWhether name is enabled for Automatic Advanced Matching. Supported values: `true`, `false`.
addressbooleanWhether address is enabled for Automatic Advanced Matching. Supported values: `true`, `false`.
external_idbooleanWhether external ID is enabled for Automatic Advanced Matching. Supported values: `true`, `false`.
enable_first_party_cookiesbooleanWhether to allow first-party cookies. Allowing first-party cookies will allow the system to share data from your website's first-party cookies with TikTok to improve measurement and help reach more users. Learn more about using cookies with TikTok Pixel. Supported values: `true`, `false`.
enable_expanded_data_sharingbooleanWhether to enable expanded data sharing. Enabling expanded data sharing allows this pixel to collect more information from your website, including page content (such as meta tags, and product details), visitor actions (such as clicks, button interactions, and time spent), and website performance (such as page load speed and responsiveness). This data may be used to improve ad delivery and campaign performance on TikTok. You can view all collected data in TikTok Pixel Helper. Learn more about Expanded Data Sharing with the TikTok Pixel. Supported values: `true`, `false`.
asset_ownershipobjectAsset ownership data
asset_relation_statusstringAsset relationship status. Enum values: - null: The pixel is owned by the advertiser (`advertiser_id`) and has not been transferred to a Business Center as an asset. - `TRANSFERRED`: The pixel has been transferred to a Business Center as an asset but is still owned by the advertiser (`advertiser_id`). To transfer a pixel, use /bc/pixel/transfer/. - `SHARED`: The pixel is shared with the advertiser (`advertiser_id`) as an asset. You can modify a pixel that is shared by others, but you cannot delete it. - `UNBOUND`: The pixel was shared with the advertiser (`advertiser_id`) as an asset but has been unbound from the advertiser. In reporting data, pixels whose status is `UNBOUND` will not be counted.
ownership_statusbooleanWhether the pixel is owned by the advertiser (`advertiser_id`). Enum values: `true`, `false`. - If the value of `asset_relation_status` is null or `TRANSFERRED`, the value of this field will be `true`. - If the value of `asset_relation_status` is `SHARED` or `UNBOUND`, the value of this field will be `false`.
owner_bc_idstringID of the Business Center that owns the pixel as an asset. - If `asset_relation_status` is `TRANSFERRED`, the value of this field represents the ID of the Business Center that the pixel has been transferred to as an asset. - If `asset_relation_status` is not `TRANSFERRED`, the value of this field will be null.
updated_atintegerTime when the lastest relationship was formed, in the format of Unix timestamp (for example, 1581679723600). Note: The field is to be deprecated in the next API version, and currently you may not get a valid time via this field.
eventsobject[]A list of Pixel Events. Pixel Events data is refreshed every 2-4 hours. If events occur within four hours, the value of this field might be an empty list (`[]`). You can retry after four hours to obtain the data of these events.
currency_valuestringEvent conversion value (if not specified when the event was created, it returns `" "`).
currencystringEvent corresponding currency. Enum values: `INR` (Indian Rupee), `JPY` (JPY), `USD`(USD).
namestringEvent name.
deprecatedbooleanWhether the event is deprecated.
event_typestringReturned only for a Standard Pixel Event. Standard Pixel Event type. To learn about the enum values, see the "Event name for ad creation (`optimization_event`)" column in Supported Pixel events - Pixel events.
optimization_eventstringThe conversion event type for a Standard Pixel Event (`event_type`). You can pass the conversion event type to the `optimization_event` field when you create an ad group via /adgroup/create/. To learn about the enum values, see the "Event name for ad creation (`optimization_event`)" column in Supported Pixel events - Pixel events. Note: The Standard Pixel Event type `PAGE_VIEW` cannot be used for optimization. Therefore, when `event_type` is `PAGE_VIEW`, this field will have a null value.
custom_event_typestringReturned only for a Custom Pixel Event. Custom Pixel Event type. Custom Events are actions that TikTok partners can define themselves beyond the predefined Standard Events list. To learn more about Custom Events, see Standard and Custom Events. You cannot create a Custom Pixel Event via /pixel/event/create/, but you can send back a Custom Pixel Event directly by using the Events 1.0 endpoints /pixel/track/ or /pixel/batch/, or the Events 2.0 endpoint /event/track/. For instance, a `SHOPPING` event that is sent back will be regarded as a Custom Pixel Event because it's not included in the "Event" column in Events API 1.0 - Report web events and parameters - Supported web events or Events API 2.0 - Supported events - Web Standard Events.
event_codestringEvent Code.
event_idstringEvent ID.
statistic_typestringStatistics type, optional values include: `EVERY_TIME` (every time), `ONCE` (only once).
rulesobject[]Data connection event rules, sub-field rules and descriptions see Supported Pixel events-Event Rule Type.
operatorstringOperator, optional values include: `OPERATORTYPE_CONTAINS`, `OPERATORTYPE_DOES_NOT_EQUAL`, `OPERATORTYPE_EQUALS`
triggerstringEvent trigger type, optional values include: `TRIGGERTYPE_CLICK`, `TRIGGERTYPE_PAGEVIEW`.
valuestringVariable value.
variablestringVariable type, optional values include: `ELEMENT`, `PAGE_HOSTNAME`, `PAGE_PATH`, `PAGE_URL`
page_infoobjectPagination information.
pagenumberCurrent page number.
page_sizenumberPage size.
total_numbernumberTotal number of results.
total_pagenumberTotal number of pages.
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": {
        "page_info": {
            "page": 1,
            "page_size": 20,
            "total_number": 1,
            "total_page": 1
        },
        "pixels": [
            {
                "activity_status": "NO_RECENT_ACTIVITY",
                "advanced_matching_fields": {
                    "email": true,
                    "phone_number": true
                },
                "asset_ownership": {
                    "ownership_status": true,
                    "updated_at": 0
                },
                "automatic_advanced_matching_fields": {
                    "address": true,
                    "email": false,
                    "external_id": true,
                    "name": true,
                    "phone_number": true
                },
                "create_time": "{{create_time}}",
                "enable_expanded_data_sharing": true,
                "enable_first_party_cookies": true,
                "events": [],
                "pixel_category": "CUSTOMIZE_EVENTS",
                "pixel_code": "{{pixel_code}}",
                "pixel_id": "{{pixel_id}}",
                "pixel_name": "{{pixel_name}}",
                "pixel_script": "{{pixel_script}}",
                "pixel_setup_mode": "DEVELOPER"
            }
        ]
    }
}

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