VI | EN
Message us on Messenger
Developer resources

Get available attribution sources and data sources for an app — TikTok Business API

Get available attribution sources and data sources for an app · 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 available attribution sources and data sources for an app

GET/tool/available/attribution_source/Via 360: GET https://partner.quantri360.com/v1/tiktok_business/tool/available/attribution_source/
Description

Use this endpoint to retrieve the attribution sources and data sources available for your mobile app when you create Upgraded Smart+ Ad Groups.

Request

Endpoint

GET https://partner.quantri360.com/v1/tiktok_business/tool/available/attribution_source/

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
optimization_eventquerystringNoOptimization event (Conversion event). To learn about the enum values, see List of values for optimization_event.
campaign_typequerystringNoCampaign type. Enum values: - REGULAR_CAMPAIGN: a campaign with the iOS 14 Dedicated Campaign setting disabled. - IOS14_CAMPAIGN: a campaign with the iOS 14 Dedicated Campaign setting enabled. Default value: REGULAR_CAMPAIGN.

Request examples

curl -s "https://partner.quantri360.com/v1/tiktok_business/tool/available/attribution_source/" \
  -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/available/attribution_source/",
    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/available/attribution_source/');
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/available/attribution_source/' . '?' . 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 response codes and descriptions, see Appendix - Return Codes.
messagestringResponse message. For details, see Appendix - Return Codes.
request_idstringThe log ID of the request, which uniquely identifies a request.
dataobjectReturned data.
connected_data_sourcestring[]The list of data sources that the app is connected to. Enum values: - `MMP`: MMP (mobile measurement partner). - `EVENT_SDK`: TikTok App Events SDK. - `EVENT_API`: TikTok Events API.
available_attribution_source_listobject[]The details of the attribution sources and data sources you can configure for the app when creating Upgraded Smart+ Ad Groups. You can pass the values from `available_attribution_source` and `available_data_source` to the `app_attribution_source` and `app_data_source` parameters when you call /smart_plus/adgroup/create/.
available_attribution_sourcestringThe attribution source that you can configure for the app when creating Upgraded Smart+ Ad Groups. The attribution source you choose will be used for optimization, bidding, and reporting. Enum values: - `MMP`: MMP (mobile measurement partner) attribution. Signals from your selected MMP will be used for attribution. - `SAN`: SAN (self-attribution network) attribution. Signals from TikTok SAN will be used for attribution.
available_data_sourcestring[]The list of data sources that you can configure for the app when creating Upgraded Smart+ Ad Groups. The attribution signals you select will be used for reporting. Enum values: - `MMP`: MMP signals. Signals from your MMP will be used for reporting. - `EVENT_SDK`: App Events SDK signals. Signals from TikTok App Events SDK will be used for reporting. - `EVENT_API`: Events API signals. Signals from TikTok Events API will be used for reporting.

Response sample

HTTPS/1.1 200 OK
{
    "code": 0,
    "message": "OK",
    "request_id": "{{request_id}}",
    "data": {
        "available_attribution_source_list": [
            {
                "available_attribution_source": "SAN",
                "available_data_source": [
                    "EVENT_SDK"
                ]
            }
        ],
        "connected_data_source": [
            "EVENT_SDK"
        ]
    }
}

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