taobao.smartpic.pictag.schedulepic.save (设置定时商品图)

设置定时商品图

公共参数

请求参数

名称 类型 是否必须 示例值 更多限制 描述
save_unit_request SaveUnitRequest 必须 请求
  • delivery_setting
  • DeliverySetting
  • 可选
  • 投放相关配置
  • └ start_time
  • Number
  • 可选
  • 1676898078000
  • start_time
  • └ end_time
  • Number
  • 可选
  • 1676898078000
  • end_time
  • └ item_id
  • Number
  • 可选
  • 123
  • item_id
  • src_pic_setting
  • SrcPicSetting
  • 可选
  • 原图相关配置
  • └ use_item_normal_src_pic
  • Boolean
  • 可选
  • false
  • 使用商品原图
  • └ size
  • String
  • 可选
  • 1:1
  • 尺寸
  • └ special_src_pic
  • String
  • 可选
  • https://gw.alicdn.com/imgextra/O1CN012JsWJzDjNUnyxS9_!!263669477-0-picasso.jpg
  • 自定义原图
  • └ ju_id
  • Number
  • 可选
  • 1234
  • ju_id
  • template_setting
  • TemplateSetting
  • 可选
  • 模版相关参数
  • decorate_pic_layer
  • PicTagLiteImageLayer
  • 可选
  • 装饰图层
  • └ rotate
  • String
  • 可选
  • 0.1
  • 旋转
  • └ image_url
  • String
  • 可选
  • https://gw.alicdn.com/imgextra/O1CN012JsWJzDjNUnyxS9_!!263669477-0-picasso.jpg
  • 链接
  • └ width
  • Number
  • 可选
  • 80
  • └ x
  • Number
  • 可选
  • 20
  • x
  • └ y
  • Number
  • 可选
  • 20
  • y
  • └ opacity
  • String
  • 可选
  • 0.1
  • 不透明
  • └ height
  • Number
  • 可选
  • 80
  • src_pic_layer
  • PicTagLiteImageLayer
  • 可选
  • 原图图层
  • └ rotate
  • String
  • 可选
  • 0.1
  • 旋转
  • └ width
  • Number
  • 可选
  • 80
  • └ x
  • Number
  • 可选
  • 20
  • x
  • └ y
  • Number
  • 可选
  • 20
  • y
  • └ opacity
  • String
  • 可选
  • 0.1
  • 不透明
  • └ height
  • Number
  • 可选
  • 80
  • price_layer
  • PriceDynamicLayer []
  • 可选
  • []
  • 价格图层
  • └ rotate
  • String
  • 可选
  • 0.1
  • 旋转
  • └ color
  • String
  • 可选
  • red
  • 颜色
  • └ text_align
  • String
  • 可选
  • center
  • 剧中
  • └ letter_spacing
  • String
  • 可选
  • 0.1
  • 间距
  • └ text_decoration
  • String
  • 可选
  • throuth
  • 装饰
  • └ text_type
  • String
  • 可选
  • fix
  • 自适应
  • └ font_style
  • String
  • 可选
  • font_style
  • font_family
  • └ font_family
  • String
  • 可选
  • font_family
  • 字体
  • └ decimal_font_size
  • Number
  • 可选
  • 8
  • 小数字号
  • └ width
  • Number
  • 可选
  • 80
  • └ x
  • Number
  • 可选
  • 20
  • x
  • └ y
  • Number
  • 可选
  • 20
  • y
  • └ font_size
  • Number
  • 可选
  • 10
  • 字号
  • └ line_height
  • Number
  • 可选
  • 10
  • 行高
  • └ opacity
  • String
  • 可选
  • 0.1
  • 不透明度
  • └ price_layer_kind
  • String
  • 可选
  • price
  • 价格图层类型
  • └ font_weight
  • String
  • 可选
  • bold
  • font_weight
  • └ direction
  • String
  • 可选
  • vertical
  • 文字方向
  • └ height
  • Number
  • 可选
  • 80
  • shadow
  • LayerEffectShadow
  • 可选
  • shadow
  • └ x
  • Number
  • 可选
  • 1
  • x
  • └ y
  • Number
  • 可选
  • 1
  • y
  • └ color
  • String
  • 可选
  • red
  • color
  • └ opacity
  • String
  • 可选
  • 0.1
  • opacity
  • └ blur
  • String
  • 可选
  • 0.1
  • blur
  • stroke
  • LayerEffectStroke
  • 可选
  • stroke
  • └ opacity
  • String
  • 可选
  • 0.1
  • opacity
  • └ color
  • String
  • 可选
  • red
  • color
  • └ type
  • String
  • 可选
  • center
  • type
  • └ width
  • Number
  • 可选
  • 2
  • width
  • └ id
  • Number
  • 可选
  • 123
  • 定时图id,不传新增
  • price_rule
  • PictagPriceRuleDTO
  • 可选
  • 价格规则
  • └ show_unit_price
  • Boolean
  • 可选
  • true
  • 使用单位价格
  • └ make_up_type
  • Number
  • 可选
  • 1
  • 凑单类型
  • └ sell_profit_string1
  • String
  • 可选
  • 123
  • 兜底文案第一行
  • └ sell_profit_string2
  • String
  • 可选
  • 123
  • 兜底文案第二行
  • └ unit_price_suffix
  • String
  • 可选
  • 单位价格后缀
  • └ make_up_num
  • Number
  • 可选
  • 2
  • 凑单件数
  • └ price_express_type
  • Number
  • 可选
  • 2
  • 价格计算类型
  • └ unit_price_count
  • Number
  • 可选
  • 10
  • 单位价格数
  • └ sku_id
  • Number
  • 可选
  • 123
  • sku_id
  • └ preview
  • Boolean
  • 可选
  • true
  • true

响应参数

名称 类型 示例值 描述
result Result 返回值
  • └ success
  • Boolean
  • true
  • 成功
  • └ msg_info
  • String
  • 系统繁忙
  • 错误信息
  • └ msg_code
  • String
  • PARAM_ERROR
  • 错误码
  • model
  • UnitVO4Isv
  • 单元
  • └ id
  • Number
  • 123
  • unitId
  • └ pic_url
  • String
  • https://img.alicdn.com/bao/uploaded/i1/2206339971229/O1CN010L9W1h1KwvXTL1Z5e_!!0-item_pic.jpg
  • 定时投放图片链接
  • └ condition_pics
  • String []
  • 特有人群条件图列表
  • └ start_time
  • Date
  • 2023-02-03 00:00:00
  • 开始时间
  • └ end_time
  • Date
  • 2023-02-03 00:00:00
  • 结束时间
  • └ status
  • Number
  • 21
  • 状态12 在线 21下线
  • └ op_status
  • Number
  • 1
  • 操作状态 -1异常 1 进行中 2已完成
  • └ op_result
  • String
  • 合图失败
  • 操作结果
  • └ src_pic_url
  • String
  • https://img.alicdn.com/bao/uploaded/i1/2206339971229/O1CN010L9W1h1KwvXTL1Z5e_!!0-item_pic.jpg
  • 原图链接
  • └ item_id
  • Number
  • 123
  • 商品id

请求示例

  • JAVA
  • .NET
  • PHP
  • CURL
  • Python
  • C/C++
  • NodeJS
TaobaoClient client = new DefaultTaobaoClient(url, appkey, secret);
SmartpicPictagSchedulepicSaveRequest req = new SmartpicPictagSchedulepicSaveRequest();
SmartpicPictagSchedulepicSaveRequest.SaveUnitRequest obj1 = new SmartpicPictagSchedulepicSaveRequest.SaveUnitRequest();
SmartpicPictagSchedulepicSaveRequest.DeliverySetting obj2 = new SmartpicPictagSchedulepicSaveRequest.DeliverySetting();
obj2.setStartTime(1676898078000L);
obj2.setEndTime(1676898078000L);
obj1.setDeliverySetting(obj2);
obj1.setItemId(123L);
SmartpicPictagSchedulepicSaveRequest.SrcPicSetting obj3 = new SmartpicPictagSchedulepicSaveRequest.SrcPicSetting();
obj3.setUseItemNormalSrcPic(false);
obj3.setSize("1:1");
obj3.setSpecialSrcPic("https://gw.alicdn.com/imgextra/O1CN012JsWJzDjNUnyxS9_!!263669477-0-picasso.jpg");
obj1.setSrcPicSetting(obj3);
obj1.setJuId(1234L);
SmartpicPictagSchedulepicSaveRequest.TemplateSetting obj4 = new SmartpicPictagSchedulepicSaveRequest.TemplateSetting();
SmartpicPictagSchedulepicSaveRequest.PicTagLiteImageLayer obj5 = new SmartpicPictagSchedulepicSaveRequest.PicTagLiteImageLayer();
obj5.setRotate("0.1");
obj5.setImageUrl("https://gw.alicdn.com/imgextra/O1CN012JsWJzDjNUnyxS9_!!263669477-0-picasso.jpg");
obj5.setWidth(80L);
obj5.setX(20L);
obj5.setY(20L);
obj5.setOpacity("0.1");
obj5.setHeight(80L);
obj4.setDecoratePicLayer(obj5);
SmartpicPictagSchedulepicSaveRequest.PicTagLiteImageLayer obj6 = new SmartpicPictagSchedulepicSaveRequest.PicTagLiteImageLayer();
obj6.setRotate("0.1");
obj6.setWidth(80L);
obj6.setX(20L);
obj6.setY(20L);
obj6.setOpacity("0.1");
obj6.setHeight(80L);
obj4.setSrcPicLayer(obj6);
List<SmartpicPictagSchedulepicSaveRequest.PriceDynamicLayer> list8 = new ArrayList<SmartpicPictagSchedulepicSaveRequest.PriceDynamicLayer>();
SmartpicPictagSchedulepicSaveRequest.PriceDynamicLayer obj9 = new SmartpicPictagSchedulepicSaveRequest.PriceDynamicLayer();
list8.add(obj9);
obj9.setRotate("0.1");
obj9.setColor("red");
obj9.setTextAlign("center");
obj9.setLetterSpacing("0.1");
obj9.setTextDecoration("throuth");
obj9.setTextType("fix");
obj9.setFontStyle("font_style");
obj9.setFontFamily("font_family");
obj9.setDecimalFontSize(8L);
obj9.setWidth(80L);
obj9.setX(20L);
obj9.setY(20L);
obj9.setFontSize(10L);
obj9.setLineHeight(10L);
obj9.setOpacity("0.1");
obj9.setPriceLayerKind("price");
obj9.setFontWeight("bold");
obj9.setDirection("vertical");
obj9.setHeight(80L);
SmartpicPictagSchedulepicSaveRequest.LayerEffectShadow obj11 = new SmartpicPictagSchedulepicSaveRequest.LayerEffectShadow();
obj11.setX(1L);
obj11.setY(1L);
obj11.setColor("red");
obj11.setOpacity("0.1");
obj11.setBlur("0.1");
list10.setShadow(obj11);
SmartpicPictagSchedulepicSaveRequest.LayerEffectStroke obj13 = new SmartpicPictagSchedulepicSaveRequest.LayerEffectStroke();
obj13.setOpacity("0.1");
obj13.setColor("red");
obj13.setType("center");
obj13.setWidth(2L);
list12.setStroke(obj13);
obj4.setPriceLayer(list8);
obj1.setTemplateSetting(obj4);
obj1.setId(123L);
SmartpicPictagSchedulepicSaveRequest.PictagPriceRuleDTO obj14 = new SmartpicPictagSchedulepicSaveRequest.PictagPriceRuleDTO();
obj14.setShowUnitPrice(true);
obj14.setMakeUpType(1L);
obj14.setSellProfitString1("123");
obj14.setSellProfitString2("123");
obj14.setUnitPriceSuffix("包");
obj14.setMakeUpNum(2L);
obj14.setPriceExpressType(2L);
obj14.setUnitPriceCount(10L);
obj14.setSkuId(123L);
obj1.setPriceRule(obj14);
obj1.setPreview(true);
req.setSaveUnitRequest(obj1);
SmartpicPictagSchedulepicSaveResponse rsp = client.execute(req, sessionKey);
System.out.println(rsp.getBody());

响应示例

  • XML示例
  • JSON示例
<smartpic_pictag_schedulepic_save_response>
    <result>
        <success>true</success>
        <msg_info>系统繁忙</msg_info>
        <msg_code>PARAM_ERROR</msg_code>
        <model>
            <id>123</id>
            <pic_url>https://img.alicdn.com/bao/uploaded/i1/2206339971229/O1CN010L9W1h1KwvXTL1Z5e_!!0-item_pic.jpg</pic_url>
            <start_time>2023-02-03 00:00:00</start_time>
            <end_time>2023-02-03 00:00:00</end_time>
            <status>21</status>
            <op_status>1</op_status>
            <op_result>合图失败</op_result>
            <src_pic_url>https://img.alicdn.com/bao/uploaded/i1/2206339971229/O1CN010L9W1h1KwvXTL1Z5e_!!0-item_pic.jpg</src_pic_url>
            <item_id>123</item_id>
        </model>
    </result>
</smartpic_pictag_schedulepic_save_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>

错误码解释

错误码 错误描述 解决方案
PARAM_ERROR 参数错误 调整参数

API工具

如何获得此API

FAQ

返回
顶部