广告素材列表
获取广告素材列表信息。
请求地址
https://openapi.aiclk.com/openapi/v1/material/get
所属权限
ads_read
请求方式
GET
请求参数
| 字段名 | 类型 | 是否必须 | 描述 |
|---|---|---|---|
| account_id | int | 是 | 广告主ID(广告投放平台的userID) |
| query | string | 是 | 请求参数结构,json格式,具体字段如下 |
query参数
| 字段名 | 类型 | 是否必须 | 描述 |
|---|---|---|---|
| material_id | array | 否 | 素材ID,示例:[55555,77777],不传时默认回去该账户下所有素材信息 |
| fields | array | 是 | 需要的返回字段,允许值:"account_id","material_id","material_name","material_status","material_type","remote_url","material_md5","audit_reason","width","height","duration","size","created_at" |
| page | int | 否 | 页数,默认为1 |
| page_size | int | 否 | 页面大小,默认为10,不大于100 |
| order_by | array | 否 | 排序,目前支持material_id排序,asc顺序,desc倒序 示例:[["material_id","desc"]] |
说明
接口默认过滤已删除的素材, 可以通过增加查询条件
"material_status":["PASSED", "DELETED", "UNDER_PASSING", "UN_PASSED"]
来查询所有状态的素材, 也可以指定查询指定状态的素材
query示例
{
"page": 1,
"page_size": 10,
"material_id": [
55555,
77777
],
"fields": [
"meterial_id",
"material_status",
"material_type"
],
}
请求示例
curl -X GET \
'https://openapi.aiclk.com/openapi/v1/material/get?account_id=1000002&query={"material_id":[11111,22222],"fields":["account_id","material_id","material_status","material_type","remote_url","material_md5","audit_reason"],"order_by":[["material_id","desc"]]}' \
-H 'OGW_ACCESS_TOKEN: your_access_token'
返回字段释义
| 字段名 | 类型 | 描述 |
|---|---|---|
| code | int | 返回码 |
| message | string | 返回信息 |
| data | json | 返回值,json格式,包含如下字段 |
| - list | json | 返回值,数据列表 |
| -- account_id | int | 广告主ID |
| -- material_id | int | 素材ID |
| -- material_name | int | 素材名称 |
| -- material_status | string | 素材状态,见<枚举值> |
| -- material_type | string | 素材类型,见<枚举值> |
| -- remote_url | string | 素材远程下载地址 |
| -- material_md5 | string | 素材md5值 |
| -- audit_reason | string | 审核原因 |
| -- video_poster_url | string | 视频封面地址 |
| -- width | int | 素材宽度 |
| -- height | int | 素材高度 |
| -- duration | int | 素材播放时长,单位(秒) |
| -- size | int | 素材大小 |
| -- created_at | string | 创建时间 |
| - page_info | json | 分页信息 |
| -- page | int | 页数 |
| -- page_size | int | 页面大小 |
| -- total_number | int | 总数 |
返回示例
{
"code": 200,
"message": "success",
"data": {
"list": [
{
"account_id": 235433,
"material_id": 343233,
"material_status": "UNDER_PASSING",
"material_type": "ANDROID_APP",
"remote_url": "http://www.xxx.com/video/1234.mp4",
"video_poster_url": "http://www.xxx.com/img/asd2123x0q2esrf.jpg",
"material_md5": "895daeb57d3eee78ce723a9d64307feb"
}
],
"page_info":{
"page": 1,
"page_size": 10,
"total_number": 2
}
}
}