VI | EN
Message us on Messenger
Developer resources

(To-be-deprecated) Get recommended budgets — TikTok Business API

(To-be-deprecated) Get recommended budgets · 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.

(To-be-deprecated) Get recommended budgets

GET/delivery/budget/recommend/Via 360: GET https://partner.quantri360.com/v1/tiktok_business/delivery/budget/recommend/
Description

> Important

> This endpoint will be deprecated in the next API version. We recommend that you migrate to /tool/diagnosis/get/ and obtain the budget estimated delivery results through the response parameter budget_edr_info.

Use this endpoint to get 15 sets of recommended budgets and the corresponding estimated conversion data for each budget on the same day when the budget is adopted. See here to find out the preconditions for and the steps of getting budget estimated delivery results.

>Note

  • Budget estimated delivery results are given according to your ad group setting. If you evaluate multiple ad groups of the same setting via this endpoint , you can only get results for the earliest ad group.

Request

Endpoint

GET https://partner.quantri360.com/v1/tiktok_business/delivery/budget/recommend/

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
adgroup_idsquerystring[]YesAd group IDs. The number of IDs cannot exceed 20.

Request examples

curl -s "https://partner.quantri360.com/v1/tiktok_business/delivery/budget/recommend/?adgroup_ids=%5B%5D" \
  -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/delivery/budget/recommend/",
    params={
        "adgroup_ids": []
    },
    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/delivery/budget/recommend/');
for (const [k, v] of Object.entries({"adgroup_ids":[]})) 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/delivery/budget/recommend/' . '?' . http_build_query(['adgroup_ids' => '[]']);
$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 a request, which uniquely identifies the request.
dataobjectReturned data.
resultsobject[]List of ad group IDs and corresponding budget recommendation results.
adgroup_idstringAd group ID.
recommendationsobject[]15 sets of data for recommended budget raise ratios from -20% to 50% with a step of 5%, and corresponding estimated results.
recommended_budgetfloatRecommended budget. Please adopt one suitable budget using /adgroup/budget/update/ within the same day (advertiser account time zone).
budget_increase_ratiofloatEstimated budget raise ratio.
estimated_conversionintegerEstimated conversion.
conversion_upliftintegerEstimated conversion uplift.
conversion_uplift_ratiofloatEstimated conversion uplift ratio.

Response sample

HTTPS/1.1 200 OK
{
    "code": 0,
    "message": "OK",
    "request_id": "{{request_id}}",
    "data": {
        "results": [
            {
                "recommendations": [
                    {
                        "budget_increase_ratio": -0.2,
                        "conversion_uplift": 0,
                        "recommended_budget": 80.0,
                        "estimated_conversion": 39,
                        "conversion_uplift_ratio": 0.0
                    },
                    {
                        "budget_increase_ratio": -0.15,
                        "conversion_uplift": 0,
                        "recommended_budget": 85.0,
                        "estimated_conversion": 40,
                        "conversion_uplift_ratio": 0.0
                    },
                    {
                        "budget_increase_ratio": -0.1,
                        "conversion_uplift": 0,
                        "recommended_budget": 90.0,
                        "estimated_conversion": 41,
                        "conversion_uplift_ratio": 0.0
                    },
                    {
                        "budget_increase_ratio": -0.05,
                        "conversion_uplift": 0,
                        "recommended_budget": 95.0,
                        "estimated_conversion": 41,
                        "conversion_uplift_ratio": 0.0
                    },
                    {
                        "budget_increase_ratio": 0.0,
                        "conversion_uplift": 0,
                        "recommended_budget": 100.0,
                        "estimated_conversion": 41,
                        "conversion_uplift_ratio": 0.0
                    },
                    {
                        "budget_increase_ratio": 0.05,
                        "conversion_uplift": 0,
                        "recommended_budget": 105.0,
                        "estimated_conversion": 43,
                        "conversion_uplift_ratio": 0.0
                    },
                    {
                        "budget_increase_ratio": 0.1,
                        "conversion_uplift": 0,
                        "recommended_budget": 110.0,
                        "estimated_conversion": 45,
                        "conversion_uplift_ratio": 0.0
                    },
                    {
                        "budget_increase_ratio": 0.15,
                        "conversion_uplift": 0,
                        "recommended_budget": 115.0,
                        "estimated_conversion": 46,
                        "conversion_uplift_ratio": 0.0
                    },
                    {
                        "budget_increase_ratio": 0.2,
                        "conversion_uplift": 0,
                        "recommended_budget": 120.0,
                        "estimated_conversion": 48,
                        "conversion_uplift_ratio": 0.0
                    },
                    {
                        "budget_increase_ratio": 0.25,
                        "conversion_uplift": 0,
                        "recommended_budget": 125.0,
                        "estimated_conversion": 49,
                        "conversion_uplift_ratio": 0.0
                    },
                    {
                        "budget_increase_ratio": 0.3,
                        "conversion_uplift": 0,
                        "recommended_budget": 130.0,
                        "estimated_conversion": 51,
                        "conversion_uplift_ratio": 0.0
                    },
                    {
                        "budget_increase_ratio": 0.35,
                        "conversion_uplift": 0,
                        "recommended_budget": 135.0,
                        "estimated_conversion": 52,
                        "conversion_uplift_ratio": 0.0
                    },
                    {
                        "budget_increase_ratio": 0.4,
                        "conversion_uplift": 0,
                        "recommended_budget": 140.0,
                        "estimated_conversion": 53,
                        "conversion_uplift_ratio": 0.0
                    },
                    {
                        "budget_increase_ratio": 0.45,
                        "conversion_uplift": 0,
                        "recommended_budget": 145.0,
                        "estimated_conversion": 54,
                        "conversion_uplift_ratio": 0.0
                    },
                    {
                        "budget_increase_ratio": 0.5,
                        "conversion_uplift": 0,
                        "recommended_budget": 150.0,
                        "estimated_conversion": 55,
                        "conversion_uplift_ratio": 0.0
                    }
                ],
                "adgroup_id": "{{adgroup_id}}"
            }
        ]
    }
}

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