文档中心 > API类目 > 万相台无界API

taobao.universalbp.new.creative.bind (绑定创意)

针对已有单元绑定创意

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
top_service_context TopServiceContext 必须 topServiceContext
  • └ biz_code
  • String
  • 必须
  • xxxxx
  • api业务线编码
  • └ login_type
  • Number
  • 可选
  • 1
  • 1: 直客(正常)登录 2: 代理直投(叉乘账号)
  • └ member_id
  • Number
  • 可选
  • 12345
  • 代理直投时被代理商家账号, 代理直投(叉乘)时必填。 直客 时也可以填入 memberId
  • └ ext
  • String
  • 可选
  • {}
  • 扩展内容, 暂时无用
creative_ref_command_list_v_o CreativeRefCommandListVO 必须 creativeRefCommandListVO
  • creative_ref_list
  • CreativeRefCommandVO []
  • 必须
  • 创意关联关系集合
  • └ campaign_id
  • Number
  • 可选
  • 68796878069
  • 计划id,计划已经存在场景必填
  • └ adgroup_id
  • Number
  • 可选
  • 68793666608
  • 单元id,单元已经存在场景必填
  • └ creative_id
  • Number
  • 可选
  • 6845715605
  • 创意id
  • └ creative_id_list
  • Number []
  • 可选
  • [739684500310001]
  • 创意id列表
  • └ add_main_pic_video
  • Boolean
  • 可选
  • true
  • 主图视频,true:是,false:否
  • └ add_auto_creative
  • Boolean
  • 可选
  • true
  • 增加智能创意,true:是,false:否
  • material_image_info_list
  • MaterialImageInfoVO []
  • 可选
  • 主副图素材
  • └ material_id
  • Number
  • 可选
  • 714616513841
  • 物料id
  • └ image_position
  • Number
  • 可选
  • 0
  • 主副图图片位置,主图0,副图从1开始
  • └ img_url
  • String
  • 可选
  • https://img.alicdn.com/bao/uploaded/i1/3838159498/O1CN013BTEpu2K28f5CkcgG_!!3838159498.jpg
  • 图片链接
  • └ link_url
  • String
  • 可选
  • http://item.taobao.com/item.htm?id=668800719012
  • 物料链接
  • └ material_name
  • String
  • 可选
  • 外投宝贝测试,请不要拍
  • 物料名称

响应参数

名称 类型 示例值 描述
top_result TopResult topResult
  • info
  • TopInfo
  • 通用前端结果的Info信息
  • 请求系统信息
  • └ ok
  • Boolean
  • true
  • 是否成功
  • └ message
  • String
  • 参数错误
  • 错误信息
  • └ error_code
  • String
  • xxxxx
  • 错误编码
  • creative_ref_result_v_o_top_part_data
  • TopPartData
  • 结果集
  • └ count
  • Number
  • 10
  • 成功数量
  • creative_ref_result_v_o_list
  • CreativeRefResultVO []
  • 批量成功结果集
  • └ campaign_id
  • Number
  • 68796878069
  • 计划id
  • └ adgroup_id
  • Number
  • 68793666608
  • 单元id
  • └ creative_id
  • Number
  • 6843262308
  • 创意id
  • └ reason
  • String
  • xxxxx
  • 失败原因
  • └ error_count
  • Number
  • 10
  • 失败数量
  • error_details
  • TopFailResult []
  • 失败结果集
  • └ code
  • String
  • xxxxx
  • 业务失败编码
  • └ msg
  • String
  • xxxxx
  • 业务失败原因

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
UniversalbpNewCreativeBindRequest req = new UniversalbpNewCreativeBindRequest();
UniversalbpNewCreativeBindRequest.TopServiceContext obj1 = new UniversalbpNewCreativeBindRequest.TopServiceContext();
obj1.setBizCode("xxxxx");
obj1.setLoginType(1L);
obj1.setMemberId(12345L);
obj1.setExt("{}");
req.setTopServiceContext(obj1);
UniversalbpNewCreativeBindRequest.CreativeRefCommandListVO obj2 = new UniversalbpNewCreativeBindRequest.CreativeRefCommandListVO();
List<UniversalbpNewCreativeBindRequest.CreativeRefCommandVO> list4 = new ArrayList<UniversalbpNewCreativeBindRequest.CreativeRefCommandVO>();
UniversalbpNewCreativeBindRequest.CreativeRefCommandVO obj5 = new UniversalbpNewCreativeBindRequest.CreativeRefCommandVO();
list4.add(obj5);
obj5.setCampaignId(68796878069L);
obj5.setAdgroupId(68793666608L);
obj5.setCreativeId(6845715605L);
obj5.setCreativeIdList(new Long[] { 739684500310001 };
);
obj5.setAddMainPicVideo(true);
obj5.setAddAutoCreative(true);
List<UniversalbpNewCreativeBindRequest.MaterialImageInfoVO> list8 = new ArrayList<UniversalbpNewCreativeBindRequest.MaterialImageInfoVO>();
UniversalbpNewCreativeBindRequest.MaterialImageInfoVO obj9 = new UniversalbpNewCreativeBindRequest.MaterialImageInfoVO();
list8.add(obj9);
obj9.setMaterialId(714616513841L);
obj9.setImagePosition(0L);
obj9.setImgUrl("https://img.alicdn.com/bao/uploaded/i1/3838159498/O1CN013BTEpu2K28f5CkcgG_!!3838159498.jpg");
obj9.setLinkUrl("http://item.taobao.com/item.htm?id=668800719012");
obj9.setMaterialName("外投宝贝测试,请不要拍");
list6.setMaterialImageInfoList(list8);
obj2.setCreativeRefList(list4);
req.setCreativeRefCommandListVO(obj2);
UniversalbpNewCreativeBindResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<universalbp_new_creative_bind_response>
    <top_result>
        <info>
            <ok>true</ok>
            <message>参数错误</message>
            <error_code>xxxxx</error_code>
        </info>
        <creative_ref_result_v_o_top_part_data>
            <count>10</count>
            <creative_ref_result_v_o_list>
                <creative_ref_result_v_o>
                    <campaign_id>68796878069</campaign_id>
                    <adgroup_id>68793666608</adgroup_id>
                    <creative_id>6843262308</creative_id>
                    <reason>xxxxx</reason>
                </creative_ref_result_v_o>
            </creative_ref_result_v_o_list>
            <error_count>10</error_count>
            <error_details>
                <top_fail_result>
                    <code>xxxxx</code>
                    <msg>xxxxx</msg>
                </top_fail_result>
            </error_details>
        </creative_ref_result_v_o_top_part_data>
    </top_result>
</universalbp_new_creative_bind_response>

异常示例

  • XML示例
  • JSON示例
<error_response>
    <code>50</code>
    <msg>Remote service error</msg>
    <sub_code>isv.invalid-parameter</sub_code>
    <sub_msg>非法参数</sub_msg>
</error_response>

错误码解释

错误码 错误描述 解决方案

API工具

如何获得此API

FAQ

返回
顶部