通过账号ID,时间范围,查询账号的breakdowns数据,GET请求
GET /account_insights_breakdowns HTTP/1.1
Host: /lb/api/v1/
请求参数:
{
"id": <String>,
"access_token": <String>,
"breakdowns":<String>,
"time_range":{
"since":<String>,
"until":<String>
},
"fields": List<String>,
"limit": <Int>,
"sort": <String>,
"req_header": {
"search_id": <String>
}
}
字段 | 类型 | 注释 |
id | String | 广告账户ID |
access_token | String | 联系开发人员获取token,token是和公司主体绑定的 |
time_range | Object | |
since | String | 开始时间,YYYY-MM-DD |
until | String | 结束时间,YYYY-MM-DD |
fields | List<String> | 查询的账户字段 eg[:’id’,’account_id’,’name’] 根据传入的字段返回相应字段值 |
limit | Int | 最大值是200 |
sort | String | 排序规则 |
req_header | Object | |
search_id | String | 唯一标识一个请求 |
返回的结果:
{
"resp_header": {
"code": <Int> ,
"message": <String> ,
"search_id": <String>
},
"data": [{
"account_id": <String> ,
"spend": <String> ,
"country": <String> ,
…
}]
}
字段 | 类型 | 注释 |
resp_header | Object | |
code | Int | |
message | String | |
search_id | String | |
data | JsonArray | |
account_id | String | |
spend | String | |
country | String | |
… |
错误编码:
编码 | 注释 |
1001 | 系统异常 |
1002 | id 不能为空 |
1003 | id 参数无效 |
1009 | fields 不能为空 |
1010 | fields 参数无效 |
1011 | Facebook API 请求超时 |
1015 | 缺少时间范围相关参数或参数错误 |
1016 | 时间范围的开始日期不能超过当前日期的37个月 |
1017 | total_postbacks 字段只能单独查询 |
1018 | 缺少 breakdowns 参数或参数错误 |
1019 | sort 参数错误 |
1026 | limit最大值不能超过 |