|
推广组服务 | 推广组服务(Restful)
更新推广推广组 ( 可批量 )
通过 updateCpcGrp() 方法,您可以更新除 cpcPlanId 、 cpcGrpId 、 status 之外的任何一个属性。在调用该方法前,您需要首先构造一个 CpcGrpType 对象。设置该对象的属性为您所需要的值,然后把该对象传递给 updateCpcGrp() 方法即可。如果您在一次请求中,不想更新某些属性 ( 如 cpcGrpName) ,可把这些属性置为 NULL 即可。服务器端会忽略属性值为 NULL 的更新。
请求方式:
POST(HTTPS)
请求地址:
SERVER_HOST/api/v2/cpcgrp/updateCpcGrp
请求参数体:
{
"body": {//
"cpcGrpTypes": [//
{
"cpcGrpId": 0,//
"cpcPlanId": 0,//
"cpcGrpName": "",//
"maxPrice": 0,//
"negativeWords": [],//
"exactNegativeWords": [],//
"pause": false,//
"status": 0,//
"opt": {}//
}
]
},
"header": {//
"adType": 1,//
"agentpassword": "",//
"agentusername": "",//
"apiusertype": "",//
"password": "",//
"token": "",//
"username": ""//
}
}
|
响应结果:
{
"data": {//
"cpcGrpTypes": [//
{
"cpcGrpId": 0,//
"cpcPlanId": 0,//
"cpcGrpName": "",//
"maxPrice": 0,//
"negativeWords": [],//
"exactNegativeWords": [],//
"pause": false,//
"status": 0,//
"opt": []//
}
]
},
// 公共响应
}
|
getCpcGrpIdByCpcPlanId
根据指定的计划 id 获取推广推广组 id
请求方式:
POST(HTTPS)
请求地址:
SERVER_HOST/api/v2/cpcgrp/getCpcGrpIdByCpcPlanId
请求参数体:
{
"body": {//
"cpcPlanIds": []//
},
"header": {//
"adType": 1,//
"agentpassword": "",//
"agentusername": "",//
"apiusertype": "",//
"password": "",//
"token": "",//
"username": ""//
}
}
|
响应结果:
{
"data": {//
"cpcPlanGrpIds": [//
{
"cpcPlanId": 0,//
"cpcGrpIds": []//
}
]
},
// 公共响应
}
|
getCpcGrpByCpcPlanId
根据指定的计划 id 获取推广推广组 ( 计划 id 可批量 ) 。
请求方式:
POST(HTTPS)
请求地址:
SERVER_HOST/api/v2/cpcgrp/getCpcGrpByCpcPlanId
请求参数体:
{
"body": {//
"cpcPlanIds": []//
},
"header": {//
"adType": 1,//
"agentpassword": "",//
"agentusername": "",//
"apiusertype": "",//
"password": "",//
"token": "",//
"username": ""//
}
}
|
响应结果:
{
"data": {//
"cpcPlanGrps": [//
{
"cpcPlanId": 0,//
"cpcGrpTypes": [//
{
"cpcGrpId": 0,//
"cpcPlanId": 0,//
"cpcGrpName": "",//
"maxPrice": 0,//
"negativeWords": [],//
"exactNegativeWords": [],//
"pause": false,//
"status": 0,//
"opt": []//
}
]
}
]
},
// 公共响应
}
|
getCpcGrpByCpcGrpId
根据指定的推广组 id 获取推广组 。
请求方式:
POST(HTTPS)
请求地址:
SERVER_HOST/api/v2/cpcgrp/getCpcGrpByCpcGrpId
请求参数体:
{
"body": {//
"cpcGrpIds": []//
},
"header": {//
"adType": 1,//
"agentpassword": "",//
"agentusername": "",//
"apiusertype": "",//
"password": "",//
"token": "",//
"username": ""//
}
}
|
响应结果:
{
"data": {//
"cpcGrpTypes": [//
{
"cpcGrpId": 0,//
"cpcPlanId": 0,//
"cpcGrpName": "",//
"maxPrice": 0,//
"negativeWords": [],//
"exactNegativeWords": [],//
"pause": false,//
"status": 0,//
"opt": []//
}
]
},
// 公共响应
}
|
getAllCpcGrpId
获取账户内的全部推广组 ID。
请求方式:
POST(HTTPS)
请求地址:
SERVER_HOST/api/v2/cpcgrp/getAllCpcGrpId
请求参数体:
{
"body": {},//
"header": {//
"adType": 1,//
"agentpassword": "",//
"agentusername": "",//
"apiusertype": "",//
"password": "",//
"token": "",//
"username": ""//
}
}
|
响应结果:
{
"data": {//
"cpcPlanGrpIds": [//
{
"cpcPlanId": 0,//
"cpcGrpIds": []//
}
]
},
// 公共响应
}
|
删除指定的推广组 ( 可批量 )
通过 deleteCpcGrp() 方法,您可以删除您账户下的一个或者多个推广组。推广组被删除后,其名下的关键词、创意数据均会被同时删除。
请求方式:
POST(HTTPS)
请求地址:
SERVER_HOST/api/v2/cpcgrp/deleteCpcGrp
请求参数体:
{
"body": {//
"cpcGrpIds": []//
},
"header": {//
"adType": 1,//
"agentpassword": "",//
"agentusername": "",//
"apiusertype": "",//
"password": "",//
"token": "",//
"username": ""//
}
}
|
响应结果:
{
"data": {//
"response": ""//
},
// 公共响应
}
|
新增推广组 ( 可批量 )
通过 addCpcGrp() 方法,您可以在您的账户下批量添加新的推广组。在调用该方法前,您首先需要构造 CpcGrpType 对象,并设置该对象的必要的属性。 ( 详情请见下面的 API 参考 ) 构造完成合适的 CpcGrpType 对象后,即可调用 addCpcGrp() 方法添加新的推广组到指定的推广计划中。 添加成功后,您可以获得新增推广组的 id ,此 id 全局唯一。您可以根据此 id 对推广组进行更新 / 删除操作。
请求方式:
POST(HTTPS)
请求地址:
SERVER_HOST/api/v2/cpcgrp/addCpcGrp
请求参数体:
{
"body": {//
"cpcGrpTypes": [//
{
"cpcGrpId": 0,//
"cpcPlanId": 0,//
"cpcGrpName": "",//
"maxPrice": 0,//
"negativeWords": [],//
"exactNegativeWords": [],//
"pause": false,//
"status": 0,//
"opt": {}//
}
]
},
"header": {//
"adType": 1,//
"agentpassword": "",//
"agentusername": "",//
"apiusertype": "",//
"password": "",//
"token": "",//
"username": ""//
}
}
|
响应结果:
{
"data": {//
"cpcGrpTypes": [//
{
"cpcGrpId": 0,//
"cpcPlanId": 0,//
"cpcGrpName": "",//
"maxPrice": 0,//
"negativeWords": [],//
"exactNegativeWords": [],//
"pause": false,//
"status": 0,//
"opt": {}//
}
]
},
// 公共响应
}
|
|