UD素材创建接口
名称 | 类型 | 是否必须 | 示例值 | 更多限制 | 描述 |
---|---|---|---|---|---|
request_id | String | 可选 | 1 | 请求id,用于幂等唯一key 本接口需向媒体侧提交任务耗时较长,因TOPAPI 5秒超时限制,可能会在任务执行中提示“超时”/“远程服务调用超时”/“重复请求”等报错,此时可以用相同的request_id进行幂等重试即可返回最新结果 | |
material_upload_top_dto | MaterialUploadTopDTO | 必须 | 素材信息 | ||
|
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
result | MaterialTopDTO | 素材详细信息 | |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret); UnideskRtaAssetsMaterialAddRequest req = new UnideskRtaAssetsMaterialAddRequest(); req.setRequestId( "1" ); UnideskRtaAssetsMaterialAddRequest.MaterialUploadTopDTO obj1 = new UnideskRtaAssetsMaterialAddRequest.MaterialUploadTopDTO(); obj1.setType(1L); obj1.setAdvertiserId(1L); obj1.setName( "素材名称" ); obj1.setMaterialUploadType(8L); obj1.setWidth(1080L); obj1.setHeight(540L); req.setMaterialUploadTopDto(obj1); UnideskRtaAssetsMaterialAddResponse rsp = client.execute(req, sessionKey); System.out.println(rsp.getBody()); |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | < unidesk_rta_assets_material_add_response > < result > < gmt_create >1661760507259</ gmt_create > < type >1</ type > < advertiser_id >1</ advertiser_id > < duration >1</ duration > < size >1</ size > < width >720</ width > < name >素材名称</ name > < id >v02033g10000catc8b3c77ua16dov</ id > < height >720</ height > < poster >https://ossgw.alicdn.com/creatives-assets/prod/feupload/user/6kutr/ecd30-f773-11ec-a587-e7614.mp4?x-oss-process=video/snapshot,t_0,w_720,h_1280</ poster > </ result > </ unidesk_rta_assets_material_add_response > |
1 2 3 4 5 6 | < error_response > < code >50</ code > < msg >Remote service error</ msg > < sub_code >isv.invalid-parameter</ sub_code > < sub_msg >非法参数</ sub_msg > </ error_response > |
错误码 | 错误描述 | 解决方案 |
---|