王尘宇王尘宇

研究百度干SEO做推广变成一个被互联网搞的人

vivo广告推广平台:服务端API接口文档《NO.9》


7.标签组合管理

7.1 新增标签组合接口

接口说明

为应用方增加标签组合。 一个标签组合由多个标签组成。

访问方式


URL

编码方式

协议

method

Content-Type

/tagSegment/add

Utf-8

https

POST

application/json

Curl e.g.:   

curl -X POST   -H   'authToken:${your_auth_token}' -H     'Content-Type:application/json'  -d     '${your_request_body}' https://host:port/tagSegment/add

Request   body e.g.:

{

    "name":   "segment1",

          "expression":{

                   "notTags":["shenzhen"],

                  "andTags":[],

                  "orTags":[]

          }

}

Response body   e.g.:

http status   200:

{

         "result": 0,

         "desc": "成功",

}

业务异常:

{

         "result": xxx,

"desc":     "xxx"

}

http status   500:

Internet   server error!


接口定义


输入参数:


属性名字

类型

是否必填Y/N

描述

name

string

Y

标签组合名称

expression

JSON Object

Y

标签组合表达式:包含三种JSON数组:notTags表示非操作、andTags表示与操作,orTags表示或操作,例如:"tagExpression":{

                 "notTags":["琴","棋","书","画"],

                  "andTags":["深圳","广东"],

                  "orTags":["本科生","研究生"]

          }

可以表示为,不会琴、棋、书、画的广东省深圳市的本科生或研究生的所有用户。

当然这些标签需要先在平台或者接口创建后再使用。


输出参数:


属性名字

类型

描述

result

int

接口调用是否成功的状态码 0成功,非0失败

desc

string

文字描述接口调用情况


7.2 更新单个标签组合接口

接口说明

更新一个标签组合的信息

访问方式


URL

编码方式

协议

method

Content-Type

/tagSegment/update

Utf-8

https

POST

application/json

Curl e.g.:   

curl -X POST   -H   'authToken:${your_auth_token}' -H     'Content-Type:application/json'  -d '${your_request_body}'       https://host:port/tagSegment/update

Request   body e.g.:

{

           "oldName":"segment1",

           "newName":"segment2",

"expression":   {

                    "orTags": ["shenzhen"],

                    "andTags":     [],

                    "notTags": []

    }

}

Response body   e.g.:

http status   200:

{

    "result":   0,

    "desc":   "成功"

}

业务异常:

{

         "result": xxx,

"desc":     "xxx"

}

http status   500:

Internet   server error!


接口定义


输入参数:


属性名字

类型

是否必填Y/N

描述

oldName

string

Y

旧标签组合名称

newName

string

Y

新标签组合名称

expression

JSON Object

N

新标签组合表达式:包含三种JSON数组:notTags表示非操作、andTags表示与操作,orTags表示或操作,例如:"tagExpression":{

                 "notTags":["琴","棋","书","画"],

                  "andTags":["深圳","广东"],

                  "orTags":["本科生","研究生"]

          }

可以表示为,不会琴、棋、书、画的广东省深圳市的本科生或研究生的所有用户。

当然这些标签需要先在平台或者接口创建后再使用。


输出参数:


属性名字

类型

描述

result

int

接口调用是否成功的状态码 0成功,非0失败

desc

string

文字描述接口调用情况




相关文章

评论列表

发表评论:
验证码

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。