广告账户breakdowns数据

通过账号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>  ​                   
    }     
}
字段类型注释
idString广告账户ID
access_tokenString联系开发人员获取token,token是和公司主体绑定的
time_rangeObject
sinceString开始时间,YYYY-MM-DD
untilString结束时间,YYYY-MM-DD
fieldsList<String>查询的账户字段 eg[:’id’,’account_id’,’name’] 根据传入的字段返回相应字段值
limitInt最大值是200
sortString排序规则
req_headerObject
search_idString唯一标识一个请求

返回的结果:

{
    "resp_header": {
        "code": <Int> ,
        "message": <String> ,
        "search_id": <String>
    },
    "data": [{
        "account_id": <String> ,
        "spend": <String> ,
        "country": <String> ,
        …
    }]
}
字段类型注释
resp_headerObject
codeInt
messageString
search_idString
dataJsonArray
account_idString
spendString
countryString

错误编码:

编码注释
1001系统异常
1002id 不能为空
1003id 参数无效
1009fields 不能为空
1010fields 参数无效
1011Facebook API 请求超时
1015缺少时间范围相关参数或参数错误
1016时间范围的开始日期不能超过当前日期的37个月
1017total_postbacks 字段只能单独查询
1018缺少 breakdowns 参数或参数错误
1019sort 参数错误
1026limit最大值不能超过