可传尺寸查询


可传尺寸查询

HTTP请求方式

POST

请求地址

https://api.e.360.cn/mobile/advert/Sizes

Headers 请求参数
字段 类型 必须 描述
Content-Type string yes application/x-www-form-urlencoded
apiKey string yes 注册时分配到的api key,该参数作为HTTP HEAD字段传递。
accessToken string yes 访问token
Body 请求参数
字段 类型 必须 描述
solutions string yes JSON 格式的创意对象数组,单次请求提交数量最多 100 个
adverts示例
[
    {
        "solution_id":608562626,
        "creative_type":"native" 
    } ,
    {
        "solution_id":608562626,
        "creative_type":"multiimage" 
    } ,
    {
        "solution_id":60856262633,
        "creative_type":"multiimage" 
    } 
]
字段说明
字段 类型 必须 描述
solution_id int Yes 组id
creative_type string Yes 创意素材的类型:单图native、多图multiimage
请求示例
curl -X POST \ 
--header 'apiKey:APIKEY' \ 
--header 'accessToken:ACCESSTOKEN' \ 
--data 'solutions=[ { "solution_id":608562626, "creative_type":"native" } ,{ "solution_id":608562626, "creative_type":"multiimage" } ,{ "solution_id":60856262633, "creative_type":"multiimage" } ]' \ 
'https://api.e.360.cn/mobile/advert/Sizes'
返回结果
{
    "failures": [
        {
            "code": 1002006,
            "creative_type": "multiimage",
            "message": "solution_id无效",
            "solution_id": 60856262633
        }
    ],
    "success": [
        {
            "creative_type": "native",
            "data": {
                "all": {
                    "102": {
                        "ID": "102",
                        "default": "2",
                        "height": "90",
                        "size": "100",
                        "sizename": "728x90",
                        "type": "jpg,png",
                        "width": "728"
                    },
                    "11002": {
                        "ID": "11002",
                        "default": "2",
                        "height": "800",
                        "size": "100",
                        "sizename": "480x800",
                        "type": "jpg,png",
                        "width": "480"
                    }
                },
                "must": [
                    "728x90"
                ]
            },
            "solution_id": 608562626
        },
        {
            "creative_type": "multiimage",
            "data": {
                "all": {
                    "15444": {
                        "ID": "15444",
                        "default": "2",
                        "height": "210",
                        "size": "100",
                        "sizename": "324x210",
                        "type": "jpg,png",
                        "width": "324"
                    }
                },
                "must": [
                    "324x210"
                ]
            },
            "solution_id": 608562626
        }
    ]
}
返回结果说明
字段 类型 描述
success String 获取的图片尺寸信息
failures String 与传参solutions中json的顺序一致,如果插入失败,则返回对应的错误信息,如果成功,则返回空{}
返回结果success字段说明
字段 描述
solution_id 组id
creative_type 创意素材的类型
data.must 必填尺寸
data.all 所有可传尺寸列表
width宽、height高、size大小,单位kb、type图片类型
返回结果failures字段说明
字段 描述
solution_id 组id
creative_type 创意素材的类型
code 错误码
message 错误详情

results matching ""

    No results matching ""