接口文档SDK业务专题开发者工具

新增推广计划否定词
全部接口
V1.1
loading

所属权限 Ads Management
请求地址 campaign_negativewords/add
请求方法 post

全局参数

全局参数是指每一个接口都需要使用到的参数。详情参考,代码案例参考

参数名称 参数类型
access_token 授权令牌,完成 OAuth 2.0 授权后获得,参考授权认证章节
timestamp

当前的时间戳,单位为秒,允许客户端请求最大时间误差为 300 秒。

MarketingAPI 所使用的时间戳,若无特殊说明,均为秒级时间戳

MarketingAPI 所使用的时区为 GMT+8,例如当时间戳为 1494840119 时,表示 2017-05-15 17:21:59

nonce 随机字串标识,不超过 32 个字符,由调用方自行生成,需保证全局唯一性
fields get 接口增加 fields 字段,用于指定返回参数的字段列表,为选填字段。fields 取值范围为 get 接口返回的 list 中的字段。如不填写,则根据默认值进行返回

请求参数

标有*的参数为必填项

名称 类型 描述
account_id*
integer 广告主帐号 id,有操作权限的帐号 id,不支持代理商 id
campaign_id*
int64 推广计划 id
phrase_negative_words*
string[] 短语否定词,每个否定词长度最小 1 个等宽字符,长度最大 20 等宽字符(即字段最大长度为 20 个中文字或全角标点,40 个英文字或半角标点。一个等宽字符等价于一个中文,等价于两个英文。)
数组最小长度 1,最大长度 800
字段长度最大 150 字节
exact_negative_words*
string[] 精确否定词,每个否定词长度最小 1 个等宽字符,长度最大 20 等宽字符(即字段最大长度为 20 个中文字或全角标点,40 个英文字或半角标点。一个等宽字符等价于一个中文,等价于两个英文。)
数组最小长度 1,最大长度 800
字段长度最大 150 字节

请求示例


curl 'https://api.e.qq.com/v1.1/campaign_negativewords/add?access_token=<ACCESS_TOKEN>&timestamp=<TIMESTAMP>&nonce=<NONCE>' \
-d 'account_id=<ACCOUNT_ID>' \
-d 'campaign_id=<CAMPAIGN_ID>' \
-d 'phrase_negative_words=[]' \
-d 'exact_negative_words=[]' 
					

应答字段

名称 类型 描述
campaign_id
int64 推广计划 id
status
enum 操作执行状态,OPER_FAIL,操作失败; OPER_SUCCESS,操作成功。只要有操作失败的词,就返回 OPER_FAIL,全部成功返回 OPER_SUCCESS,操作执行状态,[枚举详情]
duplicate_words
struct 否定词重复而导致失败的否定词列表,包括请求的否定词之间重复、请求的否定词和已有否定词重复、否定词和广告组中关键词重复等,否定词重复而导致失败的否定词列表
phrase_negative_words
string[] 短语否定词
exact_negative_words
string[] 精确否定词
exceed_length_words
struct 单个否定词长度超过限制导致失败的否定词列表
phrase_negative_words
string[] 短语否定词
exact_negative_words
string[] 精确否定词
exceed_limit_words
struct 超过否定词限定个数导致失败的否定词列表
phrase_negative_words
string[] 短语否定词
exact_negative_words
string[] 精确否定词
has_special_words
struct 含有特殊字符导致失败的否定词列表
phrase_negative_words
string[] 短语否定词
exact_negative_words
string[] 精确否定词
success_words
struct 操作成功的否定词列表
phrase_negative_words
string[] 短语否定词
exact_negative_words
string[] 精确否定词

应答示例

{
    "code": 0,
    "message": "",
    "message_cn": "",
    "data": {
        "campaign_id": "<CAMPAIGN_ID>",
        "duplicate_words": {
            "phrase_negative_words": [],
            "exact_negative_words": []
        },
        "exceed_length_words": {
            "phrase_negative_words": [],
            "exact_negative_words": []
        },
        "exceed_limit_words": {
            "phrase_negative_words": [],
            "exact_negative_words": []
        },
        "has_special_words": {
            "phrase_negative_words": [],
            "exact_negative_words": []
        },
        "success_words": {
            "phrase_negative_words": [],
            "exact_negative_words": []
        }
    }
}

可视化调试工具