""" Copyright 2023 TikTok Pte. Ltd.
This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree. """
All URIs are relative to https://business-api.tiktok.com
Method | HTTP request | Description |
---|---|---|
bc_advertiser_create | POST /open_api/v1.3/bc/advertiser/create/ | Create an ad account BC advertiser create |
bc_asset_get | GET /open_api/v1.3/bc/asset/get/ | Get assets BC asset get |
bc_get | GET /open_api/v1.3/bc/get/ | Get Business Centers BC get |
bc_image_upload | POST /open_api/v1.3/bc/image/upload/ | Upload a business certificate BC image upload |
InlineResponse200 bc_advertiser_create(access_token, body=body)
Create an ad account BC advertiser create
from __future__ import print_function
import time
import business_api_client
from business_api_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = business_api_client.BCApi()
access_token = 'access_token_example' # str | Authorized access token. For details, see [Authentication](https://ads.tiktok.com/marketing_api/docs?id=1738373164380162).
body = business_api_client.AdvertiserCreateBody() # AdvertiserCreateBody | BC advertiser create body parameters (optional)
try:
# Create an ad account [BC advertiser create](https://ads.tiktok.com/marketing_api/docs?id=1739939020318721)
api_response = api_instance.bc_advertiser_create(access_token, body=body)
pprint(api_response)
except ApiException as e:
print("Exception when calling BCApi->bc_advertiser_create: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
access_token | str | Authorized access token. For details, see Authentication. | [required] |
body | AdvertiserCreateBody | BC advertiser create body parameters | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse200 bc_asset_get(bc_id, asset_type, access_token, filtering=filtering, page=page, page_size=page_size)
Get assets BC asset get
from __future__ import print_function
import time
import business_api_client
from business_api_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = business_api_client.BCApi()
bc_id = 'bc_id_example' # str | Business Center ID
asset_type = 'asset_type_example' # str | Type of asset that you want to get. Enum values: `CATALOG`, `ADVERTISER`, `PIXEL`, `LEAD`, `TT_ACCOUNT`(corresponds to `BC_AUTH_TT`, and learn more from [Identities](https://ads.tiktok.com/marketing_api/docs?id=1738958351620097), `TIKTOK_SHOP` (TikTok shop) , `STOREFRONT`( TikTok Storefront (third-party store))
access_token = 'access_token_example' # str | Authorized access token. For details, see [Authentication](https://ads.tiktok.com/marketing_api/docs?id=1738373164380162).
filtering = business_api_client.Filtering() # Filtering | Filtering conditions. Use either `user_id` or `user_email` as filter.Note: You cannot use `user_id` and `user_email` at the same time.If you do not specify any filter values, the system will pass in to the `user_id` field the user ID of the TikTok for Business account that gives you the authentication code (`auth_code`) (optional)
page = 56 # int | Current page number. Default value: 1 (optional)
page_size = 56 # int | Page size, in the range of 1-50. Default value: 10 (optional)
try:
# Get assets [BC asset get](https://ads.tiktok.com/marketing_api/docs?id=1739432717798401)
api_response = api_instance.bc_asset_get(bc_id, asset_type, access_token, filtering=filtering, page=page, page_size=page_size)
pprint(api_response)
except ApiException as e:
print("Exception when calling BCApi->bc_asset_get: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
bc_id | str | Business Center ID | [required] |
asset_type | str | Type of asset that you want to get. Enum values: `CATALOG`, `ADVERTISER`, `PIXEL`, `LEAD`, `TT_ACCOUNT`(corresponds to `BC_AUTH_TT`, and learn more from Identities, `TIKTOK_SHOP` (TikTok shop) , `STOREFRONT`( TikTok Storefront (third-party store)) | [required] |
access_token | str | Authorized access token. For details, see Authentication. | [required] |
filtering | Filtering | Filtering conditions. Use either `user_id` or `user_email` as filter.Note: You cannot use `user_id` and `user_email` at the same time.If you do not specify any filter values, the system will pass in to the `user_id` field the user ID of the TikTok for Business account that gives you the authentication code (`auth_code`) | [optional] |
page | int | Current page number. Default value: 1 | [optional] |
page_size | int | Page size, in the range of 1-50. Default value: 10 | [optional] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse200 bc_get(access_token, bc_id=bc_id, page=page, page_size=page_size)
Get Business Centers BC get
from __future__ import print_function
import time
import business_api_client
from business_api_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = business_api_client.BCApi()
access_token = 'access_token_example' # str | Authorized access token. For details, see [Authentication](https://ads.tiktok.com/marketing_api/docs?id=1738373164380162).
bc_id = 'bc_id_example' # str | The Business Center ID. When not passed, returns the user entire list of Business Centers by default, and returns the specified Business Center account when passed in (optional)
page = 56 # int | Current number of pages. Default value: 1. Value range : ≥ 1 (optional)
page_size = 56 # int | Page size. Default value: 10. Value range: 1-50 (optional)
try:
# Get Business Centers [BC get](https://ads.tiktok.com/marketing_api/docs?id=1737115687501826)
api_response = api_instance.bc_get(access_token, bc_id=bc_id, page=page, page_size=page_size)
pprint(api_response)
except ApiException as e:
print("Exception when calling BCApi->bc_get: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
access_token | str | Authorized access token. For details, see Authentication. | [required] |
bc_id | str | The Business Center ID. When not passed, returns the user entire list of Business Centers by default, and returns the specified Business Center account when passed in | [optional] |
page | int | Current number of pages. Default value: 1. Value range : ≥ 1 | [optional] |
page_size | int | Page size. Default value: 10. Value range: 1-50 | [optional] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
InlineResponse200 bc_image_upload(access_token, bc_id=bc_id, image_file=image_file)
Upload a business certificate BC image upload
from __future__ import print_function
import time
import business_api_client
from business_api_client.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = business_api_client.BCApi()
access_token = 'access_token_example' # str | Authorized access token. For details, see [Authentication](https://ads.tiktok.com/marketing_api/docs?id=1738373164380162).
bc_id = 'bc_id_example' # str | (optional)
image_file = 'image_file_example' # str | (optional)
try:
# Upload a business certificate [BC image upload](https://ads.tiktok.com/marketing_api/docs?id=1739938996913218)
api_response = api_instance.bc_image_upload(access_token, bc_id=bc_id, image_file=image_file)
pprint(api_response)
except ApiException as e:
print("Exception when calling BCApi->bc_image_upload: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
access_token | str | Authorized access token. For details, see Authentication. | [required] |
bc_id | str | [optional] | |
image_file | str | [optional] |
No authorization required
- Content-Type: multipart/form-data
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]