根据日期范围以及账户ID(支持多个账号),批量获取账户每日的消耗,POST请求
POST /account_batch_insights HTTP/1.1
Host: /lb/api/v1/
请求参数:
{
"access_token": "你的token",
"req_header": {
"search_id": "test_1234"
},
"platform": 1,
"time_range": {
"since": "2026-10-19",
"until": "2026-11-02"
},
"account_ids": [
"123134223423",
"234234242344",
"345346453453"
]
}
| 字段 | 类型 | 注释 |
| platform | Short | 平台:1meta; 3google; 5tiktok |
| access_token | String | 联系开发人员获取token,token是和公司主体绑定的 |
| since | String | 开始时间(开始时间与结束时间最大间隔15天) |
| until | String | 结束时间(开始时间与结束时间最大间隔15天) |
| search_id | String | 唯一标识一个请求 |
| account_ids | list | 需要获取消耗的账户列表,一次最多50个 |
返回的结果:
{
{
"resp_header": {
"code": 1,
"message": "成功",
"search_id": "test_1234"
},
"data": [
{
"accountId": "123134223423",
"date": "2026-10-19",
"cost": 51.36
},
{
"accountId": "123134223423",
"date": "2026-10-20",
"cost": 48.91
}
]
}
}
| 字段 | 类型 | 注释 |
| resp_header | Object | |
| code | Int | 返回的编码,1:成功 |
| message | String | 返回提示信息 |
| search_id | String | 唯一标识一个请求 |
| accountId | String | 账户ID |
| date | String | 日期 |
| cost | decimal | 消耗 |
错误编码:
| 编码 | 注释 |
| 1001 | 系统异常 |
| 1047 | 单次批量查询时间范围最多不能超过15天 |
| 1048 | account_ids 不能为空 |
| 1049 | 单次批量查询最多支持50个账号 |