建议
GET accounts/:account_id/recommendations¶
状态:封闭测试版
检索与此广告账号相关的广告活动建议。目前,每种支付手段最多只能有 1 个建议。
资源 URL¶
https://ads-api.twitter.com/5/accounts/:account_id/recommendations
参数¶
名称 | 说明 |
---|---|
account_id 必需 |
所使用账号的标识符。出现在资源路径中,通常是所有广告商 API 请求的必要参数,不包含 GET accounts。指定账号必须与已验证的用户关联。 类型:string 示例: |
请求示例¶
GET https://ads-api.twitter.com/5/accounts/18ce54d4x5t/recommendations
响应示例¶
"request": {
"params": {
"account_id": "18ce54d4x5t"
}
},
"total_count": 1,
"data": [
{
"funding_instrument_id": "gpvzb",
"id": "62ce8zza1q0w",
"account_id": "18ce54d4x5t",
"status": "PENDING",
"message": "Recommendation for testing",
"created_at": "2016-11-14T23:07:54Z",
"updated_at": "2016-11-14T23:07:54Z"
}
]
GET accounts/:account_id/recommendations/:recommendation_id¶
状态:封闭测试版
检索与此广告账号相关的特定广告活动建议。
广告活动建议包含针对广告活动结构的全套更改建议,以对象树的形式显示。响应树应与批量 API 端点配合使用,但也可以根据情况映射到单个更新端点(POST 为创建,PUT 为更新,DELETE 为删除)。
资源 URL¶
https://ads-api.twitter.com/5/accounts/:account_id/recommendations/:recommendation_id
参数¶
名称 | 说明 |
---|---|
account_id 必需 |
所使用账号的标识符。出现在资源路径中,通常是所有广告商 API 请求的必要参数,不包含 GET accounts。指定账号必须与已验证的用户关联。 类型:string 示例: |
recommendation_id 必需 |
请求中对正在操作的建议 ID 的引用 类型:string 示例: |
请求示例¶
GET https://ads-api.twitter.com/5/accounts/18ce54d4x5t/recommendations/62ce8zza1q0w
响应示例¶
{
"request": {
"params": {
"recommendation_id": "62ce8zza1q0w",
"account_id": "18ce54d4x5t"
}
},
"data_type": "recommendations",
"data": {
"changes": [
{
"entity_type": "campaigns",
"params": {
"start_time": "2016-11-08T22:00:00Z",
"daily_budget_amount_local_micro": 2200000,
"end_time": "2016-11-16T07:59:00Z",
"total_budget_amount_local_micro": 12000000,
"id": "64m0d"
},
"operation_type": "Update",
"dependent_entities": [
{
"entity_type": "line_items",
"params": {
"name": "Campaign for recommendations",
"placements": [
"TWITTER_TIMELINE"
],
"bid_amount_local_micro": 1430000,
"id": "6f5kq",
"include_sentiment": "ALL"
},
"operation_type": "Update",
"dependent_entities": [
{
"entity_type": "targeting_criteria",
"params": {
"id": "a8po6p"
},
"operation_type": null,
"dependent_entities": []
},
{
"entity_type": "targeting_criteria",
"params": {
"line_item_id": "6f5kq",
"name": "election results",
"targeting_value": "election results",
"targeting_type": "PHRASE_KEYWORD"
},
"operation_type": "Create",
"dependent_entities": []
},
{
"entity_type": "promoted_tweets",
"params": {
"id": "101ftp"
},
"operation_type": "Delete",
"dependent_entities": []
},
{
"entity_type": "targeting_criteria",
"params": {
"line_item_id": "6f5kq",
"name": "Male",
"targeting_value": 1,
"targeting_type": "GENDER"
},
"operation_type": "Create",
"dependent_entities": []
},
{
"entity_type": "targeting_criteria",
"params": {
"line_item_id": "6f5kq",
"name": "San Francisco-Oakland-San Jose CA, US",
"targeting_value": "",
"targeting_type": "LOCATION"
},
"operation_type": "Create",
"dependent_entities": []
},
{
"entity_type": "promoted_tweets",
"params": {
"id": "101fto"
},
"operation_type": "Delete",
"dependent_entities": []
},
{
"entity_type": "promoted_tweets",
"params": {
"line_item_id": "6f5kq",
"display_properties": [],
"paused": false,
"approval_status": "ACCEPTED",
"tweet_id": "91125952589766656"
},
"operation_type": "Create",
"dependent_entities": []
},
{
"entity_type": "targeting_criteria",
"params": {
"line_item_id": "6f5kq",
"name": "Partner audience targeting",
"targeting_value": "v2cx",
"targeting_type": "NEGATIVE_BEHAVIOR"
},
"operation_type": "Create",
"dependent_entities": []
},
{
"entity_type": "targeting_criteria",
"params": {
"line_item_id": "6f5kq",
"name": "AGE_21_TO_34",
"targeting_value": "AGE_21_TO_34",
"targeting_type": "AGE"
},
"operation_type": "Create",
"dependent_entities": []
},
{
"entity_type": "targeting_criteria",
"params": {
"id": "a8po6o"
},
"operation_type": "Delete",
"dependent_entities": []
},
{
"entity_type": "promoted_tweets",
"params": {
"line_item_id": "6f5kq",
"display_properties": [],
"paused": false,
"approval_status": "ACCEPTED",
"tweet_id": "991101965843460096"
},
"operation_type": "Create",
"dependent_entities": []
},
{
"entity_type": "promoted_tweets",
"params": {
"line_item_id": "6f5kq",
"display_properties": [],
"paused": false,
"approval_status": "ACCEPTED",
"tweet_id": "991127212156096516"
},
"operation_type": "Create",
"dependent_entities": []
},
{
"entity_type": "targeting_criteria",
"params": {
"line_item_id": "6f5kq",
"name": "debate",
"targeting_value": "debate",
"targeting_type": "NEGATIVE_PHRASE_KEYWORD"
},
"operation_type": "Create",
"dependent_entities": []
},
{
"entity_type": "targeting_criteria",
"params": {
"line_item_id": "6f5kq",
"name": "60004, IL, US",
"targeting_value": "",
"targeting_type": "LOCATION"
},
"operation_type": "Create",
"dependent_entities": []
},
{
"entity_type": "targeting_criteria",
"params": {
"id": "a8po6n"
},
"operation_type": null,
"dependent_entities": []
},
{
"entity_type": "promoted_tweets",
"params": {
"id": "101ftn"
},
"operation_type": null,
"dependent_entities": []
}
]
}
]
}
],
"funding_instrument_id": "gpvzb",
"id": "62ce8zza1q0w",
"account_id": "18ce54d4x5t",
"status": "PENDING",
"message": "Recommendation for testing",
"created_at": "2016-11-14T23:07:54Z",
"updated_at": "2016-11-14T23:07:54Z"
}
}