Skip to content

Commit 8e9c837

Browse files
added ACO api (#6)
Co-authored-by: lakshminarasimhan.s <lakshminarasimhan.s@bytedance.com>
1 parent 1f3594d commit 8e9c837

File tree

317 files changed

+9726
-218
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

317 files changed

+9726
-218
lines changed

Changelog.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# TikTok Business API SDK - Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
## 0.1.1
6+
7+
- Added ACO APIs.

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Java, Python and Javascript are among the most popular languages for TikTok busi
3636
git clone https://github.com/tiktok/tiktok-business-api-sdk.git
3737
```
3838
2. Set up your local environment
39-
- Add this dependency to your project's POM if you are using Maven, otherwise you could skip this step.
39+
- Add this dependency to your project's POM and load the maven changes if you are using Maven, otherwise you could skip this step.
4040
```
4141
<dependency>
4242
<groupId>io.swagger</groupId>
@@ -47,7 +47,7 @@ Java, Python and Javascript are among the most popular languages for TikTok busi
4747
```
4848
- Build the SDK jar file with following the commands
4949
```
50-
cd your_path/tiktok_business_api_sdk/java_sdk
50+
cd your_path/tiktok-business-api-sdk/java_sdk
5151
mvn install package
5252
```
5353
- Manually import the JAR files
@@ -110,9 +110,9 @@ Java, Python and Javascript are among the most popular languages for TikTok busi
110110
```
111111
3. Set Local env and install dependency with following commands
112112
```
113-
export PYTHONPATH=tiktok_business_api_sdk/python_sdk:tiktok_business_api_sdk/python_sdk/business_api_client
114-
cd your_path/tiktok_business_api_sdk
115-
pip install -r requirements.txt
113+
export PYTHONPATH=your_path/tiktok-business-api-sdk:your_path/tiktok-business-api-sdk/python_sdk:your_path/tiktok-business-api-sdk/python_sdk/business_api_client
114+
cd your_path/tiktok-business-api-sdk/python_sdk
115+
pip install -r requirements.txt
116116
```
117117
4. Run and test the Python SDK. Below are the sample codes for your reference.
118118
```
@@ -153,13 +153,13 @@ Java, Python and Javascript are among the most popular languages for TikTok busi
153153
- Install js-sdk dependencies
154154
155155
```
156-
cd your_path/tiktok_business_api_sdk/js_sdk
156+
cd your_path/tiktok-business-api-sdk/js_sdk
157157
npm install
158158
```
159159
- In your project, run the following command
160160
161161
```
162-
npm install your_path/tiktok_business_api_sdk/js_sdk --save
162+
npm install your_path/tiktok-business-api-sdk/js_sdk --save
163163
```
164164
- In your project, add the following code in package.json to set js_sdk as module
165165
```

java_sdk/.swagger-codegen/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.0.41-SNAPSHOT
1+
3.0.46

java_sdk/README.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# TikTok Business API SDK - Java
2-
- API version: 0.1.0 Beta (in Beta Test)
2+
- API version: 0.1.1 Beta (in Beta Test)
33

44
Comprehensive collection of client libraries that enable our developers to build software to integrate with Business API faster and in a more standardized way.
55

@@ -105,6 +105,10 @@ Class | Method | HTTP request | Description
105105
*AdApi* | [**adGet**](docs/AdApi.md#adGet) | **GET** /open_api/v1.3/ad/get/ | Get the data of regular ads and ACO ads. [Ad get](https://ads.tiktok.com/marketing_api/docs?id&#x3D;1735735588640770)
106106
*AdApi* | [**adStatusUpdate**](docs/AdApi.md#adStatusUpdate) | **POST** /open_api/v1.3/ad/status/update/ | To enable, disable or delete an ad or ads [Ad status update](https://ads.tiktok.com/marketing_api/docs?id&#x3D;1739953422970882)
107107
*AdApi* | [**adUpdate**](docs/AdApi.md#adUpdate) | **POST** /open_api/v1.3/ad/update/ | Modify your custom ad creatives such as call-to-action, ad name, text image and video material. To update ACO ads, use the /ad/aco/update/ endpoint. [Ad update](https://ads.tiktok.com/marketing_api/docs?id&#x3D;1739953422970882)
108+
*AdAcoApi* | [**adAcoCreate**](docs/AdAcoApi.md#adAcoCreate) | **POST** /open_api/v1.3/ad/aco/create/ | Create an ACO ad by uploading necessary ad creatives to the library. [Ad Aco Create](https://ads.tiktok.com/marketing_api/docs?id&#x3D;1739473063234626)
109+
*AdAcoApi* | [**adAcoGet**](docs/AdAcoApi.md#adAcoGet) | **GET** /open_api/v1.3/ad/aco/get/ | Get creative materials for an ACO ad, including call-to-actions, texts, ad names, images, or video materials. [Ad Aco Get](https://ads.tiktok.com/marketing_api/docs?id&#x3D;1739473020978177)
110+
*AdAcoApi* | [**adAcoMaterialStatusUpdate**](docs/AdAcoApi.md#adAcoMaterialStatusUpdate) | **POST** /open_api/v1.3/ad/aco/material_status/update/ | Update the status of creative materials for an ACO ad, including ad texts, images, and video materials [Update materials](https://ads.tiktok.com/marketing_api/docs?id&#x3D;1739506701165570)
111+
*AdAcoApi* | [**adAcoUpdate**](docs/AdAcoApi.md#adAcoUpdate) | **POST** /open_api/v1.3/ad/aco/update/ | Modify ACO ad creatives. [Update ACO](https://ads.tiktok.com/marketing_api/docs?id&#x3D;1739473077112833)
108112
*AdgroupApi* | [**adgroupCreate**](docs/AdgroupApi.md#adgroupCreate) | **POST** /open_api/v1.3/adgroup/create/ | Create an ad group. At the ad group level, you can configure placement, audience settings (see Ad Targeting), budget, schedules, as well as bidding and optimization options for ads. To learn about the procedure and the essential data fields to create an ad group, see Create an Ad Group. [Ad Update](https://ads.tiktok.com/marketing_api/docs?id&#x3D;1739499616346114)
109113
*AdgroupApi* | [**adgroupGet**](docs/AdgroupApi.md#adgroupGet) | **GET** /open_api/v1.3/adgroup/get/ | Obtain detailed information of an ad group or ad groups. [Adgroup get](https://ads.tiktok.com/marketing_api/docs?id&#x3D;1739314558673922)
110114
*AdgroupApi* | [**adgroupStatusUpdate**](docs/AdgroupApi.md#adgroupStatusUpdate) | **POST** /open_api/v1.3/adgroup/status/update/ | Enable, disable or delete an ad group. [Adgroup status update](https://ads.tiktok.com/marketing_api/docs?id&#x3D;1739591716326402)
@@ -150,6 +154,23 @@ Class | Method | HTTP request | Description
150154

151155
## Documentation for Models
152156

157+
- [AdAcoBody](docs/AdAcoBody.md)
158+
- [AdAcoBodyAvatarIcon](docs/AdAcoBodyAvatarIcon.md)
159+
- [AdAcoBodyAvatarIconList](docs/AdAcoBodyAvatarIconList.md)
160+
- [AdAcoBodyCallToActionList](docs/AdAcoBodyCallToActionList.md)
161+
- [AdAcoBodyCardList](docs/AdAcoBodyCardList.md)
162+
- [AdAcoBodyCommonMaterial](docs/AdAcoBodyCommonMaterial.md)
163+
- [AdAcoBodyCommonMaterialTrackingInfo](docs/AdAcoBodyCommonMaterialTrackingInfo.md)
164+
- [AdAcoBodyDeeplinkList](docs/AdAcoBodyDeeplinkList.md)
165+
- [AdAcoBodyDisplayNameList](docs/AdAcoBodyDisplayNameList.md)
166+
- [AdAcoBodyLandingPageUrls](docs/AdAcoBodyLandingPageUrls.md)
167+
- [AdAcoBodyMediaInfo](docs/AdAcoBodyMediaInfo.md)
168+
- [AdAcoBodyMediaInfoImageInfo](docs/AdAcoBodyMediaInfoImageInfo.md)
169+
- [AdAcoBodyMediaInfoList](docs/AdAcoBodyMediaInfoList.md)
170+
- [AdAcoBodyMediaInfoVideoInfo](docs/AdAcoBodyMediaInfoVideoInfo.md)
171+
- [AdAcoBodyPageList](docs/AdAcoBodyPageList.md)
172+
- [AdAcoBodyTitleList](docs/AdAcoBodyTitleList.md)
173+
- [AdAcoUpdateBody](docs/AdAcoUpdateBody.md)
153174
- [AdCreateBody](docs/AdCreateBody.md)
154175
- [AdStatusUpdateBody](docs/AdStatusUpdateBody.md)
155176
- [AdUpdateBody](docs/AdUpdateBody.md)
@@ -176,6 +197,7 @@ Class | Method | HTTP request | Description
176197
- [IdentityCreateBody](docs/IdentityCreateBody.md)
177198
- [ImageUploadBody](docs/ImageUploadBody.md)
178199
- [InlineResponse200](docs/InlineResponse200.md)
200+
- [MaterialStatusUpdateBody](docs/MaterialStatusUpdateBody.md)
179201
- [Oauth2AccessTokenBody](docs/Oauth2AccessTokenBody.md)
180202
- [OpenApiv13adcreateCreatives](docs/OpenApiv13adcreateCreatives.md)
181203
- [OpenApiv13adcreateDisclaimerClickableTexts](docs/OpenApiv13adcreateDisclaimerClickableTexts.md)

java_sdk/docs/AdAcoApi.md

Lines changed: 195 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,195 @@
1+
# AdAcoApi
2+
3+
All URIs are relative to *https://business-api.tiktok.com*
4+
5+
Method | HTTP request | Description
6+
------------- | ------------- | -------------
7+
[**adAcoCreate**](AdAcoApi.md#adAcoCreate) | **POST** /open_api/v1.3/ad/aco/create/ | Create an ACO ad by uploading necessary ad creatives to the library. [Ad Aco Create](https://ads.tiktok.com/marketing_api/docs?id&#x3D;1739473063234626)
8+
[**adAcoGet**](AdAcoApi.md#adAcoGet) | **GET** /open_api/v1.3/ad/aco/get/ | Get creative materials for an ACO ad, including call-to-actions, texts, ad names, images, or video materials. [Ad Aco Get](https://ads.tiktok.com/marketing_api/docs?id&#x3D;1739473020978177)
9+
[**adAcoMaterialStatusUpdate**](AdAcoApi.md#adAcoMaterialStatusUpdate) | **POST** /open_api/v1.3/ad/aco/material_status/update/ | Update the status of creative materials for an ACO ad, including ad texts, images, and video materials [Update materials](https://ads.tiktok.com/marketing_api/docs?id&#x3D;1739506701165570)
10+
[**adAcoUpdate**](AdAcoApi.md#adAcoUpdate) | **POST** /open_api/v1.3/ad/aco/update/ | Modify ACO ad creatives. [Update ACO](https://ads.tiktok.com/marketing_api/docs?id&#x3D;1739473077112833)
11+
12+
<a name="adAcoCreate"></a>
13+
# **adAcoCreate**
14+
> Response adAcoCreate(accessToken, body)
15+
16+
Create an ACO ad by uploading necessary ad creatives to the library. [Ad Aco Create](https://ads.tiktok.com/marketing_api/docs?id&#x3D;1739473063234626)
17+
18+
### Example
19+
```java
20+
// Import classes:
21+
//import business_api.ApiException;
22+
//import io.swagger.client.api.AdAcoApi;
23+
24+
25+
AdAcoApi apiInstance = new AdAcoApi();
26+
String accessToken = "accessToken_example"; // String | Authorized access token. For details, see [Authentication](https://ads.tiktok.com/marketing_api/docs?id=1738373164380162).
27+
AdAcoBody body = new AdAcoBody(); // AdAcoBody | Ad Aco update parameters.
28+
try {
29+
Response result = apiInstance.adAcoCreate(accessToken, body);
30+
System.out.println(result);
31+
} catch (ApiException e) {
32+
System.err.println("Exception when calling AdAcoApi#adAcoCreate");
33+
e.printStackTrace();
34+
}
35+
```
36+
37+
### Parameters
38+
39+
Name | Type | Description | Notes
40+
------------- | ------------- | ------------- | -------------
41+
**accessToken** | **String**| Authorized access token. For details, see [Authentication](https://ads.tiktok.com/marketing_api/docs?id&#x3D;1738373164380162). |[required]
42+
**body** | [**AdAcoBody**](AdAcoBody.md)| Ad Aco update parameters. | [optional]
43+
44+
### Return type
45+
46+
[**Response**](Response.md)
47+
48+
### Authorization
49+
50+
No authorization required
51+
52+
### HTTP request headers
53+
54+
- **Content-Type**: application/json
55+
- **Accept**: application/json
56+
57+
<a name="adAcoGet"></a>
58+
# **adAcoGet**
59+
> Response adAcoGet(advertiserId, adgroupIds, accessToken, excludeFieldTypesInResponse)
60+
61+
Get creative materials for an ACO ad, including call-to-actions, texts, ad names, images, or video materials. [Ad Aco Get](https://ads.tiktok.com/marketing_api/docs?id&#x3D;1739473020978177)
62+
63+
### Example
64+
```java
65+
// Import classes:
66+
//import business_api.ApiException;
67+
//import io.swagger.client.api.AdAcoApi;
68+
69+
70+
AdAcoApi apiInstance = new AdAcoApi();
71+
String advertiserId = "advertiserId_example"; // String | Advertiser ID.
72+
List<String> adgroupIds = Arrays.asList("adgroupIds_example"); // List<String> | A list of ad group IDs. Quantity- 1-100.
73+
String accessToken = "accessToken_example"; // String | Authorized access token. For details, see [Authentication](https://ads.tiktok.com/marketing_api/docs?id=1738373164380162).
74+
List<String> excludeFieldTypesInResponse = Arrays.asList("excludeFieldTypesInResponse_example"); // List<String> | The type of fields that you want to remove from the response.
75+
try {
76+
Response result = apiInstance.adAcoGet(advertiserId, adgroupIds, accessToken, excludeFieldTypesInResponse);
77+
System.out.println(result);
78+
} catch (ApiException e) {
79+
System.err.println("Exception when calling AdAcoApi#adAcoGet");
80+
e.printStackTrace();
81+
}
82+
```
83+
84+
### Parameters
85+
86+
Name | Type | Description | Notes
87+
------------- | ------------- | ------------- | -------------
88+
**advertiserId** | **String**| Advertiser ID. |[required]
89+
**adgroupIds** | [**List&lt;String&gt;**](String.md)| A list of ad group IDs. Quantity- 1-100. |[required]
90+
**accessToken** | **String**| Authorized access token. For details, see [Authentication](https://ads.tiktok.com/marketing_api/docs?id&#x3D;1738373164380162). |[required]
91+
**excludeFieldTypesInResponse** | [**List&lt;String&gt;**](String.md)| The type of fields that you want to remove from the response. | [optional]
92+
93+
### Return type
94+
95+
[**Response**](Response.md)
96+
97+
### Authorization
98+
99+
No authorization required
100+
101+
### HTTP request headers
102+
103+
- **Content-Type**: Not defined
104+
- **Accept**: application/json
105+
106+
<a name="adAcoMaterialStatusUpdate"></a>
107+
# **adAcoMaterialStatusUpdate**
108+
> Response adAcoMaterialStatusUpdate(accessToken, body)
109+
110+
Update the status of creative materials for an ACO ad, including ad texts, images, and video materials [Update materials](https://ads.tiktok.com/marketing_api/docs?id&#x3D;1739506701165570)
111+
112+
### Example
113+
```java
114+
// Import classes:
115+
//import business_api.ApiException;
116+
//import io.swagger.client.api.AdAcoApi;
117+
118+
119+
AdAcoApi apiInstance = new AdAcoApi();
120+
String accessToken = "accessToken_example"; // String | Authorized access token. For details, see [Authentication](https://ads.tiktok.com/marketing_api/docs?id=1738373164380162).
121+
MaterialStatusUpdateBody body = new MaterialStatusUpdateBody(); // MaterialStatusUpdateBody | Ad Aco material status body
122+
try {
123+
Response result = apiInstance.adAcoMaterialStatusUpdate(accessToken, body);
124+
System.out.println(result);
125+
} catch (ApiException e) {
126+
System.err.println("Exception when calling AdAcoApi#adAcoMaterialStatusUpdate");
127+
e.printStackTrace();
128+
}
129+
```
130+
131+
### Parameters
132+
133+
Name | Type | Description | Notes
134+
------------- | ------------- | ------------- | -------------
135+
**accessToken** | **String**| Authorized access token. For details, see [Authentication](https://ads.tiktok.com/marketing_api/docs?id&#x3D;1738373164380162). |[required]
136+
**body** | [**MaterialStatusUpdateBody**](MaterialStatusUpdateBody.md)| Ad Aco material status body | [optional]
137+
138+
### Return type
139+
140+
[**Response**](Response.md)
141+
142+
### Authorization
143+
144+
No authorization required
145+
146+
### HTTP request headers
147+
148+
- **Content-Type**: application/json
149+
- **Accept**: application/json
150+
151+
<a name="adAcoUpdate"></a>
152+
# **adAcoUpdate**
153+
> Response adAcoUpdate(accessToken, body)
154+
155+
Modify ACO ad creatives. [Update ACO](https://ads.tiktok.com/marketing_api/docs?id&#x3D;1739473077112833)
156+
157+
### Example
158+
```java
159+
// Import classes:
160+
//import business_api.ApiException;
161+
//import io.swagger.client.api.AdAcoApi;
162+
163+
164+
AdAcoApi apiInstance = new AdAcoApi();
165+
String accessToken = "accessToken_example"; // String | Authorized access token. For details, see [Authentication](https://ads.tiktok.com/marketing_api/docs?id=1738373164380162).
166+
AdAcoUpdateBody body = new AdAcoUpdateBody(); // AdAcoUpdateBody | Ad Aco update parameters
167+
try {
168+
Response result = apiInstance.adAcoUpdate(accessToken, body);
169+
System.out.println(result);
170+
} catch (ApiException e) {
171+
System.err.println("Exception when calling AdAcoApi#adAcoUpdate");
172+
e.printStackTrace();
173+
}
174+
```
175+
176+
### Parameters
177+
178+
Name | Type | Description | Notes
179+
------------- | ------------- | ------------- | -------------
180+
**accessToken** | **String**| Authorized access token. For details, see [Authentication](https://ads.tiktok.com/marketing_api/docs?id&#x3D;1738373164380162). |[required]
181+
**body** | [**AdAcoUpdateBody**](AdAcoUpdateBody.md)| Ad Aco update parameters | [optional]
182+
183+
### Return type
184+
185+
[**Response**](Response.md)
186+
187+
### Authorization
188+
189+
No authorization required
190+
191+
### HTTP request headers
192+
193+
- **Content-Type**: application/json
194+
- **Accept**: application/json
195+

java_sdk/docs/AdAcoBody.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# AdAcoBody
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**adgroupId** | **String** | Ad group ID. The ID should be of the ad group that you will enable Automated Creative Optimization for, and &#x60;creative_material_mode&#x60; for the ad group must be set as &#x60;DYNAMIC&#x60;. | [optional]
7+
**advertiserId** | **String** | Advertiser ID. |[required]
8+
**callToActionList** | [**List&lt;AdAcoBodyCallToActionList&gt;**](AdAcoBodyCallToActionList.md) | Call-to-action list. For TikTok ads, either this field or &#x60;call_to_action_id&#x60; must be specified. If both are specified, this field will be ignored. | [optional]
9+
**cardList** | [**List&lt;AdAcoBodyCardList&gt;**](AdAcoBodyCardList.md) | Card ID list. Length range- [0,1]. | [optional]
10+
**commonMaterial** | [**AdAcoBodyCommonMaterial**](AdAcoBodyCommonMaterial.md) | | [optional]
11+
**deeplinkList** | [**List&lt;AdAcoBodyDeeplinkList&gt;**](AdAcoBodyDeeplinkList.md) | List of open URLs. Length range- [0,1] | [optional]
12+
**displayNameList** | [**List&lt;AdAcoBodyDisplayNameList&gt;**](AdAcoBodyDisplayNameList.md) | Display names. | [optional]
13+
**landingPageUrls** | [**List&lt;AdAcoBodyLandingPageUrls&gt;**](AdAcoBodyLandingPageUrls.md) | Multiple landing page URLs. | [optional]
14+
**mediaInfoList** | [**List&lt;AdAcoBodyMediaInfoList&gt;**](AdAcoBodyMediaInfoList.md) | List of media information. | [optional]
15+
**pageList** | [**List&lt;AdAcoBodyPageList&gt;**](AdAcoBodyPageList.md) | Page ID list. | [optional]
16+
**avatarIconList** | [**List&lt;AdAcoBodyAvatarIconList&gt;**](AdAcoBodyAvatarIconList.md) | Avatar image list. | [optional]
17+
**titleList** | [**List&lt;AdAcoBodyTitleList&gt;**](AdAcoBodyTitleList.md) | List of ad titles (also called ad texts). Ad titles are shown to your audience as part of your ad creative, to deliver the message you intend to communicate to them. | [optional]
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# AdAcoBodyAvatarIcon
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**webUri** | **String** | ID of the avatar image. It can be uploaded through the Upload an image endpoint. | [optional]
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# AdAcoBodyAvatarIconList
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**avatarIcon** | [**AdAcoBodyAvatarIcon**](AdAcoBodyAvatarIcon.md) | | [optional]
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# AdAcoBodyCallToActionList
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**callToAction** | **String** | Call-to-action text. For enum values, see [Enumeration - Call-to-action](https://ads.tiktok.com/marketing_api/docs?id&#x3D;1737174886619138). | [optional]

java_sdk/docs/AdAcoBodyCardList.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# AdAcoBodyCardList
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**cardId** | **String** | Display Card ID, gift code card ID, premium badge ID, Countdown Sticker ID, or Download Card ID.&lt;ul&gt;&lt;li&gt; To learn about how to get a display card ID or download card ID, please see [Use Cards in Ads](https://ads.tiktok.com/marketing_api/docs?id&#x3D;1738963975941122).To learn about how to get a premium badge ID, see [Premium Add-ons](https://ads.tiktok.com/marketing_api/docs?id&#x3D;1749019676181505). Premium badges are only supported in R&amp;F ads.To learn about how to get a Countdown Sticker ID, see [Stickers](https://ads.tiktok.com/marketing_api/docs?id&#x3D;1749019667506177). | [optional]

0 commit comments

Comments
 (0)