VI | EN
Message us on Messenger
Developer resources

Get Custom Conversions associated with an event source — TikTok Business API

Get Custom Conversions associated with an event source · 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 Custom Conversions associated with an event source

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

Use this endpoint to retrieve the Custom Conversions associated with a Pixel or an App.

Request

Endpoint

GET https://partner.quantri360.com/v1/tiktok_business/custom_conversion/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
event_source_typequerystringYesEvent source type. Enum values: - PIXEL: Pixel. - APP: App.
event_source_idquerystringYesEvent source ID. - When event_source_type is PIXEL, specify a Pixel ID. - To obtain IDs of Pixels within your ad account, use /pixel/list/ and check the returned pixel_id. - When event_source_type is APP, specify the app platform ID of a Self Attribution Network (SAN) App. - To obtain app platform IDs of SAN Apps within your ad account, use /app/list/. Confirm that the returned self_attribution_enabled for the App is true and check the returned app_platform_id.
search_keywordquerystringNoThe keyword to search for Custom Conversions by. You can search by Custom Conversion name or Custom Conversion ID. - When you search by Custom Conversion name, fuzzy matches are supported. - When you search by Custom Conversion ID, exact matches are supported.
sort_fieldquerystringNoSorting field. Enum values: - CREATE_TIME: The time when the Custom Conversion was created. - TOTAL_COUNT: The total conversion count for the Custom Conversion.Default value: CREATE_TIME.
sort_typequerystringNoSorting type. Enum values: - DESC: descending. - ASC: ascending.Default value: DESC.
pagequerynumberNoCurrent page number. Value range: ≥ 1. Default value: 1.
page_sizequerynumberNoPage size. Value range: 1-1,000. Default value: 10.

Request examples

curl -s "https://partner.quantri360.com/v1/tiktok_business/custom_conversion/list/?event_source_type=&event_source_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/custom_conversion/list/",
    params={
        "event_source_type": "",
        "event_source_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/custom_conversion/list/');
for (const [k, v] of Object.entries({"event_source_type":"","event_source_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/custom_conversion/list/' . '?' . http_build_query(['event_source_type' => '', 'event_source_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 Code.
messagestringResponse message. For details, see Appendix - Return Codes.
request_idstringThe log ID of a request, which uniquely identifies the request.
dataobjectReturned data.
listobject[]The list of Custom Conversions associated with the event source.
custom_conversion_idstringThe ID of the Custom Conversion.
namestringThe name of the Custom Conversion.
descriptionstringThe description of the Custom Conversion.
event_source_typestringEvent source type. Enum values: - `PIXEL`: Pixel. - `APP`: App.
event_source_idstringEvent source ID. - When `event_source_type` is `PIXEL`, this field represents a Pixel ID. - To obtain IDs of Pixels within your ad account, use /pixel/list/ and check the returned `pixel_id`. - When `event_source_type` is `APP`, this field represents the app platform ID of a Self Attribution Network (SAN) App. - To obtain app platform IDs of SAN Apps within your ad account, use /app/list/. Confirm that the returned `self_attribution_enabled` for the App is `true` and check the returned `app_platform_id`.
activity_infoobjectDetails of the activity for the Custom Conversion.
activity_statusstringThe activity status of the Custom Conversion. Enum values: - `NO_RECENT_ACTIVITY`: No recent activity. Activity received, but not in the past 7 days. - `ACTIVE`: Active. Activity received in the past 7 days. - `WAITING_FOR_ACTIVITY`: Inactive. No activity received in the past 90 days.
total_countnumberThe total conversion count for the Custom Conversion.
last_record_timestringThe time when activity for the Custom Conversion was last received, in the format of `YYYY-MM-DD HH:MM:SS` (UTC+0). Example: `2025-01-01 00:00:01`.
optimization_eventstringThe conversion event (standard event) associated with the Custom Conversion. For enum values, see List of values for `optimization_event`.
rulesobject[]Details of the conversion rules for the Custom Conversion. Only actions that meet these conditions will count as Custom Conversions.
parameterstringParameter. Enum values: - `BRAND`: `brand`. - `CONTENT_CATEGORY`: `content_category`. - `CONTENT_ID`: `content_id`. - `CONTENT_NAME`: `content_name`. - `CONTENT_TYPE`: `content_type`. - `CURRENCY`: `currency`. - `DESCRIPTION`: `description`. - `EVENT_ID`: `event_id`. - `NUM_ITEMS`: `num_items`. - `PRICE`: `price`. - `SEARCH_STRING`: `search_string`. - `STATUS`: `status`. - `URL`: `url`. - `VALUE`: `value`.
operatorstringOperator. - When `parameter` is `BRAND`, `CONTENT_CATEGORY`, `CONTENT_ID`, `CONTENT_NAME`, `CONTENT_TYPE`, `DESCRIPTION`, `EVENT_ID`, `SEARCH_STRING`, `STATUS`, or `URL`, the enum values are: - `CONTAIN`: Contains. - `NOT_CONTAIN`: Does not contain. - `START_WITH`: Starts with. - `EQUAL`: Is equal to. - `NOT_EQUAL`: Is not equal to. - When `parameter` is `NUM_ITEMS`, `PRICE`, or `VALUE`, the enum values are: - `EQUAL`: Is equal to. - `NOT_EQUAL`: Is not equal to. - `LT`: Is less than. - `GT`: Is greater than. - `LTE`: Is less than or equal to. - `GTE`: Is greater than or equal to. - When `parameter` is `CURRENCY`, the enum values are: - `EQUAL`: Is equal to. - `NOT_EQUAL`: Is not equal to.
valuesstring[]Values for the parameter. - When `parameter` is `BRAND`, `CONTENT_CATEGORY`, `CONTENT_ID`, `CONTENT_NAME`, `CONTENT_TYPE`, `DESCRIPTION`, `EVENT_ID`, `SEARCH_STRING`, `STATUS`, `URL`, the field will be an array of strings, each with a maximum length of 100 characters and up to 100 entries. - When `parameter` is `NUM_ITEMS`, the field will be an integer between 0 and 1,000,000,000. - When `parameter` is `PRICE`, `VALUE`, the field will be a float kept to two decimal places, within the range from 0.00 to 1,000,000,000.00. - When `parameter` is `CURRENCY`, the field will be an array of strings. To learn about the enum values, see List of currency values.
create_timestringThe time when the Custom Conversion was created, in the format of `YYYY-MM-DD HH:MM:SS`(UTC+0). Example: `2025-01-01 00:00:01`.
update_timestringThe time when the Custom Conversion was last updated, in the format of `YYYY-MM-DD HH:MM:SS`(UTC+0). Example: `2025-01-01 00:00:01`.
page_infoobjectPagination information.
pagenumberCurrent page number.
page_sizenumberPage size.
total_numbernumberTotal number of results.
total_pagenumberTotal pages of results.

Response sample

HTTPS/1.1 200 OK
{
    "code": 0,
    "message": "OK",
    "request_id": "{{request_id}}",
    "data": {
        "list": [
            {
                "activity_info": {
                    "activity_status": "WAITING_FOR_ACTIVITY",
                    "total_count": 0
                },
                "create_time": "{{create_time}}",
                "custom_conversion_id": "{{custom_conversion_id}}",
                "description": "{{description}}",
                "event_source_id": "{{event_source_id}}",
                "event_source_type": "PIXEL",
                "name": "{{name}}",
                "optimization_event": "SHOPPING",
                "rules": [
                    {
                        "operator": "NOT_CONTAIN",
                        "parameter": "EVENT_ID",
                        "values": [
                            "{{event_id}}",
                            "{{event_id}}"
                        ]
                    },
                    {
                        "operator": "START_WITH",
                        "parameter": "DESCRIPTION",
                        "values": [
                            "{{description_value}}"
                        ]
                    }
                ],
                "update_time": "{{update_time}}"
            },
            {
                "activity_info": {
                    "activity_status": "NO_RECENT_ACTIVITY",
                    "last_record_time": "{{last_record_time}}",
                    "total_count": 1
                },
                "create_time": "{{create_time}}",
                "custom_conversion_id": "{{custom_conversion_id}}",
                "description": "",
                "event_source_id": "{{event_source_id}}",
                "event_source_type": "PIXEL",
                "name": "{{name}}",
                "optimization_event": "ON_WEB_CART",
                "rules": [
                    {
                        "operator": "CONTAIN",
                        "parameter": "CONTENT_ID",
                        "values": [
                            "{{content_id}}"
                        ]
                    }
                ],
                "update_time": "{{update_time}}"
            },
            ...
            {
                "activity_info": {
                    "activity_status": "ACTIVE",
                    "last_record_time": "{{last_record_time}}",
                    "total_count": 20
                },
                "create_time": "{{create_time}}",
                "custom_conversion_id": "{{custom_conversion_id}}",
                "description": "",
                "event_source_id": "{{event_source_id}}",
                "event_source_type": "PIXEL",
                "name": "{{name}}",
                "optimization_event": "SHOPPING",
                "rules": [
                    {
                        "operator": "CONTAIN",
                        "parameter": "STATUS",
                        "values": [
                            "{{status_value}}"
                        ]
                    }
                ],
                "update_time": "{{update_time}}"
            }
        ],
        "page_info": {
            "page": 1,
            "page_size": 1000,
            "total_number": 98,
            "total_page": 1
        }
    }
}

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